Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/mips32/src/asm.S

    r45f7449 r0407636  
    2727 */
    2828
     29#include <abi/asmtool.h>
    2930#include <arch/asm/regname.h>
     31#include <arch/fpu_context_struct.h>
    3032
    3133.text
     
    4749.set nomacro
    4850
    49 .global asm_delay_loop
    50 asm_delay_loop:
     51FUNCTION_BEGIN(asm_delay_loop)
    5152        j $31
    5253        nop
    53 
    54 .global cpu_halt
    55 cpu_halt:
     54FUNCTION_END(asm_delay_loop)
     55
     56FUNCTION_BEGIN(cpu_halt)
    5657        j cpu_halt
    5758        nop
    58 
    59 .global memcpy_from_uspace
    60 .global memcpy_to_uspace
    61 .global memcpy_from_uspace_failover_address
    62 .global memcpy_to_uspace_failover_address
    63 memcpy_from_uspace:
    64 memcpy_to_uspace:
     59FUNCTION_END(cpu_halt)
     60
     61FUNCTION_BEGIN(memcpy_from_uspace)
     62FUNCTION_BEGIN(memcpy_to_uspace)
    6563        move $t2, $a0  /* save dst */
    6664       
     
    128126                jr $ra
    129127                move $v0, $t2
    130 
    131 memcpy_from_uspace_failover_address:
    132 memcpy_to_uspace_failover_address:
     128FUNCTION_END(memcpy_from_uspace)
     129FUNCTION_END(memcpy_to_uspace)
     130
     131SYMBOL(memcpy_from_uspace_failover_address)
     132SYMBOL(memcpy_to_uspace_failover_address)
    133133        jr $ra
    134134        move $v0, $zero
     
    136136.macro fpu_gp_save reg ctx
    137137        mfc1 $t0, $\reg
    138         sw $t0, \reg * 4(\ctx)
     138        sw $t0, FPU_CONTEXT_OFFSET_DREGS + \reg * FPU_CONTEXT_DREGS_ITEM_SIZE(\ctx)
    139139.endm
    140140
    141141.macro fpu_gp_restore reg ctx
    142         lw $t0, \reg * 4(\ctx)
     142        lw $t0, FPU_CONTEXT_OFFSET_DREGS + \reg * FPU_CONTEXT_DREGS_ITEM_SIZE(\ctx)
    143143        mtc1 $t0, $\reg
    144144.endm
     
    146146.macro fpu_ct_save reg ctx
    147147        cfc1 $t0, $1
    148         sw $t0, (\reg + 32) * 4(\ctx)
     148        sw $t0, FPU_CONTEXT_OFFSET_CREGS + \reg * FPU_CONTEXT_CREGS_ITEM_SIZE(\ctx)
    149149.endm
    150150
    151151.macro fpu_ct_restore reg ctx
    152         lw $t0, (\reg + 32) * 4(\ctx)
     152        lw $t0, FPU_CONTEXT_OFFSET_CREGS + \reg * FPU_CONTEZT_CREGS_ITEM_SIZE(\ctx)
    153153        ctc1 $t0, $\reg
    154154.endm
    155155
    156 .global fpu_context_save
    157 fpu_context_save:
     156FUNCTION_BEGIN(fpu_context_save)
    158157#ifdef CONFIG_FPU
    159158        fpu_gp_save 0, $a0
     
    224223        j $ra
    225224        nop
    226 
    227 .global fpu_context_restore
    228 fpu_context_restore:
     225FUNCTION_END(fpu_context_save)
     226
     227FUNCTION_BEGIN(fpu_context_restore)
    229228#ifdef CONFIG_FPU
    230229        fpu_gp_restore 0, $a0
     
    295294        j $ra
    296295        nop
    297 
    298 .global early_putchar
    299 early_putchar:
     296FUNCTION_END(fpu_context_restore)
     297
     298FUNCTION_BEGIN(early_putchar)
    300299        j $ra
    301300        nop
     301FUNCTION_END(early_putchar)
Note: See TracChangeset for help on using the changeset viewer.