forked from OSchip/llvm-project
[mips][mips64r6] Add SELEQZ and SELNEZ instructions
Differential Revision: http://reviews.llvm.org/D3743 llvm-svn: 208987
This commit is contained in:
parent
81774baf4d
commit
6110e3bce6
|
@ -129,6 +129,9 @@ class MSUBF_D_ENC : COP1_3R_FM<0b011001, FIELD_FMT_D>;
|
|||
class SEL_D_ENC : COP1_3R_FM<0b010000, FIELD_FMT_D>;
|
||||
class SEL_S_ENC : COP1_3R_FM<0b010000, FIELD_FMT_S>;
|
||||
|
||||
class SELEQZ_ENC : SPECIAL_3R_FM<0b00000, 0b110101>;
|
||||
class SELNEZ_ENC : SPECIAL_3R_FM<0b00000, 0b110111>;
|
||||
|
||||
class LWPC_ENC : PCREL19_FM<OPCODE2_LWPC>;
|
||||
class LWUPC_ENC : PCREL19_FM<OPCODE2_LWUPC>;
|
||||
|
||||
|
@ -413,6 +416,16 @@ class COP1_4R_DESC_BASE<string instr_asm, RegisterOperand FGROpnd> {
|
|||
class SEL_D_DESC : COP1_4R_DESC_BASE<"sel.d", FGR64Opnd>;
|
||||
class SEL_S_DESC : COP1_4R_DESC_BASE<"sel.s", FGR32Opnd>;
|
||||
|
||||
class SELEQNE_Z_DESC_BASE<string instr_asm, RegisterOperand GPROpnd> {
|
||||
dag OutOperandList = (outs GPROpnd:$rd);
|
||||
dag InOperandList = (ins GPROpnd:$rs, GPROpnd:$rt);
|
||||
string AsmString = !strconcat(instr_asm, "\t$rd, $rs, $rt");
|
||||
list<dag> Pattern = [];
|
||||
}
|
||||
|
||||
class SELEQZ_DESC : SELEQNE_Z_DESC_BASE<"seleqz", GPR32Opnd>;
|
||||
class SELNEZ_DESC : SELEQNE_Z_DESC_BASE<"selnez", GPR32Opnd>;
|
||||
|
||||
class MADDF_S_DESC : COP1_4R_DESC_BASE<"maddf.s", FGR32Opnd>;
|
||||
class MADDF_D_DESC : COP1_4R_DESC_BASE<"maddf.d", FGR64Opnd>;
|
||||
class MSUBF_S_DESC : COP1_4R_DESC_BASE<"msubf.s", FGR32Opnd>;
|
||||
|
@ -529,10 +542,10 @@ def MULU : MULU_ENC, MULU_DESC, ISA_MIPS32R6;
|
|||
def NAL; // BAL with rd=0
|
||||
def RINT_D : RINT_D_ENC, RINT_D_DESC, ISA_MIPS32R6;
|
||||
def RINT_S : RINT_S_ENC, RINT_S_DESC, ISA_MIPS32R6;
|
||||
def SELEQZ;
|
||||
def SELEQZ : SELEQZ_ENC, SELEQZ_DESC, ISA_MIPS32R6;
|
||||
def SELEQZ_D : SELEQZ_D_ENC, SELEQZ_D_DESC, ISA_MIPS32R6;
|
||||
def SELEQZ_S : SELEQZ_S_ENC, SELEQZ_S_DESC, ISA_MIPS32R6;
|
||||
def SELNEZ;
|
||||
def SELNEZ : SELNEZ_ENC, SELNEZ_DESC, ISA_MIPS32R6;
|
||||
def SELNEZ_D : SELNEZ_D_ENC, SELNEZ_D_DESC, ISA_MIPS32R6;
|
||||
def SELNEZ_S : SELNEZ_S_ENC, SELNEZ_S_DESC, ISA_MIPS32R6;
|
||||
def SEL_D : SEL_D_ENC, SEL_D_DESC, ISA_MIPS32R6;
|
||||
|
|
|
@ -76,6 +76,8 @@
|
|||
msubf.d $f2,$f3,$f4 # CHECK: msubf.d $f2, $f3, $f4 # encoding: [0x46,0x24,0x18,0x99]
|
||||
sel.d $f0,$f1,$f2 # CHECK: sel.d $f0, $f1, $f2 # encoding: [0x46,0x22,0x08,0x10]
|
||||
sel.s $f0,$f1,$f2 # CHECK: sel.s $f0, $f1, $f2 # encoding: [0x46,0x02,0x08,0x10]
|
||||
seleqz $2,$3,$4 # CHECK: seleqz $2, $3, $4 # encoding: [0x00,0x64,0x10,0x35]
|
||||
selnez $2,$3,$4 # CHECK: selnez $2, $3, $4 # encoding: [0x00,0x64,0x10,0x37]
|
||||
max.s $f0, $f2, $f4 # CHECK: max.s $f0, $f2, $f4 # encoding: [0x46,0x04,0x10,0x1d]
|
||||
max.d $f0, $f2, $f4 # CHECK: max.d $f0, $f2, $f4 # encoding: [0x46,0x24,0x10,0x1d]
|
||||
min.s $f0, $f2, $f4 # CHECK: min.s $f0, $f2, $f4 # encoding: [0x46,0x04,0x10,0x1c]
|
||||
|
|
|
@ -89,6 +89,8 @@
|
|||
msubf.d $f2,$f3,$f4 # CHECK: msubf.d $f2, $f3, $f4 # encoding: [0x46,0x24,0x18,0x99]
|
||||
sel.d $f0,$f1,$f2 # CHECK: sel.d $f0, $f1, $f2 # encoding: [0x46,0x22,0x08,0x10]
|
||||
sel.s $f0,$f1,$f2 # CHECK: sel.s $f0, $f1, $f2 # encoding: [0x46,0x02,0x08,0x10]
|
||||
seleqz $2,$3,$4 # CHECK: seleqz $2, $3, $4 # encoding: [0x00,0x64,0x10,0x35]
|
||||
selnez $2,$3,$4 # CHECK: selnez $2, $3, $4 # encoding: [0x00,0x64,0x10,0x37]
|
||||
max.s $f0, $f2, $f4 # CHECK: max.s $f0, $f2, $f4 # encoding: [0x46,0x04,0x10,0x1d]
|
||||
max.d $f0, $f2, $f4 # CHECK: max.d $f0, $f2, $f4 # encoding: [0x46,0x24,0x10,0x1d]
|
||||
min.s $f0, $f2, $f4 # CHECK: min.s $f0, $f2, $f4 # encoding: [0x46,0x04,0x10,0x1c]
|
||||
|
|
Loading…
Reference in New Issue