mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-26 04:32:44 +01:00
[DebugInfo] Describe size of spilled values in call site params
A call site parameter description of a memory operand needs to unambiguously convey the size of the operand to prevent incorrect entry value evaluation. Thanks for David Stenberg for pointing this issue out!
This commit is contained in:
parent
802dc83e3f
commit
1f5735e21b
@ -1150,7 +1150,11 @@ TargetInstrInfo::describeLoadedValue(const MachineInstr &MI) const {
|
||||
if (!TII->getMemOperandWithOffset(MI, BaseOp, Offset, TRI))
|
||||
return None;
|
||||
|
||||
Expr = DIExpression::prepend(Expr, DIExpression::DerefAfter, Offset);
|
||||
SmallVector<uint64_t, 8> Ops;
|
||||
DIExpression::appendOffset(Ops, Offset);
|
||||
Ops.push_back(dwarf::DW_OP_deref_size);
|
||||
Ops.push_back(MMO->getSize());
|
||||
Expr = DIExpression::prependOpcodes(Expr, Ops);
|
||||
return ParamLoadedValue(*BaseOp, Expr);
|
||||
}
|
||||
|
||||
|
@ -22,7 +22,7 @@
|
||||
|
||||
# CHECK-LABEL: DW_TAG_call_site_parameter
|
||||
# CHECK-NEXT: DW_AT_location (DW_OP_reg5 RDI)
|
||||
# CHECK-NEXT: DW_AT_call_value (DW_OP_fbreg -44, DW_OP_deref)
|
||||
# CHECK-NEXT: DW_AT_call_value (DW_OP_fbreg -44, DW_OP_deref_size 0x4)
|
||||
|
||||
--- |
|
||||
; ModuleID = 'spill.cc'
|
||||
|
Loading…
Reference in New Issue
Block a user