home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / unix / amiga / 2431 < prev    next >
Encoding:
Internet Message Format  |  1992-11-17  |  1.6 KB

  1. Path: sparky!uunet!charon.amdahl.com!pacbell.com!decwrl!hal.com!olivea!spool.mu.edu!umn.edu!uum1!kksys.com!quest!digibd!kas!rhealey
  2. From: rhealey@kas.helios.mn.org (Rob Healey)
  3. Newsgroups: comp.unix.amiga
  4. Subject: gcc 2.3.1 fix to config/m68k.c
  5. Message-ID: <1992Nov15.121935.2047@kas.helios.mn.org>
  6. Date: 15 Nov 92 12:19:35 GMT
  7. Organization: Rob's home system, Hopkins, MN
  8. Lines: 32
  9.  
  10.  
  11.     Recently somebody reported problems compiling gcc 2.3.1 on AmigaUNIX,
  12.     turns out somebody messed up on the m68ksgs version of double
  13.     precision constant macros. The REAL fix is probably to correct the
  14.     macro to do the right thing, I'm too lazy to do that so I just
  15.     tweeked the m68k.c file around line 1612:
  16.  
  17.  
  18.   else if (GET_CODE (op) == CONST_DOUBLE && GET_MODE (op) != DImode)
  19.     {
  20.       double d;
  21.       union real_extract u;            <- added this definition
  22.       REAL_VALUE_FROM_CONST_DOUBLE (d, op);
  23.       u.d=d;                    <- added this assign
  24.       ASM_OUTPUT_DOUBLE_OPERAND (file, d);
  25.     }
  26.   else
  27.     {
  28.       asm_fprintf (file, "%0I"); output_addr_const (file, op);
  29.     }
  30.  
  31.     What happens is the ASM_OUTPUT_DOUBLE_OPERAND macro refers directly
  32.     to "union { double d; int i[2] } u" by using the reference u.i[0]
  33.     and u.i[1] even though the u variable is NOT defined within the macro.
  34.     The 2.2.2 code defined a u union at the same scope level as double d,
  35.     someone deleted this union but didn't reliase the ASM_OUTPUT_DOUBLE_OPERAND
  36.     still refered to the now nonexistant u union. The REAL fix is to fix the
  37.     ASM_OUTPUT_DOUBLE_OPERAND macro so that it breaks down the double
  38.     passed to it internally and not to rely on an external union to save
  39.     it's sorry keister...
  40.  
  41.     -Rob
  42.