mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-18 13:34:04 +00:00
[MMX] Use the appropriate instructions for GR64 <-> VR64 copies.
MOVSDto64rr and MOV64toSDrr are defined to convert between FR64 (%xmm) <-> GR64 registers, not VR64 (%mm) <-> GR64. This is wrong. I found this by inspection and could not find a suitable testcase for it since (1) we don't handle MMX bitcasts in Peephole optimizer as to generate COPYs that (2) could be expanded back to the appropriate x86 instruction in ExpandPostRA. Switch to use the appropriate instructions: MMX_MOVD64from64rr and MMX_MOVD64to64rr here. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242191 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
13141f04d3
commit
813d99877a
@ -3806,7 +3806,7 @@ static unsigned CopyToFromAsymmetricReg(unsigned DestReg, unsigned SrcReg,
|
||||
X86::MOVPQIto64rr);
|
||||
if (X86::VR64RegClass.contains(SrcReg))
|
||||
// Copy from a VR64 register to a GR64 register.
|
||||
return X86::MOVSDto64rr;
|
||||
return X86::MMX_MOVD64from64rr;
|
||||
} else if (X86::GR64RegClass.contains(SrcReg)) {
|
||||
// Copy from a GR64 register to a VR128 register.
|
||||
if (X86::VR128XRegClass.contains(DestReg))
|
||||
@ -3814,7 +3814,7 @@ static unsigned CopyToFromAsymmetricReg(unsigned DestReg, unsigned SrcReg,
|
||||
X86::MOV64toPQIrr);
|
||||
// Copy from a GR64 register to a VR64 register.
|
||||
if (X86::VR64RegClass.contains(DestReg))
|
||||
return X86::MOV64toSDrr;
|
||||
return X86::MMX_MOVD64to64rr;
|
||||
}
|
||||
|
||||
// SrcReg(FR32) -> DestReg(GR32)
|
||||
|
Loading…
x
Reference in New Issue
Block a user