mirror of
https://github.com/RPCSX/llvm.git
synced 2025-01-27 07:12:06 +00:00
Force some values to be absolute and align based on the FDE pointers size. A small
step towards using .cfi_* on OS X. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130273 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
547eb4fd56
commit
9266cc400e
@ -622,14 +622,14 @@ const MCSymbol &FrameEmitterImpl::EmitCIE(MCStreamer &streamer,
|
||||
const TargetAsmInfo &asmInfo = context.getTargetAsmInfo();
|
||||
const MCSection §ion = *asmInfo.getEHFrameSection();
|
||||
streamer.SwitchSection(§ion);
|
||||
MCSymbol *sectionStart = streamer.getContext().CreateTempSymbol();
|
||||
MCSymbol *sectionStart = context.CreateTempSymbol();
|
||||
MCSymbol *sectionEnd = streamer.getContext().CreateTempSymbol();
|
||||
|
||||
// Length
|
||||
const MCExpr *Length = MakeStartMinusEndExpr(streamer, *sectionStart,
|
||||
*sectionEnd, 4);
|
||||
streamer.EmitLabel(sectionStart);
|
||||
streamer.EmitValue(Length, 4);
|
||||
streamer.EmitAbsValue(Length, 4);
|
||||
|
||||
// CIE ID
|
||||
streamer.EmitIntValue(0, 4);
|
||||
@ -715,13 +715,13 @@ MCSymbol *FrameEmitterImpl::EmitFDE(MCStreamer &streamer,
|
||||
|
||||
// Length
|
||||
const MCExpr *Length = MakeStartMinusEndExpr(streamer, *fdeStart, *fdeEnd, 0);
|
||||
streamer.EmitValue(Length, 4);
|
||||
streamer.EmitAbsValue(Length, 4);
|
||||
|
||||
streamer.EmitLabel(fdeStart);
|
||||
// CIE Pointer
|
||||
const MCExpr *offset = MakeStartMinusEndExpr(streamer, cieStart, *fdeStart,
|
||||
0);
|
||||
streamer.EmitValue(offset, 4);
|
||||
streamer.EmitAbsValue(offset, 4);
|
||||
unsigned fdeEncoding = asmInfo.getFDEEncoding();
|
||||
unsigned size = getSizeForEncoding(streamer, fdeEncoding);
|
||||
|
||||
@ -731,7 +731,7 @@ MCSymbol *FrameEmitterImpl::EmitFDE(MCStreamer &streamer,
|
||||
// PC Range
|
||||
const MCExpr *Range = MakeStartMinusEndExpr(streamer, *frame.Begin,
|
||||
*frame.End, 0);
|
||||
streamer.EmitValue(Range, size);
|
||||
streamer.EmitAbsValue(Range, size);
|
||||
|
||||
// Augmentation Data Length
|
||||
MCSymbol *augmentationStart = streamer.getContext().CreateTempSymbol();
|
||||
@ -751,7 +751,7 @@ MCSymbol *FrameEmitterImpl::EmitFDE(MCStreamer &streamer,
|
||||
EmitCFIInstructions(streamer, frame.Instructions, frame.Begin);
|
||||
|
||||
// Padding
|
||||
streamer.EmitValueToAlignment(4);
|
||||
streamer.EmitValueToAlignment(size);
|
||||
|
||||
return fdeEnd;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user