aboutsummaryrefslogtreecommitdiffstats
path: root/test/MC/ARM
diff options
context:
space:
mode:
authorJiangning Liu <jiangning.liu@arm.com>2012-08-02 08:21:27 +0000
committerJiangning Liu <jiangning.liu@arm.com>2012-08-02 08:21:27 +0000
commitc1b7ca5ba28ded2d83ae534c8e072c2538d43295 (patch)
tree8e16398e07d0ce3dee1067da6f6a69cb38f44345 /test/MC/ARM
parent1fb27eccf5b7eabde9678d84411eb1df8a693683 (diff)
downloadexternal_llvm-c1b7ca5ba28ded2d83ae534c8e072c2538d43295.zip
external_llvm-c1b7ca5ba28ded2d83ae534c8e072c2538d43295.tar.gz
external_llvm-c1b7ca5ba28ded2d83ae534c8e072c2538d43295.tar.bz2
Fix #13138, a bug around ARM instruction DSB encoding and decoding issue.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161161 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/MC/ARM')
-rw-r--r--test/MC/ARM/basic-arm-instructions.s74
-rw-r--r--test/MC/ARM/basic-thumb2-instructions.s68
2 files changed, 142 insertions, 0 deletions
diff --git a/test/MC/ARM/basic-arm-instructions.s b/test/MC/ARM/basic-arm-instructions.s
index 45f5247..5c2a214 100644
--- a/test/MC/ARM/basic-arm-instructions.s
+++ b/test/MC/ARM/basic-arm-instructions.s
@@ -567,6 +567,23 @@ Lforward:
@------------------------------------------------------------------------------
@ DMB
@------------------------------------------------------------------------------
+ dmb #0xf
+ dmb #0xe
+ dmb #0xd
+ dmb #0xc
+ dmb #0xb
+ dmb #0xa
+ dmb #0x9
+ dmb #0x8
+ dmb #0x7
+ dmb #0x6
+ dmb #0x5
+ dmb #0x4
+ dmb #0x3
+ dmb #0x2
+ dmb #0x1
+ dmb #0x0
+
dmb sy
dmb st
dmb sh
@@ -583,6 +600,23 @@ Lforward:
@ CHECK: dmb sy @ encoding: [0x5f,0xf0,0x7f,0xf5]
@ CHECK: dmb st @ encoding: [0x5e,0xf0,0x7f,0xf5]
+@ CHECK: dmb #0xd @ encoding: [0x5d,0xf0,0x7f,0xf5]
+@ CHECK: dmb #0xc @ encoding: [0x5c,0xf0,0x7f,0xf5]
+@ CHECK: dmb ish @ encoding: [0x5b,0xf0,0x7f,0xf5]
+@ CHECK: dmb ishst @ encoding: [0x5a,0xf0,0x7f,0xf5]
+@ CHECK: dmb #0x9 @ encoding: [0x59,0xf0,0x7f,0xf5]
+@ CHECK: dmb #0x8 @ encoding: [0x58,0xf0,0x7f,0xf5]
+@ CHECK: dmb nsh @ encoding: [0x57,0xf0,0x7f,0xf5]
+@ CHECK: dmb nshst @ encoding: [0x56,0xf0,0x7f,0xf5]
+@ CHECK: dmb #0x5 @ encoding: [0x55,0xf0,0x7f,0xf5]
+@ CHECK: dmb #0x4 @ encoding: [0x54,0xf0,0x7f,0xf5]
+@ CHECK: dmb osh @ encoding: [0x53,0xf0,0x7f,0xf5]
+@ CHECK: dmb oshst @ encoding: [0x52,0xf0,0x7f,0xf5]
+@ CHECK: dmb #0x1 @ encoding: [0x51,0xf0,0x7f,0xf5]
+@ CHECK: dmb #0x0 @ encoding: [0x50,0xf0,0x7f,0xf5]
+
+@ CHECK: dmb sy @ encoding: [0x5f,0xf0,0x7f,0xf5]
+@ CHECK: dmb st @ encoding: [0x5e,0xf0,0x7f,0xf5]
@ CHECK: dmb ish @ encoding: [0x5b,0xf0,0x7f,0xf5]
@ CHECK: dmb ish @ encoding: [0x5b,0xf0,0x7f,0xf5]
@ CHECK: dmb ishst @ encoding: [0x5a,0xf0,0x7f,0xf5]
@@ -598,6 +632,26 @@ Lforward:
@------------------------------------------------------------------------------
@ DSB
@------------------------------------------------------------------------------
+ dsb #0xf
+ dsb #0xe
+ dsb #0xd
+ dsb #0xc
+ dsb #0xb
+ dsb #0xa
+ dsb #0x9
+ dsb #0x8
+ dsb #0x7
+ dsb #0x6
+ dsb #0x5
+ dsb #0x4
+ dsb #0x3
+ dsb #0x2
+ dsb #0x1
+ dsb #0x0
+
+ dsb 8
+ dsb 7
+
dsb sy
dsb st
dsb sh
@@ -614,6 +668,26 @@ Lforward:
@ CHECK: dsb sy @ encoding: [0x4f,0xf0,0x7f,0xf5]
@ CHECK: dsb st @ encoding: [0x4e,0xf0,0x7f,0xf5]
+@ CHECK: dsb #0xd @ encoding: [0x4d,0xf0,0x7f,0xf5]
+@ CHECK: dsb #0xc @ encoding: [0x4c,0xf0,0x7f,0xf5]
+@ CHECK: dsb ish @ encoding: [0x4b,0xf0,0x7f,0xf5]
+@ CHECK: dsb ishst @ encoding: [0x4a,0xf0,0x7f,0xf5]
+@ CHECK: dsb #0x9 @ encoding: [0x49,0xf0,0x7f,0xf5]
+@ CHECK: dsb #0x8 @ encoding: [0x48,0xf0,0x7f,0xf5]
+@ CHECK: dsb nsh @ encoding: [0x47,0xf0,0x7f,0xf5]
+@ CHECK: dsb nshst @ encoding: [0x46,0xf0,0x7f,0xf5]
+@ CHECK: dsb #0x5 @ encoding: [0x45,0xf0,0x7f,0xf5]
+@ CHECK: dsb #0x4 @ encoding: [0x44,0xf0,0x7f,0xf5]
+@ CHECK: dsb osh @ encoding: [0x43,0xf0,0x7f,0xf5]
+@ CHECK: dsb oshst @ encoding: [0x42,0xf0,0x7f,0xf5]
+@ CHECK: dsb #0x1 @ encoding: [0x41,0xf0,0x7f,0xf5]
+@ CHECK: dsb #0x0 @ encoding: [0x40,0xf0,0x7f,0xf5]
+
+@ CHECK: dsb #0x8 @ encoding: [0x48,0xf0,0x7f,0xf5]
+@ CHECK: dsb nsh @ encoding: [0x47,0xf0,0x7f,0xf5]
+
+@ CHECK: dsb sy @ encoding: [0x4f,0xf0,0x7f,0xf5]
+@ CHECK: dsb st @ encoding: [0x4e,0xf0,0x7f,0xf5]
@ CHECK: dsb ish @ encoding: [0x4b,0xf0,0x7f,0xf5]
@ CHECK: dsb ish @ encoding: [0x4b,0xf0,0x7f,0xf5]
@ CHECK: dsb ishst @ encoding: [0x4a,0xf0,0x7f,0xf5]
diff --git a/test/MC/ARM/basic-thumb2-instructions.s b/test/MC/ARM/basic-thumb2-instructions.s
index 6a048cf..31ada98 100644
--- a/test/MC/ARM/basic-thumb2-instructions.s
+++ b/test/MC/ARM/basic-thumb2-instructions.s
@@ -417,6 +417,23 @@ _func:
@------------------------------------------------------------------------------
@ DMB
@------------------------------------------------------------------------------
+ dmb #0xf
+ dmb #0xe
+ dmb #0xd
+ dmb #0xc
+ dmb #0xb
+ dmb #0xa
+ dmb #0x9
+ dmb #0x8
+ dmb #0x7
+ dmb #0x6
+ dmb #0x5
+ dmb #0x4
+ dmb #0x3
+ dmb #0x2
+ dmb #0x1
+ dmb #0x0
+
dmb sy
dmb st
dmb sh
@@ -433,6 +450,23 @@ _func:
@ CHECK: dmb sy @ encoding: [0xbf,0xf3,0x5f,0x8f]
@ CHECK: dmb st @ encoding: [0xbf,0xf3,0x5e,0x8f]
+@ CHECK: dmb #0xd @ encoding: [0xbf,0xf3,0x5d,0x8f]
+@ CHECK: dmb #0xc @ encoding: [0xbf,0xf3,0x5c,0x8f]
+@ CHECK: dmb ish @ encoding: [0xbf,0xf3,0x5b,0x8f]
+@ CHECK: dmb ishst @ encoding: [0xbf,0xf3,0x5a,0x8f]
+@ CHECK: dmb #0x9 @ encoding: [0xbf,0xf3,0x59,0x8f]
+@ CHECK: dmb #0x8 @ encoding: [0xbf,0xf3,0x58,0x8f]
+@ CHECK: dmb nsh @ encoding: [0xbf,0xf3,0x57,0x8f]
+@ CHECK: dmb nshst @ encoding: [0xbf,0xf3,0x56,0x8f]
+@ CHECK: dmb #0x5 @ encoding: [0xbf,0xf3,0x55,0x8f]
+@ CHECK: dmb #0x4 @ encoding: [0xbf,0xf3,0x54,0x8f]
+@ CHECK: dmb osh @ encoding: [0xbf,0xf3,0x53,0x8f]
+@ CHECK: dmb oshst @ encoding: [0xbf,0xf3,0x52,0x8f]
+@ CHECK: dmb #0x1 @ encoding: [0xbf,0xf3,0x51,0x8f]
+@ CHECK: dmb #0x0 @ encoding: [0xbf,0xf3,0x50,0x8f]
+
+@ CHECK: dmb sy @ encoding: [0xbf,0xf3,0x5f,0x8f]
+@ CHECK: dmb st @ encoding: [0xbf,0xf3,0x5e,0x8f]
@ CHECK: dmb ish @ encoding: [0xbf,0xf3,0x5b,0x8f]
@ CHECK: dmb ish @ encoding: [0xbf,0xf3,0x5b,0x8f]
@ CHECK: dmb ishst @ encoding: [0xbf,0xf3,0x5a,0x8f]
@@ -449,6 +483,23 @@ _func:
@------------------------------------------------------------------------------
@ DSB
@------------------------------------------------------------------------------
+ dsb #0xf
+ dsb #0xe
+ dsb #0xd
+ dsb #0xc
+ dsb #0xb
+ dsb #0xa
+ dsb #0x9
+ dsb #0x8
+ dsb #0x7
+ dsb #0x6
+ dsb #0x5
+ dsb #0x4
+ dsb #0x3
+ dsb #0x2
+ dsb #0x1
+ dsb #0x0
+
dsb sy
dsb st
dsb sh
@@ -465,6 +516,23 @@ _func:
@ CHECK: dsb sy @ encoding: [0xbf,0xf3,0x4f,0x8f]
@ CHECK: dsb st @ encoding: [0xbf,0xf3,0x4e,0x8f]
+@ CHECK: dsb #0xd @ encoding: [0xbf,0xf3,0x4d,0x8f]
+@ CHECK: dsb #0xc @ encoding: [0xbf,0xf3,0x4c,0x8f]
+@ CHECK: dsb ish @ encoding: [0xbf,0xf3,0x4b,0x8f]
+@ CHECK: dsb ishst @ encoding: [0xbf,0xf3,0x4a,0x8f]
+@ CHECK: dsb #0x9 @ encoding: [0xbf,0xf3,0x49,0x8f]
+@ CHECK: dsb #0x8 @ encoding: [0xbf,0xf3,0x48,0x8f]
+@ CHECK: dsb nsh @ encoding: [0xbf,0xf3,0x47,0x8f]
+@ CHECK: dsb nshst @ encoding: [0xbf,0xf3,0x46,0x8f]
+@ CHECK: dsb #0x5 @ encoding: [0xbf,0xf3,0x45,0x8f]
+@ CHECK: dsb #0x4 @ encoding: [0xbf,0xf3,0x44,0x8f]
+@ CHECK: dsb osh @ encoding: [0xbf,0xf3,0x43,0x8f]
+@ CHECK: dsb oshst @ encoding: [0xbf,0xf3,0x42,0x8f]
+@ CHECK: dsb #0x1 @ encoding: [0xbf,0xf3,0x41,0x8f]
+@ CHECK: dsb #0x0 @ encoding: [0xbf,0xf3,0x40,0x8f]
+
+@ CHECK: dsb sy @ encoding: [0xbf,0xf3,0x4f,0x8f]
+@ CHECK: dsb st @ encoding: [0xbf,0xf3,0x4e,0x8f]
@ CHECK: dsb ish @ encoding: [0xbf,0xf3,0x4b,0x8f]
@ CHECK: dsb ish @ encoding: [0xbf,0xf3,0x4b,0x8f]
@ CHECK: dsb ishst @ encoding: [0xbf,0xf3,0x4a,0x8f]