aboutsummaryrefslogtreecommitdiff
path: root/test/MC/ARM
diff options
context:
space:
mode:
authorEli Bendersky <eliben@google.com>2012-12-20 19:07:30 +0000
committerEli Bendersky <eliben@google.com>2012-12-20 19:07:30 +0000
commit16996c4940ad4248dc2a874d060b30e94e55b672 (patch)
treeebad7a2df61d26d9fbbba91bb3353beaab52df57 /test/MC/ARM
parent4766ef41b31e4f97bce1179c3b0398303bf65356 (diff)
Tests for the aligned bundling support added in r170718
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170719 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/MC/ARM')
-rw-r--r--test/MC/ARM/AlignedBundling/group-bundle-arm.s37
-rw-r--r--test/MC/ARM/AlignedBundling/lit.local.cfg6
2 files changed, 43 insertions, 0 deletions
diff --git a/test/MC/ARM/AlignedBundling/group-bundle-arm.s b/test/MC/ARM/AlignedBundling/group-bundle-arm.s
new file mode 100644
index 0000000000..6a5e454bf0
--- /dev/null
+++ b/test/MC/ARM/AlignedBundling/group-bundle-arm.s
@@ -0,0 +1,37 @@
+# RUN: llvm-mc -filetype=obj -triple armv7-linux-gnueabi %s -o - \
+# RUN: | llvm-objdump -no-show-raw-insn -triple armv7 -disassemble - | FileCheck %s
+
+# On ARM each instruction is 4 bytes long so padding for individual
+# instructions should not be inserted. However, for bundle=locked groups
+# it can be.
+
+ .syntax unified
+ .text
+ .bundle_align_mode 4
+
+ bx lr
+ and r1, r1, r2
+ and r1, r1, r2
+ .bundle_lock
+ bx r9
+ bx r8
+ .bundle_unlock
+# CHECK: c: nop
+# CHECK-NEXT: 10: bx
+# CHECK-NEXT: 14: bx
+
+ # pow2 here
+ .align 4
+ bx lr
+ .bundle_lock
+ bx r9
+ bx r9
+ bx r9
+ bx r8
+ .bundle_unlock
+# CHECK: 20: bx
+# CHECK-NEXT: 24: nop
+# CHECK-NEXT: 28: nop
+# CHECK-NEXT: 2c: nop
+# CHECK-NEXT: 30: bx
+
diff --git a/test/MC/ARM/AlignedBundling/lit.local.cfg b/test/MC/ARM/AlignedBundling/lit.local.cfg
new file mode 100644
index 0000000000..6c49f08b74
--- /dev/null
+++ b/test/MC/ARM/AlignedBundling/lit.local.cfg
@@ -0,0 +1,6 @@
+config.suffixes = ['.s']
+
+targets = set(config.root.targets_to_build.split())
+if not 'X86' in targets:
+ config.unsupported = True
+