1 /* This file defines the interface between the RISC-V simulator and GDB.
3 Copyright (C) 2005-2025 Free Software Foundation, Inc.
4 Contributed by Mike Frysinger.
6 This file is part of GDB.
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 3 of the License, or
11 (at your option) any later version.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program. If not, see <http://www.gnu.org/licenses/>. */
21 /* Order has to match gdb riscv-tdep list. */
22 enum sim_riscv_regnum
{
23 SIM_RISCV_ZERO_REGNUM
= 0,
32 #define SIM_RISCV_FP_REGNUM SIM_RISCV_S0_REGNUM
58 #define SIM_RISCV_FIRST_FP_REGNUM SIM_RISCV_FT0_REGNUM
84 SIM_RISCV_FS10_REGNUM
,
85 SIM_RISCV_FS11_REGNUM
,
88 SIM_RISCV_FT10_REGNUM
,
89 SIM_RISCV_FT11_REGNUM
,
90 #define SIM_RISCV_LAST_FP_REGNUM SIM_RISCV_FT11_REGNUM
92 #define SIM_RISCV_FIRST_CSR_REGNUM SIM_RISCV_LAST_FP_REGNUM + 1
93 #define DECLARE_CSR(name, num, ...) SIM_RISCV_ ## num ## _REGNUM,
94 #include "opcode/riscv-opc.h"
96 #define SIM_RISCV_LAST_CSR_REGNUM SIM_RISCV_LAST_REGNUM - 1