Changeset 32573ff in mainline for uspace/lib/c/arch


Ignore:
Timestamp:
2016-05-02T20:58:16Z (9 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
7c4b26c
Parents:
6adb775f (diff), 5035ba05 (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:

Merge mainline, which has dltest and fixes.

Location:
uspace/lib/c/arch
Files:
29 edited
15 moved

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/arch/amd64/Makefile.common

    r6adb775f r32573ff  
    2727#
    2828
    29 GCC_CFLAGS += -fno-omit-frame-pointer
     29GCC_CFLAGS += -mno-tls-direct-seg-refs -fno-omit-frame-pointer
    3030CLANG_CFLAGS += -fno-omit-frame-pointer
    3131
  • uspace/lib/c/arch/amd64/include/libarch/tls.h

    r6adb775f r32573ff  
    4747static inline void __tcb_set(tcb_t *tcb)
    4848{
    49         __SYSCALL1(SYS_TLS_SET, (sysarg_t) tcb);
     49        asm volatile ("movq %0, %%fs:0" :: "r" (tcb));
    5050}
    5151
    52 static inline tcb_t * __tcb_get(void)
     52static inline tcb_t *__tcb_get(void)
    5353{
    54         void * retval;
     54        void *retval;
    5555
    56         asm ("movq %%fs:0, %0" : "=r"(retval));
     56        asm volatile ("movq %%fs:0, %0" : "=r" (retval));
    5757        return retval;
    5858}
  • uspace/lib/c/arch/amd64/src/fibril.S

    r6adb775f r32573ff  
    5151        movq %r15, CONTEXT_OFFSET_R15(%rdi)
    5252       
    53         # save TLS
    5453        movq %fs:0, %rax
    5554        movq %rax, CONTEXT_OFFSET_TLS(%rdi)
     
    7978        movq %rdx,(%rsp)
    8079       
    81         # Set thread local storage
    82         movq CONTEXT_OFFSET_TLS(%rdi), %rdi  # Set arg1 to TLS addr
    83         movl $1, %eax                        # SYS_TLS_SET
    84         syscall
     80        movq CONTEXT_OFFSET_TLS(%rdi), %rdi
     81        movq %rdi, %fs:0
    8582       
    8683        xorl %eax, %eax                      # context_restore returns 0
  • uspace/lib/c/arch/arm32/Makefile.inc

    r6adb775f r32573ff  
    2929
    3030ARCH_SOURCES = \
    31         arch/$(UARCH)/src/entry.s \
    32         arch/$(UARCH)/src/entryjmp.s \
    33         arch/$(UARCH)/src/thread_entry.s \
     31        arch/$(UARCH)/src/entry.S \
     32        arch/$(UARCH)/src/entryjmp.S \
     33        arch/$(UARCH)/src/thread_entry.S \
    3434        arch/$(UARCH)/src/syscall.c \
    3535        arch/$(UARCH)/src/fibril.S \
  • uspace/lib/c/arch/arm32/src/eabi.S

    r6adb775f r32573ff  
    2727#
    2828
     29#include <abi/asmtool.h>
     30
    2931.text
    3032
    31 .global __aeabi_read_tp
    32 
    33 .global __aeabi_idiv
    34 .global __aeabi_uidiv
    35 
    36 .global __aeabi_idivmod
    37 .global __aeabi_uidivmod
    38 
    39 .global __aeabi_ldivmod
    40 .global __aeabi_uldivmod
    41 
    42 __aeabi_read_tp:
     33FUNCTION_BEGIN(__aeabi_read_tp)
    4334        mov r0, r9
    4435        mov pc, lr
     36FUNCTION_END(__aeabi_read_tp)
    4537
    46 __aeabi_idiv:
     38FUNCTION_BEGIN(__aeabi_idiv)
    4739        push {lr}
    4840        bl __divsi3
    4941        pop {lr}
    5042        mov pc, lr
     43FUNCTION_END(__aeabi_idiv)
    5144
    52 __aeabi_uidiv:
     45FUNCTION_BEGIN(__aeabi_uidiv)
    5346        push {lr}
    5447        bl __udivsi3
    5548        pop {lr}
    5649        mov pc, lr
     50FUNCTION_END(__aeabi_uidiv)
    5751
    58 __aeabi_idivmod:
     52FUNCTION_BEGIN(__aeabi_idivmod)
    5953        push {lr}
    6054        sub sp, sp, #12
     
    6559        pop {lr}
    6660        mov pc, lr
     61FUNCTION_END(__aeabi_idivmod)
    6762
    68 __aeabi_uidivmod:
     63FUNCTION_BEGIN(__aeabi_uidivmod)
    6964        push {lr}
    7065        sub sp, sp, #12
     
    7570        pop {lr}
    7671        mov pc, lr
     72FUNCTION_END(__aeabi_uidivmod)
    7773
    78 __aeabi_ldivmod:
     74FUNCTION_BEGIN(__aeabi_ldivmod)
    7975        push {lr}
    8076        sub sp, sp, #24
     
    8682        pop {lr}
    8783        mov pc, lr
     84FUNCTION_END(__aeabi_ldivmod)
    8885
    89 __aeabi_uldivmod:
     86FUNCTION_BEGIN(__aeabi_uldivmod)
    9087        push {lr}
    9188        sub sp, sp, #24
     
    9794        pop {lr}
    9895        mov pc, lr
     96FUNCTION_END(__aeabi_uldivmod)
     97
  • uspace/lib/c/arch/arm32/src/entry.S

    r6adb775f r32573ff  
    2727#
    2828
     29#include <abi/asmtool.h>
     30
    2931.section .init, "ax"
    3032
    3133.org 0
    32 
    33 .global __entry
    3434
    3535## User-space task entry point
     
    3838# r2 contains the RAS page address
    3939#
    40 __entry:
     40SYMBOL(__entry)
    4141        # Store the RAS page address into the ras_page variable
    4242        ldr r0, =ras_page
     
    5757.data
    5858
    59 .global ras_page
    60 ras_page:
     59SYMBOL(ras_page)
    6160        .long 0
  • uspace/lib/c/arch/arm32/src/entryjmp.S

    r6adb775f r32573ff  
    2727#
    2828
    29 .globl entry_point_jmp
     29#include <abi/asmtool.h>
    3030
    3131## void entry_point_jmp(void *entry_point, void *pcb);
     
    3535#
    3636# Jump to program entry point
    37 entry_point_jmp:
     37SYMBOL(entry_point_jmp)
    3838        # load ras_page address to r2
    3939        ldr r2, =ras_page
  • uspace/lib/c/arch/arm32/src/fibril.S

    r6adb775f r32573ff  
    2727#
    2828
     29#include <abi/asmtool.h>
     30
    2931.text
    3032
    31 .global context_save
    32 .global context_restore
    33 
    34 context_save:
     33FUNCTION_BEGIN(context_save)
    3534        stmia r0!, {sp, lr}
    3635        stmia r0!, {r4-r11}
     
    3938        mov r0, #1
    4039        mov pc, lr
     40FUNCTION_END(context_save)
    4141
    42 context_restore:
     42FUNCTION_BEGIN(context_restore)
    4343        ldmia r0!, {sp, lr}
    4444        ldmia r0!, {r4-r11}
     
    4747        mov r0, #0
    4848        mov pc, lr
     49FUNCTION_END(context_restore)
    4950
  • uspace/lib/c/arch/arm32/src/stacktrace_asm.S

    r6adb775f r32573ff  
    2727#
    2828
     29#include <abi/asmtool.h>
     30
    2931.text
    3032
    31 .global stacktrace_prepare
    32 .global stacktrace_fp_get
    33 .global stacktrace_pc_get
     33FUNCTION_BEGIN(stacktrace_prepare)
     34        mov pc, lr
     35FUNCTION_END(stacktrace_prepare)
    3436
    35 stacktrace_prepare:
    36         mov pc, lr
    37 
    38 stacktrace_fp_get:
     37FUNCTION_BEGIN(stacktrace_fp_get)
    3938        mov r0, fp
    4039        mov pc, lr
     40FUNCTION_END(stacktrace_fp_get)
    4141
    42 stacktrace_pc_get:
     42FUNCTION_BEGIN(stacktrace_pc_get)
    4343        mov r0, lr
    4444        mov pc, lr
     45FUNCTION_END(stacktrace_pc_get)
     46
  • uspace/lib/c/arch/arm32/src/thread_entry.S

    r6adb775f r32573ff  
    2727#
    2828
     29#include <abi/asmtool.h>
     30
    2931.text
    30 
    31 .global __thread_entry
    3232
    3333## User-space thread entry point for all but the first threads.
    3434#
    3535#
    36 __thread_entry:
     36SYMBOL(__thread_entry)
    3737        #
    3838        # Create the first stack frame.
  • uspace/lib/c/arch/ia32/Makefile.common

    r6adb775f r32573ff  
    2828
    2929ifeq ($(PROCESSOR),i486)
    30         GCC_CFLAGS += -march=i486 -fno-omit-frame-pointer
     30        GCC_CFLAGS += -march=i486 -mno-tls-direct-seg-refs -fno-omit-frame-pointer
    3131else
    32         GCC_CFLAGS += -march=pentium -fno-omit-frame-pointer
     32        GCC_CFLAGS += -march=pentium -mno-tls-direct-seg-refs -fno-omit-frame-pointer
    3333endif
    3434
  • uspace/lib/c/arch/ia32/include/libarch/tls.h

    r6adb775f r32573ff  
    4747static inline void __tcb_set(tcb_t *tcb)
    4848{
    49         __SYSCALL1(SYS_TLS_SET, (sysarg_t) tcb);
     49        asm volatile ("movl %0, %%gs:0" :: "r" (tcb));
    5050}
    5151
     
    5454        void *retval;
    5555       
    56         asm (
    57                 "movl %%gs:0, %0"
    58                 : "=r" (retval)
    59         );
     56        asm volatile ("movl %%gs:0, %0" : "=r" (retval));
    6057       
    6158        return retval;
  • uspace/lib/c/arch/ia32/src/fibril.S

    r6adb775f r32573ff  
    7777       
    7878        # set thread local storage
    79         pushl %edx
    8079        movl CONTEXT_OFFSET_TLS(%eax), %edx     # Set arg1 to TLS addr
    81         movl $1, %eax                           # Syscall SYS_TLS_SET
    82         int $0x30
    83         popl %edx
     80        movl %edx, %gs:0
    8481       
    8582        xorl %eax, %eax         # context_restore returns 0
  • uspace/lib/c/arch/ia32/src/rtld/reloc.c

    r6adb775f r32573ff  
    144144
    145145                        sym_def = symbol_def_find(str_tab + sym->st_name,
    146                             m, ssf_noroot, &dest);
     146                            m, ssf_noexec, &dest);
    147147
    148148                        if (sym_def) {
  • uspace/lib/c/arch/ia64/Makefile.inc

    r6adb775f r32573ff  
    2828
    2929ARCH_SOURCES = \
    30         arch/$(UARCH)/src/entry.s \
    31         arch/$(UARCH)/src/entryjmp.s \
    32         arch/$(UARCH)/src/thread_entry.s \
     30        arch/$(UARCH)/src/entry.S \
     31        arch/$(UARCH)/src/entryjmp.S \
     32        arch/$(UARCH)/src/thread_entry.S \
    3333        arch/$(UARCH)/src/syscall.S \
    3434        arch/$(UARCH)/src/fibril.S \
  • uspace/lib/c/arch/ia64/src/entry.S

    r6adb775f r32573ff  
    2727#
    2828
     29#include <abi/asmtool.h>
     30
    2931.section .init, "ax"
    3032
    3133.org 0
    32 
    33 .globl __entry
    3434
    3535## User-space task entry point
     
    3737# r2 contains the PCB pointer
    3838#
    39 __entry:
     39SYMBOL(__entry)
    4040        alloc loc0 = ar.pfs, 0, 1, 2, 0
    4141        movl gp = __gp
     
    4444        mov out0 = r2
    4545        br.call.sptk.many b0 = __main
     46
  • uspace/lib/c/arch/ia64/src/entryjmp.S

    r6adb775f r32573ff  
    2727#
    2828
     29#include <abi/asmtool.h>
     30
    2931.text
    3032.explicit
    31 .globl entry_point_jmp
    3233
    3334## void entry_point_jmp(void *entry_point, void *pcb);
     
    3738#
    3839# Jump to program entry point
    39 entry_point_jmp:
     40SYMBOL(entry_point_jmp)
    4041        # Pass pcb to the entry point in r2
    4142
  • uspace/lib/c/arch/ia64/src/fibril.S

    r6adb775f r32573ff  
    2727#
    2828
     29#include <abi/asmtool.h>
    2930#include <libarch/fibril_context.h>
    3031
    3132.text
    3233
    33 .global context_save
    34 .global context_restore
    35 
    36 context_save:
     34FUNCTION_BEGIN(context_save)
    3735        alloc loc0 = ar.pfs, 1, 49, 0, 0
    3836        mov loc1 = ar.unat ;;
     
    182180        add r8 = r0, r0, 1      /* context_save returns 1 */
    183181        br.ret.sptk.many b0
    184 
    185 context_restore:
     182FUNCTION_END(context_save)
     183
     184FUNCTION_BEGIN(context_restore)
    186185        alloc loc0 = ar.pfs, 1, 50, 0, 0        ;;
    187186
     
    338337        mov r8 = r0                     /* context_restore returns 0 */
    339338        br.ret.sptk.many b0
     339FUNCTION_END(context_restore)
     340
  • uspace/lib/c/arch/ia64/src/stacktrace_asm.S

    r6adb775f r32573ff  
    2727#
    2828
     29#include <abi/asmtool.h>
     30
    2931.text
    3032
    31 .global stacktrace_prepare
    32 .global stacktrace_fp_get
    33 .global stacktrace_pc_get
     33FUNCTION_BEGIN(stacktrace_prepare)
     34        br.ret.sptk.many b0
     35FUNCTION_END(stacktrace_prepare)
    3436
    35 stacktrace_prepare:
    36         br.ret.sptk.many b0
    37 
    38 stacktrace_fp_get:
    39 stacktrace_pc_get:
     37FUNCTION_BEGIN(stacktrace_fp_get)
     38FUNCTION_BEGIN(stacktrace_pc_get)
    4039        mov r8 = r0
    4140        br.ret.sptk.many b0
     41FUNCTION_END(stacktrace_fp_get)
     42FUNCTION_END(stacktrace_pc_get)
     43
  • uspace/lib/c/arch/ia64/src/syscall.S

    r6adb775f r32573ff  
    2727#
    2828
     29#include <abi/asmtool.h>
     30
    2931/**
    3032 * Immediate operand for break instruction.
     
    3739#define SYSCALL_IMM     1
    3840
    39 .global __syscall
    40 __syscall:
     41FUNCTION_BEGIN(__syscall)
    4142        alloc r14 = ar.pfs, 7, 0, 0, 0 ;;
    4243        break SYSCALL_IMM
    4344        mov ar.pfs = r14 ;;
    4445        br.ret.sptk.many b0
     46FUNCTION_END(__syscall)
     47
  • uspace/lib/c/arch/ia64/src/thread_entry.S

    r6adb775f r32573ff  
    2727#
    2828
     29#include <abi/asmtool.h>
     30
    2931.text
    30 
    31 .globl __thread_entry
    3232
    3333## User-space thread entry point for all but the first threads.
    3434#
    3535#
    36 __thread_entry:
     36SYMBOL(__thread_entry)
    3737        alloc loc0 = ar.pfs, 0, 1, 1, 0
    3838
     
    4949        # Not reached.
    5050        #
    51        
    52 .end __thread_entry
     51
  • uspace/lib/c/arch/mips32/src/entry.S

    r6adb775f r32573ff  
    2727#
    2828
     29#include <abi/asmtool.h>
    2930#include <libarch/stack.h>
    3031
    3132.text
    3233.section .init, "ax"
    33 
    34 .global __entry
    3534
    3635.set noreorder
     
    4140# $a0 ($4) contains the PCB pointer
    4241#
    43 .ent __entry
    44 __entry:
     42FUNCTION_BEGIN(__entry)
     43        .ent __entry
    4544        .frame $sp, ABI_STACK_FRAME, $ra
    4645        .cpload $t9
     
    6362        #
    6463        addiu $sp, ABI_STACK_FRAME
    65 .end __entry
     64FUNCTION_END(__entry)
  • uspace/lib/c/arch/mips32/src/entryjmp.S

    r6adb775f r32573ff  
    2727#
    2828
     29#include <abi/asmtool.h>
    2930#include <libarch/stack.h>
    3031
    3132.text
    3233.section .text
    33 .global entry_point_jmp
    3434.set noreorder
    3535
     
    4040#
    4141# Jump to program entry point
    42 .ent entry_point_jmp
    43 entry_point_jmp:
     42FUNCTION_BEGIN(entry_point_jmp)
    4443        # tmp := entry_point
    4544        move $t9, $a0
     
    5150        addiu $sp, -ABI_STACK_FRAME
    5251        addiu $sp, ABI_STACK_FRAME
    53 .end entry_point_jmp
     52FUNCTION_END(entry_point_jmp)
     53
  • uspace/lib/c/arch/mips32/src/fibril.S

    r6adb775f r32573ff  
    3232.set noreorder
    3333
     34#include <abi/asmtool.h>
    3435#include <libarch/fibril_context.h>
    3536
    36 .global context_save
    37 .global context_restore
    38 
    39 context_save:
     37FUNCTION_BEGIN(context_save)
    4038        sw $s0, CONTEXT_OFFSET_S0($a0)
    4139        sw $s1, CONTEXT_OFFSET_S1($a0)
     
    9290        j $ra
    9391        li $v0, 1
     92FUNCTION_END(context_save)
    9493
    95 context_restore:
     94FUNCTION_BEGIN(context_restore)
    9695        lw $s0, CONTEXT_OFFSET_S0($a0)
    9796        lw $s1, CONTEXT_OFFSET_S1($a0)
     
    151150        j $ra
    152151        xor $v0, $v0
     152FUNCTION_END(context_restore)
  • uspace/lib/c/arch/mips32/src/stacktrace_asm.S

    r6adb775f r32573ff  
    2727#
    2828
     29#include <abi/asmtool.h>
     30
    2931.text
    3032
     
    3234.set noreorder
    3335
    34 .global stacktrace_prepare
    35 .global stacktrace_fp_get
    36 .global stacktrace_pc_get
    37 
    38 stacktrace_prepare:
    39 stacktrace_fp_get:
    40 stacktrace_pc_get:
     36FUNCTION_BEGIN(stacktrace_prepare)
     37FUNCTION_BEGIN(stacktrace_fp_get)
     38FUNCTION_BEGIN(stacktrace_pc_get)
    4139        j $ra
    4240        xor $v0, $v0
     41FUNCTION_END(stacktrace_prepare)
     42FUNCTION_END(stacktrace_fp_get)
     43FUNCTION_END(stacktrace_pc_get)
  • uspace/lib/c/arch/mips32/src/thread_entry.S

    r6adb775f r32573ff  
    2727#
    2828
     29#include <abi/asmtool.h>
    2930#include <libarch/stack.h>
    3031
     
    3536.option pic2
    3637
    37 .globl __thread_entry
    38 
    3938## User-space thread entry point for all but the first threads.
    4039#
    4140#
    42 .ent __thread_entry
    43 __thread_entry:
     41SYMBOL(__thread_entry)
     42        .ent __thread_entry
    4443        .frame $sp, ABI_STACK_FRAME, $ra
    4544        .cpload $t9
     
    6362        #
    6463        addiu $sp, ABI_STACK_FRAME
    65 .end __thread_entry
  • uspace/lib/c/arch/ppc32/Makefile.inc

    r6adb775f r32573ff  
    2828
    2929ARCH_SOURCES = \
    30         arch/$(UARCH)/src/entry.s \
    31         arch/$(UARCH)/src/entryjmp.s \
    32         arch/$(UARCH)/src/thread_entry.s \
     30        arch/$(UARCH)/src/entry.S \
     31        arch/$(UARCH)/src/entryjmp.S \
     32        arch/$(UARCH)/src/thread_entry.S \
    3333        arch/$(UARCH)/src/syscall.c \
    3434        arch/$(UARCH)/src/fibril.S \
  • uspace/lib/c/arch/ppc32/src/entry.S

    r6adb775f r32573ff  
    2727#
    2828
     29#include <abi/asmtool.h>
     30
    2931.section .init, "ax"
    3032
    3133.org 0
    32 
    33 .globl __entry
    3434
    3535## User-space task entry point
     
    3737# r6 contains the PCB pointer
    3838#
    39 __entry:
     39SYMBOL(__entry)
    4040        #
    4141        # Create the first stack frame.
  • uspace/lib/c/arch/ppc32/src/entryjmp.S

    r6adb775f r32573ff  
    2727#
    2828
    29 .globl entry_point_jmp
     29#include <abi/asmtool.h>
    3030
    3131## void entry_point_jmp(void *entry_point, void *pcb);
     
    3535#
    3636# Jump to program entry point
    37 entry_point_jmp:
     37FUNCTION_BEGIN(entry_point_jmp)
    3838        mtctr %r3
    3939        mr %r6, %r4     # Pass pcb to the entry point in %r6
    4040        bctr
     41FUNCTION_END(entry_point_jmp)
  • uspace/lib/c/arch/ppc32/src/fibril.S

    r6adb775f r32573ff  
    2929.text
    3030
    31 .global context_save
    32 .global context_restore
    33 
     31#include <abi/asmtool.h>
    3432#include <libarch/regname.h>
    3533#include <libarch/fibril_context.h>
    3634
    37 context_save:
     35FUNCTION_BEGIN(context_save)
    3836        stw sp, CONTEXT_OFFSET_SP(r3)
    3937        stw r2, CONTEXT_OFFSET_TLS(r3)
     
    6765        li r3, 1
    6866        blr
     67FUNCTION_END(context_save)
    6968
    70 
    71 context_restore:
     69FUNCTION_BEGIN(context_restore)
    7270        lwz sp, CONTEXT_OFFSET_SP(r3)
    7371        lwz r2, CONTEXT_OFFSET_TLS(r3)
     
    10199        li r3, 0
    102100        blr
     101FUNCTION_END(context_restore)
  • uspace/lib/c/arch/ppc32/src/stacktrace_asm.S

    r6adb775f r32573ff  
    2929.text
    3030
     31#include <abi/asmtool.h>
    3132#include <libarch/regname.h>
    3233
    33 .global stacktrace_prepare
    34 .global stacktrace_fp_get
    35 .global stacktrace_pc_get
     34FUNCTION_BEGIN(stacktrace_prepare)
     35        blr
     36FUNCTION_END(stacktrace_prepare)
    3637
    37 stacktrace_prepare:
    38         blr
    39 
    40 stacktrace_fp_get:
     38FUNCTION_BEGIN(stacktrace_fp_get)
    4139        mr r3, sp
    4240        blr
     41FUNCTION_END(stacktrace_fp_get)
    4342
    44 stacktrace_pc_get:
     43FUNCTION_BEGIN(stacktrace_pc_get)
    4544        mflr r3
    4645        blr
     46FUNCTION_END(stacktrace_pc_get)
  • uspace/lib/c/arch/ppc32/src/thread_entry.S

    r6adb775f r32573ff  
    2727#
    2828
     29#include <abi/asmtool.h>
     30
    2931.text
    3032       
    31 .globl __thread_entry
    32 
    3333## User-space thread entry point for all but the first threads.
    3434#
    3535#
    36 __thread_entry:
     36SYMBOL(__thread_entry)
    3737        #
    3838        # Create the first stack frame.
     
    4444        b __thread_main
    4545
    46 .end __thread_entry
  • uspace/lib/c/arch/sparc32/Makefile.inc

    r6adb775f r32573ff  
    2828
    2929ARCH_SOURCES = \
    30         arch/$(UARCH)/src/entry.s \
    31         arch/$(UARCH)/src/entryjmp.s \
    32         arch/$(UARCH)/src/thread_entry.s \
     30        arch/$(UARCH)/src/entry.S \
     31        arch/$(UARCH)/src/entryjmp.S \
     32        arch/$(UARCH)/src/thread_entry.S \
    3333        arch/$(UARCH)/src/fibril.S \
    3434        arch/$(UARCH)/src/tls.c \
  • uspace/lib/c/arch/sparc32/src/entry.S

    r6adb775f r32573ff  
    2727#
    2828
     29#include <abi/asmtool.h>
     30
    2931.section .init, "ax"
    3032
    3133.org 0
    32 
    33 .globl __entry
    3434
    3535## User-space task entry point
     
    3838# %o1 contains pcb_ptr
    3939#
    40 __entry:
     40SYMBOL(__entry)
    4141        #
    4242        # Create the first stack frame.
  • uspace/lib/c/arch/sparc32/src/entryjmp.S

    r6adb775f r32573ff  
    2727#
    2828
    29 .globl entry_point_jmp
     29#include <abi/asmtool.h>
    3030
    3131## void entry_point_jmp(void *entry_point, void *pcb);
     
    3535#
    3636# Jump to program entry point
    37 entry_point_jmp:
     37FUNCTION_BEGIN(entry_point_jmp)
    3838        # Pass pcb pointer to entry point in %o1. As it is already
    3939        # there, no action is needed.
     
    4141        nop
    4242        # FIXME: use branch instead of call
     43FUNCTION_END(entry_point_jmp)
  • uspace/lib/c/arch/sparc32/src/fibril.S

    r6adb775f r32573ff  
    2727#
    2828
     29#include <abi/asmtool.h>
    2930#include <libarch/context_offset.h>
    3031
    3132.text
    3233
    33 .global flush_windows
    34 .global context_save
    35 .global context_restore
    36 
    37 context_save:
     34FUNCTION_BEGIN(context_save)
    3835        #
    3936        # We rely on the kernel to flush our active register windows to memory
     
    5653        retl
    5754        mov 1, %o0              ! context_save_arch returns 1
     55FUNCTION_END(context_save)
    5856
    59 context_restore:
     57FUNCTION_BEGIN(context_restore)
    6058        #
    6159        # Flush all active windows.
     
    8482        retl
    8583        xor %o0, %o0, %o0       ! context_restore_arch returns 0
     84FUNCTION_END(context_restore)
  • uspace/lib/c/arch/sparc32/src/stacktrace_asm.S

    r6adb775f r32573ff  
    2727#
    2828
     29#include <abi/asmtool.h>
    2930#include <libarch/stack.h>
    3031
    3132.text
    3233
    33 .global stacktrace_prepare
    34 .global stacktrace_fp_get
    35 .global stacktrace_pc_get
    36 
    37 stacktrace_prepare:
     34FUNCTION_BEGIN(stacktrace_prepare)
    3835        save %sp, -(STACK_WINDOW_SAVE_AREA_SIZE+STACK_ARG_SAVE_AREA_SIZE), %sp
    3936       
     
    5350        ret
    5451        restore
     52FUNCTION_END(stacktrace_prepare)
    5553
    56 stacktrace_fp_get:
     54FUNCTION_BEGIN(stacktrace_fp_get)
    5755        # Add the stack bias to %sp to get the actual address.
    5856        retl
    5957        mov %sp,  %o0
     58FUNCTION_END(stacktrace_fp_get)
    6059
    61 stacktrace_pc_get:
     60FUNCTION_BEGIN(stacktrace_pc_get)
    6261        retl
    6362        mov %o7, %o0
     63FUNCTION_END(stacktrace_pc_get)
  • uspace/lib/c/arch/sparc32/src/thread_entry.S

    r6adb775f r32573ff  
    2727#
    2828
     29#include <abi/asmtool.h>
     30
    2931.text
    30 
    31 .globl __thread_entry
    3232
    3333## User-space thread entry point for all but the first threads.
    3434#
    3535#
    36 __thread_entry:
     36SYMBOL(__thread_entry)
    3737        #
    3838        # Create the first stack frame.
     
    6666       
    6767        ! not reached
    68        
    69 .end __thread_entry
  • uspace/lib/c/arch/sparc64/Makefile.inc

    r6adb775f r32573ff  
    2828
    2929ARCH_SOURCES = \
    30         arch/$(UARCH)/src/entry.s \
    31         arch/$(UARCH)/src/entryjmp.s \
    32         arch/$(UARCH)/src/thread_entry.s \
     30        arch/$(UARCH)/src/entry.S \
     31        arch/$(UARCH)/src/entryjmp.S \
     32        arch/$(UARCH)/src/thread_entry.S \
    3333        arch/$(UARCH)/src/fibril.S \
    3434        arch/$(UARCH)/src/tls.c \
  • uspace/lib/c/arch/sparc64/src/entry.S

    r6adb775f r32573ff  
    2727#
    2828
     29#include <abi/asmtool.h>
     30
    2931.section .init, "ax"
    3032
    3133.org 0
    32 
    33 .globl __entry
    3434
    3535## User-space task entry point
     
    3838# %o1 contains pcb_ptr
    3939#
    40 __entry:
     40SYMBOL(__entry)
    4141        #
    4242        # Create the first stack frame.
  • uspace/lib/c/arch/sparc64/src/entryjmp.S

    r6adb775f r32573ff  
    2727#
    2828
    29 .globl entry_point_jmp
     29#include <abi/asmtool.h>
    3030
    3131## void entry_point_jmp(void *entry_point, void *pcb);
     
    3535#
    3636# Jump to program entry point
    37 entry_point_jmp:
     37SYMBOL(entry_point_jmp)
    3838        # Pass pcb pointer to entry point in %o1. As it is already
    3939        # there, no action is needed.
  • uspace/lib/c/arch/sparc64/src/fibril.S

    r6adb775f r32573ff  
    2727#
    2828
     29#include <abi/asmtool.h>
    2930#include <libarch/fibril_context.h>
    3031
    3132.text
    3233
    33 .global context_save
    34 .global context_restore
    35 
    36 context_save:
     34FUNCTION_BEGIN(context_save)
    3735        #
    3836        # We rely on the kernel to flush our active register windows to memory
     
    6058        retl
    6159        mov 1, %o0              ! context_save_arch returns 1
     60FUNCTION_END(context_save)
    6261
    63 context_restore:
     62FUNCTION_BEGIN(context_restore)
    6463        #
    6564        # Flush all active windows.
     
    9190        retl
    9291        xor %o0, %o0, %o0       ! context_restore_arch returns 0
     92FUNCTION_END(context_restore)
  • uspace/lib/c/arch/sparc64/src/stacktrace_asm.S

    r6adb775f r32573ff  
    2727#
    2828
     29#include <abi/asmtool.h>
    2930#include <libarch/stack.h>
    3031
    3132.text
    3233
    33 .global stacktrace_prepare
    34 .global stacktrace_fp_get
    35 .global stacktrace_pc_get
    36 
    37 stacktrace_prepare:
     34FUNCTION_BEGIN(stacktrace_prepare)
    3835        save %sp, -(STACK_WINDOW_SAVE_AREA_SIZE+STACK_ARG_SAVE_AREA_SIZE), %sp
    3936        # Flush all other windows to memory so that we can read their contents.
     
    4138        ret
    4239        restore
     40FUNCTION_END(stacktrace_prepare)
    4341
    44 stacktrace_fp_get:
     42FUNCTION_BEGIN(stacktrace_fp_get)
    4543        # Add the stack bias to %sp to get the actual address.
    4644        retl
    4745        add %sp, STACK_BIAS, %o0
     46FUNCTION_END(stacktrace_fp_get)
    4847
    49 stacktrace_pc_get:
     48FUNCTION_BEGIN(stacktrace_pc_get)
    5049        retl
    5150        mov %o7, %o0
     51FUNCTION_END(stacktrace_pc_get)
  • uspace/lib/c/arch/sparc64/src/thread_entry.S

    r6adb775f r32573ff  
    2727#
    2828
     29#include <abi/asmtool.h>
     30
    2931.text
    3032       
    31 .globl __thread_entry
    32 
    3333## User-space thread entry point for all but the first threads.
    3434#
    3535#
    36 __thread_entry:
     36SYMBOL(__thread_entry)
    3737        #
    3838        # Create the first stack frame.
     
    5252       
    5353        ! not reached
    54        
    55 .end __thread_entry
Note: See TracChangeset for help on using the changeset viewer.