xref: /optee_os/lib/libutils/ext/include/riscv.S (revision 6a7d728246ca45b6d1c4f4b1f2bb8d455d3c63cb)
1/* SPDX-License-Identifier: BSD-2-Clause */
2/*
3 * Copyright (c) 2023 Andes Technology Corporation
4 */
5
6#if __riscv_xlen == 32
7#define STR       sw
8#define LDR       lw
9#define REGOFF(x) ((x) * 4)
10#elif __riscv_xlen == 64
11#define STR       sd
12#define LDR       ld
13#define REGOFF(x) ((x) * 8)
14#endif
15