From 8496370ad805eec69bc9b2ab194da672552c192d Mon Sep 17 00:00:00 2001 From: cxy004 Date: Mon, 16 Aug 2021 07:32:51 +0800 Subject: [PATCH] fix TI --- resources/ping-pong-mips32/game/game/trap.S | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/resources/ping-pong-mips32/game/game/trap.S b/resources/ping-pong-mips32/game/game/trap.S index f36422b..2d3ff50 100644 --- a/resources/ping-pong-mips32/game/game/trap.S +++ b/resources/ping-pong-mips32/game/game/trap.S @@ -23,10 +23,19 @@ andi k1, k0, CAUSEF_EXCCODE bnez k1, SYSCALL nop + li k1, 1 << 30 + and k1, k0, k1 + beqz k1, 7f + nop + lui k0, %hi(current_thread) + lw k0, %lo(current_thread)(k0) + lw k1, TF_INTHDL7(k0) + jr k1 + nop +7: mfc0 k1, CP0_STATUS and k0, k0, k1 - andi k1, k0, (1 << 30) | C_IRQ5 -7: + andi k1, k0, C_IRQ5 beqz k1, 6f andi k1, k0, C_IRQ4 lui k0, %hi(current_thread)