summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/DwarfExpression.h
diff options
context:
space:
mode:
authorMarkus Lavin <markus.lavin@ericsson.com>2019-04-30 07:58:57 +0000
committerMarkus Lavin <markus.lavin@ericsson.com>2019-04-30 07:58:57 +0000
commita475da36eb5013143c19074e3edfc8977ed15b2a (patch)
treed759a2c62006e45c13401025225ac6757fa93373 /llvm/lib/CodeGen/AsmPrinter/DwarfExpression.h
parent2520530bb05c8b78fd9064a117e63fb0a61a785a (diff)
downloadbcm5719-llvm-a475da36eb5013143c19074e3edfc8977ed15b2a.tar.gz
bcm5719-llvm-a475da36eb5013143c19074e3edfc8977ed15b2a.zip
[DebugInfo] DW_OP_deref_size in PrologEpilogInserter.
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). This re-commit fixes issues reported in the first one. Namely deref was inserted under wrong conditions and additionally the deref_size argument was incorrectly encoded. Differential Revision: https://reviews.llvm.org/D59687 llvm-svn: 359535
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfExpression.h')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfExpression.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfExpression.h b/llvm/lib/CodeGen/AsmPrinter/DwarfExpression.h
index 18bedf0b902..145504946a5 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfExpression.h
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfExpression.h
@@ -139,6 +139,8 @@ protected:
/// Emit a raw unsigned value.
virtual void emitUnsigned(uint64_t Value) = 0;
+ virtual void emitData1(uint8_t Value) = 0;
+
virtual void emitBaseTypeRef(uint64_t Idx) = 0;
/// Emit a normalized unsigned constant.
@@ -264,6 +266,7 @@ class DebugLocDwarfExpression final : public DwarfExpression {
void emitOp(uint8_t Op, const char *Comment = nullptr) override;
void emitSigned(int64_t Value) override;
void emitUnsigned(uint64_t Value) override;
+ void emitData1(uint8_t Value) override;
void emitBaseTypeRef(uint64_t Idx) override;
bool isFrameRegister(const TargetRegisterInfo &TRI,
unsigned MachineReg) override;
@@ -281,6 +284,7 @@ const AsmPrinter &AP;
void emitOp(uint8_t Op, const char *Comment = nullptr) override;
void emitSigned(int64_t Value) override;
void emitUnsigned(uint64_t Value) override;
+ void emitData1(uint8_t Value) override;
void emitBaseTypeRef(uint64_t Idx) override;
bool isFrameRegister(const TargetRegisterInfo &TRI,
unsigned MachineReg) override;
OpenPOWER on IntegriCloud