/* There is no prefixed version of these instructions. */
PREFIX_CHECK
- if (theInstr != 0x44000002) {
- vex_printf("dis_syslink(ppc)(theInstr)\n");
+ if (theInstr != 0x44000002) { // sc
+ if (theInstr != 0x44000001) // scv
+ vex_printf("dis_syslink(ppc)(theInstr)\n");
return False;
}
PPC_FEATURE2_HAS_ISEL 0x08000000
PPC_FEATURE2_HAS_TAR 0x04000000
PPC_FEATURE2_HAS_VCRYPTO 0x02000000
+ PPC_FEATURE2_HTM_NOSC 0x01000000
+ PPC_FEATURE2_ARCH_3_00 0x00800000
+ PPC_FEATURE2_HAS_IEEE128 0x00400000
+ PPC_FEATURE2_DARN 0x00200000
+ PPC_FEATURE2_SCV 0x00100000
+ PPC_FEATURE2_HTM_NO_SUSPEND 0x00080000
+ PPC_FEATURE2_ARCH_3_1 0x00040000
+ PPC_FEATURE2_MMA 0x00020000
*/
auxv_2_07 = (auxv->u.a_val & 0x80000000ULL) == 0x80000000ULL;
hw_caps_2_07 = (vex_archinfo->hwcaps & VEX_HWCAPS_PPC64_ISA2_07)
* matches the setting in VEX HWCAPS.
*/
vg_assert(auxv_3_1 == hw_caps_3_1);
+
+ /* Mask unrecognized HWCAP bits. Only keep the bits that have
+ * explicit support in VEX. Filter out HTM bits since the
+ * transaction begin instruction (tbegin) is always failed in
+ * Valgrind causing the code to execute the failure path.
+ * Also filter out the DARN random number (bug #411189).
+ * And the SCV syscall (bug #431157).
+ */
+ auxv->u.a_val &= (0x80000000ULL /* ARCH_2_07 */
+ | 0x20000000ULL /* DSCR */
+ | 0x10000000ULL /* EBB */
+ | 0x08000000ULL /* ISEL */
+ | 0x04000000ULL /* TAR */
+ | 0x04000000ULL /* VEC_CRYPTO */
+ | 0x00800000ULL /* ARCH_3_00 */
+ | 0x00400000ULL /* HAS_IEEE128 */
+ | 0x00040000ULL); /* ARCH_3_1 */
}
break;