All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gustavo Zacarias <gustavo@zacarias.com.ar>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] arch/arm: add support for thumb(1) mode
Date: Wed, 17 Jul 2013 12:39:15 -0300	[thread overview]
Message-ID: <1374075555-9599-1-git-send-email-gustavo@zacarias.com.ar> (raw)

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
---
 arch/Config.in.arm | 28 ++++++++++++++++++++++++++--
 1 file changed, 26 insertions(+), 2 deletions(-)

diff --git a/arch/Config.in.arm b/arch/Config.in.arm
index b2fe257..7fef04c 100644
--- a/arch/Config.in.arm
+++ b/arch/Config.in.arm
@@ -31,6 +31,9 @@ config BR2_ARM_CPU_HAS_VFPV4
 	bool
 	select BR2_ARM_CPU_HAS_VFPV3
 
+config BR2_ARM_CPU_HAS_THUMB
+	bool
+
 config BR2_ARM_CPU_HAS_THUMB2
 	bool
 
@@ -43,28 +46,38 @@ choice
 
 config BR2_arm7tdmi
 	bool "arm7tdmi"
+	select BR2_ARM_CPU_HAS_THUMB
 config BR2_arm720t
 	bool "arm720t"
+	select BR2_ARM_CPU_HAS_THUMB
 config BR2_arm920t
 	bool "arm920t"
+	select BR2_ARM_CPU_HAS_THUMB
 config BR2_arm922t
 	bool "arm922t"
+	select BR2_ARM_CPU_HAS_THUMB
 config BR2_arm926t
 	bool "arm926t"
 	select BR2_ARM_CPU_MAYBE_HAS_VFPV2
+	select BR2_ARM_CPU_HAS_THUMB
 config BR2_arm10t
 	bool "arm10t"
+	select BR2_ARM_CPU_HAS_THUMB
 config BR2_arm1136jf_s_r0
 	bool "arm1136jf_s rev0"
 	select BR2_ARM_CPU_HAS_VFPV2
+	select BR2_ARM_CPU_HAS_THUMB
 config BR2_arm1136jf_s_r1
 	bool "arm1136jf_s rev1"
 	select BR2_ARM_CPU_HAS_VFPV2
+	select BR2_ARM_CPU_HAS_THUMB
 config BR2_arm1176jz_s
 	bool "arm1176jz-s"
+	select BR2_ARM_CPU_HAS_THUMB
 config BR2_arm1176jzf_s
 	bool "arm1176jzf-s"
 	select BR2_ARM_CPU_HAS_VFPV2
+	select BR2_ARM_CPU_HAS_THUMB
 config BR2_cortex_a5
 	bool "cortex-A5"
 	select BR2_ARM_CPU_MAYBE_HAS_NEON
@@ -99,6 +112,7 @@ config BR2_strongarm
 	bool "strongarm sa110/sa1100"
 config BR2_xscale
 	bool "xscale"
+	select BR2_ARM_CPU_HAS_THUMB
 config BR2_iwmmxt
 	bool "iwmmxt"
 endchoice
@@ -286,7 +300,7 @@ endchoice
 
 choice
 	prompt "ARM instruction set"
-	depends on BR2_ARM_CPU_HAS_THUMB2
+	depends on BR2_ARM_CPU_HAS_THUMB || BR2_ARM_CPU_HAS_THUMB2
 
 config BR2_ARM_INSTRUCTIONS_ARM_CHOICE
 	bool "ARM"
@@ -294,8 +308,18 @@ config BR2_ARM_INSTRUCTIONS_ARM_CHOICE
 	  This option instructs the compiler to generate regular ARM
 	  instructions, that are all 32 bits wide.
 
+config BR2_ARM_INSTRUCTIONS_THUMB
+	bool "Thumb"
+	depends on BR2_ARM_CPU_HAS_THUMB
+	help
+	  This option instructions the compiler to generate Thumb
+	  instructions, which allows to mix 16 bits instructions and
+	  32 bits instructions. This generally provides a much smaller
+	  compiled binary size.
+
 config BR2_ARM_INSTRUCTIONS_THUMB2
 	bool "Thumb2"
+	depends on BR2_ARM_CPU_HAS_THUMB2
 	help
 	  This option instructions the compiler to generate Thumb2
 	  instructions, which allows to mix 16 bits instructions and
@@ -306,7 +330,7 @@ endchoice
 
 config BR2_ARM_INSTRUCTIONS_ARM
 	def_bool y
-	depends on !BR2_ARM_INSTRUCTIONS_THUMB2
+	depends on !(BR2_ARM_INSTRUCTIONS_THUMB || BR2_ARM_INSTRUCTIONS_THUMB2)
 
 config BR2_ARCH
 	default "arm"	if BR2_arm
-- 
1.8.1.5

             reply	other threads:[~2013-07-17 15:39 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-17 15:39 Gustavo Zacarias [this message]
2013-07-17 15:58 ` [Buildroot] [PATCH] arch/arm: add support for thumb(1) mode Thomas Petazzoni
2013-07-17 16:03   ` Gustavo Zacarias
2013-07-17 19:58     ` Thomas Petazzoni
2013-07-17 22:25       ` Gustavo Zacarias
2013-07-18  7:19         ` Thomas Petazzoni
2013-07-18 11:08           ` Gustavo Zacarias
2013-07-18 11:24             ` Thomas Petazzoni
2013-07-18  8:10         ` Peter Korsgaard
2013-07-18 16:07           ` Gustavo Zacarias
2013-07-18 22:32             ` Peter Korsgaard
2013-07-18 22:46               ` Gustavo Zacarias
2013-07-19  8:19                 ` Peter Korsgaard
2013-07-19 13:06                   ` Gustavo Zacarias
2013-07-17 22:22 ` Peter Korsgaard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1374075555-9599-1-git-send-email-gustavo@zacarias.com.ar \
    --to=gustavo@zacarias.com.ar \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.