15000e7f6SLeo Yan // SPDX-License-Identifier: GPL-2.0 25000e7f6SLeo Yan 35000e7f6SLeo Yan #include "../perf_regs.h" 45000e7f6SLeo Yan #include "../../../arch/mips/include/uapi/asm/perf_regs.h" 55000e7f6SLeo Yan __perf_reg_name_mips(int id)65000e7f6SLeo Yanconst char *__perf_reg_name_mips(int id) 75000e7f6SLeo Yan { 85000e7f6SLeo Yan switch (id) { 95000e7f6SLeo Yan case PERF_REG_MIPS_PC: 105000e7f6SLeo Yan return "PC"; 115000e7f6SLeo Yan case PERF_REG_MIPS_R1: 125000e7f6SLeo Yan return "$1"; 135000e7f6SLeo Yan case PERF_REG_MIPS_R2: 145000e7f6SLeo Yan return "$2"; 155000e7f6SLeo Yan case PERF_REG_MIPS_R3: 165000e7f6SLeo Yan return "$3"; 175000e7f6SLeo Yan case PERF_REG_MIPS_R4: 185000e7f6SLeo Yan return "$4"; 195000e7f6SLeo Yan case PERF_REG_MIPS_R5: 205000e7f6SLeo Yan return "$5"; 215000e7f6SLeo Yan case PERF_REG_MIPS_R6: 225000e7f6SLeo Yan return "$6"; 235000e7f6SLeo Yan case PERF_REG_MIPS_R7: 245000e7f6SLeo Yan return "$7"; 255000e7f6SLeo Yan case PERF_REG_MIPS_R8: 265000e7f6SLeo Yan return "$8"; 275000e7f6SLeo Yan case PERF_REG_MIPS_R9: 285000e7f6SLeo Yan return "$9"; 295000e7f6SLeo Yan case PERF_REG_MIPS_R10: 305000e7f6SLeo Yan return "$10"; 315000e7f6SLeo Yan case PERF_REG_MIPS_R11: 325000e7f6SLeo Yan return "$11"; 335000e7f6SLeo Yan case PERF_REG_MIPS_R12: 345000e7f6SLeo Yan return "$12"; 355000e7f6SLeo Yan case PERF_REG_MIPS_R13: 365000e7f6SLeo Yan return "$13"; 375000e7f6SLeo Yan case PERF_REG_MIPS_R14: 385000e7f6SLeo Yan return "$14"; 395000e7f6SLeo Yan case PERF_REG_MIPS_R15: 405000e7f6SLeo Yan return "$15"; 415000e7f6SLeo Yan case PERF_REG_MIPS_R16: 425000e7f6SLeo Yan return "$16"; 435000e7f6SLeo Yan case PERF_REG_MIPS_R17: 445000e7f6SLeo Yan return "$17"; 455000e7f6SLeo Yan case PERF_REG_MIPS_R18: 465000e7f6SLeo Yan return "$18"; 475000e7f6SLeo Yan case PERF_REG_MIPS_R19: 485000e7f6SLeo Yan return "$19"; 495000e7f6SLeo Yan case PERF_REG_MIPS_R20: 505000e7f6SLeo Yan return "$20"; 515000e7f6SLeo Yan case PERF_REG_MIPS_R21: 525000e7f6SLeo Yan return "$21"; 535000e7f6SLeo Yan case PERF_REG_MIPS_R22: 545000e7f6SLeo Yan return "$22"; 555000e7f6SLeo Yan case PERF_REG_MIPS_R23: 565000e7f6SLeo Yan return "$23"; 575000e7f6SLeo Yan case PERF_REG_MIPS_R24: 585000e7f6SLeo Yan return "$24"; 595000e7f6SLeo Yan case PERF_REG_MIPS_R25: 605000e7f6SLeo Yan return "$25"; 615000e7f6SLeo Yan case PERF_REG_MIPS_R28: 625000e7f6SLeo Yan return "$28"; 635000e7f6SLeo Yan case PERF_REG_MIPS_R29: 645000e7f6SLeo Yan return "$29"; 655000e7f6SLeo Yan case PERF_REG_MIPS_R30: 665000e7f6SLeo Yan return "$30"; 675000e7f6SLeo Yan case PERF_REG_MIPS_R31: 685000e7f6SLeo Yan return "$31"; 695000e7f6SLeo Yan default: 705000e7f6SLeo Yan break; 715000e7f6SLeo Yan } 725000e7f6SLeo Yan return NULL; 735000e7f6SLeo Yan } 745000e7f6SLeo Yan __perf_reg_ip_mips(void)75*34af56afSLeo Yanuint64_t __perf_reg_ip_mips(void) 76*34af56afSLeo Yan { 77*34af56afSLeo Yan return PERF_REG_MIPS_PC; 78*34af56afSLeo Yan } 79*34af56afSLeo Yan __perf_reg_sp_mips(void)80*34af56afSLeo Yanuint64_t __perf_reg_sp_mips(void) 81*34af56afSLeo Yan { 82*34af56afSLeo Yan return PERF_REG_MIPS_R29; 83*34af56afSLeo Yan } 84