mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-18 12:29:21 +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:
parent
43ab3a8f45
commit
7b92de1e7d
@ -2640,8 +2640,7 @@ void ISel::emitCastOperation(MachineBasicBlock *BB,
|
||||
|
||||
if (PromoteType) {
|
||||
unsigned TmpReg = makeAnotherReg(PromoteType);
|
||||
unsigned Opc = SrcTy->isSigned() ? X86::MOVSX16rr8 : X86::MOVZX16rr8;
|
||||
BuildMI(*BB, IP, Opc, 1, TmpReg).addReg(SrcReg);
|
||||
BuildMI(*BB, IP, PromoteOpcode, 1, TmpReg).addReg(SrcReg);
|
||||
SrcTy = PromoteType;
|
||||
SrcClass = getClass(PromoteType);
|
||||
SrcReg = TmpReg;
|
||||
|
@ -2640,8 +2640,7 @@ void ISel::emitCastOperation(MachineBasicBlock *BB,
|
||||
|
||||
if (PromoteType) {
|
||||
unsigned TmpReg = makeAnotherReg(PromoteType);
|
||||
unsigned Opc = SrcTy->isSigned() ? X86::MOVSX16rr8 : X86::MOVZX16rr8;
|
||||
BuildMI(*BB, IP, Opc, 1, TmpReg).addReg(SrcReg);
|
||||
BuildMI(*BB, IP, PromoteOpcode, 1, TmpReg).addReg(SrcReg);
|
||||
SrcTy = PromoteType;
|
||||
SrcClass = getClass(PromoteType);
|
||||
SrcReg = TmpReg;
|
||||
|
Loading…
Reference in New Issue
Block a user