config.gcc (sparc64-wrs-vxworks*, [...]): Include various CPU headers via tm_file.

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.

Approved by:  Richard Henderson <rth@redhat.com>
              Message-ID: <20011114132416.B17112@redhat.com>

From-SVN: r47023
This commit is contained in:
David O'Brien 2001-11-14 21:44:21 +00:00 committed by David O'Brien
parent 90a1298869
commit 0f7a7be7ce
20 changed files with 205 additions and 136 deletions

View File

@ -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> Wed Nov 14 19:46:08 CET 2001 Jan Hubicka <jh@suse.cz>
* cfglayout.c (fixup_fallthru_exit_predecesor): New static function. * cfglayout.c (fixup_fallthru_exit_predecesor): New static function.

View File

@ -2905,7 +2905,7 @@ sparc-tti-*)
xm_defines=POSIX xm_defines=POSIX
;; ;;
sparc64-wrs-vxworks*) 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 tmake_file=sparc/t-vxsparc64
use_collect2=yes use_collect2=yes
;; ;;
@ -2920,11 +2920,12 @@ sparc-*-aout*)
tm_file="sparc/sparc.h aoutos.h sparc/aout.h libgloss.h" tm_file="sparc/sparc.h aoutos.h sparc/aout.h libgloss.h"
;; ;;
sparc-*-netbsd*) 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 tmake_file=t-netbsd
use_collect2=yes use_collect2=yes
;; ;;
sparc-*-openbsd*) sparc-*-openbsd*)
tm_file="sparc/sparc.h ${tm_file}"
# needed to unconfuse gdb # needed to unconfuse gdb
tmake_file="t-libc-ok t-openbsd sparc/t-openbsd" tmake_file="t-libc-ok t-openbsd sparc/t-openbsd"
# we need collect2 until our bug is fixed... # we need collect2 until our bug is fixed...
@ -2934,7 +2935,7 @@ sparc-*-bsd*)
tm_file="${tm_file} sparc/bsd.h" tm_file="${tm_file} sparc/bsd.h"
;; ;;
sparc-*-chorusos*) 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 tmake_file=sparc/t-chorus-elf
extra_parts="crti.o crtn.o crtbegin.o crtend.o" extra_parts="crti.o crtn.o crtbegin.o crtend.o"
float_format=i64 float_format=i64
@ -2945,20 +2946,20 @@ sparc-*-chorusos*)
esac esac
;; ;;
sparc-*-elf*) 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 tmake_file=sparc/t-elf
extra_parts="crti.o crtn.o crtbegin.o crtend.o" extra_parts="crti.o crtn.o crtbegin.o crtend.o"
#float_format=i128 #float_format=i128
float_format=i64 float_format=i64
;; ;;
sparc-*-linux*aout*) # Sparc's running GNU/Linux, a.out 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 xmake_file=x-linux
gnu_ld=yes gnu_ld=yes
;; ;;
sparc-*-linux*libc1*) # Sparc's running GNU/Linux, libc5 sparc-*-linux*libc1*) # Sparc's running GNU/Linux, libc5
xmake_file=x-linux 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" tmake_file="t-slibgcc-elf-ver t-linux t-linux-gnulibc1"
extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o" extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
gnu_ld=yes gnu_ld=yes
@ -2966,7 +2967,7 @@ sparc-*-linux*libc1*) # Sparc's running GNU/Linux, libc5
;; ;;
sparc-*-linux*) # Sparc's running GNU/Linux, libc6 sparc-*-linux*) # Sparc's running GNU/Linux, libc6
xmake_file=x-linux 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" tmake_file="t-slibgcc-elf-ver t-linux"
extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o" extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
gnu_ld=yes gnu_ld=yes
@ -2978,9 +2979,9 @@ sparc-*-linux*) # Sparc's running GNU/Linux, libc6
sparc-*-lynxos*) sparc-*-lynxos*)
if test x$gas = xyes if test x$gas = xyes
then then
tm_file="${tm_file} sparc/lynx.h" tm_file="${tm_file} lynx.h sparc/aout.h sparc/lynx.h"
else 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 fi
tmake_file=sparc/t-sunos41 tmake_file=sparc/t-sunos41
;; ;;
@ -2992,7 +2993,7 @@ sparc-*-rtemsaout*)
fi fi
;; ;;
sparc-*-rtems*|sparc-*-rtemself*) 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" tmake_file="sparc/t-elf t-rtems"
extra_parts="crti.o crtn.o crtbegin.o crtend.o" extra_parts="crti.o crtn.o crtbegin.o crtend.o"
#float_format=i128 #float_format=i128
@ -3033,7 +3034,7 @@ sparcv9-*-solaris2* | sparc64-*-solaris2*)
;; ;;
sparc-hal-solaris2*) sparc-hal-solaris2*)
xm_defines=POSIX 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" tmake_file="sparc/t-halos sparc/t-sol2"
if test x$gnu_ld = xyes; then if test x$gnu_ld = xyes; then
tmake_file="$tmake_file t-slibgcc-elf-ver" tmake_file="$tmake_file t-slibgcc-elf-ver"
@ -3054,9 +3055,9 @@ sparc-hal-solaris2*)
sparc-*-solaris2*) sparc-*-solaris2*)
if test x$gnu_ld = xyes if test x$gnu_ld = xyes
then then
tm_file="sparc/sol2.h" tm_file="${tm_file} elfos.h svr4.h sparc/sysv4.h sparc/sol2.h"
else 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 fi
xm_defines=POSIX xm_defines=POSIX
tmake_file=sparc/t-sol2 tmake_file=sparc/t-sol2
@ -3101,11 +3102,11 @@ sparc-*-solaris2*)
fi fi
;; ;;
sparc-*-sunos4.0*) sparc-*-sunos4.0*)
tm_file=sparc/sunos4.h tm_file="${tm_file} sparc/aout.h sparc/sunos4.h"
use_collect2=yes use_collect2=yes
;; ;;
sparc-*-sunos4*) sparc-*-sunos4*)
tm_file=sparc/sunos4.h tm_file="${tm_file} sparc/aout.h sparc/sunos4.h"
tmake_file=sparc/t-sunos41 tmake_file=sparc/t-sunos41
use_collect2=yes use_collect2=yes
if test x$gas = xyes; then if test x$gas = xyes; then
@ -3113,18 +3114,18 @@ sparc-*-sunos4*)
fi fi
;; ;;
sparc-*-sunos3*) sparc-*-sunos3*)
tm_file="${tm_file} sparc/sun4o3.h" tm_file="${tm_file} sparc/aout.h sparc/sun4o3.h"
use_collect2=yes use_collect2=yes
;; ;;
sparc-*-sysv4*) sparc-*-sysv4*)
tm_file="${tm_file} sparc/sysv4.h" tm_file="${tm_file} elfos.h svr4.h sparc/sysv4.h"
xm_defines=POSIX xm_defines=POSIX
tmake_file=t-svr4 tmake_file=t-svr4
extra_parts="crtbegin.o crtend.o" extra_parts="crtbegin.o crtend.o"
;; ;;
sparc-*-vxsim*) sparc-*-vxsim*)
xm_defines=POSIX 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 tmake_file=sparc/t-vxsparc
;; ;;
sparclet-*-aout*) sparclet-*-aout*)
@ -3136,33 +3137,33 @@ sparclite-*-coff*)
tmake_file=sparc/t-sparclite tmake_file=sparc/t-sparclite
;; ;;
sparclite-*-aout*) 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 tmake_file=sparc/t-sparclite
;; ;;
sparclite-*-elf*) 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 tmake_file=sparc/t-sparclite
extra_parts="crtbegin.o crtend.o" extra_parts="crtbegin.o crtend.o"
;; ;;
sparc86x-*-aout*) 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 tmake_file=sparc/t-sp86x
;; ;;
sparc86x-*-elf*) 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 tmake_file=sparc/t-sp86x
extra_parts="crtbegin.o crtend.o" extra_parts="crtbegin.o crtend.o"
;; ;;
sparc64-*-aout*) 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*) 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" extra_parts="crtbegin.o crtend.o"
;; ;;
sparc64-*-linux*) # 64-bit Sparc's running GNU/Linux sparc64-*-linux*) # 64-bit Sparc's running GNU/Linux
tmake_file="t-slibgcc-elf-ver t-linux sparc/t-linux64" 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 xmake_file=x-linux
extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o" extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
gnu_ld=yes gnu_ld=yes

