mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 03:33:20 +01:00
[X86] Move Atomic CMPXCHG to WriteCMPXCHGRMW schedule class
llvm-svn: 343700
This commit is contained in:
parent
71b1475f11
commit
2f453a081a
@ -789,7 +789,7 @@ let isCodeGenOnly = 1, usesCustomInserter = 1 in {
|
||||
|
||||
multiclass LCMPXCHG_BinOp<bits<8> Opc8, bits<8> Opc, Format Form,
|
||||
string mnemonic, SDPatternOperator frag> {
|
||||
let isCodeGenOnly = 1, SchedRW = [WriteALULd, WriteRMW] in {
|
||||
let isCodeGenOnly = 1, SchedRW = [WriteCMPXCHGRMW] in {
|
||||
let Defs = [AL, EFLAGS], Uses = [AL] in
|
||||
def NAME#8 : I<Opc8, Form, (outs), (ins i8mem:$ptr, GR8:$swap),
|
||||
!strconcat(mnemonic, "{b}\t{$swap, $ptr|$ptr, $swap}"),
|
||||
@ -810,7 +810,7 @@ let isCodeGenOnly = 1, SchedRW = [WriteALULd, WriteRMW] in {
|
||||
}
|
||||
|
||||
let Defs = [EAX, EDX, EFLAGS], Uses = [EAX, EBX, ECX, EDX],
|
||||
SchedRW = [WriteALULd, WriteRMW] in {
|
||||
SchedRW = [WriteCMPXCHGRMW] in {
|
||||
defm LCMPXCHG8B : LCMPXCHG_UnOp<0xC7, MRM1m, "cmpxchg8b", X86cas8, i64mem>;
|
||||
}
|
||||
|
||||
@ -834,7 +834,7 @@ defm LCMPXCHG8B : LCMPXCHG_UnOp<0xC7, MRM1m, "cmpxchg8b", X86cas8, i64mem>;
|
||||
// the instruction and we are sure we will have a valid register to restore
|
||||
// the value of RBX.
|
||||
let Defs = [EAX, EDX, EBX, EFLAGS], Uses = [EAX, ECX, EDX],
|
||||
SchedRW = [WriteALULd, WriteRMW], isCodeGenOnly = 1, isPseudo = 1,
|
||||
SchedRW = [WriteCMPXCHGRMW], isCodeGenOnly = 1, isPseudo = 1,
|
||||
Constraints = "$ebx_save = $dst", usesCustomInserter = 1 in {
|
||||
def LCMPXCHG8B_SAVE_EBX :
|
||||
I<0, Pseudo, (outs GR32:$dst),
|
||||
@ -846,14 +846,14 @@ def LCMPXCHG8B_SAVE_EBX :
|
||||
|
||||
|
||||
let Defs = [RAX, RDX, EFLAGS], Uses = [RAX, RBX, RCX, RDX],
|
||||
Predicates = [HasCmpxchg16b], SchedRW = [WriteALULd, WriteRMW] in {
|
||||
Predicates = [HasCmpxchg16b], SchedRW = [WriteCMPXCHGRMW] in {
|
||||
defm LCMPXCHG16B : LCMPXCHG_UnOp<0xC7, MRM1m, "cmpxchg16b",
|
||||
X86cas16, i128mem>, REX_W;
|
||||
}
|
||||
|
||||
// Same as LCMPXCHG8B_SAVE_RBX but for the 16 Bytes variant.
|
||||
let Defs = [RAX, RDX, RBX, EFLAGS], Uses = [RAX, RCX, RDX],
|
||||
Predicates = [HasCmpxchg16b], SchedRW = [WriteALULd, WriteRMW],
|
||||
Predicates = [HasCmpxchg16b], SchedRW = [WriteCMPXCHGRMW],
|
||||
isCodeGenOnly = 1, isPseudo = 1, Constraints = "$rbx_save = $dst",
|
||||
usesCustomInserter = 1 in {
|
||||
def LCMPXCHG16B_SAVE_RBX :
|
||||
|
Loading…
Reference in New Issue
Block a user