commit:     7a60cec57a2fe78292758c678697d0f16819ad90
Author:     Stephan Hartmann <sultan <AT> gentoo <DOT> org>
AuthorDate: Sat Jan 15 08:47:52 2022 +0000
Commit:     Stephan Hartmann <sultan <AT> gentoo <DOT> org>
CommitDate: Sat Jan 15 08:48:27 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7a60cec5

www-client/chromium: fix building with dotprod extension on arm64

Closes: https://bugs.gentoo.org/831203
Package-Manager: Portage-3.0.28, Repoman-3.0.3
Signed-off-by: Stephan Hartmann <sultan <AT> gentoo.org>

 .../chromium/chromium-97.0.4692.71-r1.ebuild       |  1 +
 www-client/chromium/chromium-98.0.4758.54.ebuild   |  1 +
 www-client/chromium/chromium-99.0.4818.0.ebuild    |  1 +
 .../files/chromium-97-arm-tflite-cast.patch        | 26 ++++++++++++++++++++++
 4 files changed, 29 insertions(+)

diff --git a/www-client/chromium/chromium-97.0.4692.71-r1.ebuild 
b/www-client/chromium/chromium-97.0.4692.71-r1.ebuild
index 18c2360c6a75..1534ae2ed09e 100644
--- a/www-client/chromium/chromium-97.0.4692.71-r1.ebuild
+++ b/www-client/chromium/chromium-97.0.4692.71-r1.ebuild
@@ -234,6 +234,7 @@ src_prepare() {
                "${FILESDIR}/chromium-97-arm64-mte-clang.patch"
                "${FILESDIR}/chromium-97-fix-tag-dragging.patch"
                "${FILESDIR}/chromium-97-fix-tag-dragging-i3.patch"
+               "${FILESDIR}/chromium-97-arm-tflite-cast.patch"
                "${FILESDIR}/chromium-glibc-2.34.patch"
                
"${FILESDIR}/chromium-use-oauth2-client-switches-as-default.patch"
                "${FILESDIR}/chromium-shim_headers.patch"

diff --git a/www-client/chromium/chromium-98.0.4758.54.ebuild 
b/www-client/chromium/chromium-98.0.4758.54.ebuild
index af028da209f3..434c6e1fdf92 100644
--- a/www-client/chromium/chromium-98.0.4758.54.ebuild
+++ b/www-client/chromium/chromium-98.0.4758.54.ebuild
@@ -231,6 +231,7 @@ src_prepare() {
                "${WORKDIR}/patches"
                "${FILESDIR}/chromium-93-InkDropHost-crash.patch"
                "${FILESDIR}/chromium-97-fix-tag-dragging-i3.patch"
+               "${FILESDIR}/chromium-97-arm-tflite-cast.patch"
                "${FILESDIR}/chromium-98-EnumTable-crash.patch"
                "${FILESDIR}/chromium-98-system-libdrm.patch"
                "${FILESDIR}/chromium-glibc-2.34.patch"

diff --git a/www-client/chromium/chromium-99.0.4818.0.ebuild 
b/www-client/chromium/chromium-99.0.4818.0.ebuild
index 709268237eb6..b2d9fb16d746 100644
--- a/www-client/chromium/chromium-99.0.4818.0.ebuild
+++ b/www-client/chromium/chromium-99.0.4818.0.ebuild
@@ -231,6 +231,7 @@ src_prepare() {
                "${WORKDIR}/patches"
                "${FILESDIR}/chromium-93-InkDropHost-crash.patch"
                "${FILESDIR}/chromium-97-fix-tag-dragging-i3.patch"
+               "${FILESDIR}/chromium-97-arm-tflite-cast.patch"
                "${FILESDIR}/chromium-98-EnumTable-crash.patch"
                "${FILESDIR}/chromium-98-system-libdrm.patch"
                "${FILESDIR}/chromium-glibc-2.34-r1.patch"

diff --git a/www-client/chromium/files/chromium-97-arm-tflite-cast.patch 
b/www-client/chromium/files/chromium-97-arm-tflite-cast.patch
new file mode 100644
index 000000000000..843a384c76d3
--- /dev/null
+++ b/www-client/chromium/files/chromium-97-arm-tflite-cast.patch
@@ -0,0 +1,26 @@
+vreinterpret_s32_s8() casts int8x8_t to int32x2_t. However, third argument
+of vdotq_lane_s32() is of type int8x8_t.
+
+--- 
a/third_party/tflite/src/tensorflow/lite/kernels/internal/optimized/depthwiseconv_3x3_filter_common.h
++++ 
b/third_party/tflite/src/tensorflow/lite/kernels/internal/optimized/depthwiseconv_3x3_filter_common.h
+@@ -129,16 +129,14 @@ inline int32x4_t vdotq_four_lane_s32(int32x4_t acc, 
int8x16_t lhs,
+                                      int8x16_t rhs, const int lane) {
+   switch (lane) {
+     case 0:
+-      return vdotq_lane_s32(acc, lhs, vreinterpret_s32_s8(vget_low_s8(rhs)), 
0);
++      return vdotq_lane_s32(acc, lhs, vget_low_s8(rhs), 0);
+     case 1:
+-      return vdotq_lane_s32(acc, lhs, vreinterpret_s32_s8(vget_low_s8(rhs)), 
1);
++      return vdotq_lane_s32(acc, lhs, vget_low_s8(rhs), 1);
+     case 2:
+-      return vdotq_lane_s32(acc, lhs, vreinterpret_s32_s8(vget_high_s8(rhs)),
+-                            0);
++      return vdotq_lane_s32(acc, lhs, vget_high_s8(rhs), 0);
+     case 3:
+     default:
+-      return vdotq_lane_s32(acc, lhs, vreinterpret_s32_s8(vget_high_s8(rhs)),
+-                            1);
++      return vdotq_lane_s32(acc, lhs, vget_high_s8(rhs), 1);
+   }
+ }
+ 

Reply via email to