mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-20 00:43:48 +00:00
Fix IMULX machine model. Multiple def operands require multiple SchedWrites.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184566 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
3bf23304ee
commit
9b5575d55a
@ -1302,12 +1302,12 @@ let neverHasSideEffects = 1 in {
|
||||
let isCommutable = 1 in
|
||||
def rr : I<0xF6, MRMSrcReg, (outs RC:$dst1, RC:$dst2), (ins RC:$src),
|
||||
!strconcat(mnemonic, "\t{$src, $dst2, $dst1|$dst1, $dst2, $src}"),
|
||||
[], IIC_MUL8>, T8XD, VEX_4V, Sched<[WriteIMul]>;
|
||||
[], IIC_MUL8>, T8XD, VEX_4V, Sched<[WriteIMul, WriteIMulH]>;
|
||||
|
||||
let mayLoad = 1 in
|
||||
def rm : I<0xF6, MRMSrcMem, (outs RC:$dst1, RC:$dst2), (ins x86memop:$src),
|
||||
!strconcat(mnemonic, "\t{$src, $dst2, $dst1|$dst1, $dst2, $src}"),
|
||||
[], IIC_MUL8>, T8XD, VEX_4V, Sched<[WriteIMulLd]>;
|
||||
[], IIC_MUL8>, T8XD, VEX_4V, Sched<[WriteIMulLd, WriteIMulH]>;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1336,7 +1336,7 @@ let hasSideEffects = 0, Predicates = [HasADX], Defs = [EFLAGS] in {
|
||||
def ADCX32rm : I<0xF6, MRMSrcMem, (outs GR32:$dst), (ins i32mem:$src),
|
||||
"adcx{l}\t{$src, $dst|$dst, $src}",
|
||||
[], IIC_BIN_MEM>, T8, OpSize;
|
||||
|
||||
|
||||
def ADCX64rm : I<0xF6, MRMSrcMem, (outs GR64:$dst), (ins i64mem:$src),
|
||||
"adcx{q}\t{$src, $dst|$dst, $src}",
|
||||
[], IIC_BIN_MEM>, T8, OpSize, REX_W, Requires<[In64BitMode]>;
|
||||
@ -1361,7 +1361,7 @@ let hasSideEffects = 0, Predicates = [HasADX], Defs = [EFLAGS] in {
|
||||
def ADOX32rm : I<0xF6, MRMSrcMem, (outs GR32:$dst), (ins i32mem:$src),
|
||||
"adox{l}\t{$src, $dst|$dst, $src}",
|
||||
[], IIC_BIN_MEM>, T8XS;
|
||||
|
||||
|
||||
def ADOX64rm : I<0xF6, MRMSrcMem, (outs GR64:$dst), (ins i64mem:$src),
|
||||
"adox{q}\t{$src, $dst|$dst, $src}",
|
||||
[], IIC_BIN_MEM>, T8XS, REX_W, Requires<[In64BitMode]>;
|
||||
|
@ -91,6 +91,7 @@ def : WriteRes<WriteZero, []>;
|
||||
|
||||
defm : HWWriteResPair<WriteALU, HWPort0156, 1>;
|
||||
defm : HWWriteResPair<WriteIMul, HWPort1, 3>;
|
||||
def : WriteRes<WriteIMulH, []> { let Latency = 3; }
|
||||
defm : HWWriteResPair<WriteShift, HWPort056, 1>;
|
||||
defm : HWWriteResPair<WriteJump, HWPort5, 1>;
|
||||
|
||||
|
@ -86,6 +86,7 @@ def : WriteRes<WriteZero, []>;
|
||||
|
||||
defm : SBWriteResPair<WriteALU, SBPort015, 1>;
|
||||
defm : SBWriteResPair<WriteIMul, SBPort1, 3>;
|
||||
def : WriteRes<WriteIMulH, []> { let Latency = 3; }
|
||||
defm : SBWriteResPair<WriteShift, SBPort05, 1>;
|
||||
defm : SBWriteResPair<WriteJump, SBPort5, 1>;
|
||||
|
||||
|
@ -42,6 +42,7 @@ multiclass X86SchedWritePair {
|
||||
// Arithmetic.
|
||||
defm WriteALU : X86SchedWritePair; // Simple integer ALU op.
|
||||
defm WriteIMul : X86SchedWritePair; // Integer multiplication.
|
||||
def WriteIMulH : SchedWrite; // Integer multiplication, high part.
|
||||
defm WriteIDiv : X86SchedWritePair; // Integer division.
|
||||
def WriteLEA : SchedWrite; // LEA instructions can't fold loads.
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user