mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 20:32:21 +00:00
Align the __LD,__compact_unwind section.
I know what would be cool! We should align the compact unwind section because aligned data access is faster. <rdar://problem/13723271> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180171 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
8e46da20d9
commit
c60e252ef6
@ -1177,8 +1177,6 @@ void FrameEmitterImpl::EmitCompactUnwind(MCStreamer &Streamer,
|
|||||||
if (!DwarfEHFrameOnly && Frame.Lsda)
|
if (!DwarfEHFrameOnly && Frame.Lsda)
|
||||||
Encoding |= 0x40000000;
|
Encoding |= 0x40000000;
|
||||||
|
|
||||||
Streamer.SwitchSection(MOFI->getCompactUnwindSection());
|
|
||||||
|
|
||||||
// Range Start
|
// Range Start
|
||||||
unsigned FDEEncoding = MOFI->getFDEEncoding(UsingCFI);
|
unsigned FDEEncoding = MOFI->getFDEEncoding(UsingCFI);
|
||||||
unsigned Size = getSizeForEncoding(Streamer, FDEEncoding);
|
unsigned Size = getSizeForEncoding(Streamer, FDEEncoding);
|
||||||
@ -1421,7 +1419,6 @@ MCSymbol *FrameEmitterImpl::EmitFDE(MCStreamer &streamer,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Call Frame Instructions
|
// Call Frame Instructions
|
||||||
|
|
||||||
EmitCFIInstructions(streamer, frame.Instructions, frame.Begin);
|
EmitCFIInstructions(streamer, frame.Instructions, frame.Begin);
|
||||||
|
|
||||||
// Padding
|
// Padding
|
||||||
@ -1482,11 +1479,23 @@ void MCDwarfFrameEmitter::Emit(MCStreamer &Streamer,
|
|||||||
ArrayRef<MCDwarfFrameInfo> FrameArray = Streamer.getFrameInfos();
|
ArrayRef<MCDwarfFrameInfo> FrameArray = Streamer.getFrameInfos();
|
||||||
|
|
||||||
// Emit the compact unwind info if available.
|
// Emit the compact unwind info if available.
|
||||||
if (IsEH && MOFI->getCompactUnwindSection())
|
if (IsEH && MOFI->getCompactUnwindSection()) {
|
||||||
for (unsigned i = 0, n = Streamer.getNumFrameInfos(); i < n; ++i) {
|
unsigned NumFrameInfos = Streamer.getNumFrameInfos();
|
||||||
const MCDwarfFrameInfo &Frame = Streamer.getFrameInfo(i);
|
bool SectionEmitted = false;
|
||||||
Emitter.EmitCompactUnwind(Streamer, Frame);
|
|
||||||
|
if (NumFrameInfos) {
|
||||||
|
for (unsigned i = 0; i < NumFrameInfos; ++i) {
|
||||||
|
const MCDwarfFrameInfo &Frame = Streamer.getFrameInfo(i);
|
||||||
|
if (Frame.CompactUnwindEncoding == 0) continue;
|
||||||
|
if (!SectionEmitted) {
|
||||||
|
Streamer.SwitchSection(MOFI->getCompactUnwindSection());
|
||||||
|
Streamer.EmitValueToAlignment(Context.getAsmInfo().getPointerSize());
|
||||||
|
SectionEmitted = true;
|
||||||
|
}
|
||||||
|
Emitter.EmitCompactUnwind(Streamer, Frame);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const MCSection &Section = IsEH ? *MOFI->getEHFrameSection() :
|
const MCSection &Section = IsEH ? *MOFI->getEHFrameSection() :
|
||||||
*MOFI->getDwarfFrameSection();
|
*MOFI->getDwarfFrameSection();
|
||||||
|
Loading…
Reference in New Issue
Block a user