[PATCH] D59687: [DebugInfo] Prologue inserter need to insert DW_OP_deref_size

Markus Lavin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 22 03:34:37 PDT 2019


markus created this revision.
markus added reviewers: aprantl, dblaikie.
markus added a project: debug-info.
Herald added subscribers: ormris, jdoerfert.
Herald added a project: LLVM.

The `PrologEpilogInserter` need to insert a `DW_OP_deref_size` before prepending a memory location expression to an already implicit expression to avoid having the existing expression act on the memory address instead of the value behind it.

The reason for using `DW_OP_deref_size` and not plain `DW_OP_deref` is that big-endian targets need to read the right size as simply truncating a larger read would yield the wrong result (LSB bytes are not at the lower address).


Repository:
  rL LLVM

https://reviews.llvm.org/D59687

Files:
  lib/CodeGen/AsmPrinter/DwarfExpression.cpp
  lib/CodeGen/MIRParser/MIParser.cpp
  lib/CodeGen/PrologEpilogInserter.cpp
  lib/IR/DebugInfoMetadata.cpp
  test/CodeGen/X86/prologepilog_deref_size.mir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D59687.191841.patch
Type: text/x-patch
Size: 6746 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190322/f7ebce76/attachment.bin>


More information about the llvm-commits mailing list