GCC internals chapter 16.14

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dear GCC people,
Greetings!

Sorry to bother you with an idiotic question, but I might have
misunderstood something rather profoundly.

See GCC internals chapter 16.14 "Canonicalization of Instructions".
In item #4 of the list of canonicalizations, it is stated:
"(plus (mult (neg A) B) C) is canonicalized as (minus A (mult B C))."

Now, that looks a bit strange. Does that mean that
((-a) * b) + c)  is-equal-to  (a - (b * c))

because it doesn't seem that way if I substitute a=3, b=5, c=7 I get
((-3) * 5) + 7) = (-15 + 7) = -8  and
(3 - (5 * 7)) = (3 - (35)) = -32.

Am I getting something wrong? To be sure, I checked this with my soviet
made Elorg 801 LED calculator I bought from a flee-market at the price of
one euro.

Cheers,
Panu






[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux