summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/DwarfExpression.cpp
diff options
context:
space:
mode:
authorYury Delendik <ydelendik@mozilla.com>2019-12-20 14:31:56 -0800
committerDerek Schuff <dschuff@chromium.org>2019-12-20 14:39:05 -0800
commitadf7a0a558a51f275bf8906b6a010c397560b7ff (patch)
tree318dbd1006bb7054d62bf66bd9647272f3c7cf41 /llvm/lib/CodeGen/AsmPrinter/DwarfExpression.cpp
parent538b485c59fae3faf2e0cc250faa9bba8406bbfe (diff)
downloadbcm5719-llvm-adf7a0a558a51f275bf8906b6a010c397560b7ff.tar.gz
bcm5719-llvm-adf7a0a558a51f275bf8906b6a010c397560b7ff.zip
[WebAssembly] Use TargetIndex operands in DbgValue to track WebAssembly operands locations
Extends DWARF expression language to express locals/globals locations. (via target-index operands atm) (possible variants are: non-virtual registers or address spaces) The WebAssemblyExplicitLocals can replace virtual registers to targertindex operand type at the time when WebAssembly backend introduces {get,set,tee}_local instead of corresponding virtual registers. Reviewed By: aprantl, dschuff Tags: #debug-info, #llvm Differential Revision: https://reviews.llvm.org/D52634
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfExpression.cpp')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfExpression.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfExpression.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfExpression.cpp
index df33a4faa85..310647f15a5 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfExpression.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfExpression.cpp
@@ -572,3 +572,11 @@ void DwarfExpression::emitLegacyZExt(unsigned FromBits) {
emitUnsigned((1ULL << FromBits) - 1);
emitOp(dwarf::DW_OP_and);
}
+
+void DwarfExpression::addWasmLocation(unsigned Index, int64_t Offset) {
+ assert(LocationKind == Implicit || LocationKind == Unknown);
+ LocationKind = Implicit;
+ emitOp(dwarf::DW_OP_WASM_location);
+ emitUnsigned(Index);
+ emitSigned(Offset);
+}
OpenPOWER on IntegriCloud