mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-16 16:37:42 +00:00
Use DW_OP_fbreg when offset is based on frame register.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114585 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
f0633e48eb
commit
be90c3a0ea
@ -811,6 +811,16 @@ void DwarfDebug::addAddress(DIE *Die, unsigned Attribute,
|
||||
const TargetRegisterInfo *RI = Asm->TM.getRegisterInfo();
|
||||
unsigned Reg = RI->getDwarfRegNum(Location.getReg(), false);
|
||||
DIEBlock *Block = new (DIEValueAllocator) DIEBlock();
|
||||
const TargetRegisterInfo *TRI = Asm->TM.getRegisterInfo();
|
||||
|
||||
if (TRI->getFrameRegister(*Asm->MF) == Location.getReg()
|
||||
&& Location.getOffset()) {
|
||||
// If variable offset is based in frame register then use fbreg.
|
||||
addUInt(Block, 0, dwarf::DW_FORM_data1, dwarf::DW_OP_fbreg);
|
||||
addSInt(Block, 0, dwarf::DW_FORM_sdata, Location.getOffset());
|
||||
addBlock(Die, Attribute, 0, Block);
|
||||
return;
|
||||
}
|
||||
|
||||
if (Location.isReg()) {
|
||||
if (Reg < 32) {
|
||||
|
Loading…
Reference in New Issue
Block a user