Lines Matching +full:0 +full:x1234
19 #define IGNORE_GPR(n) (0x1UL << (n))
20 #define IGNORE_XER (0x1UL << 32)
21 #define IGNORE_CCR (0x1UL << 33)
22 #define NEGATIVE_TEST (0x1UL << 63)
56 #define TEST_SETB(t, bfa) ppc_inst(PPC_INST_SETB | ___PPC_RT(t) | ___PPC_RA((bfa & 0x7) << 2))
64 memset(regs, 0, sizeof(struct pt_regs)); in init_pt_regs()
71 asm volatile("mfmsr %0" : "=r"(regs->msr)); in init_pt_regs()
95 unsigned long a = 0x23; in test_ld()
101 /* ld r5, 0(r3) */ in test_ld()
102 stepped = emulate_step(®s, ppc_inst(PPC_RAW_LD(5, 3, 0))); in test_ld()
113 unsigned long a = 0x23; in test_pld()
124 /* pld r5, 0(r3), 0 */ in test_pld()
125 stepped = emulate_step(®s, TEST_PLD(5, 3, 0, 0)); in test_pld()
136 unsigned int a = 0x4545; in test_lwz()
142 /* lwz r5, 0(r3) */ in test_lwz()
143 stepped = emulate_step(®s, ppc_inst(PPC_RAW_LWZ(5, 3, 0))); in test_lwz()
154 unsigned int a = 0x4545; in test_plwz()
165 /* plwz r5, 0(r3), 0 */ in test_plwz()
167 stepped = emulate_step(®s, TEST_PLWZ(5, 3, 0, 0)); in test_plwz()
178 unsigned int a[3] = {0x0, 0x0, 0x1234}; in test_lwzx()
184 regs.gpr[5] = 0x8765; in test_lwzx()
197 unsigned long a = 0x1234; in test_std()
202 regs.gpr[5] = 0x5678; in test_std()
204 /* std r5, 0(r3) */ in test_std()
205 stepped = emulate_step(®s, ppc_inst(PPC_RAW_STD(5, 3, 0))); in test_std()
215 unsigned long a = 0x1234; in test_pstd()
225 regs.gpr[5] = 0x5678; in test_pstd()
227 /* pstd r5, 0(r3), 0 */ in test_pstd()
228 stepped = emulate_step(®s, TEST_PSTD(5, 3, 0, 0)); in test_pstd()
238 unsigned long a = 0x1234; in test_ldarx_stdcx()
240 unsigned long cr0_eq = 0x1 << 29; /* eq bit of CR0 */ in test_ldarx_stdcx()
243 asm volatile("mfcr %0" : "=r"(regs.ccr)); in test_ldarx_stdcx()
249 regs.gpr[4] = 0; in test_ldarx_stdcx()
250 regs.gpr[5] = 0x5678; in test_ldarx_stdcx()
252 /* ldarx r5, r3, r4, 0 */ in test_ldarx_stdcx()
253 stepped = emulate_step(®s, ppc_inst(PPC_RAW_LDARX(5, 3, 4, 0))); in test_ldarx_stdcx()
260 if (stepped <= 0 || regs.gpr[5] != 0x1234) { in test_ldarx_stdcx()
268 regs.gpr[5] = 0x9ABC; in test_ldarx_stdcx()
279 * In this case cr0.eq bit will be set to 0. in test_ldarx_stdcx()
308 regs.gpr[4] = 0; in test_lfsx_stfsx()
357 /* plfs frt10, 0(r3), 0 */ in test_plfs_pstfs()
358 stepped = emulate_step(®s, TEST_PLFS(10, 3, 0, 0)); in test_plfs_pstfs()
370 /* pstfs frs10, 0(r3), 0 */ in test_plfs_pstfs()
371 stepped = emulate_step(®s, TEST_PSTFS(10, 3, 0, 0)); in test_plfs_pstfs()
398 regs.gpr[4] = 0; in test_lfdx_stfdx()
447 /* plfd frt10, 0(r3), 0 */ in test_plfd_pstfd()
448 stepped = emulate_step(®s, TEST_PLFD(10, 3, 0, 0)); in test_plfd_pstfd()
460 /* pstfd frs10, 0(r3), 0 */ in test_plfd_pstfd()
461 stepped = emulate_step(®s, TEST_PSTFD(10, 3, 0, 0)); in test_plfd_pstfd()
510 cached_b[0] = c.b[0] = 923745; in test_lvx_stvx()
516 regs.gpr[4] = 0; in test_lvx_stvx()
529 c.b[0] = 4987513; in test_lvx_stvx()
537 if (stepped == 1 && cached_b[0] == c.b[0] && cached_b[1] == c.b[1] && in test_lvx_stvx()
567 cached_b[0] = c.b[0] = 18233; in test_lxvd2x_stxvd2x()
573 regs.gpr[4] = 0; in test_lxvd2x_stxvd2x()
590 c.b[0] = 21379463; in test_lxvd2x_stxvd2x()
598 if (stepped == 1 && cached_b[0] == c.b[0] && cached_b[1] == c.b[1] && in test_lxvd2x_stxvd2x()
638 cached_b[0] = c[0].b[0] = 18233; in test_lxvp_stxvp()
639 cached_b[1] = c[0].b[1] = 34863571; in test_lxvp_stxvp()
640 cached_b[2] = c[0].b[2] = 834; in test_lxvp_stxvp()
641 cached_b[3] = c[0].b[3] = 6138911; in test_lxvp_stxvp()
642 cached_b[4] = c[1].b[0] = 1234; in test_lxvp_stxvp()
647 regs.gpr[4] = (unsigned long)&c[0].a; in test_lxvp_stxvp()
652 * let TX=1 Tp=1 RA=4 DQ=0 in test_lxvp_stxvp()
654 stepped = emulate_step(®s, ppc_inst(PPC_RAW_LXVP(34, 4, 0))); in test_lxvp_stxvp()
667 c[0].b[0] = 21379463; in test_lxvp_stxvp()
668 c[0].b[1] = 87; in test_lxvp_stxvp()
669 c[0].b[2] = 374234; in test_lxvp_stxvp()
670 c[0].b[3] = 4; in test_lxvp_stxvp()
671 c[1].b[0] = 90; in test_lxvp_stxvp()
679 * let SX=1 Sp=1 RA=4 DQ=0 in test_lxvp_stxvp()
681 stepped = emulate_step(®s, ppc_inst(PPC_RAW_STXVP(34, 4, 0))); in test_lxvp_stxvp()
683 if (stepped == 1 && cached_b[0] == c[0].b[0] && cached_b[1] == c[0].b[1] && in test_lxvp_stxvp()
684 cached_b[2] == c[0].b[2] && cached_b[3] == c[0].b[3] && in test_lxvp_stxvp()
685 cached_b[4] == c[1].b[0] && cached_b[5] == c[1].b[1] && in test_lxvp_stxvp()
725 cached_b[0] = c[0].b[0] = 18233; in test_lxvpx_stxvpx()
726 cached_b[1] = c[0].b[1] = 34863571; in test_lxvpx_stxvpx()
727 cached_b[2] = c[0].b[2] = 834; in test_lxvpx_stxvpx()
728 cached_b[3] = c[0].b[3] = 6138911; in test_lxvpx_stxvpx()
729 cached_b[4] = c[1].b[0] = 1234; in test_lxvpx_stxvpx()
734 regs.gpr[3] = (unsigned long)&c[0].a; in test_lxvpx_stxvpx()
735 regs.gpr[4] = 0; in test_lxvpx_stxvpx()
755 c[0].b[0] = 21379463; in test_lxvpx_stxvpx()
756 c[0].b[1] = 87; in test_lxvpx_stxvpx()
757 c[0].b[2] = 374234; in test_lxvpx_stxvpx()
758 c[0].b[3] = 4; in test_lxvpx_stxvpx()
759 c[1].b[0] = 90; in test_lxvpx_stxvpx()
771 if (stepped == 1 && cached_b[0] == c[0].b[0] && cached_b[1] == c[0].b[1] && in test_lxvpx_stxvpx()
772 cached_b[2] == c[0].b[2] && cached_b[3] == c[0].b[3] && in test_lxvpx_stxvpx()
773 cached_b[4] == c[1].b[0] && cached_b[5] == c[1].b[1] && in test_lxvpx_stxvpx()
812 cached_b[0] = c[0].b[0] = 18233; in test_plxvp_pstxvp()
813 cached_b[1] = c[0].b[1] = 34863571; in test_plxvp_pstxvp()
814 cached_b[2] = c[0].b[2] = 834; in test_plxvp_pstxvp()
815 cached_b[3] = c[0].b[3] = 6138911; in test_plxvp_pstxvp()
816 cached_b[4] = c[1].b[0] = 1234; in test_plxvp_pstxvp()
822 regs.gpr[3] = (unsigned long)&c[0].a; in test_plxvp_pstxvp()
827 * let RA=3 R=0 D=d0||d1=0 R=0 Tp=1 TX=1 in test_plxvp_pstxvp()
829 instr = ppc_inst_prefix(PPC_RAW_PLXVP_P(34, 0, 3, 0), PPC_RAW_PLXVP_S(34, 0, 3, 0)); in test_plxvp_pstxvp()
843 c[0].b[0] = 21379463; in test_plxvp_pstxvp()
844 c[0].b[1] = 87; in test_plxvp_pstxvp()
845 c[0].b[2] = 374234; in test_plxvp_pstxvp()
846 c[0].b[3] = 4; in test_plxvp_pstxvp()
847 c[1].b[0] = 90; in test_plxvp_pstxvp()
855 * let RA=3 D=d0||d1=0 R=0 Sp=1 SX=1 in test_plxvp_pstxvp()
857 instr = ppc_inst_prefix(PPC_RAW_PSTXVP_P(34, 0, 3, 0), PPC_RAW_PSTXVP_S(34, 0, 3, 0)); in test_plxvp_pstxvp()
861 if (stepped == 1 && cached_b[0] == c[0].b[0] && cached_b[1] == c[0].b[1] && in test_plxvp_pstxvp()
862 cached_b[2] == c[0].b[2] && cached_b[3] == c[0].b[3] && in test_plxvp_pstxvp()
863 cached_b[4] == c[1].b[0] && cached_b[5] == c[1].b[1] && in test_plxvp_pstxvp()
927 .gpr[0] = LONG_MAX,
940 .ccr = 0x4000000,
947 .ccr = 0x8000,
954 .ccr = 0x200,
995 .descr = "RA = ULONG_MAX, RB = 0x1",
999 .gpr[22] = 0x1,
1035 .descr = "RA = UINT_MAX, RB = 0x1",
1039 .gpr[22] = 0x1,
1082 .descr = "RA = ULONG_MAX, RB = 0x1",
1086 .gpr[22] = 0x1,
1122 .descr = "RA = UINT_MAX, RB = 0x1",
1126 .gpr[22] = 0x1,
1167 .descr = "RA = ULONG_MAX, RB = 0x1",
1171 .gpr[22] = 0x1,
1207 .descr = "RA = UINT_MAX, RB = 0x1",
1211 .gpr[22] = 0x1,
1262 .descr = "RA = ULONG_MAX, RB = 0x1",
1266 .gpr[22] = 0x1,
1302 .descr = "RA = UINT_MAX, RB = 0x1",
1306 .gpr[22] = 0x1,
1331 .descr = "RA = 1L, RB = 0",
1336 .gpr[22] = 0,
1361 .descr = "RA = 1L, RB = 0",
1366 .gpr[22] = 0,
1392 .descr = "RA = 1L, RB = 0",
1397 .gpr[22] = 0,
1440 .descr = "RA = 1L, RB = 0",
1445 .gpr[22] = 0,
1480 .descr = "RA = LONG_MIN, SI = SI_MIN, R = 0",
1481 .instr = TEST_PADDI(21, 22, SI_MIN, 0),
1483 .gpr[21] = 0,
1488 .descr = "RA = LONG_MIN, SI = SI_MAX, R = 0",
1489 .instr = TEST_PADDI(21, 22, SI_MAX, 0),
1491 .gpr[21] = 0,
1496 .descr = "RA = LONG_MAX, SI = SI_MAX, R = 0",
1497 .instr = TEST_PADDI(21, 22, SI_MAX, 0),
1499 .gpr[21] = 0,
1504 .descr = "RA = ULONG_MAX, SI = SI_UMAX, R = 0",
1505 .instr = TEST_PADDI(21, 22, SI_UMAX, 0),
1507 .gpr[21] = 0,
1512 .descr = "RA = ULONG_MAX, SI = 0x1, R = 0",
1513 .instr = TEST_PADDI(21, 22, 0x1, 0),
1515 .gpr[21] = 0,
1520 .descr = "RA = INT_MIN, SI = SI_MIN, R = 0",
1521 .instr = TEST_PADDI(21, 22, SI_MIN, 0),
1523 .gpr[21] = 0,
1528 .descr = "RA = INT_MIN, SI = SI_MAX, R = 0",
1529 .instr = TEST_PADDI(21, 22, SI_MAX, 0),
1531 .gpr[21] = 0,
1536 .descr = "RA = INT_MAX, SI = SI_MAX, R = 0",
1537 .instr = TEST_PADDI(21, 22, SI_MAX, 0),
1539 .gpr[21] = 0,
1544 .descr = "RA = UINT_MAX, SI = 0x1, R = 0",
1545 .instr = TEST_PADDI(21, 22, 0x1, 0),
1547 .gpr[21] = 0,
1552 .descr = "RA = UINT_MAX, SI = SI_MAX, R = 0",
1553 .instr = TEST_PADDI(21, 22, SI_MAX, 0),
1555 .gpr[21] = 0,
1560 .descr = "RA is r0, SI = SI_MIN, R = 0",
1561 .instr = TEST_PADDI(21, 0, SI_MIN, 0),
1563 .gpr[21] = 0x0,
1567 .descr = "RA = 0, SI = SI_MIN, R = 0",
1568 .instr = TEST_PADDI(21, 22, SI_MIN, 0),
1570 .gpr[21] = 0x0,
1571 .gpr[22] = 0x0,
1575 .descr = "RA is r0, SI = 0, R = 1",
1576 .instr = TEST_PADDI(21, 0, 0, 1),
1578 .gpr[21] = 0,
1583 .instr = TEST_PADDI(21, 0, SI_MIN, 1),
1585 .gpr[21] = 0,
1588 /* Invalid instruction form with R = 1 and RA != 0 */
1590 .descr = "RA = R22(0), SI = 0, R = 1",
1591 .instr = TEST_PADDI(21, 22, 0, 1),
1594 .gpr[21] = 0,
1595 .gpr[22] = 0,
1626 return 0; in emulate_compute_instr()
1644 return 0; in execute_compute_instr()
1648 pr_info("GPR%u mismatch, exp = 0x%016lx, got = 0x%016lx\n", \
1652 pr_info("%s mismatch, exp = 0x%016lx, got = 0x%016lx\n", \
1664 for (i = 0; i < ARRAY_SIZE(compute_tests); i++) { in run_tests_compute()
1672 for (j = 0; j < MAX_SUBTESTS && test->subtests[j].descr; j++) { in run_tests_compute()
1691 rc = emulate_compute_instr(&got, instr, negative) != 0; in run_tests_compute()
1702 for (k = 0; k < 32; k++) { in run_tests_compute()
1742 return 0; in test_emulate_step()