Changeset 4b334fd6 in mainline
- Timestamp:
- 2014-09-03T21:21:19Z (10 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 33add3a8
- Parents:
- 5eae56a
- Location:
- uspace/lib/c/arch
- Files:
-
- 1 added
- 2 deleted
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/arch/mips32/Makefile.inc
r5eae56a r4b334fd6 37 37 arch/$(UARCH)/src/stacktrace_asm.S 38 38 39 ARCH_AUTOGENS_AG = \ 40 arch/$(UARCH)/include/libarch/fibril_context.ag 41 39 42 .PRECIOUS: arch/$(UARCH)/src/entry.o -
uspace/lib/c/arch/mips32/include/libarch/fibril.h
r5eae56a r4b334fd6 38 38 39 39 #include <sys/types.h> 40 #include <libarch/fibril_context.h> 40 41 #include <libarch/stack.h> 41 42 #include <align.h> … … 56 57 } while (0) 57 58 58 typedef struct {59 uint32_t sp;60 uint32_t pc;61 62 uint32_t s0;63 uint32_t s1;64 uint32_t s2;65 uint32_t s3;66 uint32_t s4;67 uint32_t s5;68 uint32_t s6;69 uint32_t s7;70 uint32_t s8;71 uint32_t gp;72 uint32_t tls; /* Thread local storage(=k1) */73 74 uint32_t f20;75 uint32_t f21;76 uint32_t f22;77 uint32_t f23;78 uint32_t f24;79 uint32_t f25;80 uint32_t f26;81 uint32_t f27;82 uint32_t f28;83 uint32_t f29;84 uint32_t f30;85 86 } context_t;87 88 59 static inline uintptr_t context_get_fp(context_t *ctx) 89 60 { -
uspace/lib/c/arch/mips32/src/fibril.S
r5eae56a r4b334fd6 32 32 .set noreorder 33 33 34 #include <libarch/ context_offset.h>34 #include <libarch/fibril_context.h> 35 35 36 36 .global context_save … … 38 38 39 39 context_save: 40 CONTEXT_SAVE_ARCH_CORE $a0 40 sw $s0, CONTEXT_OFFSET_S0($a0) 41 sw $s1, CONTEXT_OFFSET_S1($a0) 42 sw $s2, CONTEXT_OFFSET_S2($a0) 43 sw $s3, CONTEXT_OFFSET_S3($a0) 44 sw $s4, CONTEXT_OFFSET_S4($a0) 45 sw $s5, CONTEXT_OFFSET_S5($a0) 46 sw $s6, CONTEXT_OFFSET_S6($a0) 47 sw $s7, CONTEXT_OFFSET_S7($a0) 48 sw $s8, CONTEXT_OFFSET_S8($a0) 49 sw $gp, CONTEXT_OFFSET_GP($a0) 50 51 sw $k1, CONTEXT_OFFSET_TLS($a0) 52 53 #ifdef CONFIG_FPU 54 mfc1 $t0, $20 55 sw $t0, CONTEXT_OFFSET_F20($a0) 56 57 mfc1 $t0, $21 58 sw $t0, CONTEXT_OFFSET_F21($a0) 59 60 mfc1 $t0, $22 61 sw $t0, CONTEXT_OFFSET_F22($a0) 62 63 mfc1 $t0, $23 64 sw $t0, CONTEXT_OFFSET_F23($a0) 65 66 mfc1 $t0, $24 67 sw $t0, CONTEXT_OFFSET_F24($a0) 68 69 mfc1 $t0, $25 70 sw $t0, CONTEXT_OFFSET_F25($a0) 71 72 mfc1 $t0, $26 73 sw $t0, CONTEXT_OFFSET_F26($a0) 74 75 mfc1 $t0, $27 76 sw $t0, CONTEXT_OFFSET_F27($a0) 77 78 mfc1 $t0, $28 79 sw $t0, CONTEXT_OFFSET_F28($a0) 80 81 mfc1 $t0, $29 82 sw $t0, CONTEXT_OFFSET_F29($a0) 83 84 mfc1 $t0, $30 85 sw $t0, CONTEXT_OFFSET_F30($a0) 86 #endif /* CONFIG_FPU */ 87 88 sw $ra, CONTEXT_OFFSET_PC($a0) 89 sw $sp, CONTEXT_OFFSET_SP($a0) 41 90 42 91 # context_save returns 1 … … 45 94 46 95 context_restore: 47 CONTEXT_RESTORE_ARCH_CORE $a0 96 lw $s0, CONTEXT_OFFSET_S0($a0) 97 lw $s1, CONTEXT_OFFSET_S1($a0) 98 lw $s2, CONTEXT_OFFSET_S2($a0) 99 lw $s3, CONTEXT_OFFSET_S3($a0) 100 lw $s4, CONTEXT_OFFSET_S4($a0) 101 lw $s5, CONTEXT_OFFSET_S5($a0) 102 lw $s6, CONTEXT_OFFSET_S6($a0) 103 lw $s7, CONTEXT_OFFSET_S7($a0) 104 lw $s8, CONTEXT_OFFSET_S8($a0) 105 lw $gp, CONTEXT_OFFSET_GP($a0) 106 lw $k1, CONTEXT_OFFSET_TLS($a0) 107 108 #ifdef CONFIG_FPU 109 lw $t0, CONTEXT_OFFSET_F20($a0) 110 mtc1 $t0, $20 111 112 lw $t0, CONTEXT_OFFSET_F21($a0) 113 mtc1 $t0, $21 114 115 lw $t0, CONTEXT_OFFSET_F22($a0) 116 mtc1 $t0, $22 117 118 lw $t0, CONTEXT_OFFSET_F23($a0) 119 mtc1 $t0, $23 120 121 lw $t0, CONTEXT_OFFSET_F24($a0) 122 mtc1 $t0, $24 123 124 lw $t0, CONTEXT_OFFSET_F25($a0) 125 mtc1 $t0, $25 126 127 lw $t0, CONTEXT_OFFSET_F26($a0) 128 mtc1 $t0, $26 129 130 lw $t0, CONTEXT_OFFSET_F27($a0) 131 mtc1 $t0, $27 132 133 lw $t0, CONTEXT_OFFSET_F28($a0) 134 mtc1 $t0, $28 135 136 lw $t0, CONTEXT_OFFSET_F29($a0) 137 mtc1 $t0, $29 138 139 lw $t0, CONTEXT_OFFSET_F30($a0) 140 mtc1 $t0, $30 141 #endif /* CONFIG_FPU */ 142 143 lw $ra, CONTEXT_OFFSET_PC($a0) 144 lw $sp, CONTEXT_OFFSET_SP($a0) 48 145 49 146 # Just for the jump into first function, -
uspace/lib/c/arch/mips32eb/Makefile.inc
r5eae56a r4b334fd6 37 37 arch/$(UARCH)/src/stacktrace_asm.S 38 38 39 ARCH_AUTOGENS_AG = \ 40 arch/$(UARCH)/include/libarch/fibril_context.ag 41 39 42 .PRECIOUS: arch/$(UARCH)/src/entry.o
Note:
See TracChangeset
for help on using the changeset viewer.