Changeset c98e6ee in mainline for uspace/lib/libc/arch


Ignore:
Timestamp:
2008-07-08T16:05:45Z (17 years ago)
Author:
Jiri Svoboda <jirik.svoboda@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
f93f168
Parents:
b7f9087
Message:

Merge program-loader related stuff from dynload branch to trunk. (huge)

Location:
uspace/lib/libc/arch
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/libc/arch/amd64/src/entry.s

    rb7f9087 rc98e6ee  
    3535## User-space task entry point
    3636#
     37# %rdi contains the PCB pointer
    3738#
    3839__entry:
     40        # %rdi was deliberately chosen as the first argument is also in %rdi
     41        # Pass PCB pointer to __main (no operation)
    3942        call __main
    40         call main
     43
    4144        call __exit
  • uspace/lib/libc/arch/arm32/src/entry.s

    rb7f9087 rc98e6ee  
    3535## User-space task entry point
    3636#
     37# r1 contains the PCB pointer
    3738#
    3839__entry:
     40        # Pass pcb_ptr to __main as the first argument (in r0)
     41        mov r0, r1
    3942        bl __main
    40         bl main
     43
    4144        bl __exit
  • uspace/lib/libc/arch/ia32/src/entry.s

    rb7f9087 rc98e6ee  
    3535## User-space task entry point
    3636#
     37# %ebx contains the PCB pointer
    3738#
    3839__entry:
     
    4243        mov %ax, %fs
    4344        # Do not set %gs, it contains descriptor that can see TLS
    44        
     45
     46        # Pass the PCB pointer to __main as the first argument
     47        pushl %ebx
    4548        call __main
    46         call main
     49
    4750        call __exit
  • uspace/lib/libc/arch/ia64/src/entry.s

    rb7f9087 rc98e6ee  
    3535## User-space task entry point
    3636#
     37# r2 contains the PCB pointer
    3738#
    3839__entry:
    3940        alloc loc0 = ar.pfs, 0, 1, 2, 0
    40         mov r1 = _gp
     41        mov r1 = _gp
     42
     43        # Pass PCB pointer as the first argument to __main
     44        mov out0 = r2
    4145        br.call.sptk.many b0 = __main
    42460:
    43         br.call.sptk.many b0 = main
    44 1:
    4547        br.call.sptk.many b0 = __exit
  • uspace/lib/libc/arch/mips32/src/entry.s

    rb7f9087 rc98e6ee  
    3636## User-space task entry point
    3737#
     38# $a0 ($4) contains the PCB pointer
    3839#
    3940.ent __entry
     
    4142        .frame $sp, 32, $31
    4243        .cpload $25
    43        
    44        
     44
    4545        # Mips o32 may store its arguments on stack, make space (16 bytes),
    4646        # so that it could work with -O0
     
    4949        addiu $sp, -32
    5050        .cprestore 16   # Allow PIC code
    51        
     51
     52        # Pass pcb_ptr to __main() as the first argument. pcb_ptr is already
     53        # in $a0. As the first argument is passed in $a0, no operation
     54        # is needed.
     55
    5256        jal __main
    53         nop
    54        
    55         jal main
    5657        nop
    5758       
  • uspace/lib/libc/arch/ppc32/src/entry.s

    rb7f9087 rc98e6ee  
    3535## User-space task entry point
    3636#
     37# r3 contains the PCB pointer
    3738#
    3839__entry:
     40        # Pass the PCB pointer to __main() as the first argument.
     41        # Since the first argument is passed in r3, no operation is needed.
    3942        bl __main
    40         bl main
     43
    4144        bl __exit
  • uspace/lib/libc/arch/ppc64/src/entry.s

    rb7f9087 rc98e6ee  
    3232
    3333.globl __entry
    34 .globl __entry_driver
    3534
    3635## User-space task entry point
     
    3938__entry:
    4039        bl __main
    41         bl __io_init
    42         bl main
    4340        bl __exit
    44 
    45 __entry_driver:
    46         bl __main
    47         bl main
    48         bl __exit
  • uspace/lib/libc/arch/sparc64/src/entry.s

    rb7f9087 rc98e6ee  
    3535## User-space task entry point
    3636#
     37# %o0 contains uarg
     38# %o1 contains pcb_ptr
    3739#
    3840__entry:
     41        # Pass pcb_ptr as the first argument to __main()
     42        mov %o1, %o0
    3943        sethi %hi(_gp), %l7
    4044        call __main
    4145        or %l7, %lo(_gp), %l7
    42         call main
    43         nop
     46
    4447        call __exit
    4548        nop
Note: See TracChangeset for help on using the changeset viewer.