xref: /optee_os/lib/libutils/ext/include/riscv.S (revision dcf343a27c2823b9341988b82f353ae1676a99ff)
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