[PATCH] D70642: [DebugInfo] Support for DW_OP_implicit_pointer (DW_OP_LLVM_argN)
Alok Kumar Sharma via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 25 02:16:23 PST 2019
alok updated this revision to Diff 230859.
alok added a comment.
Updated to incorporated review comment.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D70642/new/
https://reviews.llvm.org/D70642
Files:
llvm/docs/LangRef.rst
llvm/include/llvm/BinaryFormat/Dwarf.def
Index: llvm/include/llvm/BinaryFormat/Dwarf.def
===================================================================
--- llvm/include/llvm/BinaryFormat/Dwarf.def
+++ llvm/include/llvm/BinaryFormat/Dwarf.def
@@ -652,6 +652,15 @@
// Extensions for Fission proposal.
HANDLE_DW_OP(0xfb, GNU_addr_index, 0, GNU)
HANDLE_DW_OP(0xfc, GNU_const_index, 0, GNU)
+// The LLVM extension.
+HANDLE_DW_OP(0x4000, LLVM_arg0, 0, LLVM)
+HANDLE_DW_OP(0x4001, LLVM_arg1, 0, LLVM)
+HANDLE_DW_OP(0x4002, LLVM_arg2, 0, LLVM)
+HANDLE_DW_OP(0x4003, LLVM_arg3, 0, LLVM)
+HANDLE_DW_OP(0x4004, LLVM_arg4, 0, LLVM)
+HANDLE_DW_OP(0x4005, LLVM_arg5, 0, LLVM)
+HANDLE_DW_OP(0x4006, LLVM_arg6, 0, LLVM)
+HANDLE_DW_OP(0x4007, LLVM_arg7, 0, LLVM)
// DWARF languages.
HANDLE_DW_LANG(0x0001, C89, 0, 2, DWARF)
Index: llvm/docs/LangRef.rst
===================================================================
--- llvm/docs/LangRef.rst
+++ llvm/docs/LangRef.rst
@@ -4815,6 +4815,12 @@
signed offset of the specified register. The opcode is only generated by the
``AsmPrinter`` pass to describe call site parameter value which requires an
expression over two registers.
+- ``DW_OP_LLVM_argN`` represents argument number N of the containing LLVM
+ intrinsic. Where N can be any value from 0 to 7. For example in intrinsic
+ ``call @llvm.dbg.someintrinsic(DILocalVariable("x"), DILocalVariable("y"),
+ metadata !DIExpression(DW_OP_LLVM_arg0, DW_OP_LLVM_arg1, DW_OP_plus))``
+ ``DW_OP_LLVM_arg0`` represents ``DILocalVariable("x")`` and
+ ``DW_OP_LLVM_arg1`` represents ``DILocalVariable("y")``.
DWARF specifies three kinds of simple location descriptions: Register, memory,
and implicit location descriptions. Note that a location description is
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D70642.230859.patch
Type: text/x-patch
Size: 1727 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191125/5218950e/attachment.bin>
More information about the llvm-commits
mailing list