diff options
Diffstat (limited to 'c/src/lib/libcpu/sparc/reg_win/window.S')
-rw-r--r-- | c/src/lib/libcpu/sparc/reg_win/window.S | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/c/src/lib/libcpu/sparc/reg_win/window.S b/c/src/lib/libcpu/sparc/reg_win/window.S index 535dc83105..9e4158e288 100644 --- a/c/src/lib/libcpu/sparc/reg_win/window.S +++ b/c/src/lib/libcpu/sparc/reg_win/window.S @@ -73,9 +73,9 @@ SYM(window_overflow_trap_handler): * * On entry: * - * l0 = psr (from trap table) * l1 = pc * l2 = npc + * l3 = wim (from trap table) */ PUBLIC(window_underflow_trap_handler) @@ -95,17 +95,15 @@ SYM(window_underflow_trap_handler): * register will result in the local register set changing. */ - mov %wim, %l3 ! Calculate new WIM + ! In WIM 3 write instruction delay. since WIM<=0 from trap entry sll %l3, 1, %l4 ! l4 = WIM << 1 srl %l3, SPARC_NUMBER_OF_REGISTER_WINDOWS-1, %l5 - ! l5 = WIM >> (Number Windows-1) - or %l5, %l4, %l5 ! l5 = (WIM << 1) | + or %l5, %l4, %i5 ! %i5= (WIM << 1) | ! (WIM >> (Number Windows-1)) - mov %l5, %wim ! load the new WIM - nop; nop; nop restore ! Two restores to get into the - restore ! window to restore + restore %o5, %g0, %l7 ! window to restore. Carry along new WIM ldd [%sp + 0x00], %l0 ! First the local register set + mov %l7, %wim ! load the new WIM ldd [%sp + 0x08], %l2 ldd [%sp + 0x10], %l4 ldd [%sp + 0x18], %l6 @@ -116,7 +114,7 @@ SYM(window_underflow_trap_handler): save ! Get back to the trap window. save jmp %l1 ! Re-execute restore. - rett %l2 + rett %l2 /* * Flush All Windows trap handler. |