3 * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
5 * SPDX-License-Identifier: GPL-2.0+
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 #include <bedbug/regs.h>
30 int cpu_post_test_string (void)
34 int flag = disable_interrupts();
38 char src [31], dst [31];
47 for (i = 0; i < sizeof(src); i ++)
53 cpu_post_exec_02(code, (ulong)src, (ulong)dst);
55 ret = memcmp(src, dst, sizeof(dst)) == 0 ? 0 : -1;
60 char src [95], dst [95];
69 for (i = 0; i < sizeof(src); i ++)
75 cpu_post_exec_04(code, (ulong)src, (ulong)dst, 0, sizeof(src));
77 ret = memcmp(src, dst, sizeof(dst)) == 0 ? 0 : -1;
82 post_log ("Error at string test !\n");