Changeset a71d9af9 in mainline
- Timestamp:
- 2006-03-24T00:51:14Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 86d05fae
- Parents:
- e708063
- Location:
- libc/arch/mips32
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
libc/arch/mips32/Makefile.inc
re708063 ra71d9af9 32 32 TARGET = mipsel-linux-gnu 33 33 TOOLCHAIN_DIR = /usr/local/mipsel/bin 34 CFLAGS += -mips3 -mno-abicalls34 CFLAGS += -mips3 35 35 36 36 ARCH_SOURCES += arch/$(ARCH)/src/syscall.c \ 37 37 arch/$(ARCH)/src/psthread.S 38 38 39 LFLAGS += -N40 39 -
libc/arch/mips32/_link.ld.in
re708063 ra71d9af9 18 18 } :text 19 19 20 .data ALIGN(0x4000) : SUBALIGN(0x4000){20 .data : { 21 21 *(.data); 22 *(.data.rel*); 22 23 } :data 23 24 .got : { 24 25 _gp = .; 25 *(. data.rel*);26 *(.got); 26 27 } :data 27 28 .sbss : { -
libc/arch/mips32/include/psthread.h
re708063 ra71d9af9 32 32 #include <types.h> 33 33 34 #define SP_DELTA (8) 34 /* +16 is just for sure that the called function 35 * have space to store it's arguments 36 */ 37 #define SP_DELTA (8+16) 35 38 36 39 typedef struct { -
libc/arch/mips32/src/entry.s
re708063 ra71d9af9 28 28 29 29 .text 30 31 .org 032 33 30 .section .init, "ax" 34 .globl __start 31 .global __start 32 .set noreorder 33 .option pic2 35 34 36 35 ## User-space task entry point … … 39 38 .ent __start 40 39 __start: 41 lui $28, _gp 40 .frame $sp, 32, $31 41 .cpload $25 42 42 43 # Mips o32 may store its arguments on stack, make space, 43 44 # Mips o32 may store its arguments on stack, make space (16 bytes), 44 45 # so that it could work with -O0 45 addiu $sp, -16 46 # Make space additional 16 bytes for the stack frame 47 48 addiu $sp, -32 49 .cprestore 16 # Allow PIC code 46 50 47 51 jal __main 52 nop 48 53 49 54 jal main 55 nop 50 56 51 57 jal __exit 58 nop 52 59 53 60 .end __start 61 62 # Alignment of output section data to 0x4000 63 .section .data 64 .align 14 -
libc/arch/mips32/src/psthread.S
re708063 ra71d9af9 31 31 .set noat 32 32 .set noreorder 33 .set nomacro34 33 35 34 … … 84 83 CONTEXT_LOAD $a0 85 84 85 # Just for the jump into first function, but one instruction 86 # should not bother us 87 move $t9, $ra 86 88 # context_restore returns 0 87 89 j $ra 88 90 xor $v0, $v0 91 -
libc/arch/mips32/src/thread_entry.s
re708063 ra71d9af9 28 28 29 29 .text 30 30 31 31 .set noat 32 32 .set noreorder 33 . set nomacro34 33 .option pic2 34 35 35 .globl __thread_entry 36 36 … … 40 40 .ent __thread_entry 41 41 __thread_entry: 42 lui $28, _gp 42 .frame $sp, 32, $31 43 .cpload $25 43 44 44 45 # … … 47 48 add $4, $2, 0 48 49 # Mips o32 may store its arguments on stack, make space 49 addiu $sp, -16 50 addiu $sp, -32 51 .cprestore 16 50 52 51 j __thread_main53 jal __thread_main 52 54 nop 53 55
Note:
See TracChangeset
for help on using the changeset viewer.