Individual processor configurations for sh-elf / sh-linux:
gcc: * config.gcc: Add support for sh[234]*-*-elf*, sh[2346lbe]*-*-linux*. * config/sh/linux.h (TARGET_DEFAULT): Use TARGET_CPU_DEFAULT. * sh.h (SELECT_SH1, SELECT_SH2, SELECT_SH3, SELECT_SH3E): New macros. (SELECT_SH4_NOFPU, SELECT_SH4_SINGLE_ONLY, SELECT_SH4): Likewise. (SELECT_SH4_SINGLE, SELECT_SH5_64, SELECT_SH5_64_NOFPU): Likewise. (SELECT_SH5_32, SELECT_SH5_32_NOFPU, SELECT_SH5_COMPACT): Likewise. (SELECT_SH5_COMPACT_NOFPU): Likewise. (TARGET_SWITCHES): Use them. (TARGET_CPU_DEFAULT): Define if not already defined. (TARGET_DEFAULT): Use it. (LINK_DEFAULT_CPU_EMUL): Value now depends on TARGET_CPU_DEFAULT. * config/sh/t-linux (MULTILIB_OPTIONS): Use MULTILIB_ENDIAN. * config/sh/t-monolib: New file. bfd: config.bfd: Add support for sh[1234]l*-*-elf* | sh3el*-*-elf*, sh[1234]*-elf*. ld: * configure.tgt: Add support for sh[1234]*le*-*-elf, sh[1234]*-*-elf. Still outstanding: config.sub: * config.sub: Add support for sh[12], sh3e, sh[1234]le, sh3ele, shle, sh[1234]le, sh3ele, sh64le. From-SVN: r54598
This commit is contained in:
parent
93f7aeea7a
commit
8bc6e10185
@ -1,3 +1,19 @@
|
||||
Thu Jun 13 20:18:38 2002 J"orn Rennecke <joern.rennecke@superh.com>
|
||||
|
||||
* config.gcc: Add support for sh[234]*-*-elf*, sh[2346lbe]*-*-linux*.
|
||||
* config/sh/linux.h (TARGET_DEFAULT): Use TARGET_CPU_DEFAULT.
|
||||
* sh.h (SELECT_SH1, SELECT_SH2, SELECT_SH3, SELECT_SH3E): New macros.
|
||||
(SELECT_SH4_NOFPU, SELECT_SH4_SINGLE_ONLY, SELECT_SH4): Likewise.
|
||||
(SELECT_SH4_SINGLE, SELECT_SH5_64, SELECT_SH5_64_NOFPU): Likewise.
|
||||
(SELECT_SH5_32, SELECT_SH5_32_NOFPU, SELECT_SH5_COMPACT): Likewise.
|
||||
(SELECT_SH5_COMPACT_NOFPU): Likewise.
|
||||
(TARGET_SWITCHES): Use them.
|
||||
(TARGET_CPU_DEFAULT): Define if not already defined.
|
||||
(TARGET_DEFAULT): Use it.
|
||||
(LINK_DEFAULT_CPU_EMUL): Value now depends on TARGET_CPU_DEFAULT.
|
||||
* config/sh/t-linux (MULTILIB_OPTIONS): Use MULTILIB_ENDIAN.
|
||||
* config/sh/t-monolib: New file.
|
||||
|
||||
2002-06-13 Roger Sayle <roger@eyesopen.com>
|
||||
|
||||
* toplev.c (rest_of_compilation): Simplify (and correct) the
|
||||
|
@ -2184,7 +2184,7 @@ s390x-*-linux*)
|
||||
thread_file='posix'
|
||||
fi
|
||||
;;
|
||||
sh-*-elf* | shl*-*-elf* | sh64*-*-elf*)
|
||||
sh-*-elf* | sh[2346l]*-*-elf*)
|
||||
tmake_file="sh/t-sh sh/t-elf"
|
||||
case $machine in
|
||||
shl* | sh64l*)
|
||||
@ -2204,6 +2204,14 @@ sh-*-elf* | shl*-*-elf* | sh64*-*-elf*)
|
||||
target_requires_64bit_host_wide_int=yes
|
||||
fi
|
||||
;;
|
||||
sh4_single*) target_cpu_default="SELECT_SH4_SINGLE" ;;
|
||||
sh4*) target_cpu_default="SELECT_SH4" ;;
|
||||
sh3e*) target_cpu_default="SELECT_SH3E" ;;
|
||||
sh3*) target_cpu_default="SELECT_SH3" ;;
|
||||
sh2*) target_cpu_default="SELECT_SH2" ;;
|
||||
esac
|
||||
case $machine in
|
||||
sh[234]*) tmake_file="${tmake_file} sh/t-monolib" ;;
|
||||
esac
|
||||
;;
|
||||
sh-*-rtemself*)
|
||||
@ -2224,14 +2232,42 @@ sh-*-rtems*)
|
||||
thread_file='rtems'
|
||||
fi
|
||||
;;
|
||||
sh-*-linux*)
|
||||
tm_file="sh/little.h ${tm_file} dbxelf.h elfos.h svr4.h sh/elf.h sh/linux.h"
|
||||
tmake_file="sh/t-sh sh/t-elf sh/t-le sh/t-linux"
|
||||
sh-*-linux* | sh[2346lbe]*-*-linux*)
|
||||
tmake_file="sh/t-sh sh/t-elf sh/t-linux"
|
||||
case $machine in
|
||||
sh*be-*-* | sh*eb-*-*) ;;
|
||||
*)
|
||||
tm_file="sh/little.h ${tm_file}"
|
||||
tmake_file="${tmake_file} sh/t-le"
|
||||
;;
|
||||
esac
|
||||
tm_file="${tm_file} dbxelf.h elfos.h svr4.h sh/elf.h sh/linux.h"
|
||||
gas=yes gnu_ld=yes
|
||||
if test x$enable_threads = xyes; then
|
||||
thread_file='posix'
|
||||
fi
|
||||
float_format=sh
|
||||
case $machine in
|
||||
sh64*)
|
||||
tmake_file="${tmake_file} sh/t-sh64"
|
||||
tm_file="${tm_file} sh/sh64.h"
|
||||
extra_headers="shmedia.h ushmedia.h sshmedia.h"
|
||||
# Not strictly necessary to check this, but a good idea anyway.
|
||||
if test $machine = $target; then
|
||||
target_requires_64bit_host_wide_int=yes
|
||||
fi
|
||||
;;
|
||||
sh4_single*) target_cpu_default="SELECT_SH4_SINGLE" ;;
|
||||
sh4*) target_cpu_default="SELECT_SH4" ;;
|
||||
sh3e[lb]e*) target_cpu_default="SELECT_SH3E" ;;
|
||||
sh3e[lb]*) target_cpu_default="SELECT_SH3" ;;
|
||||
sh3e*) target_cpu_default="SELECT_SH3E" ;;
|
||||
sh3*) target_cpu_default="SELECT_SH3" ;;
|
||||
sh2*) target_cpu_default="SELECT_SH2" ;;
|
||||
esac
|
||||
case $machine in
|
||||
sh[234]*) tmake_file="${tmake_file} sh/t-monolib" ;;
|
||||
esac
|
||||
;;
|
||||
sh-*-netbsdelf* | shl*-*-netbsdelf* | sh5-*-netbsd* | sh5l*-*-netbsd* | \
|
||||
sh64-*-netbsd* | sh64l*-*-netbsd*)
|
||||
|
@ -39,7 +39,7 @@ do { \
|
||||
|
||||
#undef TARGET_DEFAULT
|
||||
#define TARGET_DEFAULT \
|
||||
(SH3_BIT|SH2_BIT|SH1_BIT | USERMODE_BIT | TARGET_ENDIAN_DEFAULT)
|
||||
(TARGET_CPU_DEFAULT | USERMODE_BIT | TARGET_ENDIAN_DEFAULT)
|
||||
|
||||
#undef SUBTARGET_LINK_EMUL_SUFFIX
|
||||
#define SUBTARGET_LINK_EMUL_SUFFIX "_linux"
|
||||
|
@ -249,39 +249,54 @@ extern int target_flags;
|
||||
/* Nonzero if we should prefer @GOT calls when generating PIC. */
|
||||
#define TARGET_PREFERGOT (target_flags & PREFERGOT_BIT)
|
||||
|
||||
#define SELECT_SH1 (SH1_BIT)
|
||||
#define SELECT_SH2 (SH2_BIT | SELECT_SH1)
|
||||
#define SELECT_SH3 (SH3_BIT | SELECT_SH2)
|
||||
#define SELECT_SH3E (SH3E_BIT | FPU_SINGLE_BIT | SELECT_SH3)
|
||||
#define SELECT_SH4_NOFPU (HARD_SH4_BIT | SELECT_SH3)
|
||||
#define SELECT_SH4_SINGLE_ONLY (HARD_SH4_BIT | SELECT_SH3E)
|
||||
#define SELECT_SH4 (SH4_BIT|SH3E_BIT|HARD_SH4_BIT | SELECT_SH3)
|
||||
#define SELECT_SH4_SINGLE (FPU_SINGLE_BIT | SELECT_SH4)
|
||||
#define SELECT_SH5_64 (SH5_BIT | SH4_BIT)
|
||||
#define SELECT_SH5_64_NOFPU (SH5_BIT)
|
||||
#define SELECT_SH5_32 (SH5_BIT | SH4_BIT | SH3E_BIT)
|
||||
#define SELECT_SH5_32_NOFPU (SH5_BIT | SH3E_BIT)
|
||||
#define SELECT_SH5_COMPACT (SH5_BIT | SH4_BIT | SELECT_SH3E)
|
||||
#define SELECT_SH5_COMPACT_NOFPU (SH5_BIT | SELECT_SH3)
|
||||
|
||||
/* Reset all target-selection flags. */
|
||||
#define TARGET_NONE -(SH1_BIT | SH2_BIT | SH3_BIT | SH3E_BIT | SH4_BIT \
|
||||
| HARD_SH4_BIT | FPU_SINGLE_BIT | SH5_BIT)
|
||||
|
||||
#define TARGET_SWITCHES \
|
||||
{ {"1", TARGET_NONE, "" }, \
|
||||
{"1", SH1_BIT, "" }, \
|
||||
{"1", SELECT_SH1, "" }, \
|
||||
{"2", TARGET_NONE, "" }, \
|
||||
{"2", SH2_BIT|SH1_BIT, "" }, \
|
||||
{"2", SELECT_SH2, "" }, \
|
||||
{"3", TARGET_NONE, "" }, \
|
||||
{"3", SH3_BIT|SH2_BIT|SH1_BIT, "" }, \
|
||||
{"3", SELECT_SH3, "" }, \
|
||||
{"3e", TARGET_NONE, "" }, \
|
||||
{"3e", SH3E_BIT|SH3_BIT|SH2_BIT|SH1_BIT|FPU_SINGLE_BIT, "" }, \
|
||||
{"3e", SELECT_SH3E, "" }, \
|
||||
{"4-single-only", TARGET_NONE, "" }, \
|
||||
{"4-single-only", SH3E_BIT|SH3_BIT|SH2_BIT|SH1_BIT|HARD_SH4_BIT|FPU_SINGLE_BIT, "" }, \
|
||||
{"4-single-only", SELECT_SH4_SINGLE_ONLY, "" }, \
|
||||
{"4-single", TARGET_NONE, "" }, \
|
||||
{"4-single", SH4_BIT|SH3E_BIT|SH3_BIT|SH2_BIT|SH1_BIT|HARD_SH4_BIT|FPU_SINGLE_BIT, "" },\
|
||||
{"4-single", SELECT_SH4_SINGLE, "" },\
|
||||
{"4-nofpu", TARGET_NONE, "" }, \
|
||||
{"4-nofpu", SH3_BIT|SH2_BIT|SH1_BIT|HARD_SH4_BIT, "" },\
|
||||
{"4-nofpu", SELECT_SH4_NOFPU, "" },\
|
||||
{"4", TARGET_NONE, "" }, \
|
||||
{"4", SH4_BIT|SH3E_BIT|SH3_BIT|SH2_BIT|SH1_BIT|HARD_SH4_BIT, "" }, \
|
||||
{"4", SELECT_SH4, "" }, \
|
||||
{"5-64media", TARGET_NONE, "" }, \
|
||||
{"5-64media", SH5_BIT|SH4_BIT, "Generate 64-bit SHmedia code" }, \
|
||||
{"5-64media", SELECT_SH5_64, "Generate 64-bit SHmedia code" }, \
|
||||
{"5-64media-nofpu", TARGET_NONE, "" }, \
|
||||
{"5-64media-nofpu", SH5_BIT, "Generate 64-bit FPU-less SHmedia code" }, \
|
||||
{"5-64media-nofpu", SELECT_SH5_64_NOFPU, "Generate 64-bit FPU-less SHmedia code" }, \
|
||||
{"5-32media", TARGET_NONE, "" }, \
|
||||
{"5-32media", SH5_BIT|SH4_BIT|SH3E_BIT, "Generate 32-bit SHmedia code" }, \
|
||||
{"5-32media", SELECT_SH5_32, "Generate 32-bit SHmedia code" }, \
|
||||
{"5-32media-nofpu", TARGET_NONE, "" }, \
|
||||
{"5-32media-nofpu", SH5_BIT|SH3E_BIT, "Generate 32-bit FPU-less SHmedia code" }, \
|
||||
{"5-32media-nofpu", SELECT_SH5_32_NOFPU, "Generate 32-bit FPU-less SHmedia code" }, \
|
||||
{"5-compact", TARGET_NONE, "" }, \
|
||||
{"5-compact", SH5_BIT|SH4_BIT|SH3E_BIT|SH3_BIT|SH2_BIT|SH1_BIT|FPU_SINGLE_BIT, "Generate SHcompact code" }, \
|
||||
{"5-compact", SELECT_SH5_COMPACT, "Generate SHcompact code" }, \
|
||||
{"5-compact-nofpu", TARGET_NONE, "" }, \
|
||||
{"5-compact-nofpu", SH5_BIT|SH3_BIT|SH2_BIT|SH1_BIT, "Generate FPU-less SHcompact code" }, \
|
||||
{"5-compact-nofpu", SELECT_SH5_COMPACT_NOFPU, "Generate FPU-less SHcompact code" }, \
|
||||
{"b", -LITTLE_ENDIAN_BIT, "" }, \
|
||||
{"bigtable", BIGTABLE_BIT, "" }, \
|
||||
{"dalign", DALIGN_BIT, "" }, \
|
||||
@ -309,7 +324,11 @@ extern int target_flags;
|
||||
#define TARGET_ENDIAN_DEFAULT 0
|
||||
#endif
|
||||
|
||||
#define TARGET_DEFAULT (SH1_BIT|TARGET_ENDIAN_DEFAULT)
|
||||
#ifndef TARGET_CPU_DEFAULT
|
||||
#define TARGET_CPU_DEFAULT SELECT_SH1
|
||||
#endif
|
||||
|
||||
#define TARGET_DEFAULT (TARGET_CPU_DEFAULT|TARGET_ENDIAN_DEFAULT)
|
||||
|
||||
#define CPP_SPEC " %(subtarget_cpp_spec) "
|
||||
|
||||
@ -341,7 +360,17 @@ extern int target_flags;
|
||||
#endif
|
||||
|
||||
#define LINK_EMUL_PREFIX "sh%{ml:l}"
|
||||
|
||||
#if TARGET_CPU_DEFAULT & SH5_BIT
|
||||
#if TARGET_CPU_DEFAULT & SH3E_BIT
|
||||
#define LINK_DEFAULT_CPU_EMUL "32"
|
||||
#else
|
||||
#define LINK_DEFAULT_CPU_EMUL "64"
|
||||
#endif /* SH3E_BIT */
|
||||
#else
|
||||
#define LINK_DEFAULT_CPU_EMUL ""
|
||||
#endif /* SH5_BIT */
|
||||
|
||||
#define SUBTARGET_LINK_EMUL_SUFFIX ""
|
||||
#define SUBTARGET_LINK_SPEC ""
|
||||
|
||||
|
@ -3,7 +3,7 @@ LIB1ASMFUNCS_CACHE = _ic_invalidate
|
||||
|
||||
LIB2FUNCS_EXTRA=
|
||||
|
||||
MULTILIB_OPTIONS += m3e/m4
|
||||
MULTILIB_OPTIONS= $(MULTILIB_ENDIAN) m3e/m4
|
||||
MULTILIB_DIRNAMES=
|
||||
MULTILIB_MATCHES =
|
||||
|
||||
|
1
gcc/config/sh/t-monolib
Normal file
1
gcc/config/sh/t-monolib
Normal file
@ -0,0 +1 @@
|
||||
MULTILIB_OPTIONS=
|
Loading…
Reference in New Issue
Block a user