mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-23 01:24:30 +00:00
Fix PR313: [x86] JIT miscompiles unsigned short to floating point
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12711 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -2640,8 +2640,7 @@ void ISel::emitCastOperation(MachineBasicBlock *BB,
|
|||||||
|
|
||||||
if (PromoteType) {
|
if (PromoteType) {
|
||||||
unsigned TmpReg = makeAnotherReg(PromoteType);
|
unsigned TmpReg = makeAnotherReg(PromoteType);
|
||||||
unsigned Opc = SrcTy->isSigned() ? X86::MOVSX16rr8 : X86::MOVZX16rr8;
|
BuildMI(*BB, IP, PromoteOpcode, 1, TmpReg).addReg(SrcReg);
|
||||||
BuildMI(*BB, IP, Opc, 1, TmpReg).addReg(SrcReg);
|
|
||||||
SrcTy = PromoteType;
|
SrcTy = PromoteType;
|
||||||
SrcClass = getClass(PromoteType);
|
SrcClass = getClass(PromoteType);
|
||||||
SrcReg = TmpReg;
|
SrcReg = TmpReg;
|
||||||
|
@ -2640,8 +2640,7 @@ void ISel::emitCastOperation(MachineBasicBlock *BB,
|
|||||||
|
|
||||||
if (PromoteType) {
|
if (PromoteType) {
|
||||||
unsigned TmpReg = makeAnotherReg(PromoteType);
|
unsigned TmpReg = makeAnotherReg(PromoteType);
|
||||||
unsigned Opc = SrcTy->isSigned() ? X86::MOVSX16rr8 : X86::MOVZX16rr8;
|
BuildMI(*BB, IP, PromoteOpcode, 1, TmpReg).addReg(SrcReg);
|
||||||
BuildMI(*BB, IP, Opc, 1, TmpReg).addReg(SrcReg);
|
|
||||||
SrcTy = PromoteType;
|
SrcTy = PromoteType;
|
||||||
SrcClass = getClass(PromoteType);
|
SrcClass = getClass(PromoteType);
|
||||||
SrcReg = TmpReg;
|
SrcReg = TmpReg;
|
||||||
|
Reference in New Issue
Block a user