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 moved

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/arch/mips64/src/entryjmp.S

    rdf366b5e r6d123b3  
    2727#
    2828
     29#include <libarch/stack.h>
     30
    2931.text
    3032.section .text
     
    3436## void entry_point_jmp(void *entry_point, void *pcb);
    3537#
    36 # $a0 (=$4)     contains entry_point
    37 # $a1 (=$5)     contains pcb
     38# $a0 (=$4) contains entry_point
     39# $a1 (=$5) contains pcb
    3840#
    3941# Jump to program entry point
     
    4143entry_point_jmp:
    4244        # tmp := entry_point
    43         move $25, $a0
    44 
     45        move $t9, $a0
     46       
    4547        # Pass pcb to the entry point in $a0
    4648        move $a0, $a1
    47         jr $25
    48         nop
    49 .end
     49       
     50        jr $t9
     51        addiu $sp, -ABI_STACK_FRAME
     52        addiu $sp, ABI_STACK_FRAME
     53.end entry_point_jmp
Note: See TracChangeset for help on using the changeset viewer.