This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [cli] Bug fix for 64-bit machines


Erven Rohou <erven.rohou@inria.fr> writes:

> Index: config/cil32/emit-cil.c
> ===================================================================
> --- config/cil32/emit-cil.c     (revision 156424)
> +++ config/cil32/emit-cil.c     (working copy)
> @@ -1560,6 +1560,10 @@
>
>             real_to_target (buf, &d, TYPE_MODE (type));
>             real_to_decimal (string, &d, sizeof (string), 0, 1);
> +           /* On 64-bit machines, we need to drop high 32 bits to print the
> +              value properly. real_to_target guarantees that only 32 bits are
> +              set, no matter the size of the host long.  */
> +           buf[1] &= 0xffffffffl;

Why do you need to mask out the top 32 bits when real_to_target was
supposed to clear them already?

Andreas.

-- 
Andreas Schwab, schwab@redhat.com
GPG Key fingerprint = D4E8 DBE3 3813 BB5D FA84  5EC7 45C6 250E 6F00 984E
"And now for something completely different."


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]