forked from OSchip/llvm-project
Add new base instruction def for cmpi, cmp, slt and sltu so that def/uses
proper. Fixed this already a few days ago for slti. llvm-svn: 175975
This commit is contained in:
parent
e6907bc0e6
commit
80070bd439
|
@ -283,6 +283,11 @@ class FRR16_ins<bits<5> f, string asmstr, InstrItinClass itin> :
|
|||
!strconcat(asmstr, "\t$rx, $ry"), [], itin> {
|
||||
}
|
||||
|
||||
class FRR16R_ins<bits<5> f, string asmstr, InstrItinClass itin> :
|
||||
FRR16<f, (outs), (ins CPU16Regs:$rx, CPU16Regs:$ry),
|
||||
!strconcat(asmstr, "\t$rx, $ry"), [], itin> {
|
||||
}
|
||||
|
||||
class FRRTR16_ins<string asmstr> :
|
||||
MipsPseudo16<(outs CPU16Regs:$rz), (ins CPU16Regs:$rx, CPU16Regs:$ry),
|
||||
!strconcat(asmstr, "\t$rx, $ry\n\tmove\t$rz, $$t8"), []> ;
|
||||
|
@ -610,7 +615,7 @@ def BtnezT8SltiuX16: FEXT_T8I8I16_ins<"btnez", "sltiu">,
|
|||
// Purpose: Compare
|
||||
// To compare the contents of two GPRs.
|
||||
//
|
||||
def CmpRxRy16: FRR16_ins<0b01010, "cmp", IIAlu> {
|
||||
def CmpRxRy16: FRR16R_ins<0b01010, "cmp", IIAlu> {
|
||||
let Defs = [T8];
|
||||
}
|
||||
|
||||
|
@ -619,7 +624,7 @@ def CmpRxRy16: FRR16_ins<0b01010, "cmp", IIAlu> {
|
|||
// Purpose: Compare Immediate
|
||||
// To compare a constant with the contents of a GPR.
|
||||
//
|
||||
def CmpiRxImm16: FRI16_ins<0b01110, "cmpi", IIAlu> {
|
||||
def CmpiRxImm16: FRI16R_ins<0b01110, "cmpi", IIAlu> {
|
||||
let Defs = [T8];
|
||||
}
|
||||
|
||||
|
@ -628,7 +633,7 @@ def CmpiRxImm16: FRI16_ins<0b01110, "cmpi", IIAlu> {
|
|||
// Purpose: Compare Immediate (Extended)
|
||||
// To compare a constant with the contents of a GPR.
|
||||
//
|
||||
def CmpiRxImmX16: FEXT_RI16_ins<0b01110, "cmpi", IIAlu> {
|
||||
def CmpiRxImmX16: FEXT_RI16R_ins<0b01110, "cmpi", IIAlu> {
|
||||
let Defs = [T8];
|
||||
}
|
||||
|
||||
|
@ -1110,7 +1115,7 @@ def SltiuCCRxImmX16: FEXT_CCRXI16_ins<"sltiu">;
|
|||
// Purpose: Set on Less Than
|
||||
// To record the result of a less-than comparison.
|
||||
//
|
||||
def SltRxRy16: FRR16_ins<0b00010, "slt", IIAlu>{
|
||||
def SltRxRy16: FRR16R_ins<0b00010, "slt", IIAlu>{
|
||||
let Defs = [T8];
|
||||
}
|
||||
|
||||
|
@ -1120,7 +1125,7 @@ def SltCCRxRy16: FCCRR16_ins<"slt">;
|
|||
// Purpose: Set on Less Than Unsigned
|
||||
// To record the result of an unsigned less-than comparison.
|
||||
//
|
||||
def SltuRxRy16: FRR16_ins<0b00011, "sltu", IIAlu>{
|
||||
def SltuRxRy16: FRR16R_ins<0b00011, "sltu", IIAlu>{
|
||||
let Defs = [T8];
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue