summaryrefslogtreecommitdiffstats
path: root/llvm/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
commit801b42de3132c4927b2e4a66baefbbce9143f66a (patch)
tree86100627c3fd311bbbee1176f41cc6ffab89de64 /llvm/test
parentf6242c3e90023baf746bca765f843e6c7f0d5660 (diff)
downloadbcm5719-llvm-801b42de3132c4927b2e4a66baefbbce9143f66a.tar.gz
bcm5719-llvm-801b42de3132c4927b2e4a66baefbbce9143f66a.zip
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. llvm-svn: 306177
Diffstat (limited to 'llvm/test')
-rw-r--r--llvm/test/MC/ARM/thumb-branches.s36
1 files changed, 27 insertions, 9 deletions
diff --git a/llvm/test/MC/ARM/thumb-branches.s b/llvm/test/MC/ARM/thumb-branches.s
index b4cdfa12a55..977df4619c4 100644
--- a/llvm/test/MC/ARM/thumb-branches.s
+++ b/llvm/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
OpenPOWER on IntegriCloud