File: macros.S

package info (click to toggle)
crust-firmware 0.6-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,900 kB
  • sloc: ansic: 19,341; yacc: 596; lex: 479; makefile: 334; asm: 215; sh: 136; python: 42
file content (38 lines) | stat: -rw-r--r-- 763 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/*
 * Copyright © 2013-2017, ARM Limited and Contributors. All rights reserved.
 * Copyright © 2017-2022 The Crust Firmware Authors.
 * SPDX-License-Identifier: BSD-3-Clause
 */

#ifndef MACROS_S
#define MACROS_S

	/* This macro marks a global data declaration. */
	.macro data name
	.section .data.\name, "aw", @progbits
	.global \name
	.type \name, %object
	.align 4
\name:
	.endm

	/* This macro marks the beginning of a function. */
	.macro func name
	.section .text.\name, "ax", @progbits
	.global \name
	.type \name, %function
	.func \name
	.cfi_sections .debug_frame
	.cfi_startproc
	.align 4
\name:
	.endm

	/* This macro marks the end of a function. */
	.macro endfunc name
	.cfi_endproc
	.endfunc
	.size \name, . - \name
	.endm

#endif /* MACROS_S */