Changeset 6d123b3 in mainline for kernel/arch/mips64/src/start.S


Ignore:
Timestamp:
2012-03-13T15:23:11Z (12 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
145d16f
Parents:
df366b5e
Message:

respect the o32 ABI when calling C functions from assembler and creating contexts
(thx Adam Hraska)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/mips64/src/start.S

    rdf366b5e r6d123b3  
    241241        /* $a1 contains physical address of bootinfo_t */
    242242        jal arch_pre_main
    243         nop
     243        addiu $sp, -ABI_STACK_FRAME
    244244       
    245245        j main_bsp
     
    281281       
    282282        move $a1, $sp
     283        move $a0, $k0
    283284        jal exc_dispatch     /* exc_dispatch(excno, register_space) */
    284         move $a0, $k0
     285        addiu $sp, -ABI_STACK_FRAME
     286        addiu $sp, ABI_STACK_FRAME
    285287       
    286288        REGISTERS_LOAD $sp
     
    323325        sw $t0, ISTATE_OFFSET_T0($sp)  /* save the 5th argument on the stack */
    324326        sw $t1, ISTATE_OFFSET_T1($sp)  /* save the 6th argument on the stack */
     327       
    325328        jal syscall_handler
    326329        sw $v0, ISTATE_OFFSET_V0($sp)  /* save the syscall number on the stack */
     
    357360        move $sp, $k0
    358361       
     362        move $a0, $sp
    359363        jal tlb_refill
    360         move $a0, $sp
     364        addiu $sp, -ABI_STACK_FRAME
     365        addiu $sp, ABI_STACK_FRAME
    361366       
    362367        REGISTERS_LOAD $sp
     
    366371cache_error_handler:
    367372        KERNEL_STACK_TO_K0
    368         sub $k0, ISTATE_SOFT_SIZE 
     373        sub $k0, ISTATE_SOFT_SIZE
    369374        REGISTERS_STORE_AND_EXC_RESET $k0
    370375        sw $sp, ISTATE_OFFSET_SP($k0)
    371376        move $sp, $k0
    372377       
     378        move $a0, $sp
    373379        jal cache_error
    374         move $a0, $sp
     380        addiu $sp, -ABI_STACK_FRAME
     381        addiu $sp, ABI_STACK_FRAME
    375382       
    376383        REGISTERS_LOAD $sp
Note: See TracChangeset for help on using the changeset viewer.