f31b312611
gfx940 uses ttmp11 to hold the queue packet index so the first level trap handler uses ttmp13 instead to save ib_sts. Repurpose ttmp11[31] to mean that the ttmps are initialized. The issue was that the debugger could not tell whether ttmp6 was written by the trap handler when determining the stop reason. If ttmp11[31]=0, then the trap handler has not been executed and ttmp6 should be assumed to be 0. If ttmp11[31]=1, then ttmp6 holds the trap_id, if an s_trap instruction caused the exception. Signed-off-by: Laurent Morichetti <laurent.morichetti@amd.com> Signed-off-by: Lancelot Six <lancelot.six@amd.com> Change-Id: I9af903abae044b9ec530306229caf3b883f3ee46