let Inst{21-30} = xo;
}
+class XForm_mbar<bits<6> opcode, bits<10> xo, dag OOL, dag IOL, string asmstr,
+ InstrItinClass itin>
+ : I<opcode, OOL, IOL, asmstr, itin> {
+ bits<5> MO;
+
+ let Inst{6-10} = MO;
+ let Inst{21-30} = xo;
+}
+
class XForm_srin<bits<6> opcode, bits<10> xo, dag OOL, dag IOL, string asmstr,
InstrItinClass itin>
: I<opcode, OOL, IOL, asmstr, itin> {
def WAIT : XForm_24_sync<31, 62, (outs), (ins i32imm:$L),
"wait $L", IIC_LdStLoad, []>;
+def MBAR : XForm_mbar<31, 854, (outs), (ins u5imm:$MO),
+ "mbar $MO", IIC_LdStLoad>, Requires<[IsBookE]>;
+
def MTSR: XForm_sr<31, 210, (outs), (ins gprc:$RS, u4imm:$SR),
"mtsr $SR, $RS", IIC_SprMTSR>;
# CHECK: wait 2
0x7c 0x40 0x00 0x7c
+# CHECK: mbar 1
+0x7c 0x20 0x06 0xac
+
# CHECK: dcbf 2, 3
0x7c 0x02 0x18 0xac
# CHECK-BE: wait 2 # encoding: [0x7c,0x40,0x00,0x7c]
# CHECK-LE: wait 2 # encoding: [0x7c,0x00,0x40,0x7c]
wait 2
+# CHECK-BE: mbar 1 # encoding: [0x7c,0x20,0x06,0xac]
+# CHECK-LE: mbar 1 # encoding: [0xac,0x06,0x20,0x7c]
+ mbar 1
# Extended mnemonics