mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-02 22:23:10 +00:00
Properly split f32 and f64 into separate register classes for scalar sse fp
fixing a bunch of nasty hackery git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23735 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -57,7 +57,9 @@ void X86RegisterInfo::storeRegToStackSlot(MachineBasicBlock &MBB,
|
||||
Opc = X86::MOV16mr;
|
||||
} else if (RC == &X86::RFPRegClass || RC == &X86::RSTRegClass) {
|
||||
Opc = X86::FST64m;
|
||||
} else if (RC == &X86::RXMMRegClass) {
|
||||
} else if (RC == &X86::V4F4RegClass) {
|
||||
Opc = X86::MOVSSmr;
|
||||
} else if (RC == &X86::V2F8RegClass) {
|
||||
Opc = X86::MOVSDmr;
|
||||
} else {
|
||||
assert(0 && "Unknown regclass");
|
||||
@@ -79,7 +81,9 @@ void X86RegisterInfo::loadRegFromStackSlot(MachineBasicBlock &MBB,
|
||||
Opc = X86::MOV16rm;
|
||||
} else if (RC == &X86::RFPRegClass || RC == &X86::RSTRegClass) {
|
||||
Opc = X86::FLD64m;
|
||||
} else if (RC == &X86::RXMMRegClass) {
|
||||
} else if (RC == &X86::V4F4RegClass) {
|
||||
Opc = X86::MOVSSrm;
|
||||
} else if (RC == &X86::V2F8RegClass) {
|
||||
Opc = X86::MOVSDrm;
|
||||
} else {
|
||||
assert(0 && "Unknown regclass");
|
||||
@@ -101,8 +105,10 @@ void X86RegisterInfo::copyRegToReg(MachineBasicBlock &MBB,
|
||||
Opc = X86::MOV16rr;
|
||||
} else if (RC == &X86::RFPRegClass || RC == &X86::RSTRegClass) {
|
||||
Opc = X86::FpMOV;
|
||||
} else if (RC == &X86::RXMMRegClass) {
|
||||
Opc = X86::MOVAPDrr;
|
||||
} else if (RC == &X86::V4F4RegClass) {
|
||||
Opc = X86::MOVSSrr;
|
||||
} else if (RC == &X86::V2F8RegClass) {
|
||||
Opc = X86::MOVSDrr;
|
||||
} else {
|
||||
assert(0 && "Unknown regclass");
|
||||
abort();
|
||||
@@ -119,7 +125,7 @@ unsigned X86RegisterInfo::isLoadFromStackSlot(MachineInstr *MI,
|
||||
case X86::MOV32rm:
|
||||
case X86::FLD64m:
|
||||
case X86::FLD80m:
|
||||
case X86::MOVAPDrm:
|
||||
case X86::MOVSSrm:
|
||||
case X86::MOVSDrm:
|
||||
if (MI->getOperand(1).isFrameIndex() && MI->getOperand(2).isImmediate() &&
|
||||
MI->getOperand(3).isRegister() && MI->getOperand(4).isImmediate() &&
|
||||
|
||||
Reference in New Issue
Block a user