[PATCH] D75143: [ARM][Thumb2] support .w assembler qualifier for dmb/dsb/isb

Stefan Agner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 25 14:56:01 PST 2020


falstaff84 created this revision.
falstaff84 added a reviewer: psmith.
Herald added subscribers: llvm-commits, hiraditya, kristof.beyls.
Herald added a project: LLVM.
falstaff84 retitled this revision from "[ARM][Thumb2] support .w assembler qualifier for" to "[ARM][Thumb2] support .w assembler qualifier for dmb/dsb/isb".

Support the explicit wide assembler qualifier for the dmb/dsb/isb synchronization barrier instructions.


https://reviews.llvm.org/D75143

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


Index: llvm/test/MC/ARM/basic-thumb2-instructions.s
===================================================================
--- llvm/test/MC/ARM/basic-thumb2-instructions.s
+++ llvm/test/MC/ARM/basic-thumb2-instructions.s
@@ -686,6 +686,7 @@
         dmb osh
         dmb oshst
         dmb
+        dmb.w
 
 @ CHECK: dmb	sy                      @ encoding: [0xbf,0xf3,0x5f,0x8f]
 @ CHECK: dmb	st                      @ encoding: [0xbf,0xf3,0x5e,0x8f]
@@ -717,6 +718,7 @@
 @ CHECK: dmb	osh                     @ encoding: [0xbf,0xf3,0x53,0x8f]
 @ CHECK: dmb	oshst                   @ encoding: [0xbf,0xf3,0x52,0x8f]
 @ CHECK: dmb	sy                      @ encoding: [0xbf,0xf3,0x5f,0x8f]
+@ CHECK: dmb	sy                      @ encoding: [0xbf,0xf3,0x5f,0x8f]
 
 
 @------------------------------------------------------------------------------
@@ -752,6 +754,7 @@
         dsb osh
         dsb oshst
         dsb
+        dsb.w
 
 @ CHECK: dsb	sy                      @ encoding: [0xbf,0xf3,0x4f,0x8f]
 @ CHECK: dsb	st                      @ encoding: [0xbf,0xf3,0x4e,0x8f]
@@ -783,6 +786,7 @@
 @ CHECK: dsb	osh                     @ encoding: [0xbf,0xf3,0x43,0x8f]
 @ CHECK: dsb	oshst                   @ encoding: [0xbf,0xf3,0x42,0x8f]
 @ CHECK: dsb	sy                      @ encoding: [0xbf,0xf3,0x4f,0x8f]
+@ CHECK: dsb	sy                      @ encoding: [0xbf,0xf3,0x4f,0x8f]
 
 
 @------------------------------------------------------------------------------
@@ -810,12 +814,14 @@
 @------------------------------------------------------------------------------
         isb sy
         isb
+        isb.w
         isb #15
         isb #1
 
 @ CHECK: isb	sy                      @ encoding: [0xbf,0xf3,0x6f,0x8f]
 @ CHECK: isb	sy                      @ encoding: [0xbf,0xf3,0x6f,0x8f]
 @ CHECK: isb	sy                      @ encoding: [0xbf,0xf3,0x6f,0x8f]
+@ CHECK: isb	sy                      @ encoding: [0xbf,0xf3,0x6f,0x8f]
 @ CHECK: isb	#0x1                    @ encoding: [0xbf,0xf3,0x61,0x8f]
 
 
Index: llvm/lib/Target/ARM/ARMInstrThumb2.td
===================================================================
--- llvm/lib/Target/ARM/ARMInstrThumb2.td
+++ llvm/lib/Target/ARM/ARMInstrThumb2.td
@@ -4849,8 +4849,11 @@
 
 // Memory barriers
 def : InstAlias<"dmb${p}", (t2DMB 0xf, pred:$p), 0>, Requires<[HasDB]>;
+def : InstAlias<"dmb${p}.w", (t2DMB 0xf, pred:$p), 0>, Requires<[HasDB]>;
 def : InstAlias<"dsb${p}", (t2DSB 0xf, pred:$p), 0>, Requires<[HasDB]>;
+def : InstAlias<"dsb${p}.w", (t2DSB 0xf, pred:$p), 0>, Requires<[HasDB]>;
 def : InstAlias<"isb${p}", (t2ISB 0xf, pred:$p), 0>, Requires<[HasDB]>;
+def : InstAlias<"isb${p}.w", (t2ISB 0xf, pred:$p), 0>, Requires<[HasDB]>;
 
 // Non-predicable aliases of a predicable DSB: the predicate is (14, 0) where
 // 14 = AL (always execute) and 0 = "instruction doesn't read the CPSR".


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D75143.246579.patch
Type: text/x-patch
Size: 2851 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200225/80d5a52f/attachment.bin>


More information about the llvm-commits mailing list