diff options
author | Len Brown <len.brown@intel.com> | 2011-01-12 18:06:06 -0500 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2011-01-12 18:06:06 -0500 |
commit | 56dbed129df3fdd4caf9018b6e7599ee258a5420 (patch) | |
tree | b902491aef3a99efe0d9d49edd0f6e414dba654f /tools/perf/arch/s390/util/dwarf-regs.c | |
parent | 2a2d31c8dc6f1ebcf5eab1d93a0cb0fb4ed57c7c (diff) | |
parent | f878133bf022717b880d0e0995b8f91436fd605c (diff) |
Merge branch 'linus' into idle-test
Diffstat (limited to 'tools/perf/arch/s390/util/dwarf-regs.c')
-rw-r--r-- | tools/perf/arch/s390/util/dwarf-regs.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tools/perf/arch/s390/util/dwarf-regs.c b/tools/perf/arch/s390/util/dwarf-regs.c new file mode 100644 index 00000000000..e19653e025f --- /dev/null +++ b/tools/perf/arch/s390/util/dwarf-regs.c @@ -0,0 +1,22 @@ +/* + * Mapping of DWARF debug register numbers into register names. + * + * Copyright IBM Corp. 2010 + * Author(s): Heiko Carstens <heiko.carstens@de.ibm.com>, + * + */ + +#include <libio.h> +#include <dwarf-regs.h> + +#define NUM_GPRS 16 + +static const char *gpr_names[NUM_GPRS] = { + "%r0", "%r1", "%r2", "%r3", "%r4", "%r5", "%r6", "%r7", + "%r8", "%r9", "%r10", "%r11", "%r12", "%r13", "%r14", "%r15", +}; + +const char *get_arch_regstr(unsigned int n) +{ + return (n >= NUM_GPRS) ? NULL : gpr_names[n]; +} |