mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-03 14:21:30 +00:00
Fix SingleSource/Regression/C/2005-05-06-LongLongSignedShift.c, we were not
properly sign extending the top of the result of a 64-bit shift right by a constant > 32. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21120 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -3074,7 +3074,11 @@ void X86ISel::emitShiftOperation(MachineBasicBlock *MBB,
|
|||||||
} else {
|
} else {
|
||||||
BuildMI(*MBB, IP, isSigned ? X86::SAR32ri : X86::SHR32ri, 2,
|
BuildMI(*MBB, IP, isSigned ? X86::SAR32ri : X86::SHR32ri, 2,
|
||||||
DestReg).addReg(SrcReg+1).addImm(Amount);
|
DestReg).addReg(SrcReg+1).addImm(Amount);
|
||||||
BuildMI(*MBB, IP, X86::MOV32ri, 1, DestReg+1).addImm(0);
|
if (isSigned)
|
||||||
|
BuildMI(*MBB, IP, X86::SAR32ri, 2,
|
||||||
|
DestReg+1).addReg(SrcReg+1).addImm(31);
|
||||||
|
else
|
||||||
|
BuildMI(*MBB, IP, X86::MOV32ri, 1, DestReg+1).addImm(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user