mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-13 22:58:50 +00:00
[XCore] Add missing l2rus instructions.
These instructions are not targeted by the compiler but they are needed for the MC layer. llvm-svn: 173634
This commit is contained in:
parent
c1f9afeb84
commit
373bdcfeb5
@ -449,6 +449,12 @@ DecodeL2OpInstructionFail(MCInst &Inst, unsigned Insn, uint64_t Address,
|
||||
case 0x12c:
|
||||
Inst.setOpcode(XCore::ASHR_l2rus);
|
||||
return DecodeL2RUSBitpInstruction(Inst, Insn, Address, Decoder);
|
||||
case 0x12d:
|
||||
Inst.setOpcode(XCore::OUTPW_l2rus);
|
||||
return DecodeL2RUSBitpInstruction(Inst, Insn, Address, Decoder);
|
||||
case 0x12e:
|
||||
Inst.setOpcode(XCore::INPW_l2rus);
|
||||
return DecodeL2RUSBitpInstruction(Inst, Insn, Address, Decoder);
|
||||
case 0x13c:
|
||||
Inst.setOpcode(XCore::LDAWF_l2rus);
|
||||
return DecodeL2RUSInstruction(Inst, Insn, Address, Decoder);
|
||||
|
@ -451,7 +451,6 @@ def CRC_l3r : _FL3RSrcDst<0b101011100, (outs GRRegs:$dst),
|
||||
(int_xcore_crc32 GRRegs:$src1, GRRegs:$src2,
|
||||
GRRegs:$src3))]>;
|
||||
|
||||
// TODO inpw, outpw
|
||||
let mayStore=1 in {
|
||||
def ST16_l3r : _FL3R<0b100001100, (outs),
|
||||
(ins GRRegs:$val, GRRegs:$addr, GRRegs:$offset),
|
||||
@ -462,6 +461,14 @@ def ST8_l3r : _FL3R<0b100011100, (outs),
|
||||
"st8 $val, $addr[$offset]", []>;
|
||||
}
|
||||
|
||||
def INPW_l2rus : _FL2RUSBitp<0b100101110, (outs GRRegs:$a),
|
||||
(ins GRRegs:$b, i32imm:$c), "inpw $a, res[$b], $c",
|
||||
[]>;
|
||||
|
||||
def OUTPW_l2rus : _FL2RUSBitp<0b100101101, (outs),
|
||||
(ins GRRegs:$a, GRRegs:$b, i32imm:$c),
|
||||
"outpw res[$b], $a, $c", []>;
|
||||
|
||||
// Four operand long
|
||||
let Constraints = "$e = $a,$f = $b" in {
|
||||
def MACCU_l4r : _FL4RSrcDstSrcDst<
|
||||
|
@ -403,6 +403,12 @@
|
||||
# CHECK: ldaw r8, r2[-9]
|
||||
0x09 0xfd 0xec 0xa7
|
||||
|
||||
# CHECK: inpw r6, res[r1], 8
|
||||
0xe4 0xfc 0xee 0x97
|
||||
|
||||
# CHECK: outpw res[r3], r0, 2
|
||||
0x0e 0xf8 0xed 0x97
|
||||
|
||||
# ru6 / lru6 instructions
|
||||
|
||||
# CHECK: bt r6, -5
|
||||
|
Loading…
Reference in New Issue
Block a user