summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2008-01-16 22:06:15 (GMT)
committerYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2008-01-16 22:06:15 (GMT)
commit7a5dafbdc802b2f329633a52164fea7a938d0f19 (patch)
tree2ae0d8c84fb16cee8dfc1f28744cd3764a413082
parent72e58fb2a305d37fb7180b615ec52371d88caf58 (diff)
Merge the preliminary Super-H support from /branches/Super-H.
-rw-r--r--arch/sh/config.in27
-rw-r--r--arch/sh/functions32
-rw-r--r--config/target.in11
3 files changed, 70 insertions, 0 deletions
diff --git a/arch/sh/config.in b/arch/sh/config.in
new file mode 100644
index 0000000..70a2966
--- /dev/null
+++ b/arch/sh/config.in
@@ -0,0 +1,27 @@
+# Super-H specific configuration file
+
+comment "Super-H specific configuration"
+
+choice
+ bool
+ prompt "Variant"
+
+config ARCH_SH_SH3
+ bool
+ prompt "sh3"
+
+config ARCH_SH_SH4
+ bool
+ prompt "sh4"
+
+config ARCH_SH_SH4A
+ bool
+ prompt "sh4a"
+
+endchoice
+
+config ARCH_SH_VARIANT
+ string
+ default "sh3" if ARCH_SH_SH3
+ default "sh4" if ARCH_SH_SH4
+ default "sh4a" if ARCH_SH_SH4A
diff --git a/arch/sh/functions b/arch/sh/functions
new file mode 100644
index 0000000..b6dbc02
--- /dev/null
+++ b/arch/sh/functions
@@ -0,0 +1,32 @@
+# Compute sh-specific values
+
+CT_DoArchValues () {
+ # The architecture part of the tuple:
+ CT_TARGET_ARCH="${CT_ARCH_SH_VARIANT}${target_endian_eb}"
+
+ # gcc ./configure flags
+ CT_ARCH_WITH_ARCH=
+ CT_ARCH_WITH_ABI=
+ CT_ARCH_WITH_CPU=
+ CT_ARCH_WITH_TUNE=
+ CT_ARCH_WITH_FPU=
+ CT_ARCH_WITH_FLOAT=
+
+ # Endianness stuff
+ case "${CT_ARCH_BE},${CT_ARCH_LE}" in
+ y,) CT_ARCH_ENDIAN_CFLAG=-mb;;
+ ,y) CT_ARCH_ENDIAN_CFLAG=-ml;;
+ esac
+
+ # CFLAGS
+ case "${CT_ARCH_SH_VARIENT}" in
+ sh3) CT_ARCH_ARCH_CFLAG=-m3;;
+ sh4*)
+ case "${CT_ARCH_FLOAT_HW},${CT_ARCH_FLOAT_SW}" in
+ y,) CT_ARCH_ARCH_CFLAG="-m4${CT_ARCH_SH_VARIANT##sh?}";;
+ ,y) CT_ARCH_ARCH_CFLAG="-m4${CT_ARCH_SH_VARIANT##sh?}-nofpu";;
+ esac
+ ;;
+ esac
+ CT_ARCH_FLOAT_CFLAG=
+}
diff --git a/config/target.in b/config/target.in
index 5c36531..23e1f98 100644
--- a/config/target.in
+++ b/config/target.in
@@ -9,6 +9,7 @@ config ARCH
default "arm" if ARCH_ARM
default "ia64" if ARCH_IA64
default "mips" if ARCH_MIPS
+ default "sh" if ARCH_SH
default "x86" if ARCH_x86
default "x86_64" if ARCH_x86_64
@@ -29,6 +30,13 @@ config ARCH_IA64
depends on EXPERIMENTAL
select ARCH_SUPPORTS_BOTH_ENDIAN
+config ARCH_SH
+ bool
+ prompt "sh (EXPERIMENTAL)"
+ depends on EXPERIMENTAL
+ select ARCH_SUPPORTS_BOTH_ENDIAN
+ select ARCH_DEFAULT_LE
+
config ARCH_MIPS
bool
prompt "mips"
@@ -84,6 +92,9 @@ endif
if ARCH_MIPS
source config/arch/mips/config.in
endif
+if ARCH_SH
+source config/arch/sh/config.in
+endif
if ARCH_x86
source config/arch/x86/config.in
endif