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