Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/evalenti/linux...
[linux/fpc-iii.git] / tools / perf / arch / s390 / util / dwarf-regs.c
blob0469df02ee62725f352a8a6c337b86ae162ec0c7
1 /*
2 * Mapping of DWARF debug register numbers into register names.
4 * Copyright IBM Corp. 2010
5 * Author(s): Heiko Carstens <heiko.carstens@de.ibm.com>,
7 */
9 #include <stddef.h>
10 #include <dwarf-regs.h>
12 #define NUM_GPRS 16
14 static const char *gpr_names[NUM_GPRS] = {
15 "%r0", "%r1", "%r2", "%r3", "%r4", "%r5", "%r6", "%r7",
16 "%r8", "%r9", "%r10", "%r11", "%r12", "%r13", "%r14", "%r15",
19 const char *get_arch_regstr(unsigned int n)
21 return (n >= NUM_GPRS) ? NULL : gpr_names[n];