aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/MC/MCDwarf.cpp
diff options
context:
space:
mode:
authorFangrui Song <maskray@google.com>2020-05-22 20:18:15 -0700
committerFangrui Song <maskray@google.com>2020-05-22 21:02:53 -0700
commit773f8dbd1da8409f1b62e8c5692cb9a5d199d6c8 (patch)
tree0b59b5628c2841a2a3a6b1ac93886ab6a6cd9587 /llvm/lib/MC/MCDwarf.cpp
parent1b02db52b79e01f038775f59193a49850a34184d (diff)
downloadllvm-773f8dbd1da8409f1b62e8c5692cb9a5d199d6c8.zip
llvm-773f8dbd1da8409f1b62e8c5692cb9a5d199d6c8.tar.gz
llvm-773f8dbd1da8409f1b62e8c5692cb9a5d199d6c8.tar.bz2
[MC] Fix double negation of DW_CFA_def_cfa
Negations are incorrectly added in numerous places and the code just happens to work. Also fix a missed DW_CFA_def_cfa_offset negation in c693b9c321d5a40d012340619674cf790c9ac86c: ARMAsmBackendDarwin::generateCompactUnwindEncoding
Diffstat (limited to 'llvm/lib/MC/MCDwarf.cpp')
-rw-r--r--llvm/lib/MC/MCDwarf.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/MC/MCDwarf.cpp b/llvm/lib/MC/MCDwarf.cpp
index d0fb77f6..0b7fc45 100644
--- a/llvm/lib/MC/MCDwarf.cpp
+++ b/llvm/lib/MC/MCDwarf.cpp
@@ -1406,7 +1406,7 @@ void FrameEmitterImpl::emitCFIInstruction(const MCCFIInstruction &Instr) {
Reg = MRI->getDwarfRegNumFromDwarfEHRegNum(Reg);
Streamer.emitInt8(dwarf::DW_CFA_def_cfa);
Streamer.emitULEB128IntValue(Reg);
- CFAOffset = -Instr.getOffset();
+ CFAOffset = Instr.getOffset();
Streamer.emitULEB128IntValue(CFAOffset);
return;