diff --git a/sys/mips/mips/locore.S b/sys/mips/mips/locore.S index e45e2398b3cd..9f685ebfee4c 100644 --- a/sys/mips/mips/locore.S +++ b/sys/mips/mips/locore.S @@ -161,11 +161,11 @@ VECTOR(_locore, unknown) /* * Initialize stack and call machine startup. */ - PTR_LA sp, _C_LABEL(pcpu_space) - addiu sp, (PAGE_SIZE * 2) - CALLFRAME_SIZ + PTR_LA sp, _C_LABEL(pcpu_space) + PTR_ADDU sp, (PAGE_SIZE * 2) - CALLFRAME_SIZ - sw zero, CALLFRAME_SIZ - 4(sp) # Zero out old ra for debugger - sw zero, CALLFRAME_SIZ - 8(sp) # Zero out old fp for debugger + REG_S zero, CALLFRAME_RA(sp) # Zero out old ra for debugger + REG_S zero, CALLFRAME_SP(sp) # Zero out old fp for debugger PTR_LA gp, _C_LABEL(_gp)