def MTSPR : XFXForm_1<31, 467, (outs), (ins i32imm:$SPR, gprc:$RT),
"mtspr $SPR, $RT", SprMTSPR>;
+def MFTB : XFXForm_1<31, 371, (outs gprc:$RT), (ins i32imm:$SPR),
+ "mftb $RT, $SPR", SprMFTB>;
+
let Uses = [CTR] in {
def MFCTR : XFXForm_1_ext<31, 339, 9, (outs gprc:$rT), (ins),
"mfctr $rT", SprMFSPR>,
def : InstAlias<"mtxer $Rx", (MTSPR 1, gprc:$Rx)>;
def : InstAlias<"mfxer $Rx", (MFSPR gprc:$Rx, 1)>;
+def : InstAlias<"mftb $Rx", (MFTB gprc:$Rx, 268)>;
+def : InstAlias<"mftbu $Rx", (MFTB gprc:$Rx, 269)>;
+
def : InstAlias<"xnop", (XORI R0, R0, 0)>;
def : InstAlias<"mr $rA, $rB", (OR8 g8rc:$rA, g8rc:$rB, g8rc:$rB)>;
# CHECK: wait 2 # encoding: [0x7c,0x40,0x00,0x7c]
waitimpl
+# Time base instructions
+
+# CHECK: mftb 2, 123 # encoding: [0x7c,0x5b,0x1a,0xe6]
+ mftb 2, 123
+# CHECK: mftb 2, 268 # encoding: [0x7c,0x4c,0x42,0xe6]
+ mftb 2
+# CHECK: mftb 2, 269 # encoding: [0x7c,0x4d,0x42,0xe6]
+ mftbu 2
+