New trap handler ABI (v5)

Park the wave, if it is stopped, to avoid halting it at an s_endpgm
instruction if the architecture does not support it.

Free ttmp6 by converting the dispatch_ptr into a queue packet index
(25-bit) and storing it in ttmp7[24:0].

Save the exception PC in ttmp11[22:7] ttmp6[31:0].

Change-Id: Iaa3c5baf5b488c0b534044d338f12bffa63ddce2


[ROCm/ROCR-Runtime commit: ea6ee0aa81]
Tento commit je obsažen v:
Laurent Morichetti
2021-03-03 15:10:55 -08:00
odevzdal Laurent Morichetti
rodič 188570928f
revize 023947a6de
2 změnil soubory, kde provedl 140 přidání a 90 odebrání
+2 -1
Zobrazit soubor
@@ -77,7 +77,8 @@ __attribute__((noinline)) static void _loader_debug_state() {
// 2: New trap handler ABI. The reason for halting a wave is recorded in ttmp11[8:7].
// 3: New trap handler ABI. A wave halted at S_ENDPGM rewinds its PC by 8 bytes, and sets ttmp11[9]=1.
// 4: New trap handler ABI. Save the trap id in ttmp11[16:9]
HSA_API r_debug _amdgpu_r_debug = {4,
// 5: New trap handler ABI. Save the PC in ttmp11[22:7] ttmp6[31:0], and park the wave if stopped
HSA_API r_debug _amdgpu_r_debug = {5,
nullptr,
reinterpret_cast<uintptr_t>(&_loader_debug_state),
r_debug::RT_CONSISTENT,