~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/tools/perf/util/perf-regs-arch/perf_regs_loongarch.c

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 // SPDX-License-Identifier: GPL-2.0
  2 
  3 #include "../perf_regs.h"
  4 #include "../../../arch/loongarch/include/uapi/asm/perf_regs.h"
  5 
  6 const char *__perf_reg_name_loongarch(int id)
  7 {
  8         switch (id) {
  9         case PERF_REG_LOONGARCH_PC:
 10                 return "PC";
 11         case PERF_REG_LOONGARCH_R1:
 12                 return "%r1";
 13         case PERF_REG_LOONGARCH_R2:
 14                 return "%r2";
 15         case PERF_REG_LOONGARCH_R3:
 16                 return "%r3";
 17         case PERF_REG_LOONGARCH_R4:
 18                 return "%r4";
 19         case PERF_REG_LOONGARCH_R5:
 20                 return "%r5";
 21         case PERF_REG_LOONGARCH_R6:
 22                 return "%r6";
 23         case PERF_REG_LOONGARCH_R7:
 24                 return "%r7";
 25         case PERF_REG_LOONGARCH_R8:
 26                 return "%r8";
 27         case PERF_REG_LOONGARCH_R9:
 28                 return "%r9";
 29         case PERF_REG_LOONGARCH_R10:
 30                 return "%r10";
 31         case PERF_REG_LOONGARCH_R11:
 32                 return "%r11";
 33         case PERF_REG_LOONGARCH_R12:
 34                 return "%r12";
 35         case PERF_REG_LOONGARCH_R13:
 36                 return "%r13";
 37         case PERF_REG_LOONGARCH_R14:
 38                 return "%r14";
 39         case PERF_REG_LOONGARCH_R15:
 40                 return "%r15";
 41         case PERF_REG_LOONGARCH_R16:
 42                 return "%r16";
 43         case PERF_REG_LOONGARCH_R17:
 44                 return "%r17";
 45         case PERF_REG_LOONGARCH_R18:
 46                 return "%r18";
 47         case PERF_REG_LOONGARCH_R19:
 48                 return "%r19";
 49         case PERF_REG_LOONGARCH_R20:
 50                 return "%r20";
 51         case PERF_REG_LOONGARCH_R21:
 52                 return "%r21";
 53         case PERF_REG_LOONGARCH_R22:
 54                 return "%r22";
 55         case PERF_REG_LOONGARCH_R23:
 56                 return "%r23";
 57         case PERF_REG_LOONGARCH_R24:
 58                 return "%r24";
 59         case PERF_REG_LOONGARCH_R25:
 60                 return "%r25";
 61         case PERF_REG_LOONGARCH_R26:
 62                 return "%r26";
 63         case PERF_REG_LOONGARCH_R27:
 64                 return "%r27";
 65         case PERF_REG_LOONGARCH_R28:
 66                 return "%r28";
 67         case PERF_REG_LOONGARCH_R29:
 68                 return "%r29";
 69         case PERF_REG_LOONGARCH_R30:
 70                 return "%r30";
 71         case PERF_REG_LOONGARCH_R31:
 72                 return "%r31";
 73         default:
 74                 break;
 75         }
 76         return NULL;
 77 }
 78 
 79 uint64_t __perf_reg_ip_loongarch(void)
 80 {
 81         return PERF_REG_LOONGARCH_PC;
 82 }
 83 
 84 uint64_t __perf_reg_sp_loongarch(void)
 85 {
 86         return PERF_REG_LOONGARCH_R3;
 87 }
 88 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php