xref: /linux/tools/perf/arch/powerpc/include/dwarf-regs-table.h (revision 498495dba268b20e8eadd7fe93c140c68b6cc9d2)
1*b2441318SGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 */
2293d5b43SMasami Hiramatsu #ifdef DEFINE_DWARF_REGSTR_TABLE
3293d5b43SMasami Hiramatsu /* This is included in perf/util/dwarf-regs.c */
4293d5b43SMasami Hiramatsu 
5293d5b43SMasami Hiramatsu /*
6293d5b43SMasami Hiramatsu  * Reference:
7293d5b43SMasami Hiramatsu  * http://refspecs.linuxfoundation.org/ELF/ppc64/PPC-elf64abi-1.9.html
8293d5b43SMasami Hiramatsu  * http://refspecs.linux-foundation.org/elf/elfspec_ppc.pdf
9293d5b43SMasami Hiramatsu  */
10293d5b43SMasami Hiramatsu #define REG_DWARFNUM_NAME(reg, idx)	[idx] = "%" #reg
11293d5b43SMasami Hiramatsu 
12293d5b43SMasami Hiramatsu static const char * const powerpc_regstr_tbl[] = {
13293d5b43SMasami Hiramatsu 	"%gpr0", "%gpr1", "%gpr2", "%gpr3", "%gpr4",
14293d5b43SMasami Hiramatsu 	"%gpr5", "%gpr6", "%gpr7", "%gpr8", "%gpr9",
15293d5b43SMasami Hiramatsu 	"%gpr10", "%gpr11", "%gpr12", "%gpr13", "%gpr14",
16293d5b43SMasami Hiramatsu 	"%gpr15", "%gpr16", "%gpr17", "%gpr18", "%gpr19",
17293d5b43SMasami Hiramatsu 	"%gpr20", "%gpr21", "%gpr22", "%gpr23", "%gpr24",
18293d5b43SMasami Hiramatsu 	"%gpr25", "%gpr26", "%gpr27", "%gpr28", "%gpr29",
19293d5b43SMasami Hiramatsu 	"%gpr30", "%gpr31",
20293d5b43SMasami Hiramatsu 	REG_DWARFNUM_NAME(msr,   66),
21293d5b43SMasami Hiramatsu 	REG_DWARFNUM_NAME(ctr,   109),
22293d5b43SMasami Hiramatsu 	REG_DWARFNUM_NAME(link,  108),
23293d5b43SMasami Hiramatsu 	REG_DWARFNUM_NAME(xer,   101),
24293d5b43SMasami Hiramatsu 	REG_DWARFNUM_NAME(dar,   119),
25293d5b43SMasami Hiramatsu 	REG_DWARFNUM_NAME(dsisr, 118),
26293d5b43SMasami Hiramatsu };
27293d5b43SMasami Hiramatsu 
28293d5b43SMasami Hiramatsu #endif
29