parent
c5df463e3b
commit
f767bd6ef9
|
@ -0,0 +1,103 @@
|
|||
/* Target definitions for GNU compiler for mc680x0 running NeXTSTEP 2.1
|
||||
Copyright (C) 1989, 90, 91, 92, 93, 1994 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU CC.
|
||||
|
||||
GNU CC is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
GNU CC is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
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. */
|
||||
|
||||
/* Changed for NeXTStep2.1, Ch. Kranz, 2/94, 3/94 */
|
||||
|
||||
#include "m68k/next.h"
|
||||
#include "nextstep21.h"
|
||||
|
||||
/* for #include <mach.h> in libgcc2.c */
|
||||
#define NeXTStep21
|
||||
|
||||
#undef ASM_OUTPUT_DOUBLE
|
||||
#define ASM_OUTPUT_DOUBLE(FILE,VALUE) \
|
||||
do { if (REAL_VALUE_ISINF (VALUE)) \
|
||||
{ \
|
||||
if (REAL_VALUE_NEGATIVE (VALUE)) \
|
||||
fprintf (FILE, "#0r-99e999"); \
|
||||
else \
|
||||
fprintf (FILE, "#0r99e999"); \
|
||||
} \
|
||||
else \
|
||||
{ char dstr[30]; \
|
||||
REAL_VALUE_TO_DECIMAL ((VALUE), "%.20e", dstr); \
|
||||
fprintf (FILE, "\t.double 0r%s\n", dstr); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
/* This is how to output an assembler line defining a `float' constant. */
|
||||
#undef ASM_OUTPUT_FLOAT
|
||||
#define ASM_OUTPUT_FLOAT(FILE,VALUE) \
|
||||
do { if (REAL_VALUE_ISINF (VALUE)) \
|
||||
{ \
|
||||
if (REAL_VALUE_NEGATIVE (VALUE)) \
|
||||
fprintf (FILE, "\t.single 0r-99e999\n"); \
|
||||
else \
|
||||
fprintf (FILE, "\t.single 0r99e999\n"); \
|
||||
} \
|
||||
else \
|
||||
{ char dstr[30]; \
|
||||
REAL_VALUE_TO_DECIMAL ((VALUE), "%.20e", dstr); \
|
||||
fprintf (FILE, "\t.single 0r%s\n", dstr); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
/* called from m68k.c line 1881 */
|
||||
#undef ASM_OUTPUT_FLOAT_OPERAND
|
||||
#define ASM_OUTPUT_FLOAT_OPERAND(CODE,FILE,VALUE) \
|
||||
do{ \
|
||||
if (CODE != 'f') \
|
||||
{ \
|
||||
long l; \
|
||||
REAL_VALUE_TO_TARGET_SINGLE (VALUE, l); \
|
||||
if (sizeof (int) == sizeof (long)) \
|
||||
asm_fprintf ((FILE), "%I0x%x", l); \
|
||||
else \
|
||||
asm_fprintf ((FILE), "%I0x%lx", l); \
|
||||
} \
|
||||
else if (REAL_VALUE_ISINF (VALUE)) \
|
||||
{ \
|
||||
if (REAL_VALUE_NEGATIVE (VALUE)) \
|
||||
fprintf (FILE, "#0r-99e999"); \
|
||||
else \
|
||||
fprintf (FILE, "#0r99e999"); \
|
||||
} \
|
||||
else \
|
||||
{ char dstr[30]; \
|
||||
REAL_VALUE_TO_DECIMAL ((VALUE), "%.9g", dstr); \
|
||||
fprintf (FILE, "#0r%s", dstr); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#undef ASM_OUTPUT_DOUBLE_OPERAND
|
||||
#define ASM_OUTPUT_DOUBLE_OPERAND(FILE,VALUE) \
|
||||
do { if (REAL_VALUE_ISINF (VALUE)) \
|
||||
{ \
|
||||
if (REAL_VALUE_NEGATIVE (VALUE)) \
|
||||
fprintf (FILE, "#0r-99e999"); \
|
||||
else \
|
||||
fprintf (FILE, "#0r99e999"); \
|
||||
} \
|
||||
else \
|
||||
{ char dstr[30]; \
|
||||
REAL_VALUE_TO_DECIMAL ((VALUE), "%.20g", dstr); \
|
||||
fprintf (FILE, "#0r%s", dstr); \
|
||||
} \
|
||||
} while (0)
|
||||
|
|
@ -0,0 +1,64 @@
|
|||
/* nextstep.h -- operating system specific defines to be used when
|
||||
targeting GCC for NeXTSTEP.
|
||||
Copyright (C) 1989, 1990, 1991, 1992, 1993 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU CC.
|
||||
|
||||
GNU CC is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
GNU CC is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
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. */
|
||||
|
||||
|
||||
/* changed for NeXTStep 2.1, Ch. Kranz, 2/94, 3/94 */
|
||||
#include "nextstep.h"
|
||||
|
||||
/* set flag_gnu_linker=0, use collect2 for linking */
|
||||
#undef USE_COLLECT2
|
||||
#define USE_COLLECT2
|
||||
|
||||
/* use this until a newer gdb for NeXTStep21 is availible */
|
||||
#define DEFAULT_GDB_EXTENSIONS 0
|
||||
|
||||
/* we need the call to __main to start all global destructors and constructors
|
||||
correctly, so undef INIT_SECTION_ASM_OP, (see libgcc2.c line 1965)
|
||||
and define INVOKE_main */
|
||||
#undef INIT_SECTION_ASM_OP
|
||||
#define INVOKE__main
|
||||
|
||||
/* We call the global destructors, constructors from __main */
|
||||
#undef ASM_OUTPUT_CONSTRUCTOR
|
||||
#undef ASM_OUTPUT_DESTRUCTOR
|
||||
|
||||
#undef ASM_FILE_END
|
||||
#define ASM_FILE_END(FILE) \
|
||||
do { \
|
||||
extern char *language_string; \
|
||||
if (strcmp (language_string, "GNU C++") == 0) \
|
||||
{ \
|
||||
ASM_OUTPUT_ALIGN (FILE, 1); \
|
||||
} \
|
||||
} while (0)
|
||||
/* deleted: destructor_section (); \ */
|
||||
/* deleted: constructor_section (); \ */
|
||||
|
||||
/* Ensure correct alignment of bss data. */
|
||||
/* ASM_OUTPUT_ALIGNED_LOCAL not needed */
|
||||
/* need ASM_OUTPUT_LOCAL instead for old NeXT-as */
|
||||
/* look in varasm.c, line 1062 and 1476 */
|
||||
#undef ASM_OUTPUT_ALIGNED_LOCAL
|
||||
#undef ASM_OUTPUT_LOCAL
|
||||
#define ASM_OUTPUT_LOCAL(FILE, NAME, SIZE, ROUNDED) \
|
||||
( fputs (".lcomm ", (FILE)), \
|
||||
assemble_name ((FILE), (NAME)), \
|
||||
fprintf ((FILE), ",%u\n", (ROUNDED)))
|
||||
|
Loading…
Reference in New Issue