Ignore:
File:
1 edited

Legend:

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

    r9d58539 r33add3a8  
    2727#
    2828
    29 #include <arch/context_offset.h>
     29#include <arch/context_struct.h>
    3030
    3131.text
     
    3939
    4040context_save_arch:
    41         CONTEXT_SAVE_ARCH_CORE $a0
     41        sw $s0, CONTEXT_OFFSET_S0($a0)
     42        sw $s1, CONTEXT_OFFSET_S1($a0)
     43        sw $s2, CONTEXT_OFFSET_S2($a0)
     44        sw $s3, CONTEXT_OFFSET_S3($a0)
     45        sw $s4, CONTEXT_OFFSET_S4($a0)
     46        sw $s5, CONTEXT_OFFSET_S5($a0)
     47        sw $s6, CONTEXT_OFFSET_S6($a0)
     48        sw $s7, CONTEXT_OFFSET_S7($a0)
     49        sw $s8, CONTEXT_OFFSET_S8($a0)
     50        sw $gp, CONTEXT_OFFSET_GP($a0)
     51       
     52        sw $ra, CONTEXT_OFFSET_PC($a0)
     53        sw $sp, CONTEXT_OFFSET_SP($a0)
    4254       
    4355        # context_save returns 1
     
    4658
    4759context_restore_arch:
    48         CONTEXT_RESTORE_ARCH_CORE $a0
     60        lw $s0, CONTEXT_OFFSET_S0($a0)
     61        lw $s1, CONTEXT_OFFSET_S1($a0)
     62        lw $s2, CONTEXT_OFFSET_S2($a0)
     63        lw $s3, CONTEXT_OFFSET_S3($a0)
     64        lw $s4, CONTEXT_OFFSET_S4($a0)
     65        lw $s5, CONTEXT_OFFSET_S5($a0)
     66        lw $s6, CONTEXT_OFFSET_S6($a0)
     67        lw $s7, CONTEXT_OFFSET_S7($a0)
     68        lw $s8, CONTEXT_OFFSET_S8($a0)
     69        lw $gp, CONTEXT_OFFSET_GP($a0)
     70       
     71        lw $ra, CONTEXT_OFFSET_PC($a0)
     72        lw $sp, CONTEXT_OFFSET_SP($a0)
    4973       
    5074        # context_restore returns 0
Note: See TracChangeset for help on using the changeset viewer.