mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-02 07:11:49 +00:00
pcmpeq* and pcmpgt* intrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27685 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
0ac8ea9a4f
commit
bb5c43e73d
@ -345,6 +345,28 @@ let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.".
|
|||||||
llvm_v4i32_ty], [IntrNoMem]>;
|
llvm_v4i32_ty], [IntrNoMem]>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Integer comparison ops
|
||||||
|
let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.".
|
||||||
|
def int_x86_sse2_pcmpeq_b : GCCBuiltin<"__builtin_ia32_pcmpeqb128">,
|
||||||
|
Intrinsic<[llvm_v16i8_ty, llvm_v16i8_ty,
|
||||||
|
llvm_v16i8_ty], [IntrNoMem]>;
|
||||||
|
def int_x86_sse2_pcmpeq_w : GCCBuiltin<"__builtin_ia32_pcmpeqw128">,
|
||||||
|
Intrinsic<[llvm_v8i16_ty, llvm_v8i16_ty,
|
||||||
|
llvm_v8i16_ty], [IntrNoMem]>;
|
||||||
|
def int_x86_sse2_pcmpeq_d : GCCBuiltin<"__builtin_ia32_pcmpeqd128">,
|
||||||
|
Intrinsic<[llvm_v4i32_ty, llvm_v4i32_ty,
|
||||||
|
llvm_v4i32_ty], [IntrNoMem]>;
|
||||||
|
def int_x86_sse2_pcmpgt_b : GCCBuiltin<"__builtin_ia32_pcmpgtb128">,
|
||||||
|
Intrinsic<[llvm_v16i8_ty, llvm_v16i8_ty,
|
||||||
|
llvm_v16i8_ty], [IntrNoMem]>;
|
||||||
|
def int_x86_sse2_pcmpgt_w : GCCBuiltin<"__builtin_ia32_pcmpgtw128">,
|
||||||
|
Intrinsic<[llvm_v8i16_ty, llvm_v8i16_ty,
|
||||||
|
llvm_v8i16_ty], [IntrNoMem]>;
|
||||||
|
def int_x86_sse2_pcmpgt_d : GCCBuiltin<"__builtin_ia32_pcmpgtd128">,
|
||||||
|
Intrinsic<[llvm_v4i32_ty, llvm_v4i32_ty,
|
||||||
|
llvm_v4i32_ty], [IntrNoMem]>;
|
||||||
|
}
|
||||||
|
|
||||||
// Conversion ops
|
// Conversion ops
|
||||||
let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.".
|
let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.".
|
||||||
def int_x86_sse2_cvtdq2pd : GCCBuiltin<"__builtin_ia32_cvtdq2pd">,
|
def int_x86_sse2_cvtdq2pd : GCCBuiltin<"__builtin_ia32_cvtdq2pd">,
|
||||||
|
@ -1148,10 +1148,76 @@ def CMPPSrm : PSIi8<0xC2, MRMSrcMem,
|
|||||||
(load addr:$src), imm:$cc))]>;
|
(load addr:$src), imm:$cc))]>;
|
||||||
def CMPPDrr : PDIi8<0xC2, MRMSrcReg,
|
def CMPPDrr : PDIi8<0xC2, MRMSrcReg,
|
||||||
(ops VR128:$dst, VR128:$src1, VR128:$src, SSECC:$cc),
|
(ops VR128:$dst, VR128:$src1, VR128:$src, SSECC:$cc),
|
||||||
"cmp${cc}pd {$src, $dst|$dst, $src}", []>;
|
"cmp${cc}pd {$src, $dst|$dst, $src}",
|
||||||
|
[(set VR128:$dst, (int_x86_sse2_cmp_pd VR128:$src1,
|
||||||
|
VR128:$src, imm:$cc))]>;
|
||||||
def CMPPDrm : PDIi8<0xC2, MRMSrcMem,
|
def CMPPDrm : PDIi8<0xC2, MRMSrcMem,
|
||||||
(ops VR128:$dst, VR128:$src1, f128mem:$src, SSECC:$cc),
|
(ops VR128:$dst, VR128:$src1, f128mem:$src, SSECC:$cc),
|
||||||
"cmp${cc}pd {$src, $dst|$dst, $src}", []>;
|
"cmp${cc}pd {$src, $dst|$dst, $src}",
|
||||||
|
[(set VR128:$dst, (int_x86_sse2_cmp_pd VR128:$src1,
|
||||||
|
(load addr:$src), imm:$cc))]>;
|
||||||
|
|
||||||
|
def PCMPEQBrr : PDI<0x74, MRMSrcReg,
|
||||||
|
(ops VR128:$dst, VR128:$src1, VR128:$src2),
|
||||||
|
"pcmpeqb {$src2, $dst|$dst, $src2}",
|
||||||
|
[(set VR128:$dst, (int_x86_sse2_pcmpeq_b VR128:$src1,
|
||||||
|
VR128:$src2))]>;
|
||||||
|
def PCMPEQBrm : PDI<0x74, MRMSrcReg,
|
||||||
|
(ops VR128:$dst, VR128:$src1, i128mem:$src2),
|
||||||
|
"pcmpeqb {$src2, $dst|$dst, $src2}",
|
||||||
|
[(set VR128:$dst, (int_x86_sse2_pcmpeq_b VR128:$src1,
|
||||||
|
(bc_v16i8 (loadv2i64 addr:$src2))))]>;
|
||||||
|
def PCMPEQWrr : PDI<0x75, MRMSrcReg,
|
||||||
|
(ops VR128:$dst, VR128:$src1, VR128:$src2),
|
||||||
|
"pcmpeqw {$src2, $dst|$dst, $src2}",
|
||||||
|
[(set VR128:$dst, (int_x86_sse2_pcmpeq_w VR128:$src1,
|
||||||
|
VR128:$src2))]>;
|
||||||
|
def PCMPEQWrm : PDI<0x75, MRMSrcReg,
|
||||||
|
(ops VR128:$dst, VR128:$src1, i128mem:$src2),
|
||||||
|
"pcmpeqw {$src2, $dst|$dst, $src2}",
|
||||||
|
[(set VR128:$dst, (int_x86_sse2_pcmpeq_w VR128:$src1,
|
||||||
|
(bc_v8i16 (loadv2i64 addr:$src2))))]>;
|
||||||
|
def PCMPEQDrr : PDI<0x76, MRMSrcReg,
|
||||||
|
(ops VR128:$dst, VR128:$src1, VR128:$src2),
|
||||||
|
"pcmpeqd {$src2, $dst|$dst, $src2}",
|
||||||
|
[(set VR128:$dst, (int_x86_sse2_pcmpeq_d VR128:$src1,
|
||||||
|
VR128:$src2))]>;
|
||||||
|
def PCMPEQDrm : PDI<0x76, MRMSrcReg,
|
||||||
|
(ops VR128:$dst, VR128:$src1, i128mem:$src2),
|
||||||
|
"pcmpeqd {$src2, $dst|$dst, $src2}",
|
||||||
|
[(set VR128:$dst, (int_x86_sse2_pcmpeq_d VR128:$src1,
|
||||||
|
(bc_v4i32 (loadv2i64 addr:$src2))))]>;
|
||||||
|
|
||||||
|
def PCMPGTBrr : PDI<0x64, MRMSrcReg,
|
||||||
|
(ops VR128:$dst, VR128:$src1, VR128:$src2),
|
||||||
|
"pcmpgtb {$src2, $dst|$dst, $src2}",
|
||||||
|
[(set VR128:$dst, (int_x86_sse2_pcmpgt_b VR128:$src1,
|
||||||
|
VR128:$src2))]>;
|
||||||
|
def PCMPGTBrm : PDI<0x64, MRMSrcReg,
|
||||||
|
(ops VR128:$dst, VR128:$src1, i128mem:$src2),
|
||||||
|
"pcmpgtb {$src2, $dst|$dst, $src2}",
|
||||||
|
[(set VR128:$dst, (int_x86_sse2_pcmpgt_b VR128:$src1,
|
||||||
|
(bc_v16i8 (loadv2i64 addr:$src2))))]>;
|
||||||
|
def PCMPGTWrr : PDI<0x65, MRMSrcReg,
|
||||||
|
(ops VR128:$dst, VR128:$src1, VR128:$src2),
|
||||||
|
"pcmpgtw {$src2, $dst|$dst, $src2}",
|
||||||
|
[(set VR128:$dst, (int_x86_sse2_pcmpgt_w VR128:$src1,
|
||||||
|
VR128:$src2))]>;
|
||||||
|
def PCMPGTWrm : PDI<0x65, MRMSrcReg,
|
||||||
|
(ops VR128:$dst, VR128:$src1, i128mem:$src2),
|
||||||
|
"pcmpgtw {$src2, $dst|$dst, $src2}",
|
||||||
|
[(set VR128:$dst, (int_x86_sse2_pcmpgt_w VR128:$src1,
|
||||||
|
(bc_v8i16 (loadv2i64 addr:$src2))))]>;
|
||||||
|
def PCMPGTDrr : PDI<0x66, MRMSrcReg,
|
||||||
|
(ops VR128:$dst, VR128:$src1, VR128:$src2),
|
||||||
|
"pcmpgtd {$src2, $dst|$dst, $src2}",
|
||||||
|
[(set VR128:$dst, (int_x86_sse2_pcmpgt_d VR128:$src1,
|
||||||
|
VR128:$src2))]>;
|
||||||
|
def PCMPGTDrm : PDI<0x66, MRMSrcReg,
|
||||||
|
(ops VR128:$dst, VR128:$src1, i128mem:$src2),
|
||||||
|
"pcmpgtd {$src2, $dst|$dst, $src2}",
|
||||||
|
[(set VR128:$dst, (int_x86_sse2_pcmpgt_d VR128:$src1,
|
||||||
|
(bc_v4i32 (loadv2i64 addr:$src2))))]>;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Shuffle and unpack instructions
|
// Shuffle and unpack instructions
|
||||||
|
Loading…
Reference in New Issue
Block a user