mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-04-07 01:38:26 +00:00
Fix JIT encoding of ppc mfocrf instruction; the operands were reversed
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22707 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
4bc5f8071a
commit
394cd13ba3
@ -378,19 +378,33 @@ class XFXForm_3<bits<6> opcode, bits<10> xo, dag OL, string asmstr>
|
||||
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>;
|
||||
|
||||
|
@ -364,10 +364,10 @@ def MCRF : XLForm_3<19, 0, (ops CRRC:$BF, CRRC:$BFA),
|
||||
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">;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user