View File

@ -68,7 +68,8 @@
/* Implicit library calls should use memcpy, not bcopy, etc. */ /* 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. */ /* Handle #pragma weak and #pragma pack. */

View File

@ -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, the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */ 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" #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; }

View File

@ -70,6 +70,7 @@ Boston, MA 02111-1307, USA. */
/* Don't default to pcc-struct-return, because gcc is the only compiler, /* Don't default to pcc-struct-return, because gcc is the only compiler,
and we want to retain compatibility with older gcc versions. */ and we want to retain compatibility with older gcc versions. */
#undef DEFAULT_PCC_STRUCT_RETURN
#define DEFAULT_PCC_STRUCT_RETURN 0 #define DEFAULT_PCC_STRUCT_RETURN 0
#undef LIB_SPEC #undef LIB_SPEC

View File

@ -356,6 +356,7 @@ do { \
misnamed. These should all refer to explicit sizes (half/word/xword?), misnamed. These should all refer to explicit sizes (half/word/xword?),
anything other than short/int/long/etc. */ anything other than short/int/long/etc. */
#undef UNALIGNED_DOUBLE_INT_ASM_OP
#define UNALIGNED_DOUBLE_INT_ASM_OP "\t.uaxword\t" #define UNALIGNED_DOUBLE_INT_ASM_OP "\t.uaxword\t"
/* DWARF bits. */ /* DWARF bits. */

View File

@ -48,3 +48,31 @@ Boston, MA 02111-1307, USA. */
#undef DO_GLOBAL_CTORS_BODY #undef DO_GLOBAL_CTORS_BODY
#undef DO_GLOBAL_DTORS_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)

View File

@ -19,13 +19,10 @@ the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */ Boston, MA 02111-1307, USA. */
#undef ASM_OUTPUT_IDENT #undef ASM_OUTPUT_IDENT
#undef SELECT_SECTION
#undef SELECT_RTX_SECTION #undef SELECT_RTX_SECTION
#define BSS_SECTION_ASM_OP "\t.section\t\".bss\"" #define BSS_SECTION_ASM_OP "\t.section\t\".bss\""
#include <lynx.h>
/* ??? Must redefine to get sparclite and v8 defines. Can this be done /* ??? Must redefine to get sparclite and v8 defines. Can this be done
differently? */ differently? */

View File

@ -37,4 +37,3 @@
/* Until they use ELF or something that handles dwarf2 unwinds /* Until they use ELF or something that handles dwarf2 unwinds
and initialization stuff better. */ and initialization stuff better. */
#define DWARF2_UNWIND_INFO 0 #define DWARF2_UNWIND_INFO 0

View File

@ -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, the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */ Boston, MA 02111-1307, USA. */
#include <sparc/sparc.h>
/* Get generic OpenBSD definitions. */ /* Get generic OpenBSD definitions. */
#define OBSD_OLD_GAS #define OBSD_OLD_GAS
#include <openbsd.h> #include <openbsd.h>

View File

@ -5,6 +5,10 @@
#include "sparc/sparc_bi.h" #include "sparc/sparc_bi.h"
#endif #endif
#include "sparc/sparc.h"
#include "elfos.h"
#include "svr4.h"
#include "sparc/sysv4.h"
#include "sparc/sol2.h" #include "sparc/sol2.h"
#ifdef AS_SPARC64_FLAG #ifdef AS_SPARC64_FLAG

View File

@ -22,8 +22,6 @@ the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */ Boston, MA 02111-1307, USA. */
/* Supposedly the same as vanilla sparc svr4, except for the stuff below: */ /* 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 /* 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. */ by the SCD 2.4.1, p. 6-83, Figure 6-66. */

View File

@ -31,6 +31,3 @@ Boston, MA 02111-1307, USA. */
/* The only code model supported is Medium/Low. */ /* The only code model supported is Medium/Low. */
#undef SPARC_DEFAULT_CMODEL #undef SPARC_DEFAULT_CMODEL
#define SPARC_DEFAULT_CMODEL CM_MEDLOW #define SPARC_DEFAULT_CMODEL CM_MEDLOW
#undef CPP_PREDEFINES
#define CPP_PREDEFINES "-Dsparc -Acpu=sparc -Amachine=sparc"

View File

@ -110,8 +110,6 @@ crtbegin.o%s \
GDB doesn't support 64 bit stabs yet and the desired debug format is DWARF GDB doesn't support 64 bit stabs yet and the desired debug format is DWARF
anyway so it is the default. */ anyway so it is the default. */
#define DWARF_DEBUGGING_INFO
#define DWARF2_DEBUGGING_INFO
#define DBX_DEBUGGING_INFO #define DBX_DEBUGGING_INFO
#undef PREFERRED_DEBUGGING_TYPE #undef PREFERRED_DEBUGGING_TYPE

View File

@ -210,14 +210,6 @@ Unrecognized value in TARGET_CPU_DEFAULT.
#endif /* !SPARC_BI_ARCH */ #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. */ /* Define macros to distinguish architectures. */
/* Common CPP definitions used by CPP_SPEC amongst the various targets /* 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. */ /* This is meant to be redefined in the host dependent files. */
#define SUBTARGET_OVERRIDE_OPTIONS #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. */ /* Generate DBX debugging information. */
#define DBX_DEBUGGING_INFO #define DBX_DEBUGGING_INFO
@ -911,36 +893,6 @@ if (TARGET_ARCH64 \
#define SUNOS4_SHARED_LIBRARIES 0 #define SUNOS4_SHARED_LIBRARIES 0
#endif #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 /* Use text section for a constant
unless we need more alignment than that offers. */ 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) \ #define ASM_DECLARE_RESULT(FILE, RESULT) \
fprintf ((FILE), "\t.proc\t0%lo\n", sparc_type_code (TREE_TYPE (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 /* Output the special assembly code needed to tell the assembler some
register is used as global register variable. register is used as global register variable.
@ -2905,14 +2849,6 @@ do { \
#define ASM_DOUBLE ".double" #define ASM_DOUBLE ".double"
#define ASM_LONGDOUBLE ".xxx" /* ??? Not known (or used yet). */ #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. /* How to refer to registers in assembler output.
This sequence is indexed by compiler's hard-register-number (see above). */ This sequence is indexed by compiler's hard-register-number (see above). */
@ -2936,12 +2872,6 @@ do { \
#define ADDITIONAL_REGISTER_NAMES \ #define ADDITIONAL_REGISTER_NAMES \
{{"ccr", SPARC_ICC_REG}, {"cc", SPARC_ICC_REG}} {{"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 /* 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 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 a single entry in C++ can run more than 500 bytes, due to the length of
@ -2950,17 +2880,6 @@ do { \
guess... */ guess... */
#define DBX_CONTIN_LENGTH 1000 #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, /* 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. */ such as the label on a static function or variable NAME. */

View File

@ -22,6 +22,8 @@ Boston, MA 02111-1307, USA. */
#undef TARGET_DEFAULT #undef TARGET_DEFAULT
#define TARGET_DEFAULT (MASK_APP_REGS + MASK_EPILOGUE) #define TARGET_DEFAULT (MASK_APP_REGS + MASK_EPILOGUE)
#define CPP_PREDEFINES "-Dsparc -Acpu=sparc -Amachine=sparc"
#undef SUBTARGET_SWITCHES #undef SUBTARGET_SWITCHES
#define SUBTARGET_SWITCHES \ #define SUBTARGET_SWITCHES \
{"big-endian", -MASK_LITTLE_ENDIAN, N_("Generate code for big endian") }, \ {"big-endian", -MASK_LITTLE_ENDIAN, N_("Generate code for big endian") }, \

View File

@ -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. */ /* Override the name of the mcount profiling function. */
#undef MCOUNT_FUNCTION #undef MCOUNT_FUNCTION

View File

@ -20,12 +20,13 @@ Boston, MA 02111-1307, USA. */
#define SUNOS4_SHARED_LIBRARIES 1 #define SUNOS4_SHARED_LIBRARIES 1
#undef CPP_PREDEFINES
#define CPP_PREDEFINES "-Dsparc -Dsun -Dunix -Asystem=unix -Asystem=bsd"
/* Use N_BINCL stabs. */ /* Use N_BINCL stabs. */
#define DBX_USE_BINCL #define DBX_USE_BINCL
#include "sparc/sparc.h"
/* The Sun as doesn't like unaligned data. */ /* The Sun as doesn't like unaligned data. */
#define DWARF2_UNWIND_INFO 0 #define DWARF2_UNWIND_INFO 0

View File

@ -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, the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */ Boston, MA 02111-1307, USA. */
#ifndef TARGET_VERSION
/* Undefine some symbols which are defined in "sparc.h" but which are #define TARGET_VERSION fprintf (stderr, " (sparc ELF)");
appropriate only for SunOS 4.x, and not for svr4. */ #endif
#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"
/* ??? Put back the SIZE_TYPE/PTRDIFF_TYPE definitions set by sparc.h. /* ??? Put back the SIZE_TYPE/PTRDIFF_TYPE definitions set by sparc.h.
Why, exactly, is svr4.h messing with this? Seems like the chip Why, exactly, is svr4.h messing with this? Seems like the chip

View File

@ -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, the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */ 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: */ /* Supposedly the same as vanilla sparc svr4, except for the stuff below: */
#undef CPP_PREDEFINES #undef CPP_PREDEFINES