diff options
author | Evan Cheng <evan.cheng@apple.com> | 2009-08-01 00:16:10 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2009-08-01 00:16:10 +0000 |
commit | b620724e614c6594e7b269b6ea7d8483947ea944 (patch) | |
tree | 9b453a3e3f9472971e4a79c679c843bb321d1f30 /lib/Target/ARM/ARMSubtarget.cpp | |
parent | 675fb65bf436b398f2ab3861b0fa05e3028a83d1 (diff) |
Fix Thumb2 function call isel. Thumb1 and Thumb2 should share the same
instructions for calls since BL and BLX are always 32-bit long and BX is always
16-bit long.
Also, we should be using BLX to call external function stubs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77756 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/ARM/ARMSubtarget.cpp')
-rw-r--r-- | lib/Target/ARM/ARMSubtarget.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Target/ARM/ARMSubtarget.cpp b/lib/Target/ARM/ARMSubtarget.cpp index e611088574..d30592b0f4 100644 --- a/lib/Target/ARM/ARMSubtarget.cpp +++ b/lib/Target/ARM/ARMSubtarget.cpp @@ -75,6 +75,10 @@ ARMSubtarget::ARMSubtarget(const Module &M, const std::string &FS, } } + // Thumb2 implies at least V6T2. + if (ARMArchVersion < V6T2 && ThumbMode >= Thumb2) + ARMArchVersion = V6T2; + if (Len >= 10) { if (TT.find("-darwin") != std::string::npos) // arm-darwin |