mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 11:13:28 +01:00
[X86] Require last argument to LWPINS/LWPVAL builtins to be an ICE. Add ImmArg to the llvm intrinsics.
Update the isel patterns to use timm instead of imm. llvm-svn: 372534
This commit is contained in:
parent
b430c04585
commit
a942226366
@ -2091,16 +2091,20 @@ let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.".
|
||||
Intrinsic<[llvm_ptr_ty], [], []>;
|
||||
def int_x86_lwpins32 :
|
||||
GCCBuiltin<"__builtin_ia32_lwpins32">,
|
||||
Intrinsic<[llvm_i8_ty], [llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], []>;
|
||||
Intrinsic<[llvm_i8_ty], [llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
|
||||
[ImmArg<2>]>;
|
||||
def int_x86_lwpins64 :
|
||||
GCCBuiltin<"__builtin_ia32_lwpins64">,
|
||||
Intrinsic<[llvm_i8_ty], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], []>;
|
||||
Intrinsic<[llvm_i8_ty], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty],
|
||||
[ImmArg<2>]>;
|
||||
def int_x86_lwpval32 :
|
||||
GCCBuiltin<"__builtin_ia32_lwpval32">,
|
||||
Intrinsic<[], [llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], []>;
|
||||
Intrinsic<[], [llvm_i32_ty, llvm_i32_ty, llvm_i32_ty],
|
||||
[ImmArg<2>]>;
|
||||
def int_x86_lwpval64 :
|
||||
GCCBuiltin<"__builtin_ia32_lwpval64">,
|
||||
Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty], []>;
|
||||
Intrinsic<[], [llvm_i64_ty, llvm_i32_ty, llvm_i32_ty],
|
||||
[ImmArg<2>]>;
|
||||
}
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
@ -2697,12 +2697,12 @@ def SLWPCB64 : I<0x12, MRM1r, (outs GR64:$dst), (ins), "slwpcb\t$dst",
|
||||
multiclass lwpins_intr<RegisterClass RC> {
|
||||
def rri : Ii32<0x12, MRM0r, (outs), (ins RC:$src0, GR32:$src1, i32imm:$cntl),
|
||||
"lwpins\t{$cntl, $src1, $src0|$src0, $src1, $cntl}",
|
||||
[(set EFLAGS, (X86lwpins RC:$src0, GR32:$src1, imm:$cntl))]>,
|
||||
[(set EFLAGS, (X86lwpins RC:$src0, GR32:$src1, timm:$cntl))]>,
|
||||
XOP_4V, XOPA;
|
||||
let mayLoad = 1 in
|
||||
def rmi : Ii32<0x12, MRM0m, (outs), (ins RC:$src0, i32mem:$src1, i32imm:$cntl),
|
||||
"lwpins\t{$cntl, $src1, $src0|$src0, $src1, $cntl}",
|
||||
[(set EFLAGS, (X86lwpins RC:$src0, (loadi32 addr:$src1), imm:$cntl))]>,
|
||||
[(set EFLAGS, (X86lwpins RC:$src0, (loadi32 addr:$src1), timm:$cntl))]>,
|
||||
XOP_4V, XOPA;
|
||||
}
|
||||
|
||||
@ -2714,11 +2714,11 @@ let Defs = [EFLAGS] in {
|
||||
multiclass lwpval_intr<RegisterClass RC, Intrinsic Int> {
|
||||
def rri : Ii32<0x12, MRM1r, (outs), (ins RC:$src0, GR32:$src1, i32imm:$cntl),
|
||||
"lwpval\t{$cntl, $src1, $src0|$src0, $src1, $cntl}",
|
||||
[(Int RC:$src0, GR32:$src1, imm:$cntl)]>, XOP_4V, XOPA;
|
||||
[(Int RC:$src0, GR32:$src1, timm:$cntl)]>, XOP_4V, XOPA;
|
||||
let mayLoad = 1 in
|
||||
def rmi : Ii32<0x12, MRM1m, (outs), (ins RC:$src0, i32mem:$src1, i32imm:$cntl),
|
||||
"lwpval\t{$cntl, $src1, $src0|$src0, $src1, $cntl}",
|
||||
[(Int RC:$src0, (loadi32 addr:$src1), imm:$cntl)]>,
|
||||
[(Int RC:$src0, (loadi32 addr:$src1), timm:$cntl)]>,
|
||||
XOP_4V, XOPA;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user