From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 52683158094 for ; Sat, 20 Aug 2022 08:18:13 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 2F65CE0837; Sat, 20 Aug 2022 08:18:12 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 04E5BE0837 for ; Sat, 20 Aug 2022 08:18:11 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 04A1D340E30 for ; Sat, 20 Aug 2022 08:18:11 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 38F15569 for ; Sat, 20 Aug 2022 08:18:09 +0000 (UTC) From: "Stephan Hartmann" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Stephan Hartmann" Message-ID: <1660983483.2197ac9c808d24fdf1f039cec0b9d40038a4e784.sultan@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: www-client/chromium/files/, www-client/chromium/ X-VCS-Repository: repo/gentoo X-VCS-Files: www-client/chromium/chromium-104.0.5112.101.ebuild www-client/chromium/files/chromium-104-v8-neon.patch X-VCS-Directories: www-client/chromium/ www-client/chromium/files/ X-VCS-Committer: sultan X-VCS-Committer-Name: Stephan Hartmann X-VCS-Revision: 2197ac9c808d24fdf1f039cec0b9d40038a4e784 X-VCS-Branch: master Date: Sat, 20 Aug 2022 08:18:09 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 4cccf235-41df-4038-8cf9-272af6de58a7 X-Archives-Hash: 8aad436a1c70542935c82d6cb95c2600 commit: 2197ac9c808d24fdf1f039cec0b9d40038a4e784 Author: Stephan Hartmann gentoo org> AuthorDate: Sat Aug 20 08:17:43 2022 +0000 Commit: Stephan Hartmann gentoo org> CommitDate: Sat Aug 20 08:18:03 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2197ac9c www-client/chromium: fix building on arm64 Closes: https://bugs.gentoo.org/858587 Signed-off-by: Stephan Hartmann gentoo.org> www-client/chromium/chromium-104.0.5112.101.ebuild | 1 + .../chromium/files/chromium-104-v8-neon.patch | 72 ++++++++++++++++++++++ 2 files changed, 73 insertions(+) diff --git a/www-client/chromium/chromium-104.0.5112.101.ebuild b/www-client/chromium/chromium-104.0.5112.101.ebuild index 21b76aac3497..21adbac9cf6b 100644 --- a/www-client/chromium/chromium-104.0.5112.101.ebuild +++ b/www-client/chromium/chromium-104.0.5112.101.ebuild @@ -316,6 +316,7 @@ src_prepare() { "${FILESDIR}/chromium-98-gtk4-build.patch" "${FILESDIR}/chromium-104-tflite-system-zlib.patch" "${FILESDIR}/chromium-104-swiftshader-no-wayland.patch" + "${FILESDIR}/chromium-104-v8-neon.patch" "${FILESDIR}/chromium-use-oauth2-client-switches-as-default.patch" "${FILESDIR}/chromium-shim_headers.patch" "${FILESDIR}/chromium-cross-compile.patch" diff --git a/www-client/chromium/files/chromium-104-v8-neon.patch b/www-client/chromium/files/chromium-104-v8-neon.patch new file mode 100644 index 000000000000..ee573f8862e6 --- /dev/null +++ b/www-client/chromium/files/chromium-104-v8-neon.patch @@ -0,0 +1,72 @@ +From 0fc6592cf8867f0cd6d8d41b43392fb52d359649 Mon Sep 17 00:00:00 2001 +From: Jose Dapena Paz +Date: Tue, 07 Jun 2022 15:44:35 +0200 +Subject: [PATCH] GCC: fix compilation of NEON64 extract_first_nonzero_index + +GCC fails to compile extract_first_nonzero_index because of the +signedness type mismatch in the NEON intrinsics. + +Bug: chromium:819294 +Change-Id: I9b73e5fa1d5fbf161740ab1b5d77f5c494369dfa +Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3693709 +Reviewed-by: Toon Verwaest +Commit-Queue: José Dapena Paz +Cr-Commit-Position: refs/heads/main@{#81063} +--- + +diff --git a/v8/src/objects/simd.cc b/v8/src/objects/simd.cc +index d3cedfe..0a73b9c 100644 +--- a/v8/src/objects/simd.cc ++++ b/v8/src/objects/simd.cc +@@ -95,24 +95,21 @@ + } + + template <> +-inline int extract_first_nonzero_index(int32x4_t v) { +- int32x4_t mask = {4, 3, 2, 1}; ++inline int extract_first_nonzero_index(uint32x4_t v) { ++ uint32x4_t mask = {4, 3, 2, 1}; + mask = vandq_u32(mask, v); + return 4 - vmaxvq_u32(mask); + } + + template <> +-inline int extract_first_nonzero_index(int64x2_t v) { +- int32x4_t mask = {2, 0, 1, 0}; // Could also be {2,2,1,1} or {0,2,0,1} +- mask = vandq_u32(mask, vreinterpretq_s32_s64(v)); ++inline int extract_first_nonzero_index(uint64x2_t v) { ++ uint32x4_t mask = {2, 0, 1, 0}; // Could also be {2,2,1,1} or {0,2,0,1} ++ mask = vandq_u32(mask, vreinterpretq_u32_u64(v)); + return 2 - vmaxvq_u32(mask); + } + +-template <> +-inline int extract_first_nonzero_index(float64x2_t v) { +- int32x4_t mask = {2, 0, 1, 0}; // Could also be {2,2,1,1} or {0,2,0,1} +- mask = vandq_u32(mask, vreinterpretq_s32_f64(v)); +- return 2 - vmaxvq_u32(mask); ++inline int32_t reinterpret_vmaxvq_u64(uint64x2_t v) { ++ return vmaxvq_u32(vreinterpretq_u32_u64(v)); + } + #endif + +@@ -204,14 +201,14 @@ + } + #elif defined(NEON64) + if constexpr (std::is_same::value) { +- VECTORIZED_LOOP_Neon(int32x4_t, int32x4_t, vdupq_n_u32, vceqq_u32, ++ VECTORIZED_LOOP_Neon(uint32x4_t, uint32x4_t, vdupq_n_u32, vceqq_u32, + vmaxvq_u32) + } else if constexpr (std::is_same::value) { +- VECTORIZED_LOOP_Neon(int64x2_t, int64x2_t, vdupq_n_u64, vceqq_u64, +- vmaxvq_u32) ++ VECTORIZED_LOOP_Neon(uint64x2_t, uint64x2_t, vdupq_n_u64, vceqq_u64, ++ reinterpret_vmaxvq_u64) + } else if constexpr (std::is_same::value) { +- VECTORIZED_LOOP_Neon(float64x2_t, float64x2_t, vdupq_n_f64, vceqq_f64, +- vmaxvq_f64) ++ VECTORIZED_LOOP_Neon(float64x2_t, uint64x2_t, vdupq_n_f64, vceqq_f64, ++ reinterpret_vmaxvq_u64) + } + #else + UNREACHABLE();