Changeset 308cdd1 in mainline for uspace/lib/libc/arch/mips32/src/fibril.S
- Timestamp:
- 2008-03-15T12:21:09Z (17 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- ca21eb4b
- Parents:
- 8476a8d
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/libc/arch/mips32/src/fibril.S
r8476a8d r308cdd1 32 32 .set noreorder 33 33 34 35 #include <arch/asm/regname.h> 36 #include <libarch/context_offset.h> 34 #include <arch/context_offset.h> 37 35 38 36 .global context_save 39 37 .global context_restore 40 38 41 .macro CONTEXT_STORE r42 sw $s0,OFFSET_S0(\r)43 sw $s1,OFFSET_S1(\r)44 sw $s2,OFFSET_S2(\r)45 sw $s3,OFFSET_S3(\r)46 sw $s4,OFFSET_S4(\r)47 sw $s5,OFFSET_S5(\r)48 sw $s6,OFFSET_S6(\r)49 sw $s7,OFFSET_S7(\r)50 sw $s8,OFFSET_S8(\r)51 sw $gp,OFFSET_GP(\r)52 sw $k1,OFFSET_TLS(\r)53 54 #ifdef CONFIG_MIPS_FPU55 mfc1 $t0,$2056 sw $t0, OFFSET_F20(\r)57 58 mfc1 $t0,$2159 sw $t0, OFFSET_F21(\r)60 61 mfc1 $t0,$2262 sw $t0, OFFSET_F22(\r)63 64 mfc1 $t0,$2365 sw $t0, OFFSET_F23(\r)66 67 mfc1 $t0,$2468 sw $t0, OFFSET_F24(\r)69 70 mfc1 $t0,$2571 sw $t0, OFFSET_F25(\r)72 73 mfc1 $t0,$2674 sw $t0, OFFSET_F26(\r)75 76 mfc1 $t0,$2777 sw $t0, OFFSET_F27(\r)78 79 mfc1 $t0,$2880 sw $t0, OFFSET_F28(\r)81 82 mfc1 $t0,$2983 sw $t0, OFFSET_F29(\r)84 85 mfc1 $t0,$3086 sw $t0, OFFSET_F30(\r)87 #endif88 89 sw $ra,OFFSET_PC(\r)90 sw $sp,OFFSET_SP(\r)91 .endm92 93 .macro CONTEXT_LOAD r94 lw $s0,OFFSET_S0(\r)95 lw $s1,OFFSET_S1(\r)96 lw $s2,OFFSET_S2(\r)97 lw $s3,OFFSET_S3(\r)98 lw $s4,OFFSET_S4(\r)99 lw $s5,OFFSET_S5(\r)100 lw $s6,OFFSET_S6(\r)101 lw $s7,OFFSET_S7(\r)102 lw $s8,OFFSET_S8(\r)103 lw $gp,OFFSET_GP(\r)104 lw $k1,OFFSET_TLS(\r)105 106 #ifdef CONFIG_MIPS_FPU107 lw $t0, OFFSET_F20(\r)108 mtc1 $t0,$20109 110 lw $t0, OFFSET_F21(\r)111 mtc1 $t0,$21112 113 lw $t0, OFFSET_F22(\r)114 mtc1 $t0,$22115 116 lw $t0, OFFSET_F23(\r)117 mtc1 $t0,$23118 119 lw $t0, OFFSET_F24(\r)120 mtc1 $t0,$24121 122 lw $t0, OFFSET_F25(\r)123 mtc1 $t0,$25124 125 lw $t0, OFFSET_F26(\r)126 mtc1 $t0,$26127 128 lw $t0, OFFSET_F27(\r)129 mtc1 $t0,$27130 131 lw $t0, OFFSET_F28(\r)132 mtc1 $t0,$28133 134 lw $t0, OFFSET_F29(\r)135 mtc1 $t0,$29136 137 lw $t0, OFFSET_F30(\r)138 mtc1 $t0,$30139 #endif140 141 lw $ra,OFFSET_PC(\r)142 lw $sp,OFFSET_SP(\r)143 .endm144 145 39 context_save: 146 CONTEXT_S TORE $a040 CONTEXT_SAVE_ARCH_CORE $a0 147 41 148 42 # context_save returns 1 … … 151 45 152 46 context_restore: 153 CONTEXT_ LOAD$a047 CONTEXT_RESTORE_ARCH_CORE $a0 154 48 155 49 # Just for the jump into first function, but one instruction
Note:
See TracChangeset
for help on using the changeset viewer.