[llvm-commits] CVS: llvm/lib/Target/PowerPC/PowerPCInstrFormats.td PowerPCInstrInfo.td
Nate Begeman
natebegeman at mac.com
Mon Aug 8 13:05:03 PDT 2005
Changes in directory llvm/lib/Target/PowerPC:
PowerPCInstrFormats.td updated: 1.43 -> 1.44
PowerPCInstrInfo.td updated: 1.75 -> 1.76
---
Log message:
Fix JIT encoding of ppc mfocrf instruction; the operands were reversed
---
Diffs of the changes: (+20 -6)
PowerPCInstrFormats.td | 20 +++++++++++++++++---
PowerPCInstrInfo.td | 6 +++---
2 files changed, 20 insertions(+), 6 deletions(-)
Index: llvm/lib/Target/PowerPC/PowerPCInstrFormats.td
diff -u llvm/lib/Target/PowerPC/PowerPCInstrFormats.td:1.43 llvm/lib/Target/PowerPC/PowerPCInstrFormats.td:1.44
--- llvm/lib/Target/PowerPC/PowerPCInstrFormats.td:1.43 Tue Apr 19 00:21:30 2005
+++ llvm/lib/Target/PowerPC/PowerPCInstrFormats.td Mon Aug 8 15:04:51 2005
@@ -378,19 +378,33 @@
let Inst{31} = 0;
}
-class XFXForm_5<bits<6> opcode, bit mfcrf, bits<10> xo,
- dag OL, string asmstr> : I<opcode, OL, asmstr> {
+class XFXForm_5<bits<6> opcode, bits<10> xo, dag OL, string asmstr>
+ : I<opcode, OL, asmstr> {
bits<8> FXM;
bits<5> ST;
let Inst{6-10} = ST;
- let Inst{11} = mfcrf;
+ let Inst{11} = 0;
let Inst{12-19} = FXM;
let Inst{20} = 0;
let Inst{21-30} = xo;
let Inst{31} = 0;
}
+class XFXForm_5a<bits<6> opcode, bits<10> xo, dag OL, string asmstr>
+ : I<opcode, OL, asmstr> {
+ bits<5> ST;
+ bits<8> FXM;
+
+ let Inst{6-10} = ST;
+ let Inst{11} = 1;
+ let Inst{12-19} = FXM;
+ let Inst{20} = 0;
+ let Inst{21-30} = xo;
+ let Inst{31} = 0;
+}
+
+
class XFXForm_7<bits<6> opcode, bits<10> xo, dag OL, string asmstr>
: XFXForm_1<opcode, xo, OL, asmstr>;
Index: llvm/lib/Target/PowerPC/PowerPCInstrInfo.td
diff -u llvm/lib/Target/PowerPC/PowerPCInstrInfo.td:1.75 llvm/lib/Target/PowerPC/PowerPCInstrInfo.td:1.76
--- llvm/lib/Target/PowerPC/PowerPCInstrInfo.td:1.75 Thu Jul 21 15:44:43 2005
+++ llvm/lib/Target/PowerPC/PowerPCInstrInfo.td Mon Aug 8 15:04:52 2005
@@ -364,10 +364,10 @@
def MFCTR : XFXForm_1_ext<31, 339, 288, (ops GPRC:$rT), "mfctr $rT">;
def MFLR : XFXForm_1_ext<31, 339, 256, (ops GPRC:$rT), "mflr $rT">;
def MFCR : XFXForm_3<31, 19, (ops GPRC:$rT), "mfcr $rT">;
-def MTCRF : XFXForm_5<31, 0, 144, (ops CRRC:$FXM, GPRC:$rS),
+def MTCRF : XFXForm_5<31, 144, (ops CRRC:$FXM, GPRC:$rS),
"mtcrf $FXM, $rS">;
-def MFOCRF : XFXForm_5<31, 1, 19, (ops GPRC:$rT, crbitm:$FXM),
- "mfcr $rT, $FXM">;
+def MFOCRF : XFXForm_5a<31, 19, (ops GPRC:$rT, crbitm:$FXM),
+ "mfcr $rT, $FXM">;
def MTCTR : XFXForm_7_ext<31, 467, 288, (ops GPRC:$rS), "mtctr $rS">;
def MTLR : XFXForm_7_ext<31, 467, 256, (ops GPRC:$rS), "mtlr $rS">;
More information about the llvm-commits
mailing list