This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Re: Checking out PR4483 (constant overflow on PPC, problems compiling Linux kernel)
- From: kenner at vlsi1 dot ultra dot nyu dot edu (Richard Kenner)
- To: bosch at gnat dot com
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Sun, 2 Dec 01 06:01:33 EST
- Subject: Re: [PATCH] Re: Checking out PR4483 (constant overflow on PPC, problems compiling Linux kernel)
One of the reasons against it may be that *operations* need to know
the mode of their results. In this case, we have a PLUS operation in
SI mode. The compiler should know that information. What the mode of
the operand is does not really matter here. We have two mathematical
quantities x and y and we want to do a certain operation on them. This
operation can conceptually be separated in a mathematically exact part
(the familiar notion of +) and a rounding/truncating step. This is
similar to floating-point arithmetic.
Yes, this is what I was trying to say: thanks. Note, however, that the
analogy to FP breaks down here slightly because we *do* have modes for FP
constants. But the reason for that is that the *representation* differs
between modes, not the values.