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