Implement a PseudoI class and transfer the sse instructions over to use

it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120412 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Eric Christopher 2010-11-30 08:57:23 +00:00
parent 41c902fdbe
commit d872f144e2
2 changed files with 15 additions and 12 deletions

View File

@ -168,6 +168,11 @@ class X86Inst<bits<8> opcod, Format f, ImmType i, dag outs, dag ins,
let TSFlags{37} = has3DNow0F0FOpcode; let TSFlags{37} = has3DNow0F0FOpcode;
} }
class PseudoI<dag oops, dag iops, list<dag> pattern>
: X86Inst<0, Pseudo, NoImm, oops, iops, "", GenericDomain> {
let Pattern = pattern;
}
class I<bits<8> o, Format f, dag outs, dag ins, string asm, class I<bits<8> o, Format f, dag outs, dag ins, string asm,
list<dag> pattern, Domain d = GenericDomain> list<dag> pattern, Domain d = GenericDomain>
: X86Inst<o, f, NoImm, outs, ins, asm, d> { : X86Inst<o, f, NoImm, outs, ins, asm, d> {

View File

@ -3641,11 +3641,9 @@ def : Pat<(v16i8 (palign:$src3 VR128:$src1, VR128:$src2)),
// Thread synchronization // Thread synchronization
let usesCustomInserter = 1 in { let usesCustomInserter = 1 in {
def MONITOR : I<0, Pseudo, (outs), (ins i32mem:$src1, GR32:$src2, GR32:$src3), def MONITOR : PseudoI<(outs), (ins i32mem:$src1, GR32:$src2, GR32:$src3),
"# MONITORrrr PSUEDO",
[(int_x86_sse3_monitor addr:$src1, GR32:$src2, GR32:$src3)]>; [(int_x86_sse3_monitor addr:$src1, GR32:$src2, GR32:$src3)]>;
def MWAIT : I<0, Pseudo, (outs), (ins GR32:$src1, GR32:$src2), def MWAIT : PseudoI<(outs), (ins GR32:$src1, GR32:$src2),
"# MWAITrr PSEUDO",
[(int_x86_sse3_mwait GR32:$src1, GR32:$src2)]>; [(int_x86_sse3_mwait GR32:$src1, GR32:$src2)]>;
} }
@ -4907,12 +4905,12 @@ def : Pat<(v2i64 (X86pcmpgtq VR128:$src1, (memop addr:$src2))),
// Packed Compare Implicit Length Strings, Return Mask // Packed Compare Implicit Length Strings, Return Mask
multiclass pseudo_pcmpistrm<string asm> { multiclass pseudo_pcmpistrm<string asm> {
def REG : Ii8<0, Pseudo, (outs VR128:$dst), def REG : PseudoI<(outs VR128:$dst),
(ins VR128:$src1, VR128:$src2, i8imm:$src3), !strconcat(asm, "rr PSEUDO"), (ins VR128:$src1, VR128:$src2, i8imm:$src3),
[(set VR128:$dst, (int_x86_sse42_pcmpistrm128 VR128:$src1, VR128:$src2, [(set VR128:$dst, (int_x86_sse42_pcmpistrm128 VR128:$src1, VR128:$src2,
imm:$src3))]>; imm:$src3))]>;
def MEM : Ii8<0, Pseudo, (outs VR128:$dst), def MEM : PseudoI<(outs VR128:$dst),
(ins VR128:$src1, i128mem:$src2, i8imm:$src3), !strconcat(asm, "rm PSEUDO"), (ins VR128:$src1, i128mem:$src2, i8imm:$src3),
[(set VR128:$dst, (int_x86_sse42_pcmpistrm128 [(set VR128:$dst, (int_x86_sse42_pcmpistrm128
VR128:$src1, (load addr:$src2), imm:$src3))]>; VR128:$src1, (load addr:$src2), imm:$src3))]>;
} }
@ -4943,12 +4941,12 @@ let Defs = [XMM0, EFLAGS] in {
// Packed Compare Explicit Length Strings, Return Mask // Packed Compare Explicit Length Strings, Return Mask
multiclass pseudo_pcmpestrm<string asm> { multiclass pseudo_pcmpestrm<string asm> {
def REG : Ii8<0, Pseudo, (outs VR128:$dst), def REG : PseudoI<(outs VR128:$dst),
(ins VR128:$src1, VR128:$src3, i8imm:$src5), !strconcat(asm, "rr PSEUDO"), (ins VR128:$src1, VR128:$src3, i8imm:$src5),
[(set VR128:$dst, (int_x86_sse42_pcmpestrm128 [(set VR128:$dst, (int_x86_sse42_pcmpestrm128
VR128:$src1, EAX, VR128:$src3, EDX, imm:$src5))]>; VR128:$src1, EAX, VR128:$src3, EDX, imm:$src5))]>;
def MEM : Ii8<0, Pseudo, (outs VR128:$dst), def MEM : PseudoI<(outs VR128:$dst),
(ins VR128:$src1, i128mem:$src3, i8imm:$src5), !strconcat(asm, "rm PSEUDO"), (ins VR128:$src1, i128mem:$src3, i8imm:$src5),
[(set VR128:$dst, (int_x86_sse42_pcmpestrm128 [(set VR128:$dst, (int_x86_sse42_pcmpestrm128
VR128:$src1, EAX, (load addr:$src3), EDX, imm:$src5))]>; VR128:$src1, EAX, (load addr:$src3), EDX, imm:$src5))]>;
} }