mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-22 13:29:44 +00:00
Revert r109652, and remove the offending assert in loadRegFromStackSlot instead.
We do sometimes load from a too small stack slot when dealing with x86 arguments (varargs and smaller-than-32-bit args). It looks like we know what we are doing in those cases, so I am going to remove the assert instead of artifically enlarging stack slot sizes. The assert in storeRegToStackSlot stays in. We don't want to write beyond the bounds of a stack slot. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109764 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
a685582048
commit
b2eeed7464
@ -1701,10 +1701,7 @@ X86TargetLowering::LowerFormalArguments(SDValue Chain,
|
||||
if (isVarArg) {
|
||||
if (Is64Bit || (CallConv != CallingConv::X86_FastCall &&
|
||||
CallConv != CallingConv::X86_ThisCall)) {
|
||||
// The fixed varargs object is created large enough that we can load and
|
||||
// store any register in it.
|
||||
FuncInfo->setVarArgsFrameIndex(MFI->CreateFixedObject(32, StackSize,
|
||||
true));
|
||||
FuncInfo->setVarArgsFrameIndex(MFI->CreateFixedObject(1, StackSize,true));
|
||||
}
|
||||
if (Is64Bit) {
|
||||
unsigned TotalNumIntRegs = 0, TotalNumXMMRegs = 0;
|
||||
|
@ -2033,8 +2033,6 @@ void X86InstrInfo::loadRegFromStackSlot(MachineBasicBlock &MBB,
|
||||
const TargetRegisterClass *RC,
|
||||
const TargetRegisterInfo *TRI) const {
|
||||
const MachineFunction &MF = *MBB.getParent();
|
||||
assert(MF.getFrameInfo()->getObjectSize(FrameIdx) >= RC->getSize() &&
|
||||
"Stack slot too small for load");
|
||||
bool isAligned = (RI.getStackAlignment() >= 16) || RI.canRealignStack(MF);
|
||||
unsigned Opc = getLoadRegOpcode(DestReg, RC, isAligned, TM);
|
||||
DebugLoc DL = MBB.findDebugLoc(MI);
|
||||
|
Loading…
x
Reference in New Issue
Block a user