summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2017-06-23 22:52:36 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2017-06-23 22:52:36 +0000
commit3d8b65f712461c661bde5b3387abf6210e35e0b6 (patch)
tree6a0329fe573d570b8c60dcc2b360870f818d56a7 /test
parent51e4b46c2c6a2046bd98312d8e6f9bd976fdc8dd (diff)
ARM: move some logic from processFixupValue to applyFixup.
processFixupValue is called on every relaxation iteration. applyFixup is only called once at the very end. applyFixup is then the correct place to do last minute changes and value checks. While here, do proper range checks again for fixup_arm_thumb_bl. We used to do it, but dropped because of thumb2. We now do it again, but use the thumb2 range. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@306177 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/MC/ARM/thumb-branches.s36
1 files changed, 27 insertions, 9 deletions
diff --git a/test/MC/ARM/thumb-branches.s b/test/MC/ARM/thumb-branches.s
index b4cdfa12a55..977df4619c4 100644
--- a/test/MC/ARM/thumb-branches.s
+++ b/test/MC/ARM/thumb-branches.s
@@ -1,25 +1,43 @@
-@ RUN: llvm-mc < %s -triple thumbv5-linux-gnueabi -filetype=obj -o - \
-@ RUN: | llvm-readobj -r | FileCheck %s
+@ RUN: not llvm-mc %s -triple thumbv5-linux-gnueabi -filetype=obj -o /dev/null 2>&1 | FileCheck %s
+ .code 16
bl end
- .space 0x3fffff
+ .space 0x1ffffff
end:
bl end2
- .space 0x3fffff
+ .space 0x1ffffff
.global end2
end2:
bl end3
- .space 0x400000
+ .space 0x2000000
.global end3
end3:
+// CHECK-NOT: error
+// CHECK: [[@LINE+1]]:{{[0-9]}}: error: Relocation out of range
bl end4
- .space 0x400000
+// CHECK-NOT: error
+ .space 0x2000000
end4:
-@ CHECK: 0x400003 R_ARM_THM_CALL end2 0x0
-@ CHECK: 0x800006 R_ARM_THM_CALL end3 0x0
-@ CHECK: 0xC0000A R_ARM_THM_CALL end4 0x0
+start1:
+ .space 0x1fffffc
+ bl start1
+
+ .global start2
+start2:
+ .space 0x1fffffc
+ bl start2
+
+ .global start3
+start3:
+ .space 0x1fffffd
+ bl start3
+
+start4:
+ .space 0x1fffffd
+// CHECK: [[@LINE+1]]:{{[0-9]}}: error: Relocation out of range
+ bl start4