aboutsummaryrefslogtreecommitdiffstats
path: root/test/MC/MachO
diff options
context:
space:
mode:
authorJim Grosbach <grosbach@apple.com>2012-01-18 21:54:16 +0000
committerJim Grosbach <grosbach@apple.com>2012-01-18 21:54:16 +0000
commit256ba4f42a16da2b3ffc757aa7bf191890765580 (patch)
tree480705dad56b993a5f93afa9f21bdd00e854e3b4 /test/MC/MachO
parentec4ceb797a963b2d24b02d40fad6cc456fac3e5b (diff)
downloadexternal_llvm-256ba4f42a16da2b3ffc757aa7bf191890765580.zip
external_llvm-256ba4f42a16da2b3ffc757aa7bf191890765580.tar.gz
external_llvm-256ba4f42a16da2b3ffc757aa7bf191890765580.tar.bz2
Thumb2 relaxation for LDR(literal).
If the fixup is out of range for the Thumb1 instruction, relax it to the Thumb2 encoding instead. rdar://10711829 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148424 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/MC/MachO')
-rw-r--r--test/MC/MachO/ARM/relax-thumb-ldr-literal.s13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/MC/MachO/ARM/relax-thumb-ldr-literal.s b/test/MC/MachO/ARM/relax-thumb-ldr-literal.s
new file mode 100644
index 0000000..8d26f6d
--- /dev/null
+++ b/test/MC/MachO/ARM/relax-thumb-ldr-literal.s
@@ -0,0 +1,13 @@
+@ RUN: llvm-mc -n -triple thumbv7-apple-darwin10 %s -filetype=obj -o %t.obj
+@ RUN: macho-dump --dump-section-data < %t.obj > %t.dump
+@ RUN: FileCheck < %t.dump %s
+
+ .syntax unified
+ .text
+ .thumb
+ .thumb_func _foo
+_foo:
+ ldr r2, (_foo - 4)
+
+@ CHECK: ('num_reloc', 0)
+@ CHECK: ('_section_data', '5ff80820')