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

TOMOYO Linux Cross Reference
Linux/tools/testing/selftests/powerpc/switch_endian/check.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 "common.h"
  3 
  4 /*
  5  * Checks that registers contain what we expect, ie. they were not clobbered by
  6  * the syscall.
  7  *
  8  * r15: pattern to check registers against.
  9  *
 10  * At the end r3 == 0 if everything's OK.
 11  */
 12         nop                     # guaranteed to be illegal in reverse-endian
 13         mr      r9,r15
 14         cmpd    r9,r3           # check r3
 15         bne     1f
 16         addi    r9,r15,4        # check r4
 17         cmpd    r9,r4
 18         bne     1f
 19         lis     r9,0x00FF       # check CR
 20         ori     r9,r9,0xF000
 21         mfcr    r10
 22         and     r10,r10,r9
 23         cmpw    r9,r10
 24         addi    r9,r15,34
 25         bne     1f
 26         addi    r9,r15,32       # check LR
 27         mflr    r10
 28         cmpd    r9,r10
 29         bne     1f
 30         addi    r9,r15,5        # check r5
 31         cmpd    r9,r5
 32         bne     1f
 33         addi    r9,r15,6        # check r6
 34         cmpd    r9,r6
 35         bne     1f
 36         addi    r9,r15,7        # check r7
 37         cmpd    r9,r7
 38         bne     1f
 39         addi    r9,r15,8        # check r8
 40         cmpd    r9,r8
 41         bne     1f
 42         addi    r9,r15,13       # check r13
 43         cmpd    r9,r13
 44         bne     1f
 45         addi    r9,r15,14       # check r14
 46         cmpd    r9,r14
 47         bne     1f
 48         addi    r9,r15,16       # check r16
 49         cmpd    r9,r16
 50         bne     1f
 51         addi    r9,r15,17       # check r17
 52         cmpd    r9,r17
 53         bne     1f
 54         addi    r9,r15,18       # check r18
 55         cmpd    r9,r18
 56         bne     1f
 57         addi    r9,r15,19       # check r19
 58         cmpd    r9,r19
 59         bne     1f
 60         addi    r9,r15,20       # check r20
 61         cmpd    r9,r20
 62         bne     1f
 63         addi    r9,r15,21       # check r21
 64         cmpd    r9,r21
 65         bne     1f
 66         addi    r9,r15,22       # check r22
 67         cmpd    r9,r22
 68         bne     1f
 69         addi    r9,r15,23       # check r23
 70         cmpd    r9,r23
 71         bne     1f
 72         addi    r9,r15,24       # check r24
 73         cmpd    r9,r24
 74         bne     1f
 75         addi    r9,r15,25       # check r25
 76         cmpd    r9,r25
 77         bne     1f
 78         addi    r9,r15,26       # check r26
 79         cmpd    r9,r26
 80         bne     1f
 81         addi    r9,r15,27       # check r27
 82         cmpd    r9,r27
 83         bne     1f
 84         addi    r9,r15,28       # check r28
 85         cmpd    r9,r28
 86         bne     1f
 87         addi    r9,r15,29       # check r29
 88         cmpd    r9,r29
 89         bne     1f
 90         addi    r9,r15,30       # check r30
 91         cmpd    r9,r30
 92         bne     1f
 93         addi    r9,r15,31       # check r31
 94         cmpd    r9,r31
 95         bne     1f
 96         b       2f
 97 1:      mr      r3, r9
 98         li      r0, __NR_exit
 99         sc
100 2:      li      r0, __NR_switch_endian
101         nop

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