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

TOMOYO Linux Cross Reference
Linux/tools/testing/selftests/powerpc/math/vsx_asm.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 ] ~

Diff markup

Differences between /tools/testing/selftests/powerpc/math/vsx_asm.S (Architecture i386) and /tools/testing/selftests/powerpc/math/vsx_asm.S (Architecture sparc)


  1 /* SPDX-License-Identifier: GPL-2.0-or-later *      1 /* SPDX-License-Identifier: GPL-2.0-or-later */
  2 /*                                                  2 /*
  3  * Copyright 2015, Cyril Bur, IBM Corp.             3  * Copyright 2015, Cyril Bur, IBM Corp.
  4  */                                                 4  */
  5                                                     5 
  6 #include "basic_asm.h"                              6 #include "basic_asm.h"
  7 #include "vsx_asm.h"                                7 #include "vsx_asm.h"
  8                                                     8 
  9 #long check_vsx(vector int *r3);                    9 #long check_vsx(vector int *r3);
 10 #This function wraps storeing VSX regs to the      10 #This function wraps storeing VSX regs to the end of an array and a
 11 #call to a comparison function in C which boil     11 #call to a comparison function in C which boils down to a memcmp()
 12 FUNC_START(check_vsx)                              12 FUNC_START(check_vsx)
 13         PUSH_BASIC_STACK(32)                       13         PUSH_BASIC_STACK(32)
 14         std     r3,STACK_FRAME_PARAM(0)(sp)        14         std     r3,STACK_FRAME_PARAM(0)(sp)
 15         addi r3, r3, 16 * 12 #Second half of a     15         addi r3, r3, 16 * 12 #Second half of array
 16         bl store_vsx                               16         bl store_vsx
 17         ld r3,STACK_FRAME_PARAM(0)(sp)             17         ld r3,STACK_FRAME_PARAM(0)(sp)
 18         bl vsx_memcmp                              18         bl vsx_memcmp
 19         POP_BASIC_STACK(32)                        19         POP_BASIC_STACK(32)
 20         blr                                        20         blr
 21 FUNC_END(check_vsx)                                21 FUNC_END(check_vsx)
 22                                                    22 
 23 # int preempt_vmx(vector int *varray, int *thr     23 # int preempt_vmx(vector int *varray, int *threads_starting,
 24 #                 int *running);                   24 #                 int *running);
 25 # On starting will (atomically) decrement thre     25 # On starting will (atomically) decrement threads_starting as a signal
 26 # that the VMX have been loaded with varray. W     26 # that the VMX have been loaded with varray. Will proceed to check the
 27 # validity of the VMX registers while running      27 # validity of the VMX registers while running is not zero.
 28 FUNC_START(preempt_vsx)                            28 FUNC_START(preempt_vsx)
 29         PUSH_BASIC_STACK(512)                      29         PUSH_BASIC_STACK(512)
 30         std r3,STACK_FRAME_PARAM(0)(sp) # vect     30         std r3,STACK_FRAME_PARAM(0)(sp) # vector int *varray
 31         std r4,STACK_FRAME_PARAM(1)(sp) # int      31         std r4,STACK_FRAME_PARAM(1)(sp) # int *threads_starting
 32         std r5,STACK_FRAME_PARAM(2)(sp) # int      32         std r5,STACK_FRAME_PARAM(2)(sp) # int *running
 33                                                    33 
 34         bl load_vsx                                34         bl load_vsx
 35         nop                                        35         nop
 36                                                    36 
 37         sync                                       37         sync
 38         # Atomic DEC                               38         # Atomic DEC
 39         ld r3,STACK_FRAME_PARAM(1)(sp)             39         ld r3,STACK_FRAME_PARAM(1)(sp)
 40 1:      lwarx r4,0,r3                              40 1:      lwarx r4,0,r3
 41         addi r4,r4,-1                              41         addi r4,r4,-1
 42         stwcx. r4,0,r3                             42         stwcx. r4,0,r3
 43         bne- 1b                                    43         bne- 1b
 44                                                    44 
 45 2:      ld r3,STACK_FRAME_PARAM(0)(sp)             45 2:      ld r3,STACK_FRAME_PARAM(0)(sp)
 46         bl check_vsx                               46         bl check_vsx
 47         nop                                        47         nop
 48         cmpdi r3,0                                 48         cmpdi r3,0
 49         bne 3f                                     49         bne 3f
 50         ld r4,STACK_FRAME_PARAM(2)(sp)             50         ld r4,STACK_FRAME_PARAM(2)(sp)
 51         ld r5,0(r4)                                51         ld r5,0(r4)
 52         cmpwi r5,0                                 52         cmpwi r5,0
 53         bne 2b                                     53         bne 2b
 54                                                    54 
 55 3:      POP_BASIC_STACK(512)                       55 3:      POP_BASIC_STACK(512)
 56         blr                                        56         blr
 57 FUNC_END(preempt_vsx)                              57 FUNC_END(preempt_vsx)
                                                      

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