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]

PATCH (3.3.X): real.c cross 64bit -> 32bit portability


Gaby, OK to move to the 3.3 branch?  Bootstrapped/checked myself on
i386-unknown-freebsd4.9 without regression.  Fixes regression
introduced in 3.3 affecting i386_x64 -> i386 (which I can't personally
test) on at least how FreeBSD/i386_x64 configures itself.  Regards, Loren

2003-11-03  Alexander Kabaev  <ak03@gte.com>

	* real.c (encode_ieee_single): Ensure proper promotion.

Index: gcc/real.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/real.c,v
retrieving revision 1.105.2.3
diff -c -r1.105.2.3 real.c
*** gcc/real.c	2 Jul 2003 01:28:47 -0000	1.105.2.3
--- gcc/real.c	4 Nov 2003 11:27:22 -0000
***************
*** 2612,2620 ****
       const REAL_VALUE_TYPE *r;
  {
    unsigned long image, sig, exp;
    bool denormal = (r->sig[SIGSZ-1] & SIG_MSB) == 0;
  
!   image = r->sign << 31;
    sig = (r->sig[SIGSZ-1] >> (HOST_BITS_PER_LONG - 24)) & 0x7fffff;
  
    switch (r->class)
--- 2612,2621 ----
       const REAL_VALUE_TYPE *r;
  {
    unsigned long image, sig, exp;
+   unsigned long sign = r->sign;
    bool denormal = (r->sig[SIGSZ-1] & SIG_MSB) == 0;
  
!   image = sign << 31;
    sig = (r->sig[SIGSZ-1] >> (HOST_BITS_PER_LONG - 24)) & 0x7fffff;
  
    switch (r->class)


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