mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 20:51:52 +01:00
[X86] Fix feature flags on some MMX register instructions that really were introduced with SSE or SSE2.
llvm-svn: 252709
This commit is contained in:
parent
4d5ab434af
commit
c02d07a6f0
@ -327,6 +327,7 @@ def MMX_MOVFR642Qrr: MMXSDIi8<0xD6, MRMSrcReg, (outs VR64:$dst),
|
||||
}
|
||||
} // SchedRW
|
||||
|
||||
let Predicates = [HasSSE1] in
|
||||
def MMX_MOVNTQmr : MMXI<0xE7, MRMDestMem, (outs), (ins i64mem:$dst, VR64:$src),
|
||||
"movntq\t{$src, $dst|$dst, $src}",
|
||||
[(int_x86_mmx_movnt_dq addr:$dst, VR64:$src)],
|
||||
@ -356,6 +357,7 @@ defm MMX_PADDW : MMXI_binop_rm_int<0xFD, "paddw", int_x86_mmx_padd_w,
|
||||
MMX_INTALU_ITINS, 1>;
|
||||
defm MMX_PADDD : MMXI_binop_rm_int<0xFE, "paddd", int_x86_mmx_padd_d,
|
||||
MMX_INTALU_ITINS, 1>;
|
||||
let Predicates = [HasSSE2] in
|
||||
defm MMX_PADDQ : MMXI_binop_rm_int<0xD4, "paddq", int_x86_mmx_padd_q,
|
||||
MMX_INTALUQ_ITINS, 1>;
|
||||
defm MMX_PADDSB : MMXI_binop_rm_int<0xEC, "paddsb" , int_x86_mmx_padds_b,
|
||||
@ -383,6 +385,7 @@ defm MMX_PSUBW : MMXI_binop_rm_int<0xF9, "psubw", int_x86_mmx_psub_w,
|
||||
MMX_INTALU_ITINS>;
|
||||
defm MMX_PSUBD : MMXI_binop_rm_int<0xFA, "psubd", int_x86_mmx_psub_d,
|
||||
MMX_INTALU_ITINS>;
|
||||
let Predicates = [HasSSE2] in
|
||||
defm MMX_PSUBQ : MMXI_binop_rm_int<0xFB, "psubq", int_x86_mmx_psub_q,
|
||||
MMX_INTALUQ_ITINS>;
|
||||
|
||||
@ -409,8 +412,10 @@ defm MMX_PMULLW : MMXI_binop_rm_int<0xD5, "pmullw", int_x86_mmx_pmull_w,
|
||||
|
||||
defm MMX_PMULHW : MMXI_binop_rm_int<0xE5, "pmulhw", int_x86_mmx_pmulh_w,
|
||||
MMX_PMUL_ITINS, 1>;
|
||||
let Predicates = [HasSSE1] in
|
||||
defm MMX_PMULHUW : MMXI_binop_rm_int<0xE4, "pmulhuw", int_x86_mmx_pmulhu_w,
|
||||
MMX_PMUL_ITINS, 1>;
|
||||
let Predicates = [HasSSE2] in
|
||||
defm MMX_PMULUDQ : MMXI_binop_rm_int<0xF4, "pmuludq", int_x86_mmx_pmulu_dq,
|
||||
MMX_PMUL_ITINS, 1>;
|
||||
let isCommutable = 1 in
|
||||
@ -423,6 +428,7 @@ defm MMX_PMADDWD : MMXI_binop_rm_int<0xF5, "pmaddwd", int_x86_mmx_pmadd_wd,
|
||||
|
||||
defm MMX_PMADDUBSW : SS3I_binop_rm_int_mm<0x04, "pmaddubsw",
|
||||
int_x86_ssse3_pmadd_ub_sw, MMX_PMUL_ITINS>;
|
||||
let Predicates = [HasSSE1] in {
|
||||
defm MMX_PAVGB : MMXI_binop_rm_int<0xE0, "pavgb", int_x86_mmx_pavg_b,
|
||||
MMX_MISC_FUNC_ITINS, 1>;
|
||||
defm MMX_PAVGW : MMXI_binop_rm_int<0xE3, "pavgw", int_x86_mmx_pavg_w,
|
||||
@ -440,6 +446,7 @@ defm MMX_PMAXSW : MMXI_binop_rm_int<0xEE, "pmaxsw", int_x86_mmx_pmaxs_w,
|
||||
|
||||
defm MMX_PSADBW : MMXI_binop_rm_int<0xF6, "psadbw", int_x86_mmx_psad_bw,
|
||||
MMX_PSADBW_ITINS, 1>;
|
||||
}
|
||||
|
||||
defm MMX_PSIGNB : SS3I_binop_rm_int_mm<0x08, "psignb", int_x86_ssse3_psign_b,
|
||||
MMX_MISC_FUNC_ITINS>;
|
||||
@ -595,6 +602,7 @@ let Constraints = "$src1 = $dst" in {
|
||||
}
|
||||
|
||||
// Extract / Insert
|
||||
let Predicates = [HasSSE1] in
|
||||
def MMX_PEXTRWirri: MMXIi8<0xC5, MRMSrcReg,
|
||||
(outs GR32orGR64:$dst), (ins VR64:$src1, i32u8imm:$src2),
|
||||
"pextrw\t{$src2, $src1, $dst|$dst, $src1, $src2}",
|
||||
@ -602,6 +610,7 @@ def MMX_PEXTRWirri: MMXIi8<0xC5, MRMSrcReg,
|
||||
imm:$src2))],
|
||||
IIC_MMX_PEXTR>, Sched<[WriteShuffle]>;
|
||||
let Constraints = "$src1 = $dst" in {
|
||||
let Predicates = [HasSSE1] in {
|
||||
def MMX_PINSRWirri : MMXIi8<0xC4, MRMSrcReg,
|
||||
(outs VR64:$dst),
|
||||
(ins VR64:$src1, GR32orGR64:$src2, i32u8imm:$src3),
|
||||
@ -619,8 +628,10 @@ let Constraints = "$src1 = $dst" in {
|
||||
imm:$src3))],
|
||||
IIC_MMX_PINSRW>, Sched<[WriteShuffleLd, ReadAfterLd]>;
|
||||
}
|
||||
}
|
||||
|
||||
// Mask creation
|
||||
let Predicates = [HasSSE1] in
|
||||
def MMX_PMOVMSKBrr : MMXI<0xD7, MRMSrcReg, (outs GR32orGR64:$dst),
|
||||
(ins VR64:$src),
|
||||
"pmovmskb\t{$src, $dst|$dst, $src}",
|
||||
@ -640,12 +651,12 @@ def : Pat<(x86mmx (MMX_X86movdq2q (loadv2i64 addr:$src))),
|
||||
|
||||
// Misc.
|
||||
let SchedRW = [WriteShuffle] in {
|
||||
let Uses = [EDI] in
|
||||
let Uses = [EDI], Predicates = [HasSSE1,In32BitMode] in
|
||||
def MMX_MASKMOVQ : MMXI32<0xF7, MRMSrcReg, (outs), (ins VR64:$src, VR64:$mask),
|
||||
"maskmovq\t{$mask, $src|$src, $mask}",
|
||||
[(int_x86_mmx_maskmovq VR64:$src, VR64:$mask, EDI)],
|
||||
IIC_MMX_MASKMOV>;
|
||||
let Uses = [RDI] in
|
||||
let Uses = [RDI], Predicates = [HasSSE1,In64BitMode] in
|
||||
def MMX_MASKMOVQ64: MMXI64<0xF7, MRMSrcReg, (outs), (ins VR64:$src, VR64:$mask),
|
||||
"maskmovq\t{$mask, $src|$src, $mask}",
|
||||
[(int_x86_mmx_maskmovq VR64:$src, VR64:$mask, RDI)],
|
||||
|
Loading…
x
Reference in New Issue
Block a user