]>
git.ipfire.org Git - thirdparty/glibc.git/blob - sysdeps/riscv/sys/asm.h
1 /* Miscellaneous macros.
2 Copyright (C) 2000-2019 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/>. */
22 /* Macros to handle different pointer/register sizes for 32/64-bit code. */
23 #if __riscv_xlen == 64
28 #elif __riscv_xlen == 32
29 # error "rv32i-based targets are not supported"
31 # error __riscv_xlen must equal 32 or 64
34 #if !defined __riscv_float_abi_soft
35 /* For ABI uniformity, reserve 8 bytes for floats, even if double-precision
36 floating-point is not supported in hardware. */
37 # if defined __riscv_float_abi_double
42 # error unsupported FLEN
46 /* Declare leaf routine. */
47 #define LEAF(symbol) \
50 .type symbol,@function; \
54 /* Mark end of function. */
56 #define END(function) \
58 .size function,.-function
60 /* Stack alignment. */
63 #endif /* sys/asm.h */