xref: /optee_os/lib/libutils/ext/include/asm.S (revision 827be46c173f31c57006af70ca3a15a5b1a7fba3)
1/* SPDX-License-Identifier: BSD-2-Clause */
2/*
3 * Copyright (c) 2014, STMicroelectronics International N.V.
4 */
5
6#if defined(CFG_UNWIND)
7#define UNWIND(...) __VA_ARGS__
8#else
9#define UNWIND(...)
10#endif
11
12	.macro FUNC name colon section=default
13	.ifc	\section\(),default
14	.section .text.\name
15	.else
16	.section \section , "ax" , %progbits
17	.endif
18	.global \name
19	.type \name , %function
20	.balign 4
21	\name \colon
22	.endm
23
24	.macro DATA name colon
25	.global \name
26	.type \name , %object
27	\name \colon
28	.endm
29
30	.macro LOCAL_FUNC name colon section=default
31	.ifc	\section\(),default
32	.section .text.\name
33	.else
34	.section \section , "ax" , %progbits
35	.endif
36	.type \name , %function
37	.balign 4
38	\name \colon
39	.endm
40
41	.macro LOCAL_DATA name colon
42	.type \name , %object
43	\name \colon
44	.endm
45
46	.macro END_DATA name
47	.size \name , .-\name
48	.endm
49
50	.macro END_FUNC name
51	.size \name , .-\name
52	.endm
53