mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-17 06:33:21 +00:00
Throw an error when stack realignment stuff fails instead of silent
code miscompilation git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86463 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
c2fd919ea2
commit
773943ac5c
@ -450,12 +450,16 @@ bool X86RegisterInfo::hasFP(const MachineFunction &MF) const {
|
||||
|
||||
bool X86RegisterInfo::needsStackRealignment(const MachineFunction &MF) const {
|
||||
const MachineFrameInfo *MFI = MF.getFrameInfo();
|
||||
bool requiresRealignment =
|
||||
RealignStack && (MFI->getMaxAlignment() > StackAlign);
|
||||
|
||||
// FIXME: Currently we don't support stack realignment for functions with
|
||||
// variable-sized allocas
|
||||
return (RealignStack &&
|
||||
(MFI->getMaxAlignment() > StackAlign &&
|
||||
!MFI->hasVarSizedObjects()));
|
||||
if (requiresRealignment && MFI->hasVarSizedObjects())
|
||||
llvm_report_error(
|
||||
"Stack realignment in presense of dynamic allocas is not supported");
|
||||
|
||||
return requiresRealignment;
|
||||
}
|
||||
|
||||
bool X86RegisterInfo::hasReservedCallFrame(MachineFunction &MF) const {
|
||||
|
Loading…
x
Reference in New Issue
Block a user