aboutsummaryrefslogtreecommitdiffstats
path: root/test/MC/ARM
diff options
context:
space:
mode:
authorJoey Gouly <joey.gouly@arm.com>2013-09-05 16:05:45 +0000
committerJoey Gouly <joey.gouly@arm.com>2013-09-05 16:05:45 +0000
commit67990fa3ba3b0d61f7f94cadfebd7c78ed8f6a71 (patch)
treeb3ddf4f2cab29561a3a348dd0171098dff8988dd /test/MC/ARM
parent4897151df698197f0eb5c4085545312dbb20c94d (diff)
downloadexternal_llvm-67990fa3ba3b0d61f7f94cadfebd7c78ed8f6a71.zip
external_llvm-67990fa3ba3b0d61f7f94cadfebd7c78ed8f6a71.tar.gz
external_llvm-67990fa3ba3b0d61f7f94cadfebd7c78ed8f6a71.tar.bz2
[ARMv8] Add some missing tests for DSB/DMB.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190060 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/MC/ARM')
-rw-r--r--test/MC/ARM/basic-thumb2-instructions-v8.s37
1 files changed, 36 insertions, 1 deletions
diff --git a/test/MC/ARM/basic-thumb2-instructions-v8.s b/test/MC/ARM/basic-thumb2-instructions-v8.s
index 09edaf7..69a7cff 100644
--- a/test/MC/ARM/basic-thumb2-instructions-v8.s
+++ b/test/MC/ARM/basic-thumb2-instructions-v8.s
@@ -1,6 +1,6 @@
@ New ARMv8 T32 encodings
-@ RUN: llvm-mc -triple thumbv8 -show-encoding < %s | FileCheck %s --check-prefix=CHECK-V8
+@ RUN: not llvm-mc -triple thumbv8 -show-encoding -mattr=+db < %s | FileCheck %s --check-prefix=CHECK-V8
@ RUN: not llvm-mc -triple thumbv7 -show-encoding < %s 2>&1 | FileCheck %s --check-prefix=CHECK-V7
@ HLT
@@ -34,3 +34,38 @@
@ CHECK-V7: error: instruction requires: armv8
@ CHECK-V7: error: instruction requires: armv8
@ CHECK-V7: error: instruction requires: armv8
+
+@------------------------------------------------------------------------------
+@ DMB (v8 barriers)
+@------------------------------------------------------------------------------
+ dmb ishld
+ dmb oshld
+ dmb nshld
+ dmb ld
+ dmb #20
+
+@ CHECK-V8: dmb ishld @ encoding: [0xbf,0xf3,0x59,0x8f]
+@ CHECK-V8: dmb oshld @ encoding: [0xbf,0xf3,0x51,0x8f]
+@ CHECK-V8: dmb nshld @ encoding: [0xbf,0xf3,0x55,0x8f]
+@ CHECK-V8: dmb ld @ encoding: [0xbf,0xf3,0x5d,0x8f]
+@ CHECK-V7: error: invalid operand for instruction
+@ CHECK-V7: error: invalid operand for instruction
+@ CHECK-V7: error: invalid operand for instruction
+@ CHECK-V7: error: invalid operand for instruction
+@ CHECK-V7: error: immediate value out of range
+
+@------------------------------------------------------------------------------
+@ DSB (v8 barriers)
+@------------------------------------------------------------------------------
+ dsb ishld
+ dsb oshld
+ dsb nshld
+ dsb ld
+
+@ CHECK-V8: dsb ishld @ encoding: [0xbf,0xf3,0x49,0x8f]
+@ CHECK-V8: dsb oshld @ encoding: [0xbf,0xf3,0x41,0x8f]
+@ CHECK-V8: dsb nshld @ encoding: [0xbf,0xf3,0x45,0x8f]
+@ CHECK-V8: dsb ld @ encoding: [0xbf,0xf3,0x4d,0x8f]
+@ CHECK-V7: error: invalid operand for instruction
+@ CHECK-V7: error: invalid operand for instruction
+@ CHECK-V7: error: invalid operand for instruction