1 /* SPDX-License-Identifier: GPL-2.0 */ 2 #ifdef DEFINE_DWARF_REGSTR_TABLE 3 /* This is included in perf/util/dwarf-regs.c */ 4 5 #define REG_DWARFNUM_NAME(reg, idx) [idx] = "%" #reg 6 7 static const char * const riscv_regstr_tbl[] = { 8 REG_DWARFNUM_NAME("%zero", 0), 9 REG_DWARFNUM_NAME("%ra", 1), 10 REG_DWARFNUM_NAME("%sp", 2), 11 REG_DWARFNUM_NAME("%gp", 3), 12 REG_DWARFNUM_NAME("%tp", 4), 13 REG_DWARFNUM_NAME("%t0", 5), 14 REG_DWARFNUM_NAME("%t1", 6), 15 REG_DWARFNUM_NAME("%t2", 7), 16 REG_DWARFNUM_NAME("%s0", 8), 17 REG_DWARFNUM_NAME("%s1", 9), 18 REG_DWARFNUM_NAME("%a0", 10), 19 REG_DWARFNUM_NAME("%a1", 11), 20 REG_DWARFNUM_NAME("%a2", 12), 21 REG_DWARFNUM_NAME("%a3", 13), 22 REG_DWARFNUM_NAME("%a4", 14), 23 REG_DWARFNUM_NAME("%a5", 15), 24 REG_DWARFNUM_NAME("%a6", 16), 25 REG_DWARFNUM_NAME("%a7", 17), 26 REG_DWARFNUM_NAME("%s2", 18), 27 REG_DWARFNUM_NAME("%s3", 19), 28 REG_DWARFNUM_NAME("%s4", 20), 29 REG_DWARFNUM_NAME("%s5", 21), 30 REG_DWARFNUM_NAME("%s6", 22), 31 REG_DWARFNUM_NAME("%s7", 23), 32 REG_DWARFNUM_NAME("%s8", 24), 33 REG_DWARFNUM_NAME("%s9", 25), 34 REG_DWARFNUM_NAME("%s10", 26), 35 REG_DWARFNUM_NAME("%s11", 27), 36 REG_DWARFNUM_NAME("%t3", 28), 37 REG_DWARFNUM_NAME("%t4", 29), 38 REG_DWARFNUM_NAME("%t5", 30), 39 REG_DWARFNUM_NAME("%t6", 31), 40 }; 41 42 #endif 43