Changeset 27f67f5 in mainline


Ignore:
Timestamp:
2016-04-22T20:43:34Z (8 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
a52e2f4
Parents:
054476d
Message:

ia64: use asmtool.h macros for defining symbols

Files:
14 edited
4 moved

Legend:

Unmodified
Added
Removed
  • boot/arch/ia64/src/asm.S

    r054476d r27f67f5  
    2828#
    2929
     30#include <abi/asmtool.h>
    3031#include <arch/arch.h>
    3132
    3233.text
    3334
    34 .global halt
    35 .global memcpy
    36 .global jump_to_kernel
     35FUNCTION_BEGIN(halt)
     36        br halt
     37FUNCTION_END(halt)
    3738
    38 halt:
    39         br halt
    40 
    41 jump_to_kernel:
     39FUNCTION_BEGIN(jump_to_kernel)
    4240        alloc loc0 = ar.pfs, 1, 1, 0, 0
    4341        mov r2 = in0 ;;                 # Pass bootinfo address
     
    4543        mov b1 = r8 ;;
    4644        br.call.sptk.many b0 = b1;;
     45FUNCTION_END(jump_to_kernel)
     46
  • boot/arch/ia64/src/boot.S

    r054476d r27f67f5  
    2828#
    2929
     30#include <abi/asmtool.h>
    3031#include <arch/arch.h>
    3132
    3233.section BOOTSTRAP, "ax"
    3334
    34 .global start
    35 start:
     35SYMBOL(start)
    3636        movl gp = __gp
    3737
     
    6969.bss
    7070
    71 .global bootpar
    72 bootpar:
     71SYMBOL(bootpar)
    7372        .quad 0
    7473
  • boot/arch/ia64/src/pal_asm.S

    r054476d r27f67f5  
    2727#
    2828
     29#include <abi/asmtool.h>
     30
    2931.explicit
    3032
    31 .global pal_static_call
    32 
    33 pal_static_call:
     33FUNCTION_BEGIN(pal_static_call)
    3434        alloc loc0 = ar.pfs, 7, 6, 0, 0
    3535
     
    7474        mov ar.pfs = loc0
    7575        br.ret.sptk.many rp
     76FUNCTION_END(pal_static_call)
    7677
  • boot/arch/ia64/src/sal_asm.S

    r054476d r27f67f5  
    2727#
    2828
     29#include <abi/asmtool.h>
     30
    2931.explicit
    3032
     
    3335#define STACK_IN9               (8 + STACK_SCRATCH_AREA)
    3436#define STACK_IN10              (16 + STACK_SCRATCH_AREA)
    35 
    36 .global sal_call
    3737
    3838#
     
    4343# Assume PSR.bn is 1, as expected by SAL.
    4444#
    45 sal_call:
     45FUNCTION_BEGIN(sal_call)
    4646        alloc loc0 = ar.pfs, 8, 8, 8, 0
    4747       
     
    9292        mov ar.pfs = loc0
    9393        br.ret.sptk.many rp
     94FUNCTION_END(sal_call)
    9495
  • kernel/arch/ia64/Makefile.inc

    r054476d r27f67f5  
    4343        arch/$(KARCH)/src/start.S \
    4444        arch/$(KARCH)/src/asm.S \
    45         arch/$(KARCH)/src/dummy.s \
     45        arch/$(KARCH)/src/dummy.S \
    4646        arch/$(KARCH)/src/ia64.c \
    4747        arch/$(KARCH)/src/fpu_context.c \
  • kernel/arch/ia64/src/asm.S

    r054476d r27f67f5  
    2727 */
    2828
     29#include <abi/asmtool.h>
    2930#include <arch/register.h>
    3031
    3132.text
    32 .global memcpy_from_uspace
    33 .global memcpy_to_uspace
    34 .global memcpy_from_uspace_failover_address
    35 .global memcpy_to_uspace_failover_address
    3633
    3734/** Copy memory from/to userspace.
     
    4643 *
    4744 */
    48 memcpy_from_uspace:
    49 memcpy_to_uspace:
     45FUNCTION_BEGIN(memcpy_from_uspace)
     46FUNCTION_BEGIN(memcpy_to_uspace)
    5047        alloc loc0 = ar.pfs, 3, 1, 0, 0
    5148       
     
    132129                mov ar.pfs = loc0
    133130                br.ret.sptk.many rp
     131FUNCTION_END(memcpy_from_uspace)
     132FUNCTION_END(memcpy_to_uspace)
    134133
    135 memcpy_from_uspace_failover_address:
    136 memcpy_to_uspace_failover_address:
     134SYMBOL(memcpy_from_uspace_failover_address)
     135SYMBOL(memcpy_to_uspace_failover_address)
    137136        /* Return 0 on failure */
    138137        mov r8 = r0
     
    140139        br.ret.sptk.many rp
    141140
    142 .global cpu_halt
    143 cpu_halt:
     141FUNCTION_BEGIN(cpu_halt)
    144142        br cpu_halt
     143FUNCTION_END(cpu_halt)
    145144
    146145/** Switch to userspace - low level code.
     
    154153 *
    155154 */
    156 .global switch_to_userspace
    157 switch_to_userspace:
     155FUNCTION_BEGIN(switch_to_userspace)
    158156        alloc loc0 = ar.pfs, 6, 3, 0, 0
    159157       
     
    191189       
    192190        rfi ;;
     191FUNCTION_END(switch_to_userspace)
    193192
    194 .global early_putchar
    195 early_putchar:
     193FUNCTION_BEGIN(early_putchar)
    196194        br.ret.sptk.many b0
     195FUNCTION_END(early_putchar)
  • kernel/arch/ia64/src/context.S

    r054476d r27f67f5  
    2727#
    2828
     29#include <abi/asmtool.h>
    2930#include <arch/context_struct.h>
    3031
    3132.text
    3233
    33 .global context_save_arch
    34 .global context_restore_arch
    35 
    36 context_save_arch:
     34FUNCTION_BEGIN(context_save_arch)
    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_arch:
     182FUNCTION_END(context_save_arch)
     183
     184FUNCTION_BEGIN(context_restore_arch)
    186185        alloc loc0 = ar.pfs, 1, 50, 0, 0        ;;
    187186
     
    338337        mov r8 = r0                     /* context_restore returns 0 */
    339338        br.ret.sptk.many b0
    340 
     339FUNCTION_END(context_restore_arch)
     340
  • kernel/arch/ia64/src/debug/stacktrace_asm.S

    r054476d r27f67f5  
    2727#
    2828
     29#include <abi/asmtool.h>
     30
    2931.text
    3032
    31 .global frame_pointer_get
    32 .global program_counter_get
    33 
    34 frame_pointer_get:
     33FUNCTION_BEGIN(frame_pointer_get)
    3534        mov r8 = r0
    3635        br.ret.sptk.many b0
     36FUNCTION_END(frame_pointer_get)
    3737
    38 program_counter_get:
     38FUNCTION_BEGIN(program_counter_get)
    3939        mov r8 = r0
    4040        br.ret.sptk.many b0
     41FUNCTION_END(program_counter_get)
     42
  • kernel/arch/ia64/src/dummy.S

    r054476d r27f67f5  
    2727#
    2828
     29#include <abi/asmtool.h>
     30
    2931.text
    3032
    31 .global calibrate_delay_loop
    32 .global asm_delay_loop
    33 .global cpu_sleep
    34 .global dummy
     33FUNCTION_BEGIN(calibrate_delay_loop)
     34FUNCTION_BEGIN(asm_delay_loop)
     35FUNCTION_BEGIN(cpu_sleep)
     36        br.ret.sptk.many b0
     37FUNCTION_END(calibrate_delay_loop)
     38FUNCTION_END(asm_delay_loop)
     39FUNCTION_END(cpu_sleep)
    3540
    36 calibrate_delay_loop:
    37 asm_delay_loop:
    38 cpu_sleep:
    39 
    40 dummy:
    41         br.ret.sptk.many b0
    42 
  • kernel/arch/ia64/src/ivt.S

    r054476d r27f67f5  
    2828#
    2929
     30#include <abi/asmtool.h>
    3031#include <arch/stack.h>
    3132#include <arch/register.h>
     
    101102.endm
    102103
    103 .global heavyweight_handler
    104 heavyweight_handler:
     104SYMBOL(heavyweight_handler)
    105105    /* 1. copy interrupt registers into bank 0 */
    106106   
     
    297297        rfi ;;
    298298
    299 .global heavyweight_handler_inner
    300 heavyweight_handler_inner:
     299FUNCTION_BEGIN(heavyweight_handler_inner)
    301300        /*
    302301         * From this point, the rest of the interrupted context
     
    538537        mov ar.pfs = loc0
    539538        br.ret.sptk.many b0
    540 
    541 .global ivt
     539FUNCTION_END(heavyweight_handler_inner)
     540
    542541.align 32768
    543 ivt:
     542SYMBOL(ivt)
    544543        HEAVYWEIGHT_HANDLER 0x00
    545544        HEAVYWEIGHT_HANDLER 0x04
  • kernel/arch/ia64/src/start.S

    r054476d r27f67f5  
    2727#
    2828
     29#include <abi/asmtool.h>
    2930#include <arch/register.h>
    3031#include <arch/mm/page.h>
     
    4142.section K_TEXT_START, "ax"
    4243
    43 .global kernel_image_start
    44 
    4544stack0:
    4645
     
    5352#       r2      Address of the boot code's bootinfo structure.
    5453#
    55 kernel_image_start:
     54SYMBOL(kernel_image_start)
    5655        .auto
    5756       
     
    113112        rfi ;;
    114113
    115 .global paging_start
    116114paging_start:
    117115       
  • uspace/lib/c/arch/ia64/Makefile.inc

    r054476d r27f67f5  
    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

    r054476d r27f67f5  
    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

    r054476d r27f67f5  
    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

    r054476d r27f67f5  
    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

    r054476d r27f67f5  
    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

    r054476d r27f67f5  
    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

    r054476d r27f67f5  
    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
Note: See TracChangeset for help on using the changeset viewer.