--- gcc/config/i386/next.h 2018/04/24 18:10:27 1.1.1.1 +++ gcc/config/i386/next.h 2018/04/24 18:31:00 1.1.1.3 @@ -1,5 +1,5 @@ /* Target definitions for GNU compiler for Intel x86 CPU running NeXTSTEP - Copyright (C) 1993 Free Software Foundation, Inc. + Copyright (C) 1993, 1995 Free Software Foundation, Inc. This file is part of GNU CC. @@ -15,7 +15,8 @@ GNU General Public License for more deta You should have received a copy of the GNU General Public License along with GNU CC; see the file COPYING. If not, write to -the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ +the Free Software Foundation, 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA. */ #include "i386/gas.h" #include "nextstep.h" @@ -38,20 +39,39 @@ the Free Software Foundation, 675 Mass A #undef VALUE_REGNO #define VALUE_REGNO(MODE) \ - (((MODE)==SFmode || (MODE)==DFmode) ? FIRST_FLOAT_REG : 0) + ((MODE) == SFmode || (MODE) == DFmode || (MODE) == XFmode \ + ? FIRST_FLOAT_REG : 0) /* 1 if N is a possible register number for a function value. */ #undef FUNCTION_VALUE_REGNO_P #define FUNCTION_VALUE_REGNO_P(N) ((N) == 0 || (N)== FIRST_FLOAT_REG) +#ifdef REAL_VALUE_TO_TARGET_LONG_DOUBLE +#undef ASM_OUTPUT_LONG_DOUBLE +#define ASM_OUTPUT_LONG_DOUBLE(FILE,VALUE) \ + do { \ + long hex[3]; \ + REAL_VALUE_TO_TARGET_LONG_DOUBLE (VALUE, hex); \ + if (sizeof (int) == sizeof (long)) \ + fprintf (FILE, "\t.long 0x%x\n\t.long 0x%x\n\t.long 0x%x\n", \ + hex[0], hex[1], hex[2]); \ + else \ + fprintf (FILE, "\t.long 0x%lx\n\t.long 0x%lx\n\t.long 0x%lx\n", \ + hex[0], hex[1], hex[2]); \ + } while (0) +#endif + #ifdef REAL_VALUE_TO_TARGET_DOUBLE #undef ASM_OUTPUT_DOUBLE #define ASM_OUTPUT_DOUBLE(FILE,VALUE) \ do { \ long hex[2]; \ REAL_VALUE_TO_TARGET_DOUBLE (VALUE, hex); \ - fprintf (FILE, "\t.long 0x%x\n\t.long 0x%x\n", hex[0], hex[1]); \ + if (sizeof (int) == sizeof (long)) \ + fprintf (FILE, "\t.long 0x%x\n\t.long 0x%x\n", hex[0], hex[1]); \ + else \ + fprintf (FILE, "\t.long 0x%lx\n\t.long 0x%lx\n", hex[0], hex[1]); \ } while (0) #endif @@ -63,7 +83,10 @@ the Free Software Foundation, 675 Mass A do { \ long hex; \ REAL_VALUE_TO_TARGET_SINGLE (VALUE, hex); \ - fprintf (FILE, "\t.long 0x%x\n", hex); \ + if (sizeof (int) == sizeof (long)) \ + fprintf (FILE, "\t.long 0x%x\n", hex); \ + else \ + fprintf (FILE, "\t.long 0x%lx\n", hex); \ } while (0) #endif @@ -110,7 +133,7 @@ the Free Software Foundation, 675 Mass A /* Names to predefine in the preprocessor for this target machine. */ #undef CPP_PREDEFINES -#define CPP_PREDEFINES "-Di386 -DNeXT -Dunix -D__MACH__ -D__LITTLE_ENDIAN__ -D__ARCHITECTURE__=\"i386\"" +#define CPP_PREDEFINES "-Di386 -DNeXT -Dunix -D__MACH__ -D__LITTLE_ENDIAN__ -D__ARCHITECTURE__=\"i386\" -Asystem(unix) -Asystem(mach) -Acpu(i386) -Amachine(i386)" /* This accounts for the return pc and saved fp on the i386. */ @@ -192,7 +215,7 @@ the Free Software Foundation, 675 Mass A rely on the callee to pop it. */ #undef RETURN_POPS_ARGS -#define RETURN_POPS_ARGS(FUNTYPE,SIZE) \ +#define RETURN_POPS_ARGS(FUNDECL,FUNTYPE,SIZE) \ (TREE_CODE (FUNTYPE) == IDENTIFIER_NODE \ ? 0 \ : (TARGET_RTD \