1 /* Copyright (c) 2017 SiFive Inc. All rights reserved.
3 This copyrighted material is made available to anyone wishing to use,
4 modify, copy, or redistribute it subject to the terms and conditions
5 of the FreeBSD License. This program is distributed in the hope that
6 it will be useful, but WITHOUT ANY WARRANTY expressed or implied,
7 including the implied warranties of MERCHANTABILITY or FITNESS FOR
8 A PARTICULAR PURPOSE. A copy of this license is available at
9 http://www.opensource.org/licenses.
16 * Macros to handle different pointer/register sizes for 32/64-bit code
18 #if __riscv_xlen == 64
23 #elif __riscv_xlen == 32
29 # error __riscv_xlen must equal 32 or 64
32 #ifndef __riscv_float_abi_soft
33 /* For ABI uniformity, reserve 8 bytes for floats, even if double-precision
34 floating-point is not supported in hardware. */
36 # ifdef __riscv_float_abi_single
39 # elif defined(__riscv_float_abi_double)
42 # elif defined(__riscv_float_abi_quad)
46 # error unsupported FLEN
50 #endif /* sys/asm.h */