summaryrefslogtreecommitdiff
path: root/arch
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 /arch
parent72e58fb2a305d37fb7180b615ec52371d88caf58 (diff)
Merge the preliminary Super-H support from /branches/Super-H.
Diffstat (limited to 'arch')
-rw-r--r--arch/sh/config.in27
-rw-r--r--arch/sh/functions32
2 files changed, 59 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=
+}