1
0
Fork 0
mirror of git://sourceware.org/git/glibc.git synced 2025-03-06 20:58:33 +01:00

LoongArch: Redefine macro LEAF/ENTRY.

The following usage of macro LEAF/ENTRY are all feasible:
1. LEAF(fcn) -- the align value of fcn is .align 3(default value)
2. LEAF(fcn, 6) -- the align value of fcn is .align 6
This commit is contained in:
dengjianbo 2023-08-08 14:15:42 +08:00 committed by caiyinyu
parent 084fb31bc2
commit 57b2c14272

View file

@ -39,16 +39,32 @@
#define FREG_L fld.d #define FREG_L fld.d
#define FREG_S fst.d #define FREG_S fst.d
/* Declare leaf routine. */ /* Declare leaf routine.
#define LEAF(symbol) \ The usage of macro LEAF/ENTRY is as follows:
.text; \ 1. LEAF(fcn) -- the align value of fcn is .align 3 (default value)
.globl symbol; \ 2. LEAF(fcn, 6) -- the align value of fcn is .align 6
.align 3; \ */
cfi_startproc; \ #define LEAF_IMPL(symbol, aln, ...) \
.type symbol, @function; \ .text; \
symbol: .globl symbol; \
.align aln; \
.type symbol, @function; \
symbol: \
cfi_startproc;
#define LEAF(...) LEAF_IMPL(__VA_ARGS__, 3)
#define ENTRY(...) LEAF(__VA_ARGS__)
#define LEAF_NO_ALIGN(symbol) \
.text; \
.globl symbol; \
.type symbol, @function; \
symbol: \
cfi_startproc;
#define ENTRY_NO_ALIGN(symbol) LEAF_NO_ALIGN(symbol)
#define ENTRY(symbol) LEAF (symbol)
/* Mark end of function. */ /* Mark end of function. */
#undef END #undef END