/branches/dynload/uspace/srv/loader/arch/ia64/ia64.s |
---|
28,9 → 28,14 |
.globl program_run |
## void program_run(uintptr_t entry_point); |
## void program_run(void *entry_point, void *pcb); |
# |
# in0 contains entry_point |
# in1 contains pcb |
# |
# Jump to a program entry point |
program_run: |
mov b1 = r32 ;; |
# Pass pcb to the entry point in r2 |
mov r2 = in1 |
mov b1 = in0 ;; |
br b1 ;; |
/branches/dynload/uspace/srv/loader/arch/arm32/arm32.s |
---|
28,8 → 28,12 |
.globl program_run |
## void program_run(uintptr_t entry_point); |
## void program_run(void *entry_point, void *pcb); |
# |
# r0 contains entry_point |
# r1 contains pcb |
# |
# Jump to a program entry point |
program_run: |
# pcb is passed to the entry point in r1 (where it already is) |
mov r15, r0 |
/branches/dynload/uspace/srv/loader/arch/ppc32/ppc32.s |
---|
28,9 → 28,13 |
.globl program_run |
## void program_run(uintptr_t entry_point); |
## void program_run(void *entry_point, void *pcb); |
# |
# %r3 contains entry_point |
# %r4 contains pcb |
# |
# Jump to a program entry point |
program_run: |
mtctr %r3 |
mr %r3, %r4 # Pass pcb to the entry point in %r3 |
bctr |
/branches/dynload/uspace/srv/loader/arch/amd64/amd64.s |
---|
28,8 → 28,16 |
.globl program_run |
## void program_run(uintptr_t entry_point); |
## void program_run(void *entry_point, void *pcb); |
# |
# %rdi contains entry_point |
# %rsi contains pcb |
# |
# Jump to a program entry point |
program_run: |
jmp %rdi |
# pcb must be passed in %rdi, use %rdx as a scratch register |
mov %rdi, %rdx |
mov %rsi, %rdi |
# jump to entry point |
jmp %rdx |
/branches/dynload/uspace/srv/loader/arch/mips32/mips32.s |
---|
31,12 → 31,19 |
.global program_run |
.set noreorder |
## void program_run(uintptr_t entry_point); |
## void program_run(void *entry_point, void *pcb); |
# |
# $a0 (=$4) contains entry_point |
# $a1 (=$5) contains pcb |
# |
# Jump to a program entry point |
.ent program_run |
program_run: |
move $25, $4 |
# tmp := entry_point |
move $25, $a0 |
# Pass pcb to the entry point in $a0 |
move $a0, $a1 |
jr $25 |
nop |
.end |
/branches/dynload/uspace/srv/loader/arch/ia32/ia32.s |
---|
28,13 → 28,22 |
.globl program_run |
## void program_run(uintptr_t entry_point); |
## void program_run(void *entry_point, void *pcb); |
# |
# Jump to a program entry point |
program_run: |
# Use standard ia32 prologue not to confuse anybody |
push %ebp |
movl %esp, %ebp |
# %eax := entry_point |
movl 0x8(%ebp), %eax |
# %ebx := pcb |
# pcb is passed to the entry point int %ebx |
mov 0xc(%ebp), %ebx |
# Save a tiny bit of stack space |
pop %ebp |
jmp %eax |