Subversion Repositories HelenOS-historic

Compare Revisions

Ignore whitespace Rev 1123 → Rev 1122

/uspace/trunk/libc/arch/mips32/_link.ld.in
17,13 → 17,12
*(.rodata*);
} :text
 
.data : {
.data ALIGN(0x4000) : SUBALIGN(0x4000) {
*(.data);
*(.data.rel*);
} :data
.got : {
_gp = .;
*(.got);
*(.data.rel*);
} :data
.sbss : {
*(.scommon);
/uspace/trunk/libc/arch/mips32/include/psthread.h
31,10 → 31,7
 
#include <types.h>
 
/* +16 is just for sure that the called function
* have space to store it's arguments
*/
#define SP_DELTA (8+16)
#define SP_DELTA (8)
 
typedef struct {
uint32_t sp;
/uspace/trunk/libc/arch/mips32/Makefile.inc
31,9 → 31,10
 
TARGET = mipsel-linux-gnu
TOOLCHAIN_DIR = /usr/local/mipsel/bin
CFLAGS += -mips3
CFLAGS += -mips3 -mno-abicalls
 
ARCH_SOURCES += arch/$(ARCH)/src/syscall.c \
arch/$(ARCH)/src/psthread.S
 
LFLAGS += -N
 
/uspace/trunk/libc/arch/mips32/src/entry.s
27,10 → 27,11
#
 
.text
 
.org 0
 
.section .init, "ax"
.global __start
.set noreorder
.option pic2
.globl __start
 
## User-space task entry point
#
37,28 → 38,16
#
.ent __start
__start:
.frame $sp, 32, $31
.cpload $25
lui $28, _gp
# Mips o32 may store its arguments on stack, make space (16 bytes),
# Mips o32 may store its arguments on stack, make space,
# so that it could work with -O0
# Make space additional 16 bytes for the stack frame
 
addiu $sp, -32
.cprestore 16 # Allow PIC code
addiu $sp, -16
jal __main
nop
jal main
nop
jal __exit
nop
.end __start
 
# Alignment of output section data to 0x4000
.section .data
.align 14
/uspace/trunk/libc/arch/mips32/src/thread_entry.s
27,11 → 27,11
#
 
.text
 
.set noat
.set noreorder
.option pic2
.set nomacro
 
.globl __thread_entry
 
## User-space thread entry point for all but the first threads.
39,8 → 39,7
#
.ent __thread_entry
__thread_entry:
.frame $sp, 32, $31
.cpload $25
lui $28, _gp
 
#
# v0 contains address of uarg.
47,10 → 46,9
#
add $4, $2, 0
# Mips o32 may store its arguments on stack, make space
addiu $sp, -32
.cprestore 16
addiu $sp, -16
jal __thread_main
j __thread_main
nop
#
/uspace/trunk/libc/arch/mips32/src/psthread.S
30,6 → 30,7
 
.set noat
.set noreorder
.set nomacro
 
 
#include <arch/asm/regname.h>
82,10 → 83,6
context_restore:
CONTEXT_LOAD $a0
 
# Just for the jump into first function, but one instruction
# should not bother us
move $t9, $ra
# context_restore returns 0
j $ra
xor $v0, $v0