Index: sys/mips/include/asm.h =================================================================== --- sys/mips/include/asm.h +++ sys/mips/include/asm.h @@ -240,7 +240,8 @@ */ #define PANIC(msg) \ PTR_LA a0, 9f; \ - jal _C_LABEL(panic); \ + PTR_LA t9, _C_LABEL(panic); \ + jalr t9; \ nop; \ MSG(msg) @@ -248,7 +249,8 @@ #define PRINTF(msg) \ PTR_LA a0, 9f; \ - jal _C_LABEL(printf); \ + PTR_LA t9, _C_LABEL(printf); \ + jalr t9; \ nop; \ MSG(msg) Index: sys/mips/include/pcb.h =================================================================== --- sys/mips/include/pcb.h +++ sys/mips/include/pcb.h @@ -1,3 +1,4 @@ + /* $OpenBSD: pcb.h,v 1.3 1998/09/15 10:50:12 pefo Exp $ */ /*- @@ -84,8 +85,8 @@ COP0_SYNC ;\ beq s2, zero, 4f ;\ nop ;\ - PTR_LA s0, _C_LABEL(ast) ;\ - jalr s0 ;\ + PTR_LA t9, _C_LABEL(ast) ;\ + jalr t9 ;\ PTR_ADDU a0, s3, U_PCB_REGS ;\ j 44b ;\ nop ;\ Index: sys/mips/mips/exception.S =================================================================== --- sys/mips/mips/exception.S +++ sys/mips/mips/exception.S @@ -541,8 +541,8 @@ * Call the exception handler. a0 points at the saved frame. */ PTR_LA gp, _C_LABEL(_gp) - PTR_LA k0, _C_LABEL(trap) - jalr k0 + PTR_LA t9, _C_LABEL(trap) + jalr t9 REG_S a3, CALLFRAME_RA + KERN_REG_SIZE(sp) # for debugging /* @@ -613,8 +613,8 @@ /* * Call the exception handler. */ - PTR_LA k0, _C_LABEL(trap) - jalr k0 + PTR_LA t9, _C_LABEL(trap) + jalr t9 nop /* @@ -673,7 +673,8 @@ xori t1, t0, MIPS_SR_INT_IE mtc0 t1, MIPS_COP_0_STATUS COP0_SYNC - jal sched_runnable + PTR_LA t9, sched_runnable + jalr t9 nop REG_L ra, CALLFRAME_RA(sp) mfc0 t0, MIPS_COP_0_STATUS @@ -737,8 +738,8 @@ * Call the interrupt handler. a0 points at the saved frame. */ PTR_LA gp, _C_LABEL(_gp) - PTR_LA k0, _C_LABEL(cpu_intr) - jalr k0 + PTR_LA t9, _C_LABEL(cpu_intr) + jalr t9 REG_S a3, CALLFRAME_RA + KERN_REG_SIZE(sp) # for debugging /* @@ -859,8 +860,8 @@ /* * Call the interrupt handler. */ - PTR_LA k0, _C_LABEL(cpu_intr) - jalr k0 + PTR_LA t9, _C_LABEL(cpu_intr) + jalr t9 REG_S a3, CALLFRAME_RA(sp) # for debugging /* @@ -1362,8 +1363,8 @@ PTR_ADDU a0, a0, U_PCB_REGS # first arg is ptr to CPU registers move a1, a2 # second arg is instruction PC move a2, t1 # third arg is floating point CSR - PTR_LA t3, _C_LABEL(MipsEmulateBranch) # compute PC after branch - jalr t3 # compute PC after branch + PTR_LA t9, _C_LABEL(MipsEmulateBranch) # compute PC after branch + jalr t9 # compute PC after branch move a3, zero # fourth arg is FALSE /* * Now load the floating-point instruction in the branch delay slot @@ -1399,8 +1400,8 @@ PTR_L a0, PC_CURTHREAD(a0) # get current thread cfc1 a2, MIPS_FPU_CSR # code = FP execptions ctc1 zero, MIPS_FPU_CSR # Clear exceptions - PTR_LA t3, _C_LABEL(trapsignal) - jalr t3 + PTR_LA t9, _C_LABEL(trapsignal) + jalr t9 li a1, SIGFPE b FPReturn nop @@ -1409,8 +1410,8 @@ * Finally, we can call MipsEmulateFP() where a0 is the instruction to emulate. */ 4: - PTR_LA t3, _C_LABEL(MipsEmulateFP) - jalr t3 + PTR_LA t9, _C_LABEL(MipsEmulateFP) + jalr t9 nop /* Index: sys/mips/mips/locore.S =================================================================== --- sys/mips/mips/locore.S +++ sys/mips/mips/locore.S @@ -202,7 +202,8 @@ PTR_LA gp, _C_LABEL(_gp) /* Call the platform-specific startup code. */ - jal _C_LABEL(platform_start) + PTR_LA t9, _C_LABEL(platform_start) + jalr t9 nop PTR_LA sp, _C_LABEL(thread0) @@ -211,7 +212,8 @@ and a0, a0, t0 PTR_SUBU sp, a0, CALLFRAME_SIZ - jal _C_LABEL(mi_startup) # mi_startup(frame) + PTR_LA t9, _C_LABEL(mi_startup) + jalr t9 # mi_startup(frame) sw zero, CALLFRAME_SIZ - 8(sp) # Zero out old fp for debugger PANIC("Startup failed!") Index: sys/mips/mips/mpboot.S =================================================================== --- sys/mips/mips/mpboot.S +++ sys/mips/mips/mpboot.S @@ -63,7 +63,8 @@ mtc0 t0, MIPS_COP_0_CONFIG COP0_SYNC - jal platform_processor_id /* get the processor number */ + PTR_LA t9, platform_processor_id /* get the processor number */ + jalr t9 nop move s0, v0 @@ -81,9 +82,11 @@ PTR_LA gp, _C_LABEL(_gp) - jal platform_init_ap + PTR_LA t9, platform_init_ap + jalr t9 move a0, s0 - jal smp_init_secondary + PTR_LA t9, smp_init_secondary + jalr t9 move a0, s0 PANIC("AP startup failed!") Index: sys/mips/mips/support.S =================================================================== --- sys/mips/mips/support.S +++ sys/mips/mips/support.S @@ -186,7 +186,8 @@ REG_S ra, CALLFRAME_RA(sp) GET_CPU_PCPU(v1) PTR_L v1, PC_CURPCB(v1) - jal _C_LABEL(copystr) + PTR_LA t9, _C_LABEL(copystr) + jalr t9 PTR_S v0, U_PCB_ONFAULT(v1) REG_L ra, CALLFRAME_RA(sp) GET_CPU_PCPU(v1) @@ -214,7 +215,8 @@ REG_S ra, CALLFRAME_RA(sp) GET_CPU_PCPU(v1) PTR_L v1, PC_CURPCB(v1) - jal _C_LABEL(copystr) + PTR_LA t9, _C_LABEL(copystr) + jalr t9 PTR_S v0, U_PCB_ONFAULT(v1) REG_L ra, CALLFRAME_RA(sp) GET_CPU_PCPU(v1) @@ -239,7 +241,8 @@ REG_S ra, CALLFRAME_RA(sp) GET_CPU_PCPU(v1) PTR_L v1, PC_CURPCB(v1) - jal _C_LABEL(bcopy) + PTR_LA t9, _C_LABEL(bcopy) + jalr t9 PTR_S v0, U_PCB_ONFAULT(v1) REG_L ra, CALLFRAME_RA(sp) GET_CPU_PCPU(v1) @@ -267,7 +270,8 @@ REG_S ra, CALLFRAME_RA(sp) GET_CPU_PCPU(v1) PTR_L v1, PC_CURPCB(v1) - jal _C_LABEL(cheri_bcopy) + PTR_LA t9, _C_LABEL(cheri_bcopy) + jalr t9 PTR_S v0, U_PCB_ONFAULT(v1) REG_L ra, CALLFRAME_RA(sp) GET_CPU_PCPU(v1) @@ -294,7 +298,8 @@ REG_S ra, CALLFRAME_RA(sp) GET_CPU_PCPU(v1) PTR_L v1, PC_CURPCB(v1) - jal _C_LABEL(bcopy) + PTR_LA t9, _C_LABEL(bcopy) + jalr t9 PTR_S v0, U_PCB_ONFAULT(v1) REG_L ra, CALLFRAME_RA(sp) GET_CPU_PCPU(v1) @@ -322,7 +327,8 @@ REG_S ra, CALLFRAME_RA(sp) GET_CPU_PCPU(v1) PTR_L v1, PC_CURPCB(v1) - jal _C_LABEL(cheri_bcopy) + PTR_LA t9, _C_LABEL(cheri_bcopy) + jalr t9 PTR_S v0, U_PCB_ONFAULT(v1) REG_L ra, CALLFRAME_RA(sp) GET_CPU_PCPU(v1) Index: sys/mips/mips/swtch.S =================================================================== --- sys/mips/mips/swtch.S +++ sys/mips/mips/swtch.S @@ -79,7 +79,8 @@ LEAF(fork_trampoline) move a0,s0 move a1,s1 - jal _C_LABEL(fork_exit) + PTR_LA t9, _C_LABEL(fork_exit) + jalr t9 move a2,s2 #BDSlot DO_AST @@ -291,7 +292,8 @@ nop do_cop2_save: - jal octeon_cop2_save + PTR_LA t9, octeon_cop2_save + jalr t9 nop no_cop2_context: @@ -427,8 +429,8 @@ sw2: PTR_L s0, TD_PCB(s7) RESTORE_U_PCB_CONTEXT(sp, PCB_REG_SP, s0) - PTR_LA t1, _C_LABEL(pmap_activate) # s7 = new proc pointer - jalr t1 # s7 = new proc pointer + PTR_LA t9, _C_LABEL(pmap_activate) # s7 = new proc pointer + jalr t9 # s7 = new proc pointer move a0, s7 # BDSLOT /* * Restore registers and return.