vki_sigaction_toK_t tmp_sigill_act, tmp_sigfpe_act;
volatile Bool have_F, have_V, have_FX, have_GX, have_VX, have_DFP;
- volatile Bool have_isa_2_07;
+ volatile Bool have_isa_2_07, have_isa_3_0;
Int r;
/* This is a kludge. Really we ought to back-convert saved_act
__asm__ __volatile__(".long 0x7c000166"); /* mtvsrd XT,RA */
}
+ /* Check for ISA 3.0 support. */
+ have_isa_3_0 = True;
+ if (VG_MINIMAL_SETJMP(env_unsup_insn)) {
+ have_isa_3_0 = False;
+ } else {
+ __asm__ __volatile__(".long 0x7d205434"); /* cnttzw RT, RB */
+ }
+
/* determine dcbz/dcbzl sizes while we still have the signal
* handlers registered */
find_ppc_dcbz_sz(&vai);
vg_assert(r == 0);
r = VG_(sigprocmask)(VKI_SIG_SETMASK, &saved_set, NULL);
vg_assert(r == 0);
- VG_(debugLog)(1, "machine", "F %d V %d FX %d GX %d VX %d DFP %d ISA2.07 %d\n",
+ VG_(debugLog)(1, "machine", "F %d V %d FX %d GX %d VX %d DFP %d ISA2.07 %d ISA3.0 %d\n",
(Int)have_F, (Int)have_V, (Int)have_FX,
(Int)have_GX, (Int)have_VX, (Int)have_DFP,
- (Int)have_isa_2_07);
+ (Int)have_isa_2_07, (Int)have_isa_3_0);
/* Make FP a prerequisite for VMX (bogusly so), and for FX and GX. */
if (have_V && !have_F)
have_V = False;
if (have_VX) vai.hwcaps |= VEX_HWCAPS_PPC32_VX;
if (have_DFP) vai.hwcaps |= VEX_HWCAPS_PPC32_DFP;
if (have_isa_2_07) vai.hwcaps |= VEX_HWCAPS_PPC32_ISA2_07;
+ if (have_isa_3_0) vai.hwcaps |= VEX_HWCAPS_PPC32_ISA3_0;
VG_(machine_get_cache_info)(&vai);
vki_sigaction_toK_t tmp_sigill_act, tmp_sigfpe_act;
volatile Bool have_F, have_V, have_FX, have_GX, have_VX, have_DFP;
- volatile Bool have_isa_2_07;
+ volatile Bool have_isa_2_07, have_isa_3_0;
Int r;
/* This is a kludge. Really we ought to back-convert saved_act
__asm__ __volatile__(".long 0x7c000166"); /* mtvsrd XT,RA */
}
+ /* Check for ISA 3.0 support. */
+ have_isa_3_0 = True;
+ if (VG_MINIMAL_SETJMP(env_unsup_insn)) {
+ have_isa_3_0 = False;
+ } else {
+ __asm__ __volatile__(".long 0x7d205434"); /* cnttzw RT, RB */
+ }
+
/* determine dcbz/dcbzl sizes while we still have the signal
* handlers registered */
find_ppc_dcbz_sz(&vai);
VG_(sigaction)(VKI_SIGILL, &saved_sigill_act, NULL);
VG_(sigaction)(VKI_SIGFPE, &saved_sigfpe_act, NULL);
VG_(sigprocmask)(VKI_SIG_SETMASK, &saved_set, NULL);
- VG_(debugLog)(1, "machine", "F %d V %d FX %d GX %d VX %d DFP %d ISA2.07 %d\n",
+ VG_(debugLog)(1, "machine", "F %d V %d FX %d GX %d VX %d DFP %d ISA2.07 %d ISA3.0 %d\n",
(Int)have_F, (Int)have_V, (Int)have_FX,
(Int)have_GX, (Int)have_VX, (Int)have_DFP,
- (Int)have_isa_2_07);
+ (Int)have_isa_2_07, (int)have_isa_3_0);
/* on ppc64be, if we don't even have FP, just give up. */
if (!have_F)
return False;
if (have_VX) vai.hwcaps |= VEX_HWCAPS_PPC64_VX;
if (have_DFP) vai.hwcaps |= VEX_HWCAPS_PPC64_DFP;
if (have_isa_2_07) vai.hwcaps |= VEX_HWCAPS_PPC64_ISA2_07;
+ if (have_isa_3_0) vai.hwcaps |= VEX_HWCAPS_PPC64_ISA3_0;
VG_(machine_get_cache_info)(&vai);