1 // SPDX-License-Identifier: GPL-2.0+
4 * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
12 * Load/store string instructions: lswi, stswi, lswx, stswx
14 * Several consecutive bytes from a source memory buffer are loaded
15 * left to right into GPRs. After that, the bytes are stored
16 * from the GPRs into a target memory buffer. The contents
17 * of the source and target buffers are then compared.
23 #if CONFIG_POST & CONFIG_SYS_POST_CPU
25 extern void cpu_post_exec_02 (ulong *code, ulong op1, ulong op2);
26 extern void cpu_post_exec_04 (ulong *code, ulong op1, ulong op2, ulong op3,
29 int cpu_post_test_string (void)
33 int flag = disable_interrupts();
37 char src [31], dst [31];
46 for (i = 0; i < sizeof(src); i ++)
52 cpu_post_exec_02(code, (ulong)src, (ulong)dst);
54 ret = memcmp(src, dst, sizeof(dst)) == 0 ? 0 : -1;
59 char src [95], dst [95];
68 for (i = 0; i < sizeof(src); i ++)
74 cpu_post_exec_04(code, (ulong)src, (ulong)dst, 0, sizeof(src));
76 ret = memcmp(src, dst, sizeof(dst)) == 0 ? 0 : -1;
81 post_log ("Error at string test !\n");