diff mbox series

[OpenWrt-Devel,RFC] ARM Cortex-A9: build the userspace with Thumb-2 instructions

Message ID 20200619094523.3162-1-rsalvaterra@gmail.com
State Not Applicable
Delegated to: Petr Štetiar
Headers show
Series [OpenWrt-Devel,RFC] ARM Cortex-A9: build the userspace with Thumb-2 instructions | expand

Commit Message

Rui Salvaterra June 19, 2020, 9:45 a.m. UTC
Thumb-2 code is denser than pure ARM, reducing RAM usage and improving
performance due to better instruction cache footprint.

There's no reason for not enabling this feature on other ARMv7 targets
(cortex-a7 and cortex-a8), but I don't have the hardware to test it.

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
---
 include/target.mk | 3 +++
 1 file changed, 3 insertions(+)
diff mbox series

Patch

diff --git a/include/target.mk b/include/target.mk
index a2ceb7f783..dfc6f4e480 100644
--- a/include/target.mk
+++ b/include/target.mk
@@ -196,6 +196,9 @@  ifeq ($(DUMP),1)
     CPU_TYPE = sparc
     CPU_CFLAGS_ultrasparc = -mcpu=ultrasparc
   endif
+  ifeq ($(ARCH),arm)
+    CPU_CFLAGS_cortex-a9 = -mthumb
+  endif
   ifeq ($(ARCH),aarch64)
     CPU_TYPE ?= generic
     CPU_CFLAGS_generic = -mcpu=generic