DMB can just be a pat referencing MCR.
authorJim Grosbach <grosbach@apple.com>
Thu, 10 Mar 2011 19:27:17 +0000 (19:27 +0000)
committerJim Grosbach <grosbach@apple.com>
Thu, 10 Mar 2011 19:27:17 +0000 (19:27 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127423 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/ARM/ARMInstrInfo.td

index c28554baf6291b7012e794022804cd3063e15c5d..6aad275086f52826b4948cc6621d0254469295ca 100644 (file)
@@ -3250,13 +3250,6 @@ def DMB : AInoP<(outs), (ins memb_opt:$opt), MiscFrm, NoItinerary,
   let Inst{31-4} = 0xf57ff05;
   let Inst{3-0} = opt;
 }
-
-def DMB_MCR : AInoP<(outs), (ins GPR:$zero), MiscFrm, NoItinerary,
-                       "mcr", "\tp15, 0, $zero, c7, c10, 5",
-                       [(ARMMemBarrierMCR GPR:$zero)]>,
-                       Requires<[IsARM, HasV6]> {
-  // FIXME: add encoding
-}
 }
 
 def DSB : AInoP<(outs), (ins memb_opt:$opt), MiscFrm, NoItinerary,
@@ -3915,6 +3908,12 @@ def : ARMV5TEPat<(add GPR:$acc,
                       (sra (mul GPR:$a, sext_16_node:$b), (i32 16))),
                  (SMLAWB GPR:$a, GPR:$b, GPR:$acc)>;
 
+
+// Pre-v7 uses MCR for synchronization barriers.
+def : ARMPat<(ARMMemBarrierMCR GPR:$zero), (MCR 15, 0, GPR:$zero, 7, 10, 5)>,
+         Requires<[IsARM, HasV6]>;
+
+
 //===----------------------------------------------------------------------===//
 // Thumb Support
 //