Skip to content

Commit 04921ef

Browse files
pratikasharigcbot
authored andcommitted
Set return location register to DW_CFA_undefined in kernel frame.
1 parent 65224e0 commit 04921ef

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

IGC/DebugInfo/DwarfDebug.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3436,6 +3436,16 @@ void DwarfDebug::writeFDEStackCall(VISAModule* m)
34363436
numGRFs, EmitSettings.UseNewRegisterEncoding));
34373437
}
34383438
}
3439+
else
3440+
{
3441+
if (m->GetType() == VISAModule::ObjectType::KERNEL)
3442+
{
3443+
// set return location to be undefined in top frame
3444+
write(cfaOps[0], (uint8_t)llvm::dwarf::DW_CFA_undefined);
3445+
writeULEB128(cfaOps[0], GetEncodedRegNum<RegisterNumbering::GRFBase>(numGRFs,
3446+
EmitSettings.UseNewRegisterEncoding));
3447+
}
3448+
}
34393449

34403450
// write callee save
34413451
if (cfi.calleeSaveEntry.size() > 0)

0 commit comments

Comments
 (0)