summaryrefslogtreecommitdiffstats
path: root/test/MC
diff options
context:
space:
mode:
authorJoey Gouly <joey.gouly@arm.com>2013-09-05 15:35:24 +0000
committerJoey Gouly <joey.gouly@arm.com>2013-09-05 15:35:24 +0000
commit4897151df698197f0eb5c4085545312dbb20c94d (patch)
treec01a96e1254455cb74d6ebcdf1993bdee36c7a31 /test/MC
parentb5523ce1bb50e86942ad5273e3a89872c4d26b73 (diff)
downloadexternal_llvm-4897151df698197f0eb5c4085545312dbb20c94d.zip
external_llvm-4897151df698197f0eb5c4085545312dbb20c94d.tar.gz
external_llvm-4897151df698197f0eb5c4085545312dbb20c94d.tar.bz2
[ARMv8] Implement the new DMB/DSB operands.
This removes the custom ISD Node: MEMBARRIER and replaces it with an intrinsic. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190055 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/MC')
-rw-r--r--test/MC/ARM/basic-arm-instructions-v8.s37
1 files changed, 36 insertions, 1 deletions
diff --git a/test/MC/ARM/basic-arm-instructions-v8.s b/test/MC/ARM/basic-arm-instructions-v8.s
index 130a4c5..a447e0f 100644
--- a/test/MC/ARM/basic-arm-instructions-v8.s
+++ b/test/MC/ARM/basic-arm-instructions-v8.s
@@ -1,6 +1,6 @@
@ New ARMv8 A32 encodings
-@ RUN: llvm-mc -triple armv8 -show-encoding < %s | FileCheck %s --check-prefix=CHECK-V8
+@ RUN: not llvm-mc -triple armv8 -show-encoding -mattr=+db < %s | FileCheck %s --check-prefix=CHECK-V8
@ RUN: not llvm-mc -triple armv7 -show-encoding < %s 2>&1 | FileCheck %s --check-prefix=CHECK-V7
@ HLT
@@ -15,3 +15,38 @@
hltal #0
@ CHECK-V8: hlt #0 @ encoding: [0x70,0x00,0x00,0xe1]
@ CHECK-V7: error: instruction requires: armv8
+
+@------------------------------------------------------------------------------
+@ DMB (v8 barriers)
+@------------------------------------------------------------------------------
+ dmb ishld
+ dmb oshld
+ dmb nshld
+ dmb ld
+ dmb #20
+
+@ CHECK-V8: dmb ishld @ encoding: [0x59,0xf0,0x7f,0xf5]
+@ CHECK-V8: dmb oshld @ encoding: [0x51,0xf0,0x7f,0xf5]
+@ CHECK-V8: dmb nshld @ encoding: [0x55,0xf0,0x7f,0xf5]
+@ CHECK-V8: dmb ld @ encoding: [0x5d,0xf0,0x7f,0xf5]
+@ 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: [0x49,0xf0,0x7f,0xf5]
+@ CHECK-V8: dsb oshld @ encoding: [0x41,0xf0,0x7f,0xf5]
+@ CHECK-V8: dsb nshld @ encoding: [0x45,0xf0,0x7f,0xf5]
+@ CHECK-V8: dsb ld @ encoding: [0x4d,0xf0,0x7f,0xf5]
+@ CHECK-V7: error: invalid operand for instruction
+@ CHECK-V7: error: invalid operand for instruction
+@ CHECK-V7: error: invalid operand for instruction