Changeset 3b0f1b9a in mainline for uspace


Ignore:
Timestamp:
2016-04-12T05:57:00Z (9 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
0f792c28, d84398a7
Parents:
8844e70
Message:

amd64: use asmtool.h macros for defining symbols

Location:
uspace/lib
Files:
7 edited
3 moved

Legend:

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

    r8844e70 r3b0f1b9a  
    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/amd64/src/entry.S

    r8844e70 r3b0f1b9a  
    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# %rdi contains the PCB pointer
    3838#
    39 __entry:
     39SYMBOL(__entry)
    4040        #
    4141        # Create the first stack frame.
  • uspace/lib/c/arch/amd64/src/entryjmp.S

    r8844e70 r3b0f1b9a  
    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        # use standard amd32 prologue not to confuse anybody
    3939        push %rbp
  • uspace/lib/c/arch/amd64/src/fibril.S

    r8844e70 r3b0f1b9a  
    2727#
    2828
     29#include <abi/asmtool.h>
     30#include <libarch/fibril_context.h>
     31
    2932.text
    30 
    31 .global context_save
    32 .global context_restore
    33 
    34 #include <libarch/fibril_context.h>
    3533
    3634## Save current CPU context
     
    3937# pointed by the 1st argument. Returns 1 in EAX.
    4038#
    41 context_save:
     39FUNCTION_BEGIN(context_save)
    4240        movq (%rsp), %rdx     # the caller's return %eip
    4341       
     
    6058        incl %eax
    6159        ret
     60FUNCTION_END(context_save)
    6261
    6362## Restore current CPU context
     
    6665# pointed by the 1st argument. Returns 0 in EAX.
    6766#
    68 context_restore:
    69        
     67FUNCTION_BEGIN(context_restore)
    7068        movq CONTEXT_OFFSET_R15(%rdi), %r15
    7169        movq CONTEXT_OFFSET_R14(%rdi), %r14
     
    8886        xorl %eax, %eax                      # context_restore returns 0
    8987        ret
     88FUNCTION_END(context_restore)
    9089
  • uspace/lib/c/arch/amd64/src/stacktrace_asm.S

    r8844e70 r3b0f1b9a  
    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        ret
     35FUNCTION_END(stacktrace_prepare)
    3436
    35 stacktrace_prepare:
    36         ret
    37 
    38 stacktrace_fp_get:
     37FUNCTION_BEGIN(stacktrace_fp_get)
    3938        movq %rbp, %rax
    4039        ret
     40FUNCTION_END(stacktrace_fp_get)
    4141
    42 stacktrace_pc_get:
     42FUNCTION_BEGIN(stacktrace_pc_get)
    4343        movq (%rsp), %rax
    4444        ret
     45FUNCTION_END(stacktrace_pc_get)
     46
  • uspace/lib/c/arch/amd64/src/syscall.S

    r8844e70 r3b0f1b9a  
    2727#
    2828
     29#include <abi/asmtool.h>
     30
    2931.text
    30        
    31 .global __syscall
    3232       
    3333## Make a system call.
     
    4343# @return               The return value will be stored in RAX.
    4444#
    45 __syscall:
     45FUNCTION_BEGIN(__syscall)
    4646        #
    4747        # Move the syscall number into RAX.
     
    5555        syscall
    5656        ret
     57FUNCTION_END(__syscall)
    5758
  • uspace/lib/c/arch/amd64/src/thread_entry.S

    r8844e70 r3b0f1b9a  
    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_BEGIN(__thread_entry)
    3737        #
    3838        # Create the first stack frame.
     
    4747        movq %rax, %rdi
    4848        call __thread_main
    49        
    50 .end __thread_entry
     49SYMBOL_END(__thread_entry)
  • uspace/lib/math/arch/amd64/src/cos.S

    r8844e70 r3b0f1b9a  
    2727#
    2828
     29#include <abi/asmtool.h>
    2930#include <libarch/x87.h>
    3031
    3132.text
    3233
    33 .global cos_f64
    34 
    35 cos_f64:
     34FUNCTION_BEGIN(cos_f64)
    3635        pushq %rbp
    3736        movq %rsp, %rbp
     
    7776        leave
    7877        retq
     78FUNCTION_END(cos_f64)
  • uspace/lib/math/arch/amd64/src/sin.S

    r8844e70 r3b0f1b9a  
    2727#
    2828
     29#include <abi/asmtool.h>
    2930#include <libarch/x87.h>
    3031
    3132.text
    3233
    33 .global sin_f64
    34 
    35 sin_f64:
     34FUNCTION_BEGIN(sin_f64)
    3635        pushq %rbp
    3736        movq %rsp, %rbp
     
    7776        leave
    7877        retq
     78FUNCTION_END(sin_f64)
     79
  • uspace/lib/math/arch/amd64/src/trunc.S

    r8844e70 r3b0f1b9a  
    2727#
    2828
     29#include <abi/asmtool.h>
    2930#include <libarch/x87.h>
    3031
    3132.text
    3233
    33 .global trunc_f64
    34 
    35 trunc_f64:
     34FUNCTION_BEGIN(trunc_f64)
    3635        pushq %rbp
    3736        movq %rsp, %rbp
     
    6362        leave
    6463        retq
     64FUNCTION_END(trunc_f64)
Note: See TracChangeset for help on using the changeset viewer.