xref: /linux/tools/perf/arch/s390/include/dwarf-regs-table.h (revision 664b0bae0b87f69bc9deb098f5e0158b9cf18e04)
1b2441318SGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 */
2*a9fc2db0SHendrik Brueckner #ifndef S390_DWARF_REGS_TABLE_H
3*a9fc2db0SHendrik Brueckner #define S390_DWARF_REGS_TABLE_H
4*a9fc2db0SHendrik Brueckner 
5*a9fc2db0SHendrik Brueckner #define REG_DWARFNUM_NAME(reg, idx)	[idx] = "%" #reg
6*a9fc2db0SHendrik Brueckner 
7*a9fc2db0SHendrik Brueckner /*
8*a9fc2db0SHendrik Brueckner  * For reference, see DWARF register mapping:
9*a9fc2db0SHendrik Brueckner  * http://refspecs.linuxfoundation.org/ELF/zSeries/lzsabi0_s390/x1542.html
10*a9fc2db0SHendrik Brueckner  */
11*a9fc2db0SHendrik Brueckner static const char * const s390_dwarf_regs[] = {
12*a9fc2db0SHendrik Brueckner 	"%r0", "%r1",  "%r2",  "%r3",  "%r4",  "%r5",  "%r6",  "%r7",
13*a9fc2db0SHendrik Brueckner 	"%r8", "%r9", "%r10", "%r11", "%r12", "%r13", "%r14", "%r15",
14*a9fc2db0SHendrik Brueckner 	REG_DWARFNUM_NAME(f0, 16),
15*a9fc2db0SHendrik Brueckner 	REG_DWARFNUM_NAME(f1, 20),
16*a9fc2db0SHendrik Brueckner 	REG_DWARFNUM_NAME(f2, 17),
17*a9fc2db0SHendrik Brueckner 	REG_DWARFNUM_NAME(f3, 21),
18*a9fc2db0SHendrik Brueckner 	REG_DWARFNUM_NAME(f4, 18),
19*a9fc2db0SHendrik Brueckner 	REG_DWARFNUM_NAME(f5, 22),
20*a9fc2db0SHendrik Brueckner 	REG_DWARFNUM_NAME(f6, 19),
21*a9fc2db0SHendrik Brueckner 	REG_DWARFNUM_NAME(f7, 23),
22*a9fc2db0SHendrik Brueckner 	REG_DWARFNUM_NAME(f8, 24),
23*a9fc2db0SHendrik Brueckner 	REG_DWARFNUM_NAME(f9, 28),
24*a9fc2db0SHendrik Brueckner 	REG_DWARFNUM_NAME(f10, 25),
25*a9fc2db0SHendrik Brueckner 	REG_DWARFNUM_NAME(f11, 29),
26*a9fc2db0SHendrik Brueckner 	REG_DWARFNUM_NAME(f12, 26),
27*a9fc2db0SHendrik Brueckner 	REG_DWARFNUM_NAME(f13, 30),
28*a9fc2db0SHendrik Brueckner 	REG_DWARFNUM_NAME(f14, 27),
29*a9fc2db0SHendrik Brueckner 	REG_DWARFNUM_NAME(f15, 31),
30*a9fc2db0SHendrik Brueckner 	REG_DWARFNUM_NAME(c0, 32),
31*a9fc2db0SHendrik Brueckner 	REG_DWARFNUM_NAME(c1, 33),
32*a9fc2db0SHendrik Brueckner 	REG_DWARFNUM_NAME(c2, 34),
33*a9fc2db0SHendrik Brueckner 	REG_DWARFNUM_NAME(c3, 35),
34*a9fc2db0SHendrik Brueckner 	REG_DWARFNUM_NAME(c4, 36),
35*a9fc2db0SHendrik Brueckner 	REG_DWARFNUM_NAME(c5, 37),
36*a9fc2db0SHendrik Brueckner 	REG_DWARFNUM_NAME(c6, 38),
37*a9fc2db0SHendrik Brueckner 	REG_DWARFNUM_NAME(c7, 39),
38*a9fc2db0SHendrik Brueckner 	REG_DWARFNUM_NAME(c8, 40),
39*a9fc2db0SHendrik Brueckner 	REG_DWARFNUM_NAME(c9, 41),
40*a9fc2db0SHendrik Brueckner 	REG_DWARFNUM_NAME(c10, 42),
41*a9fc2db0SHendrik Brueckner 	REG_DWARFNUM_NAME(c11, 43),
42*a9fc2db0SHendrik Brueckner 	REG_DWARFNUM_NAME(c12, 44),
43*a9fc2db0SHendrik Brueckner 	REG_DWARFNUM_NAME(c13, 45),
44*a9fc2db0SHendrik Brueckner 	REG_DWARFNUM_NAME(c14, 46),
45*a9fc2db0SHendrik Brueckner 	REG_DWARFNUM_NAME(c15, 47),
46*a9fc2db0SHendrik Brueckner 	REG_DWARFNUM_NAME(a0, 48),
47*a9fc2db0SHendrik Brueckner 	REG_DWARFNUM_NAME(a1, 49),
48*a9fc2db0SHendrik Brueckner 	REG_DWARFNUM_NAME(a2, 50),
49*a9fc2db0SHendrik Brueckner 	REG_DWARFNUM_NAME(a3, 51),
50*a9fc2db0SHendrik Brueckner 	REG_DWARFNUM_NAME(a4, 52),
51*a9fc2db0SHendrik Brueckner 	REG_DWARFNUM_NAME(a5, 53),
52*a9fc2db0SHendrik Brueckner 	REG_DWARFNUM_NAME(a6, 54),
53*a9fc2db0SHendrik Brueckner 	REG_DWARFNUM_NAME(a7, 55),
54*a9fc2db0SHendrik Brueckner 	REG_DWARFNUM_NAME(a8, 56),
55*a9fc2db0SHendrik Brueckner 	REG_DWARFNUM_NAME(a9, 57),
56*a9fc2db0SHendrik Brueckner 	REG_DWARFNUM_NAME(a10, 58),
57*a9fc2db0SHendrik Brueckner 	REG_DWARFNUM_NAME(a11, 59),
58*a9fc2db0SHendrik Brueckner 	REG_DWARFNUM_NAME(a12, 60),
59*a9fc2db0SHendrik Brueckner 	REG_DWARFNUM_NAME(a13, 61),
60*a9fc2db0SHendrik Brueckner 	REG_DWARFNUM_NAME(a14, 62),
61*a9fc2db0SHendrik Brueckner 	REG_DWARFNUM_NAME(a15, 63),
62*a9fc2db0SHendrik Brueckner 	REG_DWARFNUM_NAME(pswm, 64),
63*a9fc2db0SHendrik Brueckner 	REG_DWARFNUM_NAME(pswa, 65),
64*a9fc2db0SHendrik Brueckner };
65*a9fc2db0SHendrik Brueckner 
66293d5b43SMasami Hiramatsu #ifdef DEFINE_DWARF_REGSTR_TABLE
67293d5b43SMasami Hiramatsu /* This is included in perf/util/dwarf-regs.c */
68293d5b43SMasami Hiramatsu 
69*a9fc2db0SHendrik Brueckner #define s390_regstr_tbl s390_dwarf_regs
70*a9fc2db0SHendrik Brueckner 
71*a9fc2db0SHendrik Brueckner #endif	/* DEFINE_DWARF_REGSTR_TABLE */
72*a9fc2db0SHendrik Brueckner #endif	/* S390_DWARF_REGS_TABLE_H */
73