1 /* Assembler macro definitions. OpenRISC version.
2 Copyright (C) 2022-2024 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library. If not, see
17 <https://www.gnu.org/licenses/>. */
19 #include <sysdeps/generic/sysdep.h>
22 #if defined __ASSEMBLER__ || defined REQUEST_ASSEMBLER_MACROS
24 /* Make use of .size directive. */
25 #define ASM_SIZE_DIRECTIVE(name) .size name,.-name;
27 /* Define an entry point visible from C. */
29 .globl C_SYMBOL_NAME(name); \
30 .type C_SYMBOL_NAME(name),@function; \
39 ASM_SIZE_DIRECTIVE(name)
41 /* Since C identifiers are not normally prefixed with an underscore
42 on this system, the asm identifier `syscall_error' intrudes on the
43 C name space. Make sure we use an innocuous name. */
44 #define syscall_error __syscall_error
46 /* If compiled for profiling, call `mcount' at the start of each function. */
49 # define CALL_MCOUNT \
60 # define CALL_MCOUNT \
65 l.movhi r15, hi(_mcount); \
66 l.ori r15, r15, lo(_mcount); \
74 # define CALL_MCOUNT /* Do nothing. */
77 /* Local label name for asm code. */
78 #define L(name) .L##name
80 #endif /* __ASSEMBLER__ */