Optimize x64 loads and stores using complex addressing modes (#972)
* Optimize x64 loads and stores using complex addressing modes * This was meant to be used for testing
This commit is contained in:
parent
e2bb5e8091
commit
61d79facd1
10 changed files with 538 additions and 86 deletions
|
@ -711,6 +711,20 @@ namespace ARMeilleure.CodeGen.RegisterAllocators
|
|||
{
|
||||
operation.SetSource(index, register);
|
||||
}
|
||||
else if (source.Kind == OperandKind.Memory)
|
||||
{
|
||||
MemoryOperand memOp = (MemoryOperand)source;
|
||||
|
||||
if (memOp.BaseAddress == current.Local)
|
||||
{
|
||||
memOp.BaseAddress = register;
|
||||
}
|
||||
|
||||
if (memOp.Index == current.Local)
|
||||
{
|
||||
memOp.Index = register;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (int index = 0; index < operation.DestinationsCount; index++)
|
||||
|
@ -1011,6 +1025,20 @@ namespace ARMeilleure.CodeGen.RegisterAllocators
|
|||
{
|
||||
yield return source;
|
||||
}
|
||||
else if (source.Kind == OperandKind.Memory)
|
||||
{
|
||||
MemoryOperand memOp = (MemoryOperand)source;
|
||||
|
||||
if (memOp.BaseAddress != null)
|
||||
{
|
||||
yield return memOp.BaseAddress;
|
||||
}
|
||||
|
||||
if (memOp.Index != null)
|
||||
{
|
||||
yield return memOp.Index;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue