Ignore:
File:
1 edited

Legend:

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

    r45f7449 r5301662  
    2828
    2929#include <arch/asm/regname.h>
     30#include <arch/fpu_context_struct.h>
    3031
    3132.text
     
    136137.macro fpu_gp_save reg ctx
    137138        mfc1 $t0, $\reg
    138         sw $t0, \reg * 4(\ctx)
     139        sw $t0, FPU_CONTEXT_OFFSET_DREGS + \reg * FPU_CONTEXT_DREGS_ITEM_SIZE(\ctx)
    139140.endm
    140141
    141142.macro fpu_gp_restore reg ctx
    142         lw $t0, \reg * 4(\ctx)
     143        lw $t0, FPU_CONTEXT_OFFSET_DREGS + \reg * FPU_CONTEXT_DREGS_ITEM_SIZE(\ctx)
    143144        mtc1 $t0, $\reg
    144145.endm
     
    146147.macro fpu_ct_save reg ctx
    147148        cfc1 $t0, $1
    148         sw $t0, (\reg + 32) * 4(\ctx)
     149        sw $t0, FPU_CONTEXT_OFFSET_CREGS + \reg * FPU_CONTEXT_CREGS_ITEM_SIZE(\ctx)
    149150.endm
    150151
    151152.macro fpu_ct_restore reg ctx
    152         lw $t0, (\reg + 32) * 4(\ctx)
     153        lw $t0, FPU_CONTEXT_OFFSET_CREGS + \reg * FPU_CONTEZT_CREGS_ITEM_SIZE(\ctx)
    153154        ctc1 $t0, $\reg
    154155.endm
Note: See TracChangeset for help on using the changeset viewer.