mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-01 05:01:59 +01:00
[MC] Fix double negation of DW_CFA_def_cfa_offset
Negations are incorrectly added in two places and the code works just because the negations cancel each other.
This commit is contained in:
parent
886a960f92
commit
85df10d8f5
@ -1394,7 +1394,7 @@ void FrameEmitterImpl::emitCFIInstruction(const MCCFIInstruction &Instr) {
|
||||
if (IsRelative)
|
||||
CFAOffset += Instr.getOffset();
|
||||
else
|
||||
CFAOffset = -Instr.getOffset();
|
||||
CFAOffset = Instr.getOffset();
|
||||
|
||||
Streamer.emitULEB128IntValue(CFAOffset);
|
||||
|
||||
|
@ -472,7 +472,7 @@ void MCStreamer::emitCFIDefCfa(int64_t Register, int64_t Offset) {
|
||||
void MCStreamer::emitCFIDefCfaOffset(int64_t Offset) {
|
||||
MCSymbol *Label = emitCFILabel();
|
||||
MCCFIInstruction Instruction =
|
||||
MCCFIInstruction::cfiDefCfaOffset(Label, -Offset);
|
||||
MCCFIInstruction::cfiDefCfaOffset(Label, Offset);
|
||||
MCDwarfFrameInfo *CurFrame = getCurrentDwarfFrameInfo();
|
||||
if (!CurFrame)
|
||||
return;
|
||||
|
Loading…
x
Reference in New Issue
Block a user