Changeset 29a9f62 in mainline for libc/arch


Ignore:
Timestamp:
2006-03-23T10:33:55Z (20 years ago)
Author:
Ondrej Palkovsky <ondrap@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
77bd004
Parents:
1cef26f
Message:

Added symbolic links 'libarch','libadt','libipc' into libc/include,
so that it can be easily used from anywhere.
Renamed thread_main to thread_main.
Allowed MIPS to compile with -O0.
Added non-preemptible threads support (not yet secured by futexes).
Added simple way to hold Thread Local Storage. Support for compiler
will be added later.
This update breaks IA64 uspace.

There is some forgotten spinlock_lock() in futexes, amd64 gets locked
in the secod uspace thread probably with preemption disabled.

Location:
libc/arch
Files:
8 added
11 edited
4 moved

Legend:

Unmodified
Added
Removed
  • libc/arch/amd64/Makefile.inc

    r1cef26f r29a9f62  
    3333TOOLCHAIN_DIR = /usr/local/amd64/bin
    3434
    35 ARCH_SOURCES += arch/$(ARCH)/src/syscall.S
     35ARCH_SOURCES += arch/$(ARCH)/src/syscall.S \
     36                arch/$(ARCH)/src/psthread.S
    3637
    3738LFLAGS += -N
  • libc/arch/amd64/src/entry.s

    r1cef26f r29a9f62  
    3737#
    3838__entry:
     39        call __main
    3940        call main
    4041        call __exit
  • libc/arch/amd64/src/thread_entry.s

    r1cef26f r29a9f62  
    3939        #
    4040        movq %rax, %rdi
    41         call thread_main
     41        call __thread_main
    4242       
    4343.end __thread_entry
  • libc/arch/ia32/Makefile.inc

    r1cef26f r29a9f62  
    3333TOOLCHAIN_DIR = /usr/local/i686/bin
    3434
    35 ARCH_SOURCES += arch/$(ARCH)/src/syscall.c
     35ARCH_SOURCES += arch/$(ARCH)/src/syscall.c \
     36                arch/$(ARCH)/src/psthread.S
    3637
    3738LFLAGS += -N
  • libc/arch/ia32/src/entry.s

    r1cef26f r29a9f62  
    4141        mov %ax, %es
    4242        mov %ax, %fs
    43         mov %ax, %gs
     43        # Do not set %gs, it contains descriptor that can see TLS
    4444       
     45        call __main     
    4546        call main
    4647        call __exit
  • libc/arch/ia32/src/thread_entry.s

    r1cef26f r29a9f62  
    3939        mov %dx, %es
    4040        mov %dx, %fs
    41         mov %dx, %gs
     41        # Do not set %gs, it contains descriptor that can see TLS
    4242
    4343        #
     
    4545        #
    4646        pushl %eax
    47         call thread_main
    48         addl $4, %esp
     47        call __thread_main
    4948       
    5049        #
  • libc/arch/ia64/src/entry.s

    r1cef26f r29a9f62  
    3939        alloc loc0 = ar.pfs, 0, 1, 2, 0
    4040        mov r1 = _gp
     41        { br.call.sptk.many b0 = __main }
    4142        { br.call.sptk.many b0 = main }
    4243        { br.call.sptk.many b0 = __exit }
  • libc/arch/ia64/src/thread_entry.s

    r1cef26f r29a9f62  
    4444       
    4545        mov out0 = r8
    46         { br.call.sptk.many b0 = thread_main }
     46        { br.call.sptk.many b0 = __thread_main }
    4747       
    4848        #
  • libc/arch/mips32/Makefile.inc

    r1cef26f r29a9f62  
    3232TARGET = mipsel-linux-gnu
    3333TOOLCHAIN_DIR = /usr/local/mipsel/bin
    34 CFLAGS += -mno-abicalls -mips3
     34CFLAGS += -mno-abicalls -mips3 -ftls-model=global-dynamic
    3535
    36 ARCH_SOURCES += arch/$(ARCH)/src/syscall.c
     36ARCH_SOURCES += arch/$(ARCH)/src/syscall.c \
     37        arch/$(ARCH)/src/psthread.S
    3738
    3839LFLAGS += -N
  • libc/arch/mips32/src/entry.s

    r1cef26f r29a9f62  
    3737#
    3838#
     39.ent __entry
    3940__entry:
    4041        lui $28, _gp
    41 
     42       
     43        # Mips o32 may store its arguments on stack, make space,
     44        # so that it could work with -O0
     45        addiu $sp, -16
     46       
     47        jal __main
     48       
    4249        jal main
    43         nop
    4450       
    4551        jal __exit
    46         nop     
    4752       
    4853.end __entry
  • libc/arch/mips32/src/thread_entry.s

    r1cef26f r29a9f62  
    3838#
    3939#
     40.ent __thread_entry
    4041__thread_entry:
    4142        lui $28, _gp
     
    4546        #
    4647        add $4, $2, 0
    47         jal thread_main
     48        # Mips o32 may store its arguments on stack, make space
     49        addiu $sp, -16
     50       
     51        j __thread_main
    4852        nop
    49        
     53               
    5054        #
    5155        # Not reached.
    5256        #
     57.end __thread_entry
Note: See TracChangeset for help on using the changeset viewer.