Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 3195 → Rev 3222

/trunk/uspace/lib/libc/arch/sparc64/src/entry.s
34,12 → 34,15
 
## User-space task entry point
#
# %o0 contains uarg
# %o1 contains pcb_ptr
#
__entry:
# Pass pcb_ptr as the first argument to __main()
mov %o1, %o0
sethi %hi(_gp), %l7
call __main
or %l7, %lo(_gp), %l7
call main
nop
 
call __exit
nop
/trunk/uspace/lib/libc/arch/ia64/src/entry.s
34,12 → 34,14
 
## User-space task entry point
#
# r2 contains the PCB pointer
#
__entry:
alloc loc0 = ar.pfs, 0, 1, 2, 0
mov r1 = _gp
mov r1 = _gp
 
# Pass PCB pointer as the first argument to __main
mov out0 = r2
br.call.sptk.many b0 = __main
0:
br.call.sptk.many b0 = main
1:
br.call.sptk.many b0 = __exit
/trunk/uspace/lib/libc/arch/arm32/src/entry.s
34,8 → 34,11
 
## User-space task entry point
#
# r1 contains the PCB pointer
#
__entry:
# Pass pcb_ptr to __main as the first argument (in r0)
mov r0, r1
bl __main
bl main
 
bl __exit
/trunk/uspace/lib/libc/arch/ppc32/src/entry.s
34,8 → 34,11
 
## User-space task entry point
#
# r3 contains the PCB pointer
#
__entry:
# Pass the PCB pointer to __main() as the first argument.
# Since the first argument is passed in r3, no operation is needed.
bl __main
bl main
 
bl __exit
/trunk/uspace/lib/libc/arch/amd64/src/entry.s
34,8 → 34,11
 
## User-space task entry point
#
# %rdi contains the PCB pointer
#
__entry:
# %rdi was deliberately chosen as the first argument is also in %rdi
# Pass PCB pointer to __main (no operation)
call __main
call main
 
call __exit
/trunk/uspace/lib/libc/arch/ppc64/src/entry.s
31,7 → 31,6
.org 0
 
.globl __entry
.globl __entry_driver
 
## User-space task entry point
#
38,11 → 37,4
#
__entry:
bl __main
bl __io_init
bl main
bl __exit
 
__entry_driver:
bl __main
bl main
bl __exit
/trunk/uspace/lib/libc/arch/mips32/src/entry.s
35,13 → 35,13
 
## User-space task entry point
#
# $a0 ($4) contains the PCB pointer
#
.ent __entry
__entry:
.frame $sp, 32, $31
.cpload $25
 
# Mips o32 may store its arguments on stack, make space (16 bytes),
# so that it could work with -O0
# Make space additional 16 bytes for the stack frame
48,13 → 48,14
 
addiu $sp, -32
.cprestore 16 # Allow PIC code
 
# Pass pcb_ptr to __main() as the first argument. pcb_ptr is already
# in $a0. As the first argument is passed in $a0, no operation
# is needed.
 
jal __main
nop
jal main
nop
jal __exit
nop
.end
/trunk/uspace/lib/libc/arch/ia32/src/entry.s
34,6 → 34,7
 
## User-space task entry point
#
# %ebx contains the PCB pointer
#
__entry:
mov %ss, %ax
41,7 → 42,9
mov %ax, %es
mov %ax, %fs
# Do not set %gs, it contains descriptor that can see TLS
 
# Pass the PCB pointer to __main as the first argument
pushl %ebx
call __main
call main
 
call __exit