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

TOMOYO Linux Cross Reference
Linux/tools/perf/arch/powerpc/tests/regs_load.S

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ 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.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0 */
  2 #include <linux/linkage.h>
  3 
  4 /* Offset is based on macros from arch/powerpc/include/uapi/asm/ptrace.h. */
  5 #define R0       0
  6 #define R1       1 * 8
  7 #define R2       2 * 8
  8 #define R3       3 * 8
  9 #define R4       4 * 8
 10 #define R5       5 * 8
 11 #define R6       6 * 8
 12 #define R7       7 * 8
 13 #define R8       8 * 8
 14 #define R9       9 * 8
 15 #define R10     10 * 8
 16 #define R11     11 * 8
 17 #define R12     12 * 8
 18 #define R13     13 * 8
 19 #define R14     14 * 8
 20 #define R15     15 * 8
 21 #define R16     16 * 8
 22 #define R17     17 * 8
 23 #define R18     18 * 8
 24 #define R19     19 * 8
 25 #define R20     20 * 8
 26 #define R21     21 * 8
 27 #define R22     22 * 8
 28 #define R23     23 * 8
 29 #define R24     24 * 8
 30 #define R25     25 * 8
 31 #define R26     26 * 8
 32 #define R27     27 * 8
 33 #define R28     28 * 8
 34 #define R29     29 * 8
 35 #define R30     30 * 8
 36 #define R31     31 * 8
 37 #define NIP     32 * 8
 38 #define CTR     35 * 8
 39 #define LINK    36 * 8
 40 #define XER     37 * 8
 41 
 42 .globl perf_regs_load
 43 perf_regs_load:
 44         std 0, R0(3)
 45         std 1, R1(3)
 46         std 2, R2(3)
 47         std 3, R3(3)
 48         std 4, R4(3)
 49         std 5, R5(3)
 50         std 6, R6(3)
 51         std 7, R7(3)
 52         std 8, R8(3)
 53         std 9, R9(3)
 54         std 10, R10(3)
 55         std 11, R11(3)
 56         std 12, R12(3)
 57         std 13, R13(3)
 58         std 14, R14(3)
 59         std 15, R15(3)
 60         std 16, R16(3)
 61         std 17, R17(3)
 62         std 18, R18(3)
 63         std 19, R19(3)
 64         std 20, R20(3)
 65         std 21, R21(3)
 66         std 22, R22(3)
 67         std 23, R23(3)
 68         std 24, R24(3)
 69         std 25, R25(3)
 70         std 26, R26(3)
 71         std 27, R27(3)
 72         std 28, R28(3)
 73         std 29, R29(3)
 74         std 30, R30(3)
 75         std 31, R31(3)
 76 
 77         /* store NIP */
 78         mflr 4
 79         std 4, NIP(3)
 80 
 81         /* Store LR */
 82         std 4, LINK(3)
 83 
 84         /* Store XER */
 85         mfxer 4
 86         std 4, XER(3)
 87 
 88         /* Store CTR */
 89         mfctr 4
 90         std 4, CTR(3)
 91 
 92         /* Restore original value of r4 */
 93         ld 4, R4(3)
 94 
 95         blr

~ [ 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