Changeset 99de22b in mainline for uspace/lib/libc/arch/sparc64


Ignore:
Timestamp:
2010-01-15T18:30:25Z (16 years ago)
Author:
Pavel Rimsky <pavel@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
eeb643d
Parents:
387416b (diff), 563d6077 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merged latest trunk changes.

Location:
uspace/lib/libc/arch/sparc64
Files:
1 added
5 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/libc/arch/sparc64/Makefile.inc

    r387416b r99de22b  
    3434
    3535ARCH_SOURCES += arch/$(UARCH)/src/fibril.S \
    36         arch/$(UARCH)/src/tls.c
     36        arch/$(UARCH)/src/tls.c \
     37        arch/$(UARCH)/src/stacktrace.S
    3738
    3839GCC_CFLAGS += -mcpu=ultrasparc -m64
  • uspace/lib/libc/arch/sparc64/include/fibril.h

    r387416b r99de22b  
    4646#endif
    4747
    48 #define context_set(c, _pc, stack, size, ptls)                  \
    49         (c)->pc = ((uintptr_t) _pc) - 8;                        \
    50         (c)->sp = ((uintptr_t) stack) + ALIGN_UP((size),        \
    51                 STACK_ALIGNMENT) - (STACK_BIAS + SP_DELTA);     \
    52         (c)->fp = -STACK_BIAS;                                  \
    53         (c)->tp = ptls
     48#define context_set(c, _pc, stack, size, ptls) \
     49        do { \
     50                (c)->pc = ((uintptr_t) _pc) - 8; \
     51                (c)->sp = ((uintptr_t) stack) + ALIGN_UP((size), \
     52                    STACK_ALIGNMENT) - (STACK_BIAS + SP_DELTA); \
     53                (c)->fp = -STACK_BIAS; \
     54                (c)->tp = ptls; \
     55        } while (0)
    5456       
    5557/*
  • uspace/lib/libc/arch/sparc64/src/entry.s

    r387416b r99de22b  
    3939#
    4040__entry:
     41        #
     42        # Create the first stack frame.
     43        #
     44        save %sp, -176, %sp
     45        flushw
     46        add %g0, -0x7ff, %fp
     47
    4148        # Pass pcb_ptr as the first argument to __main()
    42         mov %o1, %o0
     49        mov %i1, %o0
    4350        sethi %hi(_gp), %l7
    4451        call __main
  • uspace/lib/libc/arch/sparc64/src/fibril.S

    r387416b r99de22b  
    3535
    3636context_save:
     37        #
     38        # We rely on the kernel to flush our active register windows to memory
     39        # should a thread switch occur.
     40        #
    3741        CONTEXT_SAVE_ARCH_CORE %o0
    3842        retl
     
    4246        #
    4347        # Flush all active windows.
    44         # This is essential, because CONTEXT_LOAD overwrites
    45         # %sp of CWP - 1 with the value written to %fp of CWP.
    46         # Flushing all active windows mitigates this problem
    47         # as CWP - 1 becomes the overlap window.
    48         #               
     48        # This is essential, because CONTEXT_RESTORE_ARCH_CORE overwrites %sp of
     49        # CWP - 1 with the value written to %fp of CWP.  Flushing all active
     50        # windows mitigates this problem as CWP - 1 becomes the overlap window.
     51        #
    4952        flushw
    5053       
  • uspace/lib/libc/arch/sparc64/src/thread_entry.s

    r387416b r99de22b  
    3535#
    3636__thread_entry:
     37        #
     38        # Create the first stack frame.
     39        #
     40        save %sp, -176, %sp
     41        flushw
     42        add %g0, -0x7ff, %fp
     43
    3744        sethi %hi(_gp), %l7
    3845        call __thread_main              ! %o0 contains address of uarg
Note: See TracChangeset for help on using the changeset viewer.