From 5a1269e53c80708c3e3f53569791c66eab0cae12 Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Thu, 21 Dec 2006 09:57:56 +0000 Subject: tune-thumb: add tune file to enable thumb stuff on armvXt --- conf/machine/include/tune-thumb.conf | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 conf/machine/include/tune-thumb.conf (limited to 'conf/machine') diff --git a/conf/machine/include/tune-thumb.conf b/conf/machine/include/tune-thumb.conf new file mode 100644 index 0000000000..862c2c3fcc --- /dev/null +++ b/conf/machine/include/tune-thumb.conf @@ -0,0 +1,2 @@ +TARGET_CC_ARCH += " -mthumb " + -- cgit v1.2.3 From b7f57b9ab3093fa4a3258a5b309b14e8681bb5df Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Thu, 21 Dec 2006 14:51:30 +0000 Subject: tune-thumb: add more elaborate version which should allow setting ARM_INSTRUCTION_SET = "arm" in recipes as a killswitch, stolen from ixp4xx.conf --- conf/machine/include/tune-thumb.conf | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) (limited to 'conf/machine') diff --git a/conf/machine/include/tune-thumb.conf b/conf/machine/include/tune-thumb.conf index 862c2c3fcc..02c4fd0927 100644 --- a/conf/machine/include/tune-thumb.conf +++ b/conf/machine/include/tune-thumb.conf @@ -1,2 +1,32 @@ -TARGET_CC_ARCH += " -mthumb " +#tune file for thumb instructions + +ARM_INSTRUCTION_SET ?= "thumb" +# "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 ?= "yes" +# "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" -- cgit v1.2.3 From 716fd1edbf1d83605e21ef5bd9411d5b4ca07b02 Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Thu, 21 Dec 2006 15:02:33 +0000 Subject: tune-thumb: fix typos --- conf/machine/include/tune-thumb.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'conf/machine') diff --git a/conf/machine/include/tune-thumb.conf b/conf/machine/include/tune-thumb.conf index 02c4fd0927..6f84f66405 100644 --- a/conf/machine/include/tune-thumb.conf +++ b/conf/machine/include/tune-thumb.conf @@ -27,6 +27,6 @@ ARM_INTERWORK_M_OPT = "${@['-mno-thumb-interwork', '-mthumb-interwork'][bb.data. 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" +TARGET_CC_ARCH += "${ARM_INTERWORK_M_OPT} ${ARM_THUMB_M_OPT}" +TARGET_CC_KERNEL_ARCH += "-mno-thumb" -- cgit v1.2.3 From 309448c08ed867660018554a9ee23b7af3bb5e21 Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Thu, 21 Dec 2006 19:22:45 +0000 Subject: tune-thumb: convert to negative logic --- conf/machine/include/tune-thumb.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'conf/machine') diff --git a/conf/machine/include/tune-thumb.conf b/conf/machine/include/tune-thumb.conf index 6f84f66405..2a12443b3d 100644 --- a/conf/machine/include/tune-thumb.conf +++ b/conf/machine/include/tune-thumb.conf @@ -1,6 +1,6 @@ #tune file for thumb instructions -ARM_INSTRUCTION_SET ?= "thumb" +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 @@ -9,7 +9,7 @@ ARM_INSTRUCTION_SET ?= "thumb" # but requires more instructions (140% for 70% smaller code) so may be # slower. -THUMB_INTERWORK ?= "yes" +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 -- cgit v1.2.3