aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9
diff options
context:
space:
mode:
authorLai Wei-Chih <Robert.Lai@mediatek.com>2014-04-14 21:12:48 -0700
committerAndrew Hsieh <andrewhsieh@google.com>2014-04-22 16:16:21 -0700
commitb06379a7a69d300f4a071de3ece380fec6a7e3ef (patch)
treec4614a901cfde5a348ef655a6b24a97e1c678ea5 /gcc-4.9
parent771c2f9542b4e84b08c107060319603d12ec8867 (diff)
downloadtoolchain_gcc-b06379a7a69d300f4a071de3ece380fec6a7e3ef.tar.gz
toolchain_gcc-b06379a7a69d300f4a071de3ece380fec6a7e3ef.tar.bz2
toolchain_gcc-b06379a7a69d300f4a071de3ece380fec6a7e3ef.zip
[4.9] Add an internal switch -minline-thumb1-jumptable to ARM gcc4.9
See a3529b2d6b2bcc7136fd67e00e539301942e74d1 Change-Id: Ie1e6f08d437f661096e0ca14b89cb15b7b2dd538
Diffstat (limited to 'gcc-4.9')
-rw-r--r--gcc-4.9/gcc/config/arm/arm.h3
-rw-r--r--gcc-4.9/gcc/config/arm/arm.md2
-rw-r--r--gcc-4.9/gcc/config/arm/arm.opt4
-rw-r--r--gcc-4.9/gcc/config/arm/elf.h3
4 files changed, 9 insertions, 3 deletions
diff --git a/gcc-4.9/gcc/config/arm/arm.h b/gcc-4.9/gcc/config/arm/arm.h
index 597e69c6e..4d9121436 100644
--- a/gcc-4.9/gcc/config/arm/arm.h
+++ b/gcc-4.9/gcc/config/arm/arm.h
@@ -1999,10 +1999,11 @@ enum arm_auto_incmodes
#define CASE_VECTOR_PC_RELATIVE (TARGET_THUMB2 \
|| (TARGET_THUMB1 \
+ && !inline_thumb1_jump_table \
&& (optimize_size || flag_pic)))
#define CASE_VECTOR_SHORTEN_MODE(min, max, body) \
- (TARGET_THUMB1 \
+ (TARGET_THUMB1 && !inline_thumb1_jump_table \
? (min >= 0 && max < 512 \
? (ADDR_DIFF_VEC_FLAGS (body).offset_unsigned = 1, QImode) \
: min >= -256 && max < 256 \
diff --git a/gcc-4.9/gcc/config/arm/arm.md b/gcc-4.9/gcc/config/arm/arm.md
index 4b81ee272..662465f2a 100644
--- a/gcc-4.9/gcc/config/arm/arm.md
+++ b/gcc-4.9/gcc/config/arm/arm.md
@@ -9674,7 +9674,7 @@
(match_operand:SI 2 "const_int_operand" "") ; total range
(match_operand:SI 3 "" "") ; table label
(match_operand:SI 4 "" "")] ; Out of range label
- "TARGET_32BIT || optimize_size || flag_pic"
+ "TARGET_32BIT || ((optimize_size || flag_pic) && !inline_thumb1_jump_table)"
"
{
enum insn_code code;
diff --git a/gcc-4.9/gcc/config/arm/arm.opt b/gcc-4.9/gcc/config/arm/arm.opt
index d80f1f13b..d8b19cc00 100644
--- a/gcc-4.9/gcc/config/arm/arm.opt
+++ b/gcc-4.9/gcc/config/arm/arm.opt
@@ -193,6 +193,10 @@ mthumb-interwork
Target Report Mask(INTERWORK)
Support calls between Thumb and ARM instruction sets
+minline-thumb1-jumptable
+Target Report Var(inline_thumb1_jump_table)
+Inline Thumb1 Jump table code
+
mtls-dialect=
Target RejectNegative Joined Enum(tls_type) Var(target_tls_dialect) Init(TLS_GNU)
Specify thread local storage scheme
diff --git a/gcc-4.9/gcc/config/arm/elf.h b/gcc-4.9/gcc/config/arm/elf.h
index 15d53ee99..2edf520de 100644
--- a/gcc-4.9/gcc/config/arm/elf.h
+++ b/gcc-4.9/gcc/config/arm/elf.h
@@ -101,7 +101,8 @@
the code more efficient, but for Thumb-1 it's better to put them out of
band unless we are generating compressed tables. */
#define JUMP_TABLES_IN_TEXT_SECTION \
- (TARGET_32BIT || (TARGET_THUMB && (optimize_size || flag_pic)))
+ (TARGET_32BIT || (TARGET_THUMB && !inline_thumb1_jump_table \
+ && (optimize_size || flag_pic)))
#ifndef LINK_SPEC
#define LINK_SPEC "%{mbig-endian:-EB} %{mlittle-endian:-EL} -X"