Lines Matching refs:hwcaps

174 static void  check_hwcaps ( VexArch arch, UInt hwcaps );
175 static const HChar* show_hwcaps ( VexArch arch, UInt hwcaps );
309 /* KLUDGE: S390 need to know the hwcaps of the host when generating
481 /* KLUDGE: export hwcaps. */
482 s390_host_hwcaps = vta->archinfo_host.hwcaps;
591 // not return if hwcaps are infeasible in some sense.
592 check_hwcaps(vta->arch_host, vta->archinfo_host.hwcaps);
816 // not return if hwcaps are infeasible in some sense.
818 check_hwcaps(vta->arch_guest, vta->archinfo_guest.hwcaps);
832 vassert(vta->archinfo_guest.hwcaps == vta->archinfo_host.hwcaps);
1428 const HChar* LibVEX_ppVexHwCaps ( VexArch arch, UInt hwcaps )
1430 return show_hwcaps(arch, hwcaps);
1438 vai->hwcaps = 0;
1467 /* Return a string showing the hwcaps in a nice way. The string will
1470 static const HChar* show_hwcaps_x86 ( UInt hwcaps )
1490 if (hwcaps == 0) {
1495 if (hwcaps & hwcaps_list[i].hwcaps_bit)
1502 static const HChar* show_hwcaps_amd64 ( UInt hwcaps )
1524 if (hwcaps == 0) {
1529 if (hwcaps & hwcaps_list[i].hwcaps_bit)
1536 static const HChar* show_hwcaps_ppc32 ( UInt hwcaps )
1558 if (hwcaps == 0) return buf;
1562 if (hwcaps & hwcaps_list[i].hwcaps_bit)
1568 static const HChar* show_hwcaps_ppc64 ( UInt hwcaps )
1588 if (hwcaps == 0) return buf;
1592 if (hwcaps & hwcaps_list[i].hwcaps_bit)
1598 static const HChar* show_hwcaps_arm ( UInt hwcaps )
1616 level = VEX_ARM_ARCHLEVEL(hwcaps);
1620 if (hwcaps & hwcaps_list[i].hwcaps_bit)
1626 static const HChar* show_hwcaps_arm64 ( UInt hwcaps )
1628 /* Since there are no variants, just insist that hwcaps is zero,
1630 if (hwcaps == 0)
1635 static const HChar* show_hwcaps_s390x ( UInt hwcaps )
1664 hwcaps = VEX_HWCAPS_S390X(hwcaps);
1668 if (hwcaps & hwcaps_list[i].hwcaps_bit)
1673 if (hwcaps == 0)
1679 static const HChar* show_hwcaps_mips32 ( UInt hwcaps )
1682 if (VEX_MIPS_COMP_ID(hwcaps) == VEX_PRID_COMP_MIPS) {
1684 if (VEX_MIPS_PROC_DSP2(hwcaps)) {
1688 if (VEX_MIPS_PROC_DSP(hwcaps)) {
1695 if (VEX_MIPS_COMP_ID(hwcaps) == VEX_PRID_COMP_BROADCOM) {
1700 if (VEX_MIPS_COMP_ID(hwcaps) == VEX_PRID_COMP_NETLOGIC) {
1705 if (VEX_MIPS_COMP_ID(hwcaps) == VEX_PRID_COMP_CAVIUM) {
1712 static const HChar* show_hwcaps_mips64 ( UInt hwcaps )
1717 static const HChar* show_hwcaps_tilegx ( UInt hwcaps )
1726 static const HChar* show_hwcaps ( VexArch arch, UInt hwcaps )
1729 case VexArchX86: return show_hwcaps_x86(hwcaps);
1730 case VexArchAMD64: return show_hwcaps_amd64(hwcaps);
1731 case VexArchPPC32: return show_hwcaps_ppc32(hwcaps);
1732 case VexArchPPC64: return show_hwcaps_ppc64(hwcaps);
1733 case VexArchARM: return show_hwcaps_arm(hwcaps);
1734 case VexArchARM64: return show_hwcaps_arm64(hwcaps);
1735 case VexArchS390X: return show_hwcaps_s390x(hwcaps);
1736 case VexArchMIPS32: return show_hwcaps_mips32(hwcaps);
1737 case VexArchMIPS64: return show_hwcaps_mips64(hwcaps);
1738 case VexArchTILEGX: return show_hwcaps_tilegx(hwcaps);
1743 /* To be used to complain about hwcaps we cannot handle */
1745 static void invalid_hwcaps ( VexArch arch, UInt hwcaps, const HChar *message )
1748 " Found: %s\n", message, show_hwcaps(arch, hwcaps));
1751 /* This function will not return iff the hwcaps don't pass the test. */
1752 static void check_hwcaps ( VexArch arch, UInt hwcaps )
1756 if (hwcaps == 0) return; // baseline
1767 if (caps == hwcaps) return;
1770 if ((caps | VEX_HWCAPS_X86_LZCNT) == hwcaps) return;
1773 invalid_hwcaps(arch, hwcaps, "Cannot handle capabilities\n");
1783 Bool have_sse3 = (hwcaps & VEX_HWCAPS_AMD64_SSE3) != 0;
1784 Bool have_avx = (hwcaps & VEX_HWCAPS_AMD64_AVX) != 0;
1785 Bool have_bmi = (hwcaps & VEX_HWCAPS_AMD64_BMI) != 0;
1786 Bool have_avx2 = (hwcaps & VEX_HWCAPS_AMD64_AVX2) != 0;
1790 invalid_hwcaps(arch, hwcaps,
1794 invalid_hwcaps(arch, hwcaps,
1797 invalid_hwcaps(arch, hwcaps,
1805 if (hwcaps == 0) return; // baseline
1807 if ((hwcaps & VEX_HWCAPS_PPC32_F) == 0)
1808 invalid_hwcaps(arch, hwcaps,
1815 Bool has_v_fx_gx = (hwcaps & v_fx_gx) == v_fx_gx;
1817 if ((hwcaps & VEX_HWCAPS_PPC32_DFP) && ! has_v_fx_gx)
1818 invalid_hwcaps(arch, hwcaps,
1822 if ((hwcaps & VEX_HWCAPS_PPC32_VX) && ! has_v_fx_gx)
1823 invalid_hwcaps(arch, hwcaps,
1827 if ((hwcaps & VEX_HWCAPS_PPC32_ISA2_07) != 0) {
1829 invalid_hwcaps(arch, hwcaps,
1831 if (! (hwcaps & VEX_HWCAPS_PPC32_VX))
1832 invalid_hwcaps(arch, hwcaps,
1834 if (! (hwcaps & VEX_HWCAPS_PPC32_DFP))
1835 invalid_hwcaps(arch, hwcaps,
1844 if (hwcaps == 0) return; // baseline
1851 Bool has_v_fx_gx = (hwcaps & v_fx_gx) == v_fx_gx;
1853 if ((hwcaps & VEX_HWCAPS_PPC64_DFP) && ! has_v_fx_gx)
1854 invalid_hwcaps(arch, hwcaps,
1858 if ((hwcaps & VEX_HWCAPS_PPC32_VX) && ! has_v_fx_gx)
1859 invalid_hwcaps(arch, hwcaps,
1863 if ((hwcaps & VEX_HWCAPS_PPC64_ISA2_07) != 0) {
1865 invalid_hwcaps(arch, hwcaps,
1867 if (! (hwcaps & VEX_HWCAPS_PPC64_VX))
1868 invalid_hwcaps(arch, hwcaps,
1870 if (! (hwcaps & VEX_HWCAPS_PPC64_DFP))
1871 invalid_hwcaps(arch, hwcaps,
1878 Bool NEON = ((hwcaps & VEX_HWCAPS_ARM_NEON) != 0);
1879 UInt level = VEX_ARM_ARCHLEVEL(hwcaps);
1884 invalid_hwcaps(arch, hwcaps,
1889 invalid_hwcaps(arch, hwcaps,
1895 invalid_hwcaps(arch, hwcaps,
1901 if (hwcaps != 0)
1902 invalid_hwcaps(arch, hwcaps,
1908 invalid_hwcaps(arch, hwcaps,
1913 switch (VEX_MIPS_COMP_ID(hwcaps)) {
1919 invalid_hwcaps(arch, hwcaps, "Unsupported baseline\n");