Thumb2 parsing and encoding for DMB.
authorJim Grosbach <grosbach@apple.com>
Tue, 6 Sep 2011 22:14:58 +0000 (22:14 +0000)
committerJim Grosbach <grosbach@apple.com>
Tue, 6 Sep 2011 22:14:58 +0000 (22:14 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139193 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/ARM/ARMInstrThumb2.td
test/MC/ARM/basic-thumb2-instructions.s

index 8a1bcc2d64ab37097598553b06e470f3297d3241..7fcb4b07e563f021aff96dc9fef0d8cafddecc36 100644 (file)
@@ -3588,3 +3588,7 @@ def : t2InstAlias<"teq${p} $Rn, $Rm",
 def : t2InstAlias<"tst${p} $Rn, $Rm",
                   (t2TSTrr GPRnopc:$Rn, rGPR:$Rm, pred:$p)>;
 
+// Memory barriers
+def : InstAlias<"dmb", (t2DMB 0xf)>, Requires<[IsThumb2, HasDB]>;
+def : InstAlias<"dsb", (t2DSB 0xf)>, Requires<[IsThumb2, HasDB]>;
+//def : InstAlias<"isb", (t2ISB 0xf)>, Requires<[IsThumb2, HasDB]>;
index 3039f2442f2d1930174272b6ed9b69150893d37e..13cf725edc8949b3bef1ea5e343875d01cf7e613 100644 (file)
@@ -368,6 +368,38 @@ _func:
 @ CHECK: dbg   #15                     @ encoding: [0xaf,0xf3,0xff,0x80]
 
 
+@------------------------------------------------------------------------------
+@ DMB
+@------------------------------------------------------------------------------
+        dmb sy
+        dmb st
+        dmb sh
+        dmb ish
+        dmb shst
+        dmb ishst
+        dmb un
+        dmb nsh
+        dmb unst
+        dmb nshst
+        dmb osh
+        dmb oshst
+        dmb
+
+@ 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]
+@ CHECK: dmb   ishst                   @ encoding: [0xbf,0xf3,0x5a,0x8f]
+@ CHECK: dmb   nsh                     @ encoding: [0xbf,0xf3,0x57,0x8f]
+@ CHECK: dmb   nsh                     @ encoding: [0xbf,0xf3,0x57,0x8f]
+@ CHECK: dmb   nshst                   @ encoding: [0xbf,0xf3,0x56,0x8f]
+@ CHECK: dmb   nshst                   @ encoding: [0xbf,0xf3,0x56,0x8f]
+@ CHECK: dmb   osh                     @ encoding: [0xbf,0xf3,0x53,0x8f]
+@ CHECK: dmb   oshst                   @ encoding: [0xbf,0xf3,0x52,0x8f]
+@ CHECK: dmb   sy                      @ encoding: [0xbf,0xf3,0x5f,0x8f]
+
+
 @------------------------------------------------------------------------------
 @ IT
 @------------------------------------------------------------------------------