mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-06 04:31:08 +00:00
Avoid some uses of .uleb128. This is a small speedup and more importantly
lets this code be used when producing assembly code for old assemblers without uleb support. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130544 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
7f46b08082
commit
1f6c87554a
@ -679,15 +679,23 @@ const MCSymbol &FrameEmitterImpl::EmitCIE(MCStreamer &streamer,
|
|||||||
streamer.EmitULEB128IntValue(asmInfo.getDwarfRARegNum(true));
|
streamer.EmitULEB128IntValue(asmInfo.getDwarfRARegNum(true));
|
||||||
|
|
||||||
// Augmentation Data Length (optional)
|
// Augmentation Data Length (optional)
|
||||||
MCSymbol *augmentationStart = streamer.getContext().CreateTempSymbol();
|
|
||||||
MCSymbol *augmentationEnd = streamer.getContext().CreateTempSymbol();
|
unsigned augmentationLength = 0;
|
||||||
const MCExpr *augmentationLength = MakeStartMinusEndExpr(streamer,
|
if (personality) {
|
||||||
*augmentationStart,
|
// Personality Encoding
|
||||||
*augmentationEnd, 0);
|
augmentationLength += 1;
|
||||||
streamer.EmitULEB128Value(augmentationLength);
|
// Personality
|
||||||
|
augmentationLength += getSizeForEncoding(streamer, personalityEncoding);
|
||||||
|
}
|
||||||
|
if (lsda) {
|
||||||
|
augmentationLength += 1;
|
||||||
|
}
|
||||||
|
// Encoding of the FDE pointers
|
||||||
|
augmentationLength += 1;
|
||||||
|
|
||||||
|
streamer.EmitULEB128IntValue(augmentationLength);
|
||||||
|
|
||||||
// Augmentation Data (optional)
|
// Augmentation Data (optional)
|
||||||
streamer.EmitLabel(augmentationStart);
|
|
||||||
if (personality) {
|
if (personality) {
|
||||||
// Personality Encoding
|
// Personality Encoding
|
||||||
streamer.EmitIntValue(personalityEncoding, 1);
|
streamer.EmitIntValue(personalityEncoding, 1);
|
||||||
@ -700,7 +708,6 @@ const MCSymbol &FrameEmitterImpl::EmitCIE(MCStreamer &streamer,
|
|||||||
}
|
}
|
||||||
// Encoding of the FDE pointers
|
// Encoding of the FDE pointers
|
||||||
streamer.EmitIntValue(asmInfo.getFDEEncoding(), 1);
|
streamer.EmitIntValue(asmInfo.getFDEEncoding(), 1);
|
||||||
streamer.EmitLabel(augmentationEnd);
|
|
||||||
|
|
||||||
// Initial Instructions
|
// Initial Instructions
|
||||||
|
|
||||||
@ -763,15 +770,14 @@ MCSymbol *FrameEmitterImpl::EmitFDE(MCStreamer &streamer,
|
|||||||
streamer.EmitAbsValue(Range, size);
|
streamer.EmitAbsValue(Range, size);
|
||||||
|
|
||||||
// Augmentation Data Length
|
// Augmentation Data Length
|
||||||
MCSymbol *augmentationStart = streamer.getContext().CreateTempSymbol();
|
unsigned augmentationLength = 0;
|
||||||
MCSymbol *augmentationEnd = streamer.getContext().CreateTempSymbol();
|
|
||||||
const MCExpr *augmentationLength = MakeStartMinusEndExpr(streamer,
|
if (frame.Lsda || forceLsda)
|
||||||
*augmentationStart,
|
augmentationLength += getSizeForEncoding(streamer, frame.LsdaEncoding);
|
||||||
*augmentationEnd, 0);
|
|
||||||
streamer.EmitULEB128Value(augmentationLength);
|
streamer.EmitULEB128IntValue(augmentationLength);
|
||||||
|
|
||||||
// Augmentation Data
|
// Augmentation Data
|
||||||
streamer.EmitLabel(augmentationStart);
|
|
||||||
|
|
||||||
// When running in "CodeGen compatibility mode" a FDE with no LSDA can be
|
// When running in "CodeGen compatibility mode" a FDE with no LSDA can be
|
||||||
// assigned to a CIE that requires one. In that case we output a 0 (as does
|
// assigned to a CIE that requires one. In that case we output a 0 (as does
|
||||||
@ -779,9 +785,8 @@ MCSymbol *FrameEmitterImpl::EmitFDE(MCStreamer &streamer,
|
|||||||
if (frame.Lsda)
|
if (frame.Lsda)
|
||||||
EmitSymbol(streamer, *frame.Lsda, frame.LsdaEncoding);
|
EmitSymbol(streamer, *frame.Lsda, frame.LsdaEncoding);
|
||||||
else if (forceLsda)
|
else if (forceLsda)
|
||||||
streamer.EmitIntValue(0, size);
|
streamer.EmitIntValue(0, getSizeForEncoding(streamer, frame.LsdaEncoding));
|
||||||
|
|
||||||
streamer.EmitLabel(augmentationEnd);
|
|
||||||
// Call Frame Instructions
|
// Call Frame Instructions
|
||||||
|
|
||||||
EmitCFIInstructions(streamer, frame.Instructions, frame.Begin);
|
EmitCFIInstructions(streamer, frame.Instructions, frame.Begin);
|
||||||
|
Loading…
Reference in New Issue
Block a user