summaryrefslogtreecommitdiff
path: root/conf/machine
diff options
context:
space:
mode:
authorPaul Sokolovsky <pmiscml@gmail.com>2006-12-22 09:44:03 +0000
committerPaul Sokolovsky <pmiscml@gmail.com>2006-12-22 09:44:03 +0000
commit16c89f95689e9ead5f0438bbb5c0d601a7fdff74 (patch)
tree943fcd074f542c81a7e11e159abbe731ab290e23 /conf/machine
parentf0ac326b0c83fad9315d406e12b5f2e992674913 (diff)
parentc0c21a6d23cf70c053dbf39f85402e2d4ba21677 (diff)
merge of '5ea326f3b26f2123d331eace3ce101ac2983534e'
and 'fd22e946abe117169eb2505f30a12a2aa70f1a71'
Diffstat (limited to 'conf/machine')
-rw-r--r--conf/machine/include/tune-thumb.conf32
1 files changed, 32 insertions, 0 deletions
diff --git a/conf/machine/include/tune-thumb.conf b/conf/machine/include/tune-thumb.conf
new file mode 100644
index 0000000000..2a12443b3d
--- /dev/null
+++ b/conf/machine/include/tune-thumb.conf
@@ -0,0 +1,32 @@
+#tune file for thumb instructions
+
+ARM_INSTRUCTION_SET ?= "arm"
+# "arm" "thumb"
+# The instruction set the compiler should use when generating application
+# code. The kernel is always compiled with arm code at present. arm code
+# is the original 32 bit ARM instruction set, thumb code is the 16 bit
+# encoded RISC sub-set. Thumb code is smaller (maybe 70% of the ARM size)
+# but requires more instructions (140% for 70% smaller code) so may be
+# slower.
+
+THUMB_INTERWORK ?= "no"
+# "yes" "no"
+# Whether to compile with code to allow interworking between the two
+# instruction sets. This allows thumb code to be executed on a primarily
+# arm system and vice versa. It is strongly recommended that DISTROs not
+# turn this off - the actual cost is very small.
+
+OVERRIDE_THUMB = "${@['', ':thumb'][bb.data.getVar('ARM_INSTRUCTION_SET', d, 1) == 'thumb']}"
+OVERRIDE_INTERWORK = "${@['', ':thumb-interwork'][bb.data.getVar('THUMB_INTERWORK', d, 1) == 'yes']}"
+OVERRIDES += "${OVERRIDE_THUMB}${OVERRIDE_INTERWORK}"
+
+# Compiler and linker options for application code and kernel code. These
+# options ensure that the compiler has the correct settings for the selected
+# instruction set and interworking.
+ARM_INTERWORK_M_OPT = "${@['-mno-thumb-interwork', '-mthumb-interwork'][bb.data.getVar('THUMB_INTERWORK', d, 1) == 'yes']}"
+ARM_THUMB_M_OPT = "${@['-mno-thumb', '-mthumb'][bb.data.getVar('ARM_INSTRUCTION_SET', d, 1) == 'thumb']}"
+
+#
+TARGET_CC_ARCH += "${ARM_INTERWORK_M_OPT} ${ARM_THUMB_M_OPT}"
+TARGET_CC_KERNEL_ARCH += "-mno-thumb"
+