Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 0407636 in mainline


Ignore:
Timestamp:
2016-04-24T07:30:53Z (5 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
master
Children:
b66cc97
Parents:
a52e2f4
Message:

mips32: use asmtool.h macros for defining symbols

Files:
10 edited

Legend:

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

    ra52e2f4 r0407636  
    2727#
    2828
     29#include <abi/asmtool.h>
    2930#include <arch/arch.h>
    3031#include <arch/regname.h>
     
    3435.set nomacro
    3536
    36 .global start
    37 .global halt
    38 .global jump_to_kernel
    39 
    4037.section BOOTSTRAP
    4138
    42 start:
     39SYMBOL(start)
    4340        /*
    4441         * Setup the CP0 configuration
     
    145142.text
    146143
    147 halt:
     144FUNCTION_BEGIN(halt)
    148145        j halt
    149146        nop
     147FUNCTION_END(halt)
    150148
    151 jump_to_kernel:
     149FUNCTION_BEGIN(jump_to_kernel)
    152150        /*
    153151         * TODO:
     
    158156        j $a0
    159157        nop
     158FUNCTION_END(jump_to_kernel)
  • kernel/arch/mips32/src/asm.S

    ra52e2f4 r0407636  
    2727 */
    2828
     29#include <abi/asmtool.h>
    2930#include <arch/asm/regname.h>
    3031#include <arch/fpu_context_struct.h>
     
    4849.set nomacro
    4950
    50 .global asm_delay_loop
    51 asm_delay_loop:
     51FUNCTION_BEGIN(asm_delay_loop)
    5252        j $31
    5353        nop
    54 
    55 .global cpu_halt
    56 cpu_halt:
     54FUNCTION_END(asm_delay_loop)
     55
     56FUNCTION_BEGIN(cpu_halt)
    5757        j cpu_halt
    5858        nop
    59 
    60 .global memcpy_from_uspace
    61 .global memcpy_to_uspace
    62 .global memcpy_from_uspace_failover_address
    63 .global memcpy_to_uspace_failover_address
    64 memcpy_from_uspace:
    65 memcpy_to_uspace:
     59FUNCTION_END(cpu_halt)
     60
     61FUNCTION_BEGIN(memcpy_from_uspace)
     62FUNCTION_BEGIN(memcpy_to_uspace)
    6663        move $t2, $a0  /* save dst */
    6764       
     
    129126                jr $ra
    130127                move $v0, $t2
    131 
    132 memcpy_from_uspace_failover_address:
    133 memcpy_to_uspace_failover_address:
     128FUNCTION_END(memcpy_from_uspace)
     129FUNCTION_END(memcpy_to_uspace)
     130
     131SYMBOL(memcpy_from_uspace_failover_address)
     132SYMBOL(memcpy_to_uspace_failover_address)
    134133        jr $ra
    135134        move $v0, $zero
     
    155154.endm
    156155
    157 .global fpu_context_save
    158 fpu_context_save:
     156FUNCTION_BEGIN(fpu_context_save)
    159157#ifdef CONFIG_FPU
    160158        fpu_gp_save 0, $a0
     
    225223        j $ra
    226224        nop
    227 
    228 .global fpu_context_restore
    229 fpu_context_restore:
     225FUNCTION_END(fpu_context_save)
     226
     227FUNCTION_BEGIN(fpu_context_restore)
    230228#ifdef CONFIG_FPU
    231229        fpu_gp_restore 0, $a0
     
    296294        j $ra
    297295        nop
    298 
    299 .global early_putchar
    300 early_putchar:
     296FUNCTION_END(fpu_context_restore)
     297
     298FUNCTION_BEGIN(early_putchar)
    301299        j $ra
    302300        nop
     301FUNCTION_END(early_putchar)
  • kernel/arch/mips32/src/context.S

    ra52e2f4 r0407636  
    2727#
    2828
     29#include <abi/asmtool.h>
    2930#include <arch/context_struct.h>
    3031
     
    3536.set nomacro
    3637
    37 .global context_save_arch
    38 .global context_restore_arch
    39 
    40 context_save_arch:
     38FUNCTION_BEGIN(context_save_arch)
    4139        sw $s0, CONTEXT_OFFSET_S0($a0)
    4240        sw $s1, CONTEXT_OFFSET_S1($a0)
     
    5654        j $31
    5755        li $2, 1
     56FUNCTION_END(context_save_arch)
    5857
    59 context_restore_arch:
     58FUNCTION_BEGIN(context_restore_arch)
    6059        lw $s0, CONTEXT_OFFSET_S0($a0)
    6160        lw $s1, CONTEXT_OFFSET_S1($a0)
     
    7574        j $31
    7675        xor $2, $2
     76FUNCTION_END(context_restore_arch)
  • kernel/arch/mips32/src/debug/stacktrace_asm.S

    ra52e2f4 r0407636  
    2727#
    2828
     29#include <abi/asmtool.h>
     30
    2931.text
    3032
     
    3234.set noreorder
    3335
    34 .global frame_pointer_get
    35 .global program_counter_get
    36 
    37 frame_pointer_get:
     36FUNCTION_BEGIN(frame_pointer_get)
    3837        j $ra
    3938        move $v0, $sp
     39FUNCTION_END(frame_pointer_get)
    4040
    41 program_counter_get:
     41FUNCTION_BEGIN(program_counter_get)
    4242        j $ra
    4343        move $v0, $ra
     44FUNCTION_END(program_counter_get)
  • kernel/arch/mips32/src/start.S

    ra52e2f4 r0407636  
    2727#
    2828
     29#include <abi/asmtool.h>
    2930#include <arch/asm/regname.h>
    3031#include <arch/mm/page.h>
     
    3839.set noreorder
    3940.set nomacro
    40 
    41 .global kernel_image_start
    42 .global tlb_refill_entry
    43 .global cache_error_entry
    44 .global exception_entry
    45 .global userspace_asm
    4641
    4742/*
     
    192187
    193188.org 0x0
    194 kernel_image_start:
     189SYMBOL(kernel_image_start)
    195190        /* load temporary stack */
    196191        lui $sp, %hi(end_stack)
     
    210205end_stack:
    211206
    212 tlb_refill_entry:
     207SYMBOL(tlb_refill_entry)
    213208        j tlb_refill_handler
    214209        nop
    215210
    216 cache_error_entry:
     211SYMBOL(cache_error_entry)
    217212        j cache_error_handler
    218213        nop
    219214
    220 exception_entry:
     215SYMBOL(exception_entry)
    221216        j exception_handler
    222217        nop
     
    345340        eret
    346341
    347 userspace_asm:
     342FUNCTION_BEGIN(userspace_asm)
    348343        move $sp, $a0
    349344        move $v0, $a1
     
    352347                           /* set it to 0 */
    353348        eret
     349FUNCTION_END(userspace_asm)
  • uspace/lib/c/arch/mips32/src/entry.S

    ra52e2f4 r0407636  
    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

    ra52e2f4 r0407636  
    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

    ra52e2f4 r0407636  
    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

    ra52e2f4 r0407636  
    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

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