Date: Wed, 11 Nov 2020 13:38:27 +0000 (UTC) From: Mikael Urankar <mikael@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r554895 - head/www/chromium/files Message-ID: <202011111338.0ABDcReF042400@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mikael Date: Wed Nov 11 13:38:27 2020 New Revision: 554895 URL: https://svnweb.freebsd.org/changeset/ports/554895 Log: www/chromium: improve cpu features detection on aarch64 Approved by: portmgr (tier-2 blanket) Modified: head/www/chromium/files/patch-third__party_skia_src_core_SkCpu.cpp Modified: head/www/chromium/files/patch-third__party_skia_src_core_SkCpu.cpp ============================================================================== --- head/www/chromium/files/patch-third__party_skia_src_core_SkCpu.cpp Wed Nov 11 13:30:03 2020 (r554894) +++ head/www/chromium/files/patch-third__party_skia_src_core_SkCpu.cpp Wed Nov 11 13:38:27 2020 (r554895) @@ -1,19 +1,26 @@ --- third_party/skia/src/core/SkCpu.cpp.orig 2019-07-24 19:03:35 UTC +++ third_party/skia/src/core/SkCpu.cpp -@@ -76,6 +76,8 @@ - #include <sys/auxv.h> - - static uint32_t read_cpu_features() { -+return 0; -+#if 0 - const uint32_t kHWCAP_CRC32 = (1<< 7), - kHWCAP_ASIMDHP = (1<<10); - -@@ -112,6 +114,7 @@ - } - } +@@ -72,6 +72,23 @@ return features; -+#endif } - #elif defined(SK_CPU_ARM32) && __has_include(<sys/auxv.h>) && \ ++#elif defined(SK_CPU_ARM64) && defined(__FreeBSD__) ++ #include <machine/armreg.h> ++ #ifndef ID_AA64ISAR0_CRC32_VAL ++ #define ID_AA64ISAR0_CRC32_VAL ID_AA64ISAR0_CRC32 ++ #endif ++ ++ static uint32_t read_cpu_features() { ++ uint32_t features = 0; ++ uint64_t id_aa64isar0; ++ ++ id_aa64isar0 = READ_SPECIALREG(id_aa64isar0_el1); ++ if (ID_AA64ISAR0_CRC32_VAL(id_aa64isar0) == ID_AA64ISAR0_CRC32_BASE) { ++ features |= SkCpu::CRC32; ++ } ++ return features; ++ } ++ + #elif defined(SK_CPU_ARM64) && __has_include(<sys/auxv.h>) + #include <sys/auxv.h> +
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202011111338.0ABDcReF042400>