diff options
-rw-r--r-- | gcc/ChangeLog | 49 | ||||
-rw-r--r-- | gcc/config.gcc | 51 | ||||
-rw-r--r-- | gcc/config/netbsd.h | 3 | ||||
-rw-r--r-- | gcc/config/sparc/aout.h | 81 | ||||
-rw-r--r-- | gcc/config/sparc/linux-aout.h | 1 | ||||
-rw-r--r-- | gcc/config/sparc/linux64.h | 1 | ||||
-rw-r--r-- | gcc/config/sparc/litecoff.h | 28 | ||||
-rw-r--r-- | gcc/config/sparc/lynx.h | 3 | ||||
-rw-r--r-- | gcc/config/sparc/netbsd.h | 1 | ||||
-rw-r--r-- | gcc/config/sparc/openbsd.h | 2 | ||||
-rw-r--r-- | gcc/config/sparc/sol2-sld-64.h | 4 | ||||
-rw-r--r-- | gcc/config/sparc/sol2.h | 2 | ||||
-rw-r--r-- | gcc/config/sparc/sp64-aout.h | 3 | ||||
-rw-r--r-- | gcc/config/sparc/sp64-elf.h | 2 | ||||
-rw-r--r-- | gcc/config/sparc/sparc.h | 81 | ||||
-rw-r--r-- | gcc/config/sparc/splet.h | 2 | ||||
-rw-r--r-- | gcc/config/sparc/sun4o3.h | 3 | ||||
-rw-r--r-- | gcc/config/sparc/sunos4.h | 5 | ||||
-rw-r--r-- | gcc/config/sparc/sysv4.h | 16 | ||||
-rw-r--r-- | gcc/config/sparc/vxsim.h | 3 |
20 files changed, 205 insertions, 136 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 44c54091de0..b945ef488be 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,52 @@ +2001-11-14 David O'Brien <obrien@FreeBSD.org> + + * config.gcc (sparc64-wrs-vxworks*, sparc-*-netbsd*, sparc-*-openbsd*, + sparc-*-chorusos*, sparc-*-elf*, sparc-*-linux*aout*, + sparc-*-linux*libc1*, sparc-*-linux*, sparc-*-lynxos*, sparc-*-rtems*, + sparc-*-rtemself*, sparc-hal-solaris2*, sparc-*-solaris2*, + sparc-*-sunos4.0*, sparc-*-sunos4*, sparc-*-sunos3*, sparc-*-sysv4*, + sparc-*-vxsim*, sparclite-*-aout*, sparclite-*-elf*, sparc86x-*-aout*, + sparc86x-*-elf*, sparc64-*-aout*, sparc64-*-elf*, sparc64-*-linux*): + Include various CPU headers via tm_file. a.out based platforms now + properly include sparc/aout.h. sol2.h usage now implies including + elfos.h, svr4.h, and sparc/sysv4.h. + * config/netbsd.h (TARGET_MEM_FUNCTIONS): Undef before defining it. + Also define to '1'. + * sparc/sparc.h (CPP_PREDEFINES, TARGET_VERSION, WORD_SWITCH_TAKES_ARG, + SELECT_SECTION, ASM_DECLARE_FUNCTION_NAME, TEXT_SECTION_ASM_OP, + DATA_SECTION_ASM_OP, DBX_REGISTER_NUMBER, ASM_OUTPUT_SOURCE_LINE): + Remove. They are a.out specific and belong in sparc/aout.h. + * sparc/aout.h (TARGET_VERSION, WORD_SWITCH_TAKES_ARG, SELECT_SECTION, + ASM_DECLARE_FUNCTION_NAME, TEXT_SECTION_ASM_OP, DATA_SECTION_ASM_OP, + DBX_REGISTER_NUMBER, ASM_OUTPUT_SOURCE_LINE): Define. Moved here from + sparc/sparc.h. + * sparc/litecoff.h (WORD_SWITCH_TAKES_ARG, ASM_DECLARE_FUNCTION_NAME, + TEXT_SECTION_ASM_OP, DATA_SECTION_ASM_OP, DBX_REGISTER_NUMBER): Define. + Moved here from sparc/sparc.h. + * config/sparc/linux-aout.h (DEFAULT_PCC_STRUCT_RETURN): Undef before + defining. + * config/sparc/linux64.h (UNALIGNED_DOUBLE_INT_ASM_OP): Undef before + * config/sparc/lynx.h: Don't include lynx.h. + (SELECT_SECTION): Do not undef. + * config/sparc/openbsd.h: Don't include sparc/sparc.h. + * config/sparc/sol2-sld-64.h: Include sparc/sparc.h, elfos.h, svr4.h, + and sparc/sysv4.h. + * config/sparc/sol2.h: Don't include sparc/sparc.h and sparc/sysv4.h. + * config/sparc/sp64-aout.h (CPP_PREDEFINES): Don't define. Get from + sparc/aout.h now. + * config/sparc/sp64-elf.h (DWARF_DEBUGGING_INFO, DWARF2_DEBUGGING_INFO): + Don't undef, there is no need. + * config/sparc/splet.h (CPP_PREDEFINES): Define. + * config/sparc/sun4o3.h (CPP_PREDEFINES): Likewise. + * config/sparc/sunos4.h (CPP_PREDEFINES): Likewise. + Don't include sparc/sparc.h. + * config/sparc/sysv4.h (WORD_SWITCH_TAKES_ARG, ASM_OUTPUT_SOURCE_LINE, + SELECT_SECTION, ASM_DECLARE_FUNCTION_NAME, TEXT_SECTION_ASM_OP, + DATA_SECTION_ASM_OP): Don't undef, there is no need now. Don't include + elfos.h and svr4.h. + (TARGET_VERSION): Define. + * config/sparc/vxsim.h (TARGET_VERSION): Define. + Wed Nov 14 19:46:08 CET 2001 Jan Hubicka <jh@suse.cz> * cfglayout.c (fixup_fallthru_exit_predecesor): New static function. diff --git a/gcc/config.gcc b/gcc/config.gcc index 29029738b08..de4031cd166 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -2905,7 +2905,7 @@ sparc-tti-*) xm_defines=POSIX ;; sparc64-wrs-vxworks*) - tm_file="sparc/sol2.h sparc/elf.h sparc/sparc_bi.h gofast.h sparc/vxsparc64.h" + tm_file="${tm_file} elfos.h svr4.h sparc/sysv4.h sparc/sol2.h sparc/elf.h sparc/sparc_bi.h gofast.h sparc/vxsparc64.h" tmake_file=sparc/t-vxsparc64 use_collect2=yes ;; @@ -2920,11 +2920,12 @@ sparc-*-aout*) tm_file="sparc/sparc.h aoutos.h sparc/aout.h libgloss.h" ;; sparc-*-netbsd*) - tm_file="${tm_file} netbsd.h sparc/netbsd.h" + tm_file="${tm_file} sparc/aout.h netbsd.h sparc/netbsd.h" tmake_file=t-netbsd use_collect2=yes ;; sparc-*-openbsd*) + tm_file="sparc/sparc.h ${tm_file}" # needed to unconfuse gdb tmake_file="t-libc-ok t-openbsd sparc/t-openbsd" # we need collect2 until our bug is fixed... @@ -2934,7 +2935,7 @@ sparc-*-bsd*) tm_file="${tm_file} sparc/bsd.h" ;; sparc-*-chorusos*) - tm_file="${tm_file} sparc/sysv4.h sparc/sol2.h sparc/elf.h chorus.h" + tm_file="${tm_file} elfos.h svr4.h sparc/sysv4.h sparc/sol2.h sparc/elf.h chorus.h" tmake_file=sparc/t-chorus-elf extra_parts="crti.o crtn.o crtbegin.o crtend.o" float_format=i64 @@ -2945,20 +2946,20 @@ sparc-*-chorusos*) esac ;; sparc-*-elf*) - tm_file="sparc/sol2.h sparc/elf.h" + tm_file="${tm_file} elfos.h svr4.h sparc/sysv4.h sparc/sol2.h sparc/elf.h" tmake_file=sparc/t-elf extra_parts="crti.o crtn.o crtbegin.o crtend.o" #float_format=i128 float_format=i64 ;; sparc-*-linux*aout*) # Sparc's running GNU/Linux, a.out - tm_file="aoutos.h sparc/sparc.h sparc/linux-aout.h" + tm_file="aoutos.h sparc/sparc.h sparc/aout.h sparc/linux-aout.h" xmake_file=x-linux gnu_ld=yes ;; sparc-*-linux*libc1*) # Sparc's running GNU/Linux, libc5 xmake_file=x-linux - tm_file="${tm_file} sparc/sysv4.h sparc/linux.h" + tm_file="${tm_file} elfos.h svr4.h sparc/sysv4.h sparc/linux.h" tmake_file="t-slibgcc-elf-ver t-linux t-linux-gnulibc1" extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o" gnu_ld=yes @@ -2966,7 +2967,7 @@ sparc-*-linux*libc1*) # Sparc's running GNU/Linux, libc5 ;; sparc-*-linux*) # Sparc's running GNU/Linux, libc6 xmake_file=x-linux - tm_file="${tm_file} sparc/sysv4.h sparc/linux.h" + tm_file="${tm_file} elfos.h svr4.h sparc/sysv4.h sparc/linux.h" tmake_file="t-slibgcc-elf-ver t-linux" extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o" gnu_ld=yes @@ -2978,9 +2979,9 @@ sparc-*-linux*) # Sparc's running GNU/Linux, libc6 sparc-*-lynxos*) if test x$gas = xyes then - tm_file="${tm_file} sparc/lynx.h" + tm_file="${tm_file} lynx.h sparc/aout.h sparc/lynx.h" else - tm_file="${tm_file} lynx-ng.h sparc/lynx-ng.h" + tm_file="${tm_file} lynx-ng.h sparc/aout.h sparc/lynx-ng.h" fi tmake_file=sparc/t-sunos41 ;; @@ -2992,7 +2993,7 @@ sparc-*-rtemsaout*) fi ;; sparc-*-rtems*|sparc-*-rtemself*) - tm_file="sparc/sol2.h sparc/elf.h sparc/rtemself.h rtems.h" + tm_file="${tm_file} elfos.h svr4.h sparc/sysv4.h sparc/sol2.h sparc/elf.h sparc/rtemself.h rtems.h" tmake_file="sparc/t-elf t-rtems" extra_parts="crti.o crtn.o crtbegin.o crtend.o" #float_format=i128 @@ -3033,7 +3034,7 @@ sparcv9-*-solaris2* | sparc64-*-solaris2*) ;; sparc-hal-solaris2*) xm_defines=POSIX - tm_file="sparc/sol2.h sparc/hal.h" + tm_file="${tm_file} elfos.h svr4.h sparc/sysv4.h sparc/sol2.h sparc/hal.h" tmake_file="sparc/t-halos sparc/t-sol2" if test x$gnu_ld = xyes; then tmake_file="$tmake_file t-slibgcc-elf-ver" @@ -3054,9 +3055,9 @@ sparc-hal-solaris2*) sparc-*-solaris2*) if test x$gnu_ld = xyes then - tm_file="sparc/sol2.h" + tm_file="${tm_file} elfos.h svr4.h sparc/sysv4.h sparc/sol2.h" else - tm_file="sparc/sol2.h sparc/sol2-sld.h" + tm_file="${tm_file} elfos.h svr4.h sparc/sysv4.h sparc/sol2.h sparc/sol2-sld.h" fi xm_defines=POSIX tmake_file=sparc/t-sol2 @@ -3101,11 +3102,11 @@ sparc-*-solaris2*) fi ;; sparc-*-sunos4.0*) - tm_file=sparc/sunos4.h + tm_file="${tm_file} sparc/aout.h sparc/sunos4.h" use_collect2=yes ;; sparc-*-sunos4*) - tm_file=sparc/sunos4.h + tm_file="${tm_file} sparc/aout.h sparc/sunos4.h" tmake_file=sparc/t-sunos41 use_collect2=yes if test x$gas = xyes; then @@ -3113,18 +3114,18 @@ sparc-*-sunos4*) fi ;; sparc-*-sunos3*) - tm_file="${tm_file} sparc/sun4o3.h" + tm_file="${tm_file} sparc/aout.h sparc/sun4o3.h" use_collect2=yes ;; sparc-*-sysv4*) - tm_file="${tm_file} sparc/sysv4.h" + tm_file="${tm_file} elfos.h svr4.h sparc/sysv4.h" xm_defines=POSIX tmake_file=t-svr4 extra_parts="crtbegin.o crtend.o" ;; sparc-*-vxsim*) xm_defines=POSIX - tm_file="${tm_file} sparc/sysv4.h sparc/vxsim.h" + tm_file="${tm_file} elfos.h svr4.h sparc/sysv4.h sparc/vxsim.h" tmake_file=sparc/t-vxsparc ;; sparclet-*-aout*) @@ -3136,33 +3137,33 @@ sparclite-*-coff*) tmake_file=sparc/t-sparclite ;; sparclite-*-aout*) - tm_file="${tm_file} gofast.h sparc/lite.h aoutos.h libgloss.h" + tm_file="${tm_file} gofast.h sparc/aout.h sparc/lite.h aoutos.h libgloss.h" tmake_file=sparc/t-sparclite ;; sparclite-*-elf*) - tm_file="sparc/sol2.h sparc/elf.h gofast.h sparc/liteelf.h" + tm_file="${tm_file} elfos.h svr4.h sparc/sysv4.h sparc/sol2.h sparc/elf.h gofast.h sparc/liteelf.h" tmake_file=sparc/t-sparclite extra_parts="crtbegin.o crtend.o" ;; sparc86x-*-aout*) - tm_file="${tm_file} gofast.h sparc/sp86x-aout.h aoutos.h libgloss.h" + tm_file="${tm_file} gofast.h sparc/aout.h sparc/sp86x-aout.h aoutos.h libgloss.h" tmake_file=sparc/t-sp86x ;; sparc86x-*-elf*) - tm_file="sparc/sol2.h sparc/elf.h gofast.h sparc/sp86x-elf.h" + tm_file="${tm_file} elfos.h svr4.h sparc/sysv4.h sparc/sol2.h sparc/elf.h gofast.h sparc/sp86x-elf.h" tmake_file=sparc/t-sp86x extra_parts="crtbegin.o crtend.o" ;; sparc64-*-aout*) - tm_file="sparc/sparc.h aoutos.h sparc/sp64-aout.h" + tm_file="sparc/sparc.h aoutos.h sparc/aout.h sparc/sp64-aout.h" ;; sparc64-*-elf*) - tm_file="sparc/sol2.h sparc/sp64-elf.h" + tm_file="${tm_file} elfos.h svr4.h sparc/sysv4.h sparc/sol2.h sparc/sp64-elf.h" extra_parts="crtbegin.o crtend.o" ;; sparc64-*-linux*) # 64-bit Sparc's running GNU/Linux tmake_file="t-slibgcc-elf-ver t-linux sparc/t-linux64" - tm_file="sparc/sparc_bi.h ${tm_file} sparc/sysv4.h sparc/linux64.h" + tm_file="sparc/sparc_bi.h ${tm_file} elfos.h svr4.h sparc/sysv4.h sparc/linux64.h" xmake_file=x-linux extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o" gnu_ld=yes diff --git a/gcc/config/netbsd.h b/gcc/config/netbsd.h index d8b23e02a18..b76e747c50c 100644 --- a/gcc/config/netbsd.h +++ b/gcc/config/netbsd.h @@ -68,7 +68,8 @@ /* Implicit library calls should use memcpy, not bcopy, etc. */ -#define TARGET_MEM_FUNCTIONS +#undef TARGET_MEM_FUNCTIONS +#define TARGET_MEM_FUNCTIONS 1 /* Handle #pragma weak and #pragma pack. */ diff --git a/gcc/config/sparc/aout.h b/gcc/config/sparc/aout.h index 217430eeb82..fd84d75244b 100644 --- a/gcc/config/sparc/aout.h +++ b/gcc/config/sparc/aout.h @@ -19,5 +19,84 @@ along with GNU CC; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#undef CPP_PREDEFINES +/* Print subsidiary information on the compiler version in use. */ + +#define TARGET_VERSION fprintf (stderr, " (sparc)"); + +/* Names to predefine in the preprocessor for this target machine. + ??? It would be nice to not include any subtarget specific values here, + however there's no way to portably provide subtarget values to + CPP_PREFINES. Also, -D values in CPP_SUBTARGET_SPEC don't get turned into + foo, __foo and __foo__. */ + #define CPP_PREDEFINES "-Dsparc -Acpu=sparc -Amachine=sparc" + +/* These compiler options take an argument. We ignore -target for now. */ + +#define WORD_SWITCH_TAKES_ARG(STR) \ + (DEFAULT_WORD_SWITCH_TAKES_ARG (STR) \ + || !strcmp (STR, "target") || !strcmp (STR, "assert")) + +/* This is defined differently for v9 in a cover file. */ +#define SELECT_SECTION(T,RELOC,ALIGN) \ +{ \ + if (TREE_CODE (T) == VAR_DECL) \ + { \ + if (TREE_READONLY (T) && ! TREE_SIDE_EFFECTS (T) \ + && DECL_INITIAL (T) \ + && (DECL_INITIAL (T) == error_mark_node \ + || TREE_CONSTANT (DECL_INITIAL (T))) \ + && DECL_ALIGN (T) <= MAX_TEXT_ALIGN \ + && ! (flag_pic && ((RELOC) || SUNOS4_SHARED_LIBRARIES))) \ + text_section (); \ + else \ + data_section (); \ + } \ + else if (TREE_CODE (T) == CONSTRUCTOR) \ + { \ + if (flag_pic && ((RELOC) || SUNOS4_SHARED_LIBRARIES)) \ + data_section (); \ + } \ + else if (TREE_CODE_CLASS (TREE_CODE (T)) == 'c') \ + { \ + if ((TREE_CODE (T) == STRING_CST && flag_writable_strings) \ + || TYPE_ALIGN (TREE_TYPE (T)) > MAX_TEXT_ALIGN \ + || (flag_pic && ((RELOC) || SUNOS4_SHARED_LIBRARIES))) \ + data_section (); \ + else \ + text_section (); \ + } \ +} + +/* Output the label for a function definition. */ + +#define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL) \ +do { \ + ASM_DECLARE_RESULT (FILE, DECL_RESULT (DECL)); \ + ASM_OUTPUT_LABEL (FILE, NAME); \ +} while (0) + +/* Output before read-only data. */ + +#define TEXT_SECTION_ASM_OP "\t.text" + +/* Output before writable data. */ + +#define DATA_SECTION_ASM_OP "\t.data" + +/* How to renumber registers for dbx and gdb. In the flat model, the frame + pointer is really %i7. */ + +#define DBX_REGISTER_NUMBER(REGNO) \ + (TARGET_FLAT && REGNO == FRAME_POINTER_REGNUM ? 31 : REGNO) + +/* This is how to output a note to DBX telling it the line number + to which the following sequence of instructions corresponds. + + This is needed for SunOS 4.0, and should not hurt for 3.2 + versions either. */ +#define ASM_OUTPUT_SOURCE_LINE(file, line) \ + { static int sym_lineno = 1; \ + fprintf (file, ".stabn 68,0,%d,LM%d\nLM%d:\n", \ + line, sym_lineno, sym_lineno); \ + sym_lineno += 1; } diff --git a/gcc/config/sparc/linux-aout.h b/gcc/config/sparc/linux-aout.h index 0c44541103b..04ebb8c3135 100644 --- a/gcc/config/sparc/linux-aout.h +++ b/gcc/config/sparc/linux-aout.h @@ -70,6 +70,7 @@ Boston, MA 02111-1307, USA. */ /* Don't default to pcc-struct-return, because gcc is the only compiler, and we want to retain compatibility with older gcc versions. */ +#undef DEFAULT_PCC_STRUCT_RETURN #define DEFAULT_PCC_STRUCT_RETURN 0 #undef LIB_SPEC diff --git a/gcc/config/sparc/linux64.h b/gcc/config/sparc/linux64.h index 566d722971f..9785869bc64 100644 --- a/gcc/config/sparc/linux64.h +++ b/gcc/config/sparc/linux64.h @@ -356,6 +356,7 @@ do { \ misnamed. These should all refer to explicit sizes (half/word/xword?), anything other than short/int/long/etc. */ +#undef UNALIGNED_DOUBLE_INT_ASM_OP #define UNALIGNED_DOUBLE_INT_ASM_OP "\t.uaxword\t" /* DWARF bits. */ diff --git a/gcc/config/sparc/litecoff.h b/gcc/config/sparc/litecoff.h index 73a31cc0dd3..4b08d3848a5 100644 --- a/gcc/config/sparc/litecoff.h +++ b/gcc/config/sparc/litecoff.h @@ -48,3 +48,31 @@ Boston, MA 02111-1307, USA. */ #undef DO_GLOBAL_CTORS_BODY #undef DO_GLOBAL_DTORS_BODY + +/* These compiler options take an argument. We ignore -target for now. */ + +#define WORD_SWITCH_TAKES_ARG(STR) \ + (DEFAULT_WORD_SWITCH_TAKES_ARG (STR) \ + || !strcmp (STR, "target") || !strcmp (STR, "assert")) + +/* Output the label for a function definition. */ + +#define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL) \ +do { \ + ASM_DECLARE_RESULT (FILE, DECL_RESULT (DECL)); \ + ASM_OUTPUT_LABEL (FILE, NAME); \ +} while (0) + +/* Output before read-only data. */ + +#define TEXT_SECTION_ASM_OP "\t.text" + +/* Output before writable data. */ + +#define DATA_SECTION_ASM_OP "\t.data" + +/* How to renumber registers for dbx and gdb. In the flat model, the frame + pointer is really %i7. */ + +#define DBX_REGISTER_NUMBER(REGNO) \ + (TARGET_FLAT && REGNO == FRAME_POINTER_REGNUM ? 31 : REGNO) diff --git a/gcc/config/sparc/lynx.h b/gcc/config/sparc/lynx.h index 45216b2f522..866612d3b8a 100644 --- a/gcc/config/sparc/lynx.h +++ b/gcc/config/sparc/lynx.h @@ -19,13 +19,10 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #undef ASM_OUTPUT_IDENT -#undef SELECT_SECTION #undef SELECT_RTX_SECTION #define BSS_SECTION_ASM_OP "\t.section\t\".bss\"" -#include <lynx.h> - /* ??? Must redefine to get sparclite and v8 defines. Can this be done differently? */ diff --git a/gcc/config/sparc/netbsd.h b/gcc/config/sparc/netbsd.h index 0fc5bd10906..4be5b6b8e34 100644 --- a/gcc/config/sparc/netbsd.h +++ b/gcc/config/sparc/netbsd.h @@ -37,4 +37,3 @@ /* Until they use ELF or something that handles dwarf2 unwinds and initialization stuff better. */ #define DWARF2_UNWIND_INFO 0 - diff --git a/gcc/config/sparc/openbsd.h b/gcc/config/sparc/openbsd.h index ba97ac7b9de..dc3728453e5 100644 --- a/gcc/config/sparc/openbsd.h +++ b/gcc/config/sparc/openbsd.h @@ -18,8 +18,6 @@ along with GNU CC; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include <sparc/sparc.h> - /* Get generic OpenBSD definitions. */ #define OBSD_OLD_GAS #include <openbsd.h> diff --git a/gcc/config/sparc/sol2-sld-64.h b/gcc/config/sparc/sol2-sld-64.h index c9d89cad6fe..ffd84472d4d 100644 --- a/gcc/config/sparc/sol2-sld-64.h +++ b/gcc/config/sparc/sol2-sld-64.h @@ -5,6 +5,10 @@ #include "sparc/sparc_bi.h" #endif +#include "sparc/sparc.h" +#include "elfos.h" +#include "svr4.h" +#include "sparc/sysv4.h" #include "sparc/sol2.h" #ifdef AS_SPARC64_FLAG diff --git a/gcc/config/sparc/sol2.h b/gcc/config/sparc/sol2.h index aee098bce28..aeb5f7e4c70 100644 --- a/gcc/config/sparc/sol2.h +++ b/gcc/config/sparc/sol2.h @@ -22,8 +22,6 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* Supposedly the same as vanilla sparc svr4, except for the stuff below: */ -#include "sparc/sparc.h" -#include "sparc/sysv4.h" /* Solaris 2 uses a wint_t different from the default. This is required by the SCD 2.4.1, p. 6-83, Figure 6-66. */ diff --git a/gcc/config/sparc/sp64-aout.h b/gcc/config/sparc/sp64-aout.h index 81839739c83..669adc3c45d 100644 --- a/gcc/config/sparc/sp64-aout.h +++ b/gcc/config/sparc/sp64-aout.h @@ -31,6 +31,3 @@ Boston, MA 02111-1307, USA. */ /* The only code model supported is Medium/Low. */ #undef SPARC_DEFAULT_CMODEL #define SPARC_DEFAULT_CMODEL CM_MEDLOW - -#undef CPP_PREDEFINES -#define CPP_PREDEFINES "-Dsparc -Acpu=sparc -Amachine=sparc" diff --git a/gcc/config/sparc/sp64-elf.h b/gcc/config/sparc/sp64-elf.h index 3aac97859e3..07be3885efb 100644 --- a/gcc/config/sparc/sp64-elf.h +++ b/gcc/config/sparc/sp64-elf.h @@ -110,8 +110,6 @@ crtbegin.o%s \ GDB doesn't support 64 bit stabs yet and the desired debug format is DWARF anyway so it is the default. */ -#define DWARF_DEBUGGING_INFO -#define DWARF2_DEBUGGING_INFO #define DBX_DEBUGGING_INFO #undef PREFERRED_DEBUGGING_TYPE diff --git a/gcc/config/sparc/sparc.h b/gcc/config/sparc/sparc.h index 09a2943d40c..0d96acaec5a 100644 --- a/gcc/config/sparc/sparc.h +++ b/gcc/config/sparc/sparc.h @@ -210,14 +210,6 @@ Unrecognized value in TARGET_CPU_DEFAULT. #endif /* !SPARC_BI_ARCH */ -/* Names to predefine in the preprocessor for this target machine. - ??? It would be nice to not include any subtarget specific values here, - however there's no way to portably provide subtarget values to - CPP_PREFINES. Also, -D values in CPP_SUBTARGET_SPEC don't get turned into - foo, __foo and __foo__. */ - -#define CPP_PREDEFINES "-Dsparc -Dsun -Dunix -Asystem=unix -Asystem=bsd" - /* Define macros to distinguish architectures. */ /* Common CPP definitions used by CPP_SPEC amongst the various targets @@ -414,16 +406,6 @@ Unrecognized value in TARGET_CPU_DEFAULT. /* This is meant to be redefined in the host dependent files. */ #define SUBTARGET_OVERRIDE_OPTIONS -/* These compiler options take an argument. We ignore -target for now. */ - -#define WORD_SWITCH_TAKES_ARG(STR) \ - (DEFAULT_WORD_SWITCH_TAKES_ARG (STR) \ - || !strcmp (STR, "target") || !strcmp (STR, "assert")) - -/* Print subsidiary information on the compiler version in use. */ - -#define TARGET_VERSION fprintf (stderr, " (sparc)"); - /* Generate DBX debugging information. */ #define DBX_DEBUGGING_INFO @@ -911,36 +893,6 @@ if (TARGET_ARCH64 \ #define SUNOS4_SHARED_LIBRARIES 0 #endif -/* This is defined differently for v9 in a cover file. */ -#define SELECT_SECTION(T,RELOC,ALIGN) \ -{ \ - if (TREE_CODE (T) == VAR_DECL) \ - { \ - if (TREE_READONLY (T) && ! TREE_SIDE_EFFECTS (T) \ - && DECL_INITIAL (T) \ - && (DECL_INITIAL (T) == error_mark_node \ - || TREE_CONSTANT (DECL_INITIAL (T))) \ - && DECL_ALIGN (T) <= MAX_TEXT_ALIGN \ - && ! (flag_pic && ((RELOC) || SUNOS4_SHARED_LIBRARIES))) \ - text_section (); \ - else \ - data_section (); \ - } \ - else if (TREE_CODE (T) == CONSTRUCTOR) \ - { \ - if (flag_pic && ((RELOC) || SUNOS4_SHARED_LIBRARIES)) \ - data_section (); \ - } \ - else if (TREE_CODE_CLASS (TREE_CODE (T)) == 'c') \ - { \ - if ((TREE_CODE (T) == STRING_CST && flag_writable_strings) \ - || TYPE_ALIGN (TREE_TYPE (T)) > MAX_TEXT_ALIGN \ - || (flag_pic && ((RELOC) || SUNOS4_SHARED_LIBRARIES))) \ - data_section (); \ - else \ - text_section (); \ - } \ -} /* Use text section for a constant unless we need more alignment than that offers. */ @@ -1884,14 +1836,6 @@ extern struct rtx_def *sparc_compare_op0, *sparc_compare_op1; #define ASM_DECLARE_RESULT(FILE, RESULT) \ fprintf ((FILE), "\t.proc\t0%lo\n", sparc_type_code (TREE_TYPE (RESULT))) -/* Output the label for a function definition. */ - -#define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL) \ -do { \ - ASM_DECLARE_RESULT (FILE, DECL_RESULT (DECL)); \ - ASM_OUTPUT_LABEL (FILE, NAME); \ -} while (0) - /* Output the special assembly code needed to tell the assembler some register is used as global register variable. @@ -2905,14 +2849,6 @@ do { \ #define ASM_DOUBLE ".double" #define ASM_LONGDOUBLE ".xxx" /* ??? Not known (or used yet). */ -/* Output before read-only data. */ - -#define TEXT_SECTION_ASM_OP "\t.text" - -/* Output before writable data. */ - -#define DATA_SECTION_ASM_OP "\t.data" - /* How to refer to registers in assembler output. This sequence is indexed by compiler's hard-register-number (see above). */ @@ -2936,12 +2872,6 @@ do { \ #define ADDITIONAL_REGISTER_NAMES \ {{"ccr", SPARC_ICC_REG}, {"cc", SPARC_ICC_REG}} -/* How to renumber registers for dbx and gdb. In the flat model, the frame - pointer is really %i7. */ - -#define DBX_REGISTER_NUMBER(REGNO) \ - (TARGET_FLAT && REGNO == FRAME_POINTER_REGNUM ? 31 : REGNO) - /* On Sun 4, this limit is 2048. We use 1000 to be safe, since the length can run past this up to a continuation point. Once we used 1500, but a single entry in C++ can run more than 500 bytes, due to the length of @@ -2950,17 +2880,6 @@ do { \ guess... */ #define DBX_CONTIN_LENGTH 1000 -/* This is how to output a note to DBX telling it the line number - to which the following sequence of instructions corresponds. - - This is needed for SunOS 4.0, and should not hurt for 3.2 - versions either. */ -#define ASM_OUTPUT_SOURCE_LINE(file, line) \ - { static int sym_lineno = 1; \ - fprintf (file, ".stabn 68,0,%d,LM%d\nLM%d:\n", \ - line, sym_lineno, sym_lineno); \ - sym_lineno += 1; } - /* This is how to output the definition of a user-level label named NAME, such as the label on a static function or variable NAME. */ diff --git a/gcc/config/sparc/splet.h b/gcc/config/sparc/splet.h index 922dd339151..d2ef4fbe35d 100644 --- a/gcc/config/sparc/splet.h +++ b/gcc/config/sparc/splet.h @@ -22,6 +22,8 @@ Boston, MA 02111-1307, USA. */ #undef TARGET_DEFAULT #define TARGET_DEFAULT (MASK_APP_REGS + MASK_EPILOGUE) +#define CPP_PREDEFINES "-Dsparc -Acpu=sparc -Amachine=sparc" + #undef SUBTARGET_SWITCHES #define SUBTARGET_SWITCHES \ {"big-endian", -MASK_LITTLE_ENDIAN, N_("Generate code for big endian") }, \ diff --git a/gcc/config/sparc/sun4o3.h b/gcc/config/sparc/sun4o3.h index 19ff33e41be..891e3297acf 100644 --- a/gcc/config/sparc/sun4o3.h +++ b/gcc/config/sparc/sun4o3.h @@ -1,3 +1,6 @@ +#undef CPP_PREDEFINES +#define CPP_PREDEFINES "-Dsparc -Dsun -Dunix -Asystem=unix -Asystem=bsd" + /* Override the name of the mcount profiling function. */ #undef MCOUNT_FUNCTION diff --git a/gcc/config/sparc/sunos4.h b/gcc/config/sparc/sunos4.h index 07939f07e4f..2f12cc6be6b 100644 --- a/gcc/config/sparc/sunos4.h +++ b/gcc/config/sparc/sunos4.h @@ -20,12 +20,13 @@ Boston, MA 02111-1307, USA. */ #define SUNOS4_SHARED_LIBRARIES 1 +#undef CPP_PREDEFINES +#define CPP_PREDEFINES "-Dsparc -Dsun -Dunix -Asystem=unix -Asystem=bsd" + /* Use N_BINCL stabs. */ #define DBX_USE_BINCL -#include "sparc/sparc.h" - /* The Sun as doesn't like unaligned data. */ #define DWARF2_UNWIND_INFO 0 diff --git a/gcc/config/sparc/sysv4.h b/gcc/config/sparc/sysv4.h index 12c3fdf260f..caf6a21160c 100644 --- a/gcc/config/sparc/sysv4.h +++ b/gcc/config/sparc/sysv4.h @@ -20,19 +20,9 @@ along with GNU CC; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ - -/* Undefine some symbols which are defined in "sparc.h" but which are - appropriate only for SunOS 4.x, and not for svr4. */ - -#undef WORD_SWITCH_TAKES_ARG -#undef ASM_OUTPUT_SOURCE_LINE -#undef SELECT_SECTION -#undef ASM_DECLARE_FUNCTION_NAME -#undef TEXT_SECTION_ASM_OP -#undef DATA_SECTION_ASM_OP - -#include "elfos.h" -#include "svr4.h" +#ifndef TARGET_VERSION +#define TARGET_VERSION fprintf (stderr, " (sparc ELF)"); +#endif /* ??? Put back the SIZE_TYPE/PTRDIFF_TYPE definitions set by sparc.h. Why, exactly, is svr4.h messing with this? Seems like the chip diff --git a/gcc/config/sparc/vxsim.h b/gcc/config/sparc/vxsim.h index ea2ed5eaf5a..94cfb92df10 100644 --- a/gcc/config/sparc/vxsim.h +++ b/gcc/config/sparc/vxsim.h @@ -18,6 +18,9 @@ along with GNU CC; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#undef TARGET_VERSION +#define TARGET_VERSION fprintf (stderr, " (sparc VxSim)"); + /* Supposedly the same as vanilla sparc svr4, except for the stuff below: */ #undef CPP_PREDEFINES |