mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-12 17:32:19 +00:00
Don't emit the FDE end label if the last thing emitted was a compact unwind and
not the FDE git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135020 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
5cf2ee1f80
commit
8440fe2166
@ -1018,8 +1018,10 @@ void MCDwarfFrameEmitter::Emit(MCStreamer &Streamer,
|
||||
for (unsigned i = 0, n = Streamer.getNumFrameInfos(); i < n; ++i) {
|
||||
const MCDwarfFrameInfo &Frame = Streamer.getFrameInfo(i);
|
||||
if (IsEH && AsmInfo.getCompactUnwindSection() &&
|
||||
Emitter.EmitCompactUnwind(Streamer, Frame))
|
||||
Emitter.EmitCompactUnwind(Streamer, Frame)) {
|
||||
FDEEnd = NULL;
|
||||
continue;
|
||||
}
|
||||
|
||||
CIEKey Key(Frame.Personality, Frame.PersonalityEncoding,
|
||||
Frame.LsdaEncoding);
|
||||
|
@ -1059,13 +1059,21 @@ getCompactUnwindEncoding(ArrayRef<MCCFIInstruction> Instrs,
|
||||
const bool IsRelative = (Operation == MCCFIInstruction::RelMove);
|
||||
|
||||
if (Dst.isReg() && Dst.getReg() == MachineLocation::VirtualFP) {
|
||||
if (Src.getReg() == MachineLocation::VirtualFP) {
|
||||
// DW_CFA_def_cfa_offset
|
||||
if (Src.getReg() != MachineLocation::VirtualFP) {
|
||||
// DW_CFA_def_cfa
|
||||
assert(FramePointerReg == -1 &&"Defining more than one frame pointer?");
|
||||
FramePointerReg = Src.getReg();
|
||||
if (TRI->getLLVMRegNum(FramePointerReg, IsEH) != X86::EBP &&
|
||||
TRI->getLLVMRegNum(FramePointerReg, IsEH) != X86::RBP)
|
||||
// The frame pointer isn't EBP/RBP. Cannot make unwind information
|
||||
// compact.
|
||||
return 0;
|
||||
} // else DW_CFA_def_cfa_offset
|
||||
|
||||
if (IsRelative)
|
||||
CFAOffset += Src.getOffset();
|
||||
else
|
||||
CFAOffset -= Src.getOffset();
|
||||
} // else DW_CFA_def_cfa
|
||||
|
||||
continue;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user