Changeset a35b458 in mainline for uspace/lib/c/arch/mips32/src
- Timestamp:
- 2018-03-02T20:10:49Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- f1380b7
- Parents:
- 3061bc1
- git-author:
- Jiří Zárevúcky <zarevucky.jiri@…> (2018-02-28 17:38:31)
- git-committer:
- Jiří Zárevúcky <zarevucky.jiri@…> (2018-03-02 20:10:49)
- Location:
- uspace/lib/c/arch/mips32/src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/arch/mips32/src/entry.S
r3061bc1 ra35b458 44 44 .frame $sp, ABI_STACK_FRAME, $ra 45 45 .cpload $t9 46 46 47 47 # Allocate the stack frame. 48 48 addiu $sp, -ABI_STACK_FRAME 49 49 50 50 # Allow PIC code 51 51 .cprestore 16 52 52 53 53 # Pass pcb_ptr to __main() as the first argument. It is already 54 54 # in $a0. As the first argument is passed in $a0, no operation 55 55 # is needed. 56 56 57 57 jal __main 58 58 nop 59 59 60 60 # 61 61 # Not reached. -
uspace/lib/c/arch/mips32/src/entryjmp.S
r3061bc1 ra35b458 43 43 # tmp := entry_point 44 44 move $t9, $a0 45 45 46 46 # Pass pcb to the entry point in $a0 47 47 move $a0, $a1 48 48 49 49 jr $t9 50 50 addiu $sp, -ABI_STACK_FRAME -
uspace/lib/c/arch/mips32/src/fibril.S
r3061bc1 ra35b458 46 46 sw $s8, CONTEXT_OFFSET_S8($a0) 47 47 sw $gp, CONTEXT_OFFSET_GP($a0) 48 48 49 49 sw $k1, CONTEXT_OFFSET_TLS($a0) 50 50 51 51 #ifdef CONFIG_FPU 52 52 mfc1 $t0, $20 53 53 sw $t0, CONTEXT_OFFSET_F20($a0) 54 54 55 55 mfc1 $t0, $21 56 56 sw $t0, CONTEXT_OFFSET_F21($a0) 57 57 58 58 mfc1 $t0, $22 59 59 sw $t0, CONTEXT_OFFSET_F22($a0) 60 60 61 61 mfc1 $t0, $23 62 62 sw $t0, CONTEXT_OFFSET_F23($a0) 63 63 64 64 mfc1 $t0, $24 65 65 sw $t0, CONTEXT_OFFSET_F24($a0) 66 66 67 67 mfc1 $t0, $25 68 68 sw $t0, CONTEXT_OFFSET_F25($a0) 69 69 70 70 mfc1 $t0, $26 71 71 sw $t0, CONTEXT_OFFSET_F26($a0) 72 72 73 73 mfc1 $t0, $27 74 74 sw $t0, CONTEXT_OFFSET_F27($a0) 75 75 76 76 mfc1 $t0, $28 77 77 sw $t0, CONTEXT_OFFSET_F28($a0) 78 78 79 79 mfc1 $t0, $29 80 80 sw $t0, CONTEXT_OFFSET_F29($a0) 81 81 82 82 mfc1 $t0, $30 83 83 sw $t0, CONTEXT_OFFSET_F30($a0) 84 84 #endif /* CONFIG_FPU */ 85 85 86 86 sw $ra, CONTEXT_OFFSET_PC($a0) 87 87 sw $sp, CONTEXT_OFFSET_SP($a0) 88 88 89 89 # context_save returns 1 90 90 j $ra … … 104 104 lw $gp, CONTEXT_OFFSET_GP($a0) 105 105 lw $k1, CONTEXT_OFFSET_TLS($a0) 106 106 107 107 #ifdef CONFIG_FPU 108 108 lw $t0, CONTEXT_OFFSET_F20($a0) 109 109 mtc1 $t0, $20 110 110 111 111 lw $t0, CONTEXT_OFFSET_F21($a0) 112 112 mtc1 $t0, $21 113 113 114 114 lw $t0, CONTEXT_OFFSET_F22($a0) 115 115 mtc1 $t0, $22 116 116 117 117 lw $t0, CONTEXT_OFFSET_F23($a0) 118 118 mtc1 $t0, $23 119 119 120 120 lw $t0, CONTEXT_OFFSET_F24($a0) 121 121 mtc1 $t0, $24 122 122 123 123 lw $t0, CONTEXT_OFFSET_F25($a0) 124 124 mtc1 $t0, $25 125 125 126 126 lw $t0, CONTEXT_OFFSET_F26($a0) 127 127 mtc1 $t0, $26 128 128 129 129 lw $t0, CONTEXT_OFFSET_F27($a0) 130 130 mtc1 $t0, $27 131 131 132 132 lw $t0, CONTEXT_OFFSET_F28($a0) 133 133 mtc1 $t0, $28 134 134 135 135 lw $t0, CONTEXT_OFFSET_F29($a0) 136 136 mtc1 $t0, $29 137 137 138 138 lw $t0, CONTEXT_OFFSET_F30($a0) 139 139 mtc1 $t0, $30 140 140 #endif /* CONFIG_FPU */ 141 141 142 142 lw $ra, CONTEXT_OFFSET_PC($a0) 143 143 lw $sp, CONTEXT_OFFSET_SP($a0) 144 144 145 145 # Just for the jump into first function, 146 146 # but one instruction should not bother us 147 147 move $t9, $ra 148 148 149 149 # context_restore returns 0 150 150 j $ra -
uspace/lib/c/arch/mips32/src/syscall.c
r3061bc1 ra35b458 46 46 register sysarg_t __mips_reg_t1 asm("$9") = p6; 47 47 register sysarg_t __mips_reg_v0 asm("$2") = id; 48 48 49 49 asm volatile ( 50 50 "syscall\n" … … 63 63 : "%ra" 64 64 ); 65 65 66 66 return __mips_reg_v0; 67 67 } -
uspace/lib/c/arch/mips32/src/thread_entry.S
r3061bc1 ra35b458 43 43 .frame $sp, ABI_STACK_FRAME, $ra 44 44 .cpload $t9 45 45 46 46 # 47 47 # v0 contains address of uarg. 48 48 # 49 49 add $a0, $v0, 0 50 50 51 51 # Allocate the stack frame. 52 52 addiu $sp, -ABI_STACK_FRAME 53 53 54 54 # Allow PIC code 55 55 .cprestore 16 56 56 57 57 jal __thread_main 58 58 nop 59 59 60 60 # 61 61 # Not reached.
Note:
See TracChangeset
for help on using the changeset viewer.