1 /* SPDX-License-Identifier: GPL-2.0 */
7 .ascii "success: switch_endian_test\n\0"
12 .8byte 0x5555AAAA5555AAAA
16 /* Load the pattern */
17 ld r15, pattern@TOC(%r2)
19 /* Setup CR, only CR2-CR4 are maintained */
24 /* Load the pattern slightly modified into the registers */
36 /* r9 - r12 are clobbered */
41 /* Skip r15 we're using it */
61 * Call the syscall to switch endian.
62 * It clobbers r9-r12, XER, CTR and CR0-1,5-7.
64 li r0, __NR_switch_endian
67 #include "check-reversed.S"
69 /* Flip back, r0 already has the switch syscall number */
70 .long 0x02000044 /* sc */
76 ld r4, message@got(%r2)
77 li r5, 28 /* strlen(message3) */