1 // SPDX-License-Identifier: GPL-2.0 2 3 #include "../perf_regs.h" 4 #include "../../../arch/arm64/include/uapi/asm/perf_regs.h" 5 __perf_reg_name_arm64(int id)6const char *__perf_reg_name_arm64(int id) 7 { 8 switch (id) { 9 case PERF_REG_ARM64_X0: 10 return "x0"; 11 case PERF_REG_ARM64_X1: 12 return "x1"; 13 case PERF_REG_ARM64_X2: 14 return "x2"; 15 case PERF_REG_ARM64_X3: 16 return "x3"; 17 case PERF_REG_ARM64_X4: 18 return "x4"; 19 case PERF_REG_ARM64_X5: 20 return "x5"; 21 case PERF_REG_ARM64_X6: 22 return "x6"; 23 case PERF_REG_ARM64_X7: 24 return "x7"; 25 case PERF_REG_ARM64_X8: 26 return "x8"; 27 case PERF_REG_ARM64_X9: 28 return "x9"; 29 case PERF_REG_ARM64_X10: 30 return "x10"; 31 case PERF_REG_ARM64_X11: 32 return "x11"; 33 case PERF_REG_ARM64_X12: 34 return "x12"; 35 case PERF_REG_ARM64_X13: 36 return "x13"; 37 case PERF_REG_ARM64_X14: 38 return "x14"; 39 case PERF_REG_ARM64_X15: 40 return "x15"; 41 case PERF_REG_ARM64_X16: 42 return "x16"; 43 case PERF_REG_ARM64_X17: 44 return "x17"; 45 case PERF_REG_ARM64_X18: 46 return "x18"; 47 case PERF_REG_ARM64_X19: 48 return "x19"; 49 case PERF_REG_ARM64_X20: 50 return "x20"; 51 case PERF_REG_ARM64_X21: 52 return "x21"; 53 case PERF_REG_ARM64_X22: 54 return "x22"; 55 case PERF_REG_ARM64_X23: 56 return "x23"; 57 case PERF_REG_ARM64_X24: 58 return "x24"; 59 case PERF_REG_ARM64_X25: 60 return "x25"; 61 case PERF_REG_ARM64_X26: 62 return "x26"; 63 case PERF_REG_ARM64_X27: 64 return "x27"; 65 case PERF_REG_ARM64_X28: 66 return "x28"; 67 case PERF_REG_ARM64_X29: 68 return "x29"; 69 case PERF_REG_ARM64_SP: 70 return "sp"; 71 case PERF_REG_ARM64_LR: 72 return "lr"; 73 case PERF_REG_ARM64_PC: 74 return "pc"; 75 case PERF_REG_ARM64_VG: 76 return "vg"; 77 default: 78 return NULL; 79 } 80 81 return NULL; 82 } 83 __perf_reg_ip_arm64(void)84uint64_t __perf_reg_ip_arm64(void) 85 { 86 return PERF_REG_ARM64_PC; 87 } 88 __perf_reg_sp_arm64(void)89uint64_t __perf_reg_sp_arm64(void) 90 { 91 return PERF_REG_ARM64_SP; 92 } 93