Don't terminate waves halted at s_endpgm

To support single stepping the instruction preceding an s_endpgm,
unwind the PC by 8 bytes and set ttmp11[9] to notify the debugger
that the wave is halted with a modified PC.

Bump the debug r_version for this new trap handler ABI.

Change-Id: I55e4e0d65576f92da14a336266c31c513baab547


[ROCm/ROCR-Runtime commit: 8aec53969f]
Этот коммит содержится в:
Laurent Morichetti
2021-01-21 11:51:37 -08:00
родитель 3eaae50cc6
Коммит 062d313530
2 изменённых файлов: 31 добавлений и 34 удалений
+2 -1
Просмотреть файл
@@ -75,7 +75,8 @@ __attribute__((noinline)) static void _loader_debug_state() {
// r_version history:
// 1: Initial debug protocol
// 2: New trap handler ABI. The reason for halting a wave is recorded in ttmp11[8:7].
HSA_API r_debug _amdgpu_r_debug = {2,
// 3: New trap handler ABI. A wave halted at S_ENDPGM rewinds its PC by 8 bytes, and sets ttmp11[9]=1.
HSA_API r_debug _amdgpu_r_debug = {3,
nullptr,
reinterpret_cast<uintptr_t>(&_loader_debug_state),
r_debug::RT_CONSISTENT,