diff options
author | dim <dim@FreeBSD.org> | 2015-02-13 21:19:02 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2015-02-13 21:19:02 +0000 |
commit | 4c104a70d57de539b25107b2f406c13d06f66e37 (patch) | |
tree | c4b45b01a4baf6f37c5b11ed9bf50f31bc8a8086 /contrib/llvm | |
parent | 2210ee3484799e1043204646a4aaf9818a5bc319 (diff) | |
download | FreeBSD-src-4c104a70d57de539b25107b2f406c13d06f66e37.zip FreeBSD-src-4c104a70d57de539b25107b2f406c13d06f66e37.tar.gz |
MFC r271025, r271029, r271030 (by sbruno):
MFV: Only emit movw on ARMv6T2
Building for the FreeBSD default target ARMv6 was emitting movw ASM on certain
test cases (found building qmake4/5 for ARM). Don't do that, moreover, the AS
in base doesn't understand this instruction for this target. One would need
to use --integrated-as to get this to build if desired.
http://llvm.org/viewvc/llvm-project?view=revision&revision=216989
Submitted by: ian
Reviewed by: dim
Obtained from: llvm.org
Diffstat (limited to 'contrib/llvm')
-rw-r--r-- | contrib/llvm/lib/Target/ARM/ARMInstrInfo.td | 3 | ||||
-rw-r--r-- | contrib/llvm/patches/patch-r271024-llvm-r216989-fix-movm-armv6.diff | 14 |
2 files changed, 16 insertions, 1 deletions
diff --git a/contrib/llvm/lib/Target/ARM/ARMInstrInfo.td b/contrib/llvm/lib/Target/ARM/ARMInstrInfo.td index 2042c04..7a14b8e 100644 --- a/contrib/llvm/lib/Target/ARM/ARMInstrInfo.td +++ b/contrib/llvm/lib/Target/ARM/ARMInstrInfo.td @@ -3248,7 +3248,8 @@ def : ARMPat<(ARMaddc GPR:$src, imm0_65535_neg:$imm), def : ARMPat<(ARMadde GPR:$src, so_imm_not:$imm, CPSR), (SBCri GPR:$src, so_imm_not:$imm)>; def : ARMPat<(ARMadde GPR:$src, imm0_65535_neg:$imm, CPSR), - (SBCrr GPR:$src, (MOVi16 (imm_not_XFORM imm:$imm)))>; + (SBCrr GPR:$src, (MOVi16 (imm_not_XFORM imm:$imm)))>, + Requires<[IsARM, HasV6T2]>; // Note: These are implemented in C++ code, because they have to generate // ADD/SUBrs instructions, which use a complex pattern that a xform function diff --git a/contrib/llvm/patches/patch-r271024-llvm-r216989-fix-movm-armv6.diff b/contrib/llvm/patches/patch-r271024-llvm-r216989-fix-movm-armv6.diff new file mode 100644 index 0000000..30577e7 --- /dev/null +++ b/contrib/llvm/patches/patch-r271024-llvm-r216989-fix-movm-armv6.diff @@ -0,0 +1,14 @@ +Index: lib/Target/ARM/ARMInstrInfo.td +=================================================================== +--- lib/Target/ARM/ARMInstrInfo.td (revision 271024) ++++ lib/Target/ARM/ARMInstrInfo.td (revision 271026) +@@ -3248,7 +3248,8 @@ + def : ARMPat<(ARMadde GPR:$src, so_imm_not:$imm, CPSR), + (SBCri GPR:$src, so_imm_not:$imm)>; + def : ARMPat<(ARMadde GPR:$src, imm0_65535_neg:$imm, CPSR), +- (SBCrr GPR:$src, (MOVi16 (imm_not_XFORM imm:$imm)))>; ++ (SBCrr GPR:$src, (MOVi16 (imm_not_XFORM imm:$imm)))>, ++ Requires<[IsARM, HasV6T2]>; + + // Note: These are implemented in C++ code, because they have to generate + // ADD/SUBrs instructions, which use a complex pattern that a xform function |