extract_bit_field patch for 64-bit machines.

Jeffrey A Law law@cygnus.com
Mon Oct 25 23:48:00 GMT 1999


  In message <199909230330.NAA00738@gluttony.geoffk.wattle.id.au>you write:
  > 
  > The following code was causing trouble on mips64-unknown-elf:
  > 
  > void something_f(float);
  > 
  > int foo(void)
  > {
  >   union
  >   {
  >     float f;
  >     double d;
  >   } u, *pu = &u;
  > 
  >   u.f = 1.0;
  >   something_f(u.f);
  > }
  > 
  > compiled with -O1.
  > 
  > The attached patch fixes it.  You can see the comment on line 1172 is
  > obviously wrong on all 64-bit machines with a 32-bit 'float' type.
  > 
  > OK to commit?
  > 
  > -- 
  > Geoffrey Keating <geoffk@cygnus.com>
  > 
  > ===File ~/patches/cygnus/tx49-egcs-union.patch==============
  > md5sum: 7546ab221c702d2e 62bb02144429aad8 278342
  > Index: egcs/gcc/ChangeLog
  > 0a
  > Fri Sep 17 21:30:33 1999  Geoffrey Keating  <geoffk@cygnus.com>
  > 
  > 	* expmed.c (extract_bit_field): Allow for the case of non-integer
  > 	objects that are smaller than a word (like SFmode on a 64-bit
  > 	machine).
Thanks.  I went ahead and committed the change and installed the testcase.

jeff



More information about the Gcc-patches mailing list