1/*
2 * Copyright (c) 2020 Raspberry Pi (Trading) Ltd.
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
7#include "pico.h"
8
9# note we don't do this by default in this file for backwards comaptibility with user code
10# that may include this file, but not use unified syntax. Note that this macro does equivalent
11# setup to the pico_default_asm macro for inline assembly in C code.
12.macro pico_default_asm_setup
13.syntax unified
14.cpu cortex-m0plus
15.thumb
16.endm
17
18// do not put align in here as it is used mid function sometimes
19.macro regular_func x
20.global \x
21.type \x,%function
22.thumb_func
23\x:
24.endm
25
26.macro regular_func_with_section x
27.section .text.\x
28regular_func \x
29.endm
30
31// do not put align in here as it is used mid function sometimes
32.macro wrapper_func x
33regular_func WRAPPER_FUNC_NAME(\x)
34.endm
35
36.macro __pre_init func, priority_string
37.section .preinit_array.\priority_string
38.align 2
39.word \func
40.endm
41
42