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

TOMOYO Linux Cross Reference
Linux/tools/testing/selftests/powerpc/include/gpr_asm.h

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-or-later */
  2 /*
  3  * Copyright 2016, Cyril Bur, IBM Corp.
  4  */
  5 
  6 #ifndef _SELFTESTS_POWERPC_GPR_ASM_H
  7 #define _SELFTESTS_POWERPC_GPR_ASM_H
  8 
  9 #include "basic_asm.h"
 10 
 11 #define __PUSH_NVREGS(top_pos); \
 12         std r31,(top_pos)(%r1); \
 13         std r30,(top_pos - 8)(%r1); \
 14         std r29,(top_pos - 16)(%r1); \
 15         std r28,(top_pos - 24)(%r1); \
 16         std r27,(top_pos - 32)(%r1); \
 17         std r26,(top_pos - 40)(%r1); \
 18         std r25,(top_pos - 48)(%r1); \
 19         std r24,(top_pos - 56)(%r1); \
 20         std r23,(top_pos - 64)(%r1); \
 21         std r22,(top_pos - 72)(%r1); \
 22         std r21,(top_pos - 80)(%r1); \
 23         std r20,(top_pos - 88)(%r1); \
 24         std r19,(top_pos - 96)(%r1); \
 25         std r18,(top_pos - 104)(%r1); \
 26         std r17,(top_pos - 112)(%r1); \
 27         std r16,(top_pos - 120)(%r1); \
 28         std r15,(top_pos - 128)(%r1); \
 29         std r14,(top_pos - 136)(%r1)
 30 
 31 #define __POP_NVREGS(top_pos); \
 32         ld r31,(top_pos)(%r1); \
 33         ld r30,(top_pos - 8)(%r1); \
 34         ld r29,(top_pos - 16)(%r1); \
 35         ld r28,(top_pos - 24)(%r1); \
 36         ld r27,(top_pos - 32)(%r1); \
 37         ld r26,(top_pos - 40)(%r1); \
 38         ld r25,(top_pos - 48)(%r1); \
 39         ld r24,(top_pos - 56)(%r1); \
 40         ld r23,(top_pos - 64)(%r1); \
 41         ld r22,(top_pos - 72)(%r1); \
 42         ld r21,(top_pos - 80)(%r1); \
 43         ld r20,(top_pos - 88)(%r1); \
 44         ld r19,(top_pos - 96)(%r1); \
 45         ld r18,(top_pos - 104)(%r1); \
 46         ld r17,(top_pos - 112)(%r1); \
 47         ld r16,(top_pos - 120)(%r1); \
 48         ld r15,(top_pos - 128)(%r1); \
 49         ld r14,(top_pos - 136)(%r1)
 50 
 51 #define PUSH_NVREGS(stack_size) \
 52         __PUSH_NVREGS(stack_size + STACK_FRAME_MIN_SIZE)
 53 
 54 /* 18 NV FPU REGS */
 55 #define PUSH_NVREGS_BELOW_FPU(stack_size) \
 56         __PUSH_NVREGS(stack_size + STACK_FRAME_MIN_SIZE - (18 * 8))
 57 
 58 #define POP_NVREGS(stack_size) \
 59         __POP_NVREGS(stack_size + STACK_FRAME_MIN_SIZE)
 60 
 61 /* 18 NV FPU REGS */
 62 #define POP_NVREGS_BELOW_FPU(stack_size) \
 63         __POP_NVREGS(stack_size + STACK_FRAME_MIN_SIZE - (18 * 8))
 64 
 65 /*
 66  * Careful calling this, it will 'clobber' NVGPRs (by design)
 67  * Don't call this from C
 68  */
 69 FUNC_START(load_gpr)
 70         ld      r14,0(r3)
 71         ld      r15,8(r3)
 72         ld      r16,16(r3)
 73         ld      r17,24(r3)
 74         ld      r18,32(r3)
 75         ld      r19,40(r3)
 76         ld      r20,48(r3)
 77         ld      r21,56(r3)
 78         ld      r22,64(r3)
 79         ld      r23,72(r3)
 80         ld      r24,80(r3)
 81         ld      r25,88(r3)
 82         ld      r26,96(r3)
 83         ld      r27,104(r3)
 84         ld      r28,112(r3)
 85         ld      r29,120(r3)
 86         ld      r30,128(r3)
 87         ld      r31,136(r3)
 88         blr
 89 FUNC_END(load_gpr)
 90 
 91 
 92 #endif /* _SELFTESTS_POWERPC_GPR_ASM_H */
 93 

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