1.1 --- a/stage2/handlers.S Wed Feb 24 17:26:10 2016 +0100
1.2 +++ b/stage2/handlers.S Wed Feb 24 17:59:26 2016 +0100
1.3 @@ -27,14 +27,13 @@
1.4 .set noat
1.5
1.6 tlb_handler:
1.7 - sw $ra, -112($sp)
1.8 + /* gp should have been set in the entrypoint. */
1.9 +
1.10 jal save_state
1.11 nop
1.12
1.13 /* Invoke the handler. */
1.14
1.15 - lui $gp, %hi(_GLOBAL_OFFSET_TABLE_)
1.16 - ori $gp, $gp, %lo(_GLOBAL_OFFSET_TABLE_)
1.17 jal tlb_handle
1.18 nop
1.19
1.20 @@ -42,14 +41,13 @@
1.21 nop
1.22
1.23 interrupt_handler:
1.24 - sw $ra, -112($sp)
1.25 + /* gp should have been set in the entrypoint. */
1.26 +
1.27 jal save_state
1.28 nop
1.29
1.30 /* Invoke the handler. */
1.31
1.32 - lui $gp, %hi(_GLOBAL_OFFSET_TABLE_)
1.33 - ori $gp, $gp, %lo(_GLOBAL_OFFSET_TABLE_)
1.34 jal irq_handle
1.35 nop
1.36
1.37 @@ -57,7 +55,6 @@
1.38 nop
1.39
1.40 save_state:
1.41 -
1.42 /* Save the status, mask interrupts. */
1.43
1.44 mfc0 $k0, $12 /* CP0_STATUS */
1.45 @@ -90,8 +87,8 @@
1.46 sw $s6, -88($sp)
1.47 sw $s7, -92($sp)
1.48 sw $t8, -96($sp)
1.49 - sw $t9, -100($sp)
1.50 - sw $gp, -104($sp)
1.51 + /* sw $t9, -100($sp) */
1.52 + /* sw $gp, -104($sp) */
1.53 sw $fp, -108($sp)
1.54 /* sw $ra, -112($sp) */
1.55