refresh patches

epel9
Than Ngo 7 months ago
parent 765ac9dc58
commit 3f72327dd3

@ -1,7 +1,7 @@
Index: chromium-124.0.6367.60/third_party/boringssl/src/crypto/abi_self_test.cc
Index: chromium-125.0.6422.41/third_party/boringssl/src/crypto/abi_self_test.cc
===================================================================
--- chromium-124.0.6367.60.orig/third_party/boringssl/src/crypto/abi_self_test.cc
+++ chromium-124.0.6367.60/third_party/boringssl/src/crypto/abi_self_test.cc
--- chromium-125.0.6422.41.orig/third_party/boringssl/src/crypto/abi_self_test.cc
+++ chromium-125.0.6422.41/third_party/boringssl/src/crypto/abi_self_test.cc
@@ -521,3 +521,289 @@ TEST(ABITest, AArch64) {
CHECK_ABI_NO_UNWIND(abi_test_clobber_v15_upper);
}
@ -292,10 +292,10 @@ Index: chromium-124.0.6367.60/third_party/boringssl/src/crypto/abi_self_test.cc
+ CHECK_ABI_NO_UNWIND(abi_test_clobber_lr);
+}
+#endif // OPENSSL_PPC64LE && SUPPORTS_ABI_TEST
Index: chromium-124.0.6367.60/third_party/boringssl/src/crypto/cpu_ppc64le.c
Index: chromium-125.0.6422.41/third_party/boringssl/src/crypto/cpu_ppc64le.c
===================================================================
--- /dev/null
+++ chromium-124.0.6367.60/third_party/boringssl/src/crypto/cpu_ppc64le.c
+++ chromium-125.0.6422.41/third_party/boringssl/src/crypto/cpu_ppc64le.c
@@ -0,0 +1,38 @@
+/* Copyright (c) 2016, Google Inc.
+ *
@ -335,10 +335,10 @@ Index: chromium-124.0.6367.60/third_party/boringssl/src/crypto/cpu_ppc64le.c
+}
+
+#endif // OPENSSL_PPC64LE
Index: chromium-124.0.6367.60/third_party/boringssl/src/crypto/crypto.c
Index: chromium-125.0.6422.41/third_party/boringssl/src/crypto/crypto.c
===================================================================
--- chromium-124.0.6367.60.orig/third_party/boringssl/src/crypto/crypto.c
+++ chromium-124.0.6367.60/third_party/boringssl/src/crypto/crypto.c
--- chromium-125.0.6422.41.orig/third_party/boringssl/src/crypto/crypto.c
+++ chromium-125.0.6422.41/third_party/boringssl/src/crypto/crypto.c
@@ -25,10 +25,12 @@ static_assert(sizeof(ossl_ssize_t) == si
"ossl_ssize_t should be the same size as size_t");
@ -377,10 +377,10 @@ Index: chromium-124.0.6367.60/third_party/boringssl/src/crypto/crypto.c
#elif defined(OPENSSL_ARM) || defined(OPENSSL_AARCH64)
#include <openssl/arm_arch.h>
Index: chromium-124.0.6367.60/third_party/boringssl/src/crypto/fipsmodule/aes/asm/aesp8-ppc.pl
Index: chromium-125.0.6422.41/third_party/boringssl/src/crypto/fipsmodule/aes/asm/aesp8-ppc.pl
===================================================================
--- /dev/null
+++ chromium-124.0.6367.60/third_party/boringssl/src/crypto/fipsmodule/aes/asm/aesp8-ppc.pl
+++ chromium-125.0.6422.41/third_party/boringssl/src/crypto/fipsmodule/aes/asm/aesp8-ppc.pl
@@ -0,0 +1,3809 @@
+#! /usr/bin/env perl
+# Copyright 2014-2018 The OpenSSL Project Authors. All Rights Reserved.
@ -4191,10 +4191,10 @@ Index: chromium-124.0.6367.60/third_party/boringssl/src/crypto/fipsmodule/aes/as
+}
+
+close STDOUT or die "error closing STDOUT: $!";
Index: chromium-124.0.6367.60/third_party/boringssl/src/crypto/fipsmodule/aes/internal.h
Index: chromium-125.0.6422.41/third_party/boringssl/src/crypto/fipsmodule/aes/internal.h
===================================================================
--- chromium-124.0.6367.60.orig/third_party/boringssl/src/crypto/fipsmodule/aes/internal.h
+++ chromium-124.0.6367.60/third_party/boringssl/src/crypto/fipsmodule/aes/internal.h
--- chromium-125.0.6422.41.orig/third_party/boringssl/src/crypto/fipsmodule/aes/internal.h
+++ chromium-125.0.6422.41/third_party/boringssl/src/crypto/fipsmodule/aes/internal.h
@@ -59,6 +59,12 @@ OPENSSL_INLINE int vpaes_capable(void) {
OPENSSL_INLINE int vpaes_capable(void) { return CRYPTO_is_NEON_capable(); }
#endif
@ -4208,10 +4208,10 @@ Index: chromium-124.0.6367.60/third_party/boringssl/src/crypto/fipsmodule/aes/in
#endif
#endif // !NO_ASM
Index: chromium-124.0.6367.60/third_party/boringssl/src/crypto/fipsmodule/bcm.c
Index: chromium-125.0.6422.41/third_party/boringssl/src/crypto/fipsmodule/bcm.c
===================================================================
--- chromium-124.0.6367.60.orig/third_party/boringssl/src/crypto/fipsmodule/bcm.c
+++ chromium-124.0.6367.60/third_party/boringssl/src/crypto/fipsmodule/bcm.c
--- chromium-125.0.6422.41.orig/third_party/boringssl/src/crypto/fipsmodule/bcm.c
+++ chromium-125.0.6422.41/third_party/boringssl/src/crypto/fipsmodule/bcm.c
@@ -102,6 +102,7 @@
#include "self_check/fips.c"
#include "self_check/self_check.c"
@ -4220,10 +4220,10 @@ Index: chromium-124.0.6367.60/third_party/boringssl/src/crypto/fipsmodule/bcm.c
#include "sha/sha1.c"
#include "sha/sha256.c"
#include "sha/sha512.c"
Index: chromium-124.0.6367.60/third_party/boringssl/src/crypto/fipsmodule/bn/bn.c
Index: chromium-125.0.6422.41/third_party/boringssl/src/crypto/fipsmodule/bn/bn.c
===================================================================
--- chromium-124.0.6367.60.orig/third_party/boringssl/src/crypto/fipsmodule/bn/bn.c
+++ chromium-124.0.6367.60/third_party/boringssl/src/crypto/fipsmodule/bn/bn.c
--- chromium-125.0.6422.41.orig/third_party/boringssl/src/crypto/fipsmodule/bn/bn.c
+++ chromium-125.0.6422.41/third_party/boringssl/src/crypto/fipsmodule/bn/bn.c
@@ -384,6 +384,23 @@ int bn_expand(BIGNUM *bn, size_t bits) {
}
@ -4248,10 +4248,10 @@ Index: chromium-124.0.6367.60/third_party/boringssl/src/crypto/fipsmodule/bn/bn.
if ((size_t)bn->width <= words) {
if (!bn_wexpand(bn, words)) {
return 0;
Index: chromium-124.0.6367.60/third_party/boringssl/src/crypto/fipsmodule/cipher/e_aes.c
Index: chromium-125.0.6422.41/third_party/boringssl/src/crypto/fipsmodule/cipher/e_aes.c
===================================================================
--- chromium-124.0.6367.60.orig/third_party/boringssl/src/crypto/fipsmodule/cipher/e_aes.c
+++ chromium-124.0.6367.60/third_party/boringssl/src/crypto/fipsmodule/cipher/e_aes.c
--- chromium-125.0.6422.41.orig/third_party/boringssl/src/crypto/fipsmodule/cipher/e_aes.c
+++ chromium-125.0.6422.41/third_party/boringssl/src/crypto/fipsmodule/cipher/e_aes.c
@@ -1455,6 +1455,8 @@ int EVP_has_aes_hardware(void) {
return hwaes_capable() && crypto_gcm_clmul_enabled();
#elif defined(OPENSSL_ARM) || defined(OPENSSL_AARCH64)
@ -4261,10 +4261,10 @@ Index: chromium-124.0.6367.60/third_party/boringssl/src/crypto/fipsmodule/cipher
#else
return 0;
#endif
Index: chromium-124.0.6367.60/third_party/boringssl/src/crypto/fipsmodule/modes/asm/ghashp8-ppc.pl
Index: chromium-125.0.6422.41/third_party/boringssl/src/crypto/fipsmodule/modes/asm/ghashp8-ppc.pl
===================================================================
--- /dev/null
+++ chromium-124.0.6367.60/third_party/boringssl/src/crypto/fipsmodule/modes/asm/ghashp8-ppc.pl
+++ chromium-125.0.6422.41/third_party/boringssl/src/crypto/fipsmodule/modes/asm/ghashp8-ppc.pl
@@ -0,0 +1,671 @@
+#! /usr/bin/env perl
+# Copyright 2014-2016 The OpenSSL Project Authors. All Rights Reserved.
@ -4937,10 +4937,10 @@ Index: chromium-124.0.6367.60/third_party/boringssl/src/crypto/fipsmodule/modes/
+}
+
+close STDOUT or die "error closing STDOUT: $!"; # enforce flush
Index: chromium-124.0.6367.60/third_party/boringssl/src/crypto/fipsmodule/modes/gcm.c
Index: chromium-125.0.6422.41/third_party/boringssl/src/crypto/fipsmodule/modes/gcm.c
===================================================================
--- chromium-124.0.6367.60.orig/third_party/boringssl/src/crypto/fipsmodule/modes/gcm.c
+++ chromium-124.0.6367.60/third_party/boringssl/src/crypto/fipsmodule/modes/gcm.c
--- chromium-125.0.6422.41.orig/third_party/boringssl/src/crypto/fipsmodule/modes/gcm.c
+++ chromium-125.0.6422.41/third_party/boringssl/src/crypto/fipsmodule/modes/gcm.c
@@ -228,6 +228,13 @@ void CRYPTO_ghash_init(gmult_func *out_m
*out_hash = gcm_ghash_neon;
return;
@ -4955,10 +4955,10 @@ Index: chromium-124.0.6367.60/third_party/boringssl/src/crypto/fipsmodule/modes/
#endif
gcm_init_nohw(out_table, H);
Index: chromium-124.0.6367.60/third_party/boringssl/src/crypto/fipsmodule/modes/gcm_test.cc
Index: chromium-125.0.6422.41/third_party/boringssl/src/crypto/fipsmodule/modes/gcm_test.cc
===================================================================
--- chromium-124.0.6367.60.orig/third_party/boringssl/src/crypto/fipsmodule/modes/gcm_test.cc
+++ chromium-124.0.6367.60/third_party/boringssl/src/crypto/fipsmodule/modes/gcm_test.cc
--- chromium-125.0.6422.41.orig/third_party/boringssl/src/crypto/fipsmodule/modes/gcm_test.cc
+++ chromium-125.0.6422.41/third_party/boringssl/src/crypto/fipsmodule/modes/gcm_test.cc
@@ -215,5 +215,15 @@ TEST(GCMTest, ABI) {
}
}
@ -4975,10 +4975,10 @@ Index: chromium-124.0.6367.60/third_party/boringssl/src/crypto/fipsmodule/modes/
+#endif // GHASH_ASM_PPC64LE
}
#endif // SUPPORTS_ABI_TEST && !OPENSSL_NO_ASM
Index: chromium-124.0.6367.60/third_party/boringssl/src/crypto/fipsmodule/modes/internal.h
Index: chromium-125.0.6422.41/third_party/boringssl/src/crypto/fipsmodule/modes/internal.h
===================================================================
--- chromium-124.0.6367.60.orig/third_party/boringssl/src/crypto/fipsmodule/modes/internal.h
+++ chromium-124.0.6367.60/third_party/boringssl/src/crypto/fipsmodule/modes/internal.h
--- chromium-125.0.6422.41.orig/third_party/boringssl/src/crypto/fipsmodule/modes/internal.h
+++ chromium-125.0.6422.41/third_party/boringssl/src/crypto/fipsmodule/modes/internal.h
@@ -325,6 +325,13 @@ void aes_gcm_dec_kernel(const uint8_t *i
const u128 Htable[16]);
#endif
@ -4993,10 +4993,10 @@ Index: chromium-124.0.6367.60/third_party/boringssl/src/crypto/fipsmodule/modes/
#endif
#endif // OPENSSL_NO_ASM
Index: chromium-124.0.6367.60/third_party/boringssl/src/crypto/fipsmodule/rand/getrandom_fillin.h
Index: chromium-125.0.6422.41/third_party/boringssl/src/crypto/fipsmodule/rand/getrandom_fillin.h
===================================================================
--- chromium-124.0.6367.60.orig/third_party/boringssl/src/crypto/fipsmodule/rand/getrandom_fillin.h
+++ chromium-124.0.6367.60/third_party/boringssl/src/crypto/fipsmodule/rand/getrandom_fillin.h
--- chromium-125.0.6422.41.orig/third_party/boringssl/src/crypto/fipsmodule/rand/getrandom_fillin.h
+++ chromium-125.0.6422.41/third_party/boringssl/src/crypto/fipsmodule/rand/getrandom_fillin.h
@@ -30,6 +30,8 @@
#define EXPECTED_NR_getrandom 278
#elif defined(OPENSSL_ARM)
@ -5006,10 +5006,10 @@ Index: chromium-124.0.6367.60/third_party/boringssl/src/crypto/fipsmodule/rand/g
#elif defined(OPENSSL_RISCV64)
#define EXPECTED_NR_getrandom 278
#endif
Index: chromium-124.0.6367.60/third_party/boringssl/src/crypto/fipsmodule/rand/rand.c
Index: chromium-125.0.6422.41/third_party/boringssl/src/crypto/fipsmodule/rand/rand.c
===================================================================
--- chromium-124.0.6367.60.orig/third_party/boringssl/src/crypto/fipsmodule/rand/rand.c
+++ chromium-124.0.6367.60/third_party/boringssl/src/crypto/fipsmodule/rand/rand.c
--- chromium-125.0.6422.41.orig/third_party/boringssl/src/crypto/fipsmodule/rand/rand.c
+++ chromium-125.0.6422.41/third_party/boringssl/src/crypto/fipsmodule/rand/rand.c
@@ -431,6 +431,11 @@ void RAND_bytes_with_additional_data(uin
// Take a read lock around accesses to |state->drbg|. This is needed to
// avoid returning bad entropy if we race with
@ -5022,16 +5022,15 @@ Index: chromium-124.0.6367.60/third_party/boringssl/src/crypto/fipsmodule/rand/r
CRYPTO_MUTEX_lock_read(&state->clear_drbg_lock);
#endif
if (!CTR_DRBG_reseed(&state->drbg, seed, reseed_additional_data,
Index: chromium-124.0.6367.60/third_party/boringssl/src/crypto/fipsmodule/sha/internal.h
Index: chromium-125.0.6422.41/third_party/boringssl/src/crypto/fipsmodule/sha/internal.h
===================================================================
--- chromium-124.0.6367.60.orig/third_party/boringssl/src/crypto/fipsmodule/sha/internal.h
+++ chromium-124.0.6367.60/third_party/boringssl/src/crypto/fipsmodule/sha/internal.h
@@ -23,6 +23,17 @@
--- chromium-125.0.6422.41.orig/third_party/boringssl/src/crypto/fipsmodule/sha/internal.h
+++ chromium-125.0.6422.41/third_party/boringssl/src/crypto/fipsmodule/sha/internal.h
@@ -23,6 +23,16 @@
extern "C" {
#endif
+#if defined(OPENSSL_PPC64LE) || \
+ (!defined(OPENSSL_NO_ASM) && defined(OPENSSL_X86))
+#if defined(OPENSSL_PPC64LE)
+// POWER has an intrinsics-based implementation of SHA-1 and thus the functions
+// normally defined in assembly are available even with |OPENSSL_NO_ASM| in
+// this case.
@ -5044,10 +5043,10 @@ Index: chromium-124.0.6367.60/third_party/boringssl/src/crypto/fipsmodule/sha/in
// Define SHA{n}[_{variant}]_ASM if sha{n}_block_data_order[_{variant}] is
// defined in assembly.
Index: chromium-124.0.6367.60/third_party/boringssl/src/crypto/fipsmodule/sha/sha1-altivec.c
Index: chromium-125.0.6422.41/third_party/boringssl/src/crypto/fipsmodule/sha/sha1-altivec.c
===================================================================
--- /dev/null
+++ chromium-124.0.6367.60/third_party/boringssl/src/crypto/fipsmodule/sha/sha1-altivec.c
+++ chromium-125.0.6422.41/third_party/boringssl/src/crypto/fipsmodule/sha/sha1-altivec.c
@@ -0,0 +1,361 @@
+/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
+ * All rights reserved.
@ -5410,10 +5409,10 @@ Index: chromium-124.0.6367.60/third_party/boringssl/src/crypto/fipsmodule/sha/sh
+#undef BODY_20_39
+#undef BODY_40_59
+#undef BODY_60_79
Index: chromium-124.0.6367.60/third_party/boringssl/src/crypto/internal.h
Index: chromium-125.0.6422.41/third_party/boringssl/src/crypto/internal.h
===================================================================
--- chromium-124.0.6367.60.orig/third_party/boringssl/src/crypto/internal.h
+++ chromium-124.0.6367.60/third_party/boringssl/src/crypto/internal.h
--- chromium-125.0.6422.41.orig/third_party/boringssl/src/crypto/internal.h
+++ chromium-125.0.6422.41/third_party/boringssl/src/crypto/internal.h
@@ -181,7 +181,7 @@ extern "C" {
@ -5423,7 +5422,7 @@ Index: chromium-124.0.6367.60/third_party/boringssl/src/crypto/internal.h
// OPENSSL_cpuid_setup initializes the platform-specific feature cache.
void OPENSSL_cpuid_setup(void);
#endif
@@ -1632,6 +1632,16 @@ OPENSSL_INLINE int CRYPTO_is_ARMv8_SHA51
@@ -1638,6 +1638,16 @@ OPENSSL_INLINE int CRYPTO_is_ARMv8_SHA51
#endif // OPENSSL_ARM || OPENSSL_AARCH64
@ -5440,10 +5439,10 @@ Index: chromium-124.0.6367.60/third_party/boringssl/src/crypto/internal.h
#if defined(BORINGSSL_DISPATCH_TEST)
// Runtime CPU dispatch testing support
Index: chromium-124.0.6367.60/third_party/boringssl/src/crypto/perlasm/ppc-xlate.pl
Index: chromium-125.0.6422.41/third_party/boringssl/src/crypto/perlasm/ppc-xlate.pl
===================================================================
--- /dev/null
+++ chromium-124.0.6367.60/third_party/boringssl/src/crypto/perlasm/ppc-xlate.pl
+++ chromium-125.0.6422.41/third_party/boringssl/src/crypto/perlasm/ppc-xlate.pl
@@ -0,0 +1,320 @@
+#! /usr/bin/env perl
+# Copyright 2006-2016 The OpenSSL Project Authors. All Rights Reserved.
@ -5765,10 +5764,10 @@ Index: chromium-124.0.6367.60/third_party/boringssl/src/crypto/perlasm/ppc-xlate
+___
+
+close STDOUT or die "error closing STDOUT: $!";
Index: chromium-124.0.6367.60/third_party/boringssl/src/crypto/test/abi_test.h
Index: chromium-125.0.6422.41/third_party/boringssl/src/crypto/test/abi_test.h
===================================================================
--- chromium-124.0.6367.60.orig/third_party/boringssl/src/crypto/test/abi_test.h
+++ chromium-124.0.6367.60/third_party/boringssl/src/crypto/test/abi_test.h
--- chromium-125.0.6422.41.orig/third_party/boringssl/src/crypto/test/abi_test.h
+++ chromium-125.0.6422.41/third_party/boringssl/src/crypto/test/abi_test.h
@@ -179,7 +179,78 @@ struct alignas(16) Reg128 {
CALLER_STATE_REGISTER(uint64_t, x28) \
CALLER_STATE_REGISTER(uint64_t, x29)
@ -5875,10 +5874,10 @@ Index: chromium-124.0.6367.60/third_party/boringssl/src/crypto/test/abi_test.h
static_assert(sizeof...(args) <= 8,
"too many arguments for abi_test_trampoline");
Index: chromium-124.0.6367.60/third_party/boringssl/src/crypto/test/asm/trampoline-ppc.pl
Index: chromium-125.0.6422.41/third_party/boringssl/src/crypto/test/asm/trampoline-ppc.pl
===================================================================
--- /dev/null
+++ chromium-124.0.6367.60/third_party/boringssl/src/crypto/test/asm/trampoline-ppc.pl
+++ chromium-125.0.6422.41/third_party/boringssl/src/crypto/test/asm/trampoline-ppc.pl
@@ -0,0 +1,262 @@
+#!/usr/bin/env perl
+# Copyright (c) 2019, Google Inc.
@ -6142,10 +6141,10 @@ Index: chromium-124.0.6367.60/third_party/boringssl/src/crypto/test/asm/trampoli
+
+print $code;
+close STDOUT or die "error closing STDOUT: $!";
Index: chromium-124.0.6367.60/third_party/boringssl/src/include/openssl/target.h
Index: chromium-125.0.6422.41/third_party/boringssl/src/include/openssl/target.h
===================================================================
--- chromium-124.0.6367.60.orig/third_party/boringssl/src/include/openssl/target.h
+++ chromium-124.0.6367.60/third_party/boringssl/src/include/openssl/target.h
--- chromium-125.0.6422.41.orig/third_party/boringssl/src/include/openssl/target.h
+++ chromium-125.0.6422.41/third_party/boringssl/src/include/openssl/target.h
@@ -34,6 +34,9 @@
#elif defined(__ARMEL__) || defined(_M_ARM)
#define OPENSSL_32_BIT
@ -6156,10 +6155,10 @@ Index: chromium-124.0.6367.60/third_party/boringssl/src/include/openssl/target.h
#elif defined(__MIPSEL__) && !defined(__LP64__)
#define OPENSSL_32_BIT
#define OPENSSL_MIPS
Index: chromium-124.0.6367.60/third_party/boringssl/src/util/fipstools/acvp/modulewrapper/main.cc
Index: chromium-125.0.6422.41/third_party/boringssl/src/util/fipstools/acvp/modulewrapper/main.cc
===================================================================
--- chromium-124.0.6367.60.orig/third_party/boringssl/src/util/fipstools/acvp/modulewrapper/main.cc
+++ chromium-124.0.6367.60/third_party/boringssl/src/util/fipstools/acvp/modulewrapper/main.cc
--- chromium-125.0.6422.41.orig/third_party/boringssl/src/util/fipstools/acvp/modulewrapper/main.cc
+++ chromium-125.0.6422.41/third_party/boringssl/src/util/fipstools/acvp/modulewrapper/main.cc
@@ -37,6 +37,8 @@ int main(int argc, char **argv) {
puts("ARM (32-bit)");
#elif defined(OPENSSL_AARCH64)
@ -6169,10 +6168,10 @@ Index: chromium-124.0.6367.60/third_party/boringssl/src/util/fipstools/acvp/modu
#else
#error "FIPS build not supported on this architecture"
#endif
Index: chromium-124.0.6367.60/third_party/boringssl/src/util/fipstools/delocate/delocate.go
Index: chromium-125.0.6422.41/third_party/boringssl/src/util/fipstools/delocate/delocate.go
===================================================================
--- chromium-124.0.6367.60.orig/third_party/boringssl/src/util/fipstools/delocate/delocate.go
+++ chromium-124.0.6367.60/third_party/boringssl/src/util/fipstools/delocate/delocate.go
--- chromium-125.0.6422.41.orig/third_party/boringssl/src/util/fipstools/delocate/delocate.go
+++ chromium-125.0.6422.41/third_party/boringssl/src/util/fipstools/delocate/delocate.go
@@ -54,7 +54,8 @@ type stringWriter interface {
type processorType int
@ -6772,10 +6771,10 @@ Index: chromium-124.0.6367.60/third_party/boringssl/src/util/fipstools/delocate/
case "str", "bl", "ldr", "st1":
return aarch64
}
Index: chromium-124.0.6367.60/third_party/boringssl/src/util/fipstools/delocate/delocate.peg
Index: chromium-125.0.6422.41/third_party/boringssl/src/util/fipstools/delocate/delocate.peg
===================================================================
--- chromium-124.0.6367.60.orig/third_party/boringssl/src/util/fipstools/delocate/delocate.peg
+++ chromium-124.0.6367.60/third_party/boringssl/src/util/fipstools/delocate/delocate.peg
--- chromium-125.0.6422.41.orig/third_party/boringssl/src/util/fipstools/delocate/delocate.peg
+++ chromium-125.0.6422.41/third_party/boringssl/src/util/fipstools/delocate/delocate.peg
@@ -12,7 +12,7 @@
# OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
# CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */
@ -6785,10 +6784,10 @@ Index: chromium-124.0.6367.60/third_party/boringssl/src/util/fipstools/delocate/
# https://github.com/pointlander/peg. delocate.go has a go:generate line for
# rebuilding delocate.peg.go from this file.
Index: chromium-124.0.6367.60/third_party/boringssl/src/util/fipstools/delocate/delocate_test.go
Index: chromium-125.0.6422.41/third_party/boringssl/src/util/fipstools/delocate/delocate_test.go
===================================================================
--- chromium-124.0.6367.60.orig/third_party/boringssl/src/util/fipstools/delocate/delocate_test.go
+++ chromium-124.0.6367.60/third_party/boringssl/src/util/fipstools/delocate/delocate_test.go
--- chromium-125.0.6422.41.orig/third_party/boringssl/src/util/fipstools/delocate/delocate_test.go
+++ chromium-125.0.6422.41/third_party/boringssl/src/util/fipstools/delocate/delocate_test.go
@@ -39,6 +39,11 @@ func (test *delocateTest) Path(file stri
var delocateTests = []delocateTest{
@ -6801,10 +6800,10 @@ Index: chromium-124.0.6367.60/third_party/boringssl/src/util/fipstools/delocate/
{"x86_64-Basic", []string{"in.s"}, "out.s"},
{"x86_64-BSS", []string{"in.s"}, "out.s"},
{"x86_64-GOTRewrite", []string{"in.s"}, "out.s"},
Index: chromium-124.0.6367.60/third_party/boringssl/src/util/fipstools/delocate/testdata/ppc64le-GlobalEntry/in.s
Index: chromium-125.0.6422.41/third_party/boringssl/src/util/fipstools/delocate/testdata/ppc64le-GlobalEntry/in.s
===================================================================
--- /dev/null
+++ chromium-124.0.6367.60/third_party/boringssl/src/util/fipstools/delocate/testdata/ppc64le-GlobalEntry/in.s
+++ chromium-125.0.6422.41/third_party/boringssl/src/util/fipstools/delocate/testdata/ppc64le-GlobalEntry/in.s
@@ -0,0 +1,9 @@
+ .text
+foo:
@ -6815,10 +6814,10 @@ Index: chromium-124.0.6367.60/third_party/boringssl/src/util/fipstools/delocate/
+ .localentry foo,.-foo
+.LVL0:
+ bl
Index: chromium-124.0.6367.60/third_party/boringssl/src/util/fipstools/delocate/testdata/ppc64le-GlobalEntry/out.s
Index: chromium-125.0.6422.41/third_party/boringssl/src/util/fipstools/delocate/testdata/ppc64le-GlobalEntry/out.s
===================================================================
--- /dev/null
+++ chromium-124.0.6367.60/third_party/boringssl/src/util/fipstools/delocate/testdata/ppc64le-GlobalEntry/out.s
+++ chromium-125.0.6422.41/third_party/boringssl/src/util/fipstools/delocate/testdata/ppc64le-GlobalEntry/out.s
@@ -0,0 +1,62 @@
+.text
+.file 1 "inserted_by_delocate.c"
@ -6882,19 +6881,19 @@ Index: chromium-124.0.6367.60/third_party/boringssl/src/util/fipstools/delocate/
+.byte 0xff
+.byte 0x31
+.byte 0x80
Index: chromium-124.0.6367.60/third_party/boringssl/src/util/fipstools/delocate/testdata/ppc64le-LoadToR0/in.s
Index: chromium-125.0.6422.41/third_party/boringssl/src/util/fipstools/delocate/testdata/ppc64le-LoadToR0/in.s
===================================================================
--- /dev/null
+++ chromium-124.0.6367.60/third_party/boringssl/src/util/fipstools/delocate/testdata/ppc64le-LoadToR0/in.s
+++ chromium-125.0.6422.41/third_party/boringssl/src/util/fipstools/delocate/testdata/ppc64le-LoadToR0/in.s
@@ -0,0 +1,4 @@
+ .text
+foo:
+ addis 22,2,bar@toc@ha
+ ld 0,bar@toc@l(22)
Index: chromium-124.0.6367.60/third_party/boringssl/src/util/fipstools/delocate/testdata/ppc64le-LoadToR0/out.s
Index: chromium-125.0.6422.41/third_party/boringssl/src/util/fipstools/delocate/testdata/ppc64le-LoadToR0/out.s
===================================================================
--- /dev/null
+++ chromium-124.0.6367.60/third_party/boringssl/src/util/fipstools/delocate/testdata/ppc64le-LoadToR0/out.s
+++ chromium-125.0.6422.41/third_party/boringssl/src/util/fipstools/delocate/testdata/ppc64le-LoadToR0/out.s
@@ -0,0 +1,72 @@
+.text
+.file 1 "inserted_by_delocate.c"
@ -6968,10 +6967,10 @@ Index: chromium-124.0.6367.60/third_party/boringssl/src/util/fipstools/delocate/
+.byte 0xff
+.byte 0x31
+.byte 0x80
Index: chromium-124.0.6367.60/third_party/boringssl/src/util/fipstools/delocate/testdata/ppc64le-Sample/in.s
Index: chromium-125.0.6422.41/third_party/boringssl/src/util/fipstools/delocate/testdata/ppc64le-Sample/in.s
===================================================================
--- /dev/null
+++ chromium-124.0.6367.60/third_party/boringssl/src/util/fipstools/delocate/testdata/ppc64le-Sample/in.s
+++ chromium-125.0.6422.41/third_party/boringssl/src/util/fipstools/delocate/testdata/ppc64le-Sample/in.s
@@ -0,0 +1,161 @@
+ .file "foo.c"
+ .abiversion 2
@ -7134,10 +7133,10 @@ Index: chromium-124.0.6367.60/third_party/boringssl/src/util/fipstools/delocate/
+ .size exported_function,.-exported_function
+ .ident "GCC: (Ubuntu 4.9.2-10ubuntu13) 4.9.2"
+ .section .note.GNU-stack,"",@progbits
Index: chromium-124.0.6367.60/third_party/boringssl/src/util/fipstools/delocate/testdata/ppc64le-Sample/out.s
Index: chromium-125.0.6422.41/third_party/boringssl/src/util/fipstools/delocate/testdata/ppc64le-Sample/out.s
===================================================================
--- /dev/null
+++ chromium-124.0.6367.60/third_party/boringssl/src/util/fipstools/delocate/testdata/ppc64le-Sample/out.s
+++ chromium-125.0.6422.41/third_party/boringssl/src/util/fipstools/delocate/testdata/ppc64le-Sample/out.s
@@ -0,0 +1,552 @@
+.text
+.file 1 "inserted_by_delocate.c"
@ -7691,10 +7690,10 @@ Index: chromium-124.0.6367.60/third_party/boringssl/src/util/fipstools/delocate/
+.byte 0xff
+.byte 0x31
+.byte 0x80
Index: chromium-124.0.6367.60/third_party/boringssl/src/util/fipstools/delocate/testdata/ppc64le-Sample2/in.s
Index: chromium-125.0.6422.41/third_party/boringssl/src/util/fipstools/delocate/testdata/ppc64le-Sample2/in.s
===================================================================
--- /dev/null
+++ chromium-124.0.6367.60/third_party/boringssl/src/util/fipstools/delocate/testdata/ppc64le-Sample2/in.s
+++ chromium-125.0.6422.41/third_party/boringssl/src/util/fipstools/delocate/testdata/ppc64le-Sample2/in.s
@@ -0,0 +1,226 @@
+ .file "foo.c"
+ .abiversion 2
@ -7922,10 +7921,10 @@ Index: chromium-124.0.6367.60/third_party/boringssl/src/util/fipstools/delocate/
+ .zero 20
+ .ident "GCC: (Ubuntu 4.9.2-10ubuntu13) 4.9.2"
+ .section .note.GNU-stack,"",@progbits
Index: chromium-124.0.6367.60/third_party/boringssl/src/util/fipstools/delocate/testdata/ppc64le-Sample2/out.s
Index: chromium-125.0.6422.41/third_party/boringssl/src/util/fipstools/delocate/testdata/ppc64le-Sample2/out.s
===================================================================
--- /dev/null
+++ chromium-124.0.6367.60/third_party/boringssl/src/util/fipstools/delocate/testdata/ppc64le-Sample2/out.s
+++ chromium-125.0.6422.41/third_party/boringssl/src/util/fipstools/delocate/testdata/ppc64le-Sample2/out.s
@@ -0,0 +1,677 @@
+.text
+.file 1 "inserted_by_delocate.c"
@ -8604,10 +8603,10 @@ Index: chromium-124.0.6367.60/third_party/boringssl/src/util/fipstools/delocate/
+.byte 0xff
+.byte 0x31
+.byte 0x80
Index: chromium-124.0.6367.60/third_party/boringssl/src/util/fipstools/delocate/testdata/ppc64le-TOCWithOffset/in.s
Index: chromium-125.0.6422.41/third_party/boringssl/src/util/fipstools/delocate/testdata/ppc64le-TOCWithOffset/in.s
===================================================================
--- /dev/null
+++ chromium-124.0.6367.60/third_party/boringssl/src/util/fipstools/delocate/testdata/ppc64le-TOCWithOffset/in.s
+++ chromium-125.0.6422.41/third_party/boringssl/src/util/fipstools/delocate/testdata/ppc64le-TOCWithOffset/in.s
@@ -0,0 +1,23 @@
+ .text
+foo:
@ -8632,10 +8631,10 @@ Index: chromium-124.0.6367.60/third_party/boringssl/src/util/fipstools/delocate/
+
+ addis 4, 2, 1+foo-2@toc@ha+3
+ addi 4, 4, 1+foo-2@toc@l+3
Index: chromium-124.0.6367.60/third_party/boringssl/src/util/fipstools/delocate/testdata/ppc64le-TOCWithOffset/out.s
Index: chromium-125.0.6422.41/third_party/boringssl/src/util/fipstools/delocate/testdata/ppc64le-TOCWithOffset/out.s
===================================================================
--- /dev/null
+++ chromium-124.0.6367.60/third_party/boringssl/src/util/fipstools/delocate/testdata/ppc64le-TOCWithOffset/out.s
+++ chromium-125.0.6422.41/third_party/boringssl/src/util/fipstools/delocate/testdata/ppc64le-TOCWithOffset/out.s
@@ -0,0 +1,178 @@
+.text
+.file 1 "inserted_by_delocate.c"
@ -8815,10 +8814,10 @@ Index: chromium-124.0.6367.60/third_party/boringssl/src/util/fipstools/delocate/
+.byte 0xff
+.byte 0x31
+.byte 0x80
Index: chromium-124.0.6367.60/third_party/boringssl/src/crypto/fipsmodule/sha/sha1.c
Index: chromium-125.0.6422.41/third_party/boringssl/src/crypto/fipsmodule/sha/sha1.c
===================================================================
--- chromium-124.0.6367.60.orig/third_party/boringssl/src/crypto/fipsmodule/sha/sha1.c
+++ chromium-124.0.6367.60/third_party/boringssl/src/crypto/fipsmodule/sha/sha1.c
--- chromium-125.0.6422.41.orig/third_party/boringssl/src/crypto/fipsmodule/sha/sha1.c
+++ chromium-125.0.6422.41/third_party/boringssl/src/crypto/fipsmodule/sha/sha1.c
@@ -416,6 +416,10 @@ static void sha1_block_data_order(uint32
return;
}
@ -8830,3 +8829,99 @@ Index: chromium-124.0.6367.60/third_party/boringssl/src/crypto/fipsmodule/sha/sh
sha1_block_data_order_nohw(state, data, num);
}
Index: chromium-125.0.6422.41/third_party/boringssl/src/build.json
===================================================================
--- chromium-125.0.6422.41.orig/third_party/boringssl/src/build.json
+++ chromium-125.0.6422.41/third_party/boringssl/src/build.json
@@ -118,6 +118,10 @@
{"src": "crypto/fipsmodule/sha/asm/sha512-armv4.pl"},
{"src": "crypto/fipsmodule/aes/asm/vpaes-armv7.pl"}
],
+ "perlasm_ppc64le": [
+ {"src": "crypto/fipsmodule/aes/asm/aesp8-ppc.pl"},
+ {"src": "crypto/fipsmodule/modes/asm/ghashp8-ppc.pl"}
+ ],
"perlasm_x86": [
{"src": "crypto/fipsmodule/aes/asm/aesni-x86.pl"},
{"src": "crypto/fipsmodule/bn/asm/bn-586.pl"},
@@ -221,6 +225,7 @@
"crypto/cpu_arm_freebsd.c",
"crypto/cpu_arm_linux.c",
"crypto/cpu_intel.c",
+ "crypto/cpu_ppc64le.c",
"crypto/crypto.c",
"crypto/curve25519/curve25519.c",
"crypto/curve25519/curve25519_64_adx.c",
@@ -765,6 +770,9 @@
"perlasm_arm": [
{"src": "crypto/test/asm/trampoline-armv4.pl"}
],
+ "perlasm_ppc64le": [
+ {"src": "crypto/test/asm/trampoline-ppc.pl"}
+ ],
"perlasm_x86": [
{"src": "crypto/test/asm/trampoline-x86.pl"}
],
Index: chromium-125.0.6422.41/third_party/boringssl/src/util/pregenerate/build.go
===================================================================
--- chromium-125.0.6422.41.orig/third_party/boringssl/src/util/pregenerate/build.go
+++ chromium-125.0.6422.41/third_party/boringssl/src/util/pregenerate/build.go
@@ -38,6 +38,7 @@ type InputTarget struct {
// architecture.
PerlasmAarch64 []PerlasmSource `json:"perlasm_aarch64,omitempty"`
PerlasmArm []PerlasmSource `json:"perlasm_arm,omitempty"`
+ PerlasmPPC64LE []PerlasmSource `json:"perlasm_ppc64le,omitempty"`
PerlasmX86 []PerlasmSource `json:"perlasm_x86,omitempty"`
PerlasmX86_64 []PerlasmSource `json:"perlasm_x86_64,omitempty"`
}
@@ -116,6 +117,9 @@ func (in *InputTarget) Pregenerate(name
for _, p := range in.PerlasmArm {
addPerlasmTask(&out.Asm, &p, "-linux.S", []string{"linux32"})
}
+ for _, p := range in.PerlasmPPC64LE {
+ addPerlasmTask(&out.Asm, &p, "-linux.S", []string{"linux64le"})
+ }
for _, p := range in.PerlasmX86 {
addPerlasmTask(&out.Asm, &p, "-apple.S", []string{"macosx", "-fPIC", "-DOPENSSL_IA32_SSE2"})
addPerlasmTask(&out.Asm, &p, "-linux.S", []string{"elf", "-fPIC", "-DOPENSSL_IA32_SSE2"})
Index: chromium-125.0.6422.41/third_party/boringssl/BUILD.generated.gni
===================================================================
--- chromium-125.0.6422.41.orig/third_party/boringssl/BUILD.generated.gni
+++ chromium-125.0.6422.41/third_party/boringssl/BUILD.generated.gni
@@ -93,6 +93,7 @@ crypto_sources = [
"src/crypto/cpu_arm_linux.c",
"src/crypto/cpu_arm_linux.h",
"src/crypto/cpu_intel.c",
+ "src/crypto/cpu_ppc64le.c",
"src/crypto/crypto.c",
"src/crypto/curve25519/curve25519.c",
"src/crypto/curve25519/curve25519_64_adx.c",
@@ -334,6 +335,7 @@ crypto_sources_asm = [
"src/gen/bcm/aesv8-gcm-armv8-apple.S",
"src/gen/bcm/aesv8-gcm-armv8-linux.S",
"src/gen/bcm/aesv8-gcm-armv8-win.S",
+ "src/gen/bcm/aesp8-ppc-linux.S",
"src/gen/bcm/armv4-mont-linux.S",
"src/gen/bcm/armv8-mont-apple.S",
"src/gen/bcm/armv8-mont-linux.S",
@@ -350,6 +352,7 @@ crypto_sources_asm = [
"src/gen/bcm/ghash-neon-armv8-apple.S",
"src/gen/bcm/ghash-neon-armv8-linux.S",
"src/gen/bcm/ghash-neon-armv8-win.S",
+ "src/gen/bcm/ghashp8-ppc-linux.S",
"src/gen/bcm/ghash-ssse3-x86-apple.S",
"src/gen/bcm/ghash-ssse3-x86-linux.S",
"src/gen/bcm/ghash-ssse3-x86_64-apple.S",
Index: chromium-125.0.6422.41/third_party/boringssl/README.ppc64le
===================================================================
--- /dev/null
+++ chromium-125.0.6422.41/third_party/boringssl/README.ppc64le
@@ -0,0 +1,8 @@
+==============================================================
+To recreate boringssl pregenerated files patch for ppc64le:
+
+cd third_party/boringssl/src
+cp -Rp gen gen.orig
+go run ./util/pregenerate
+cd ../../../../
+diff -urN chromium-*/third_party/boringssl/src/gen.orig chromium-*/third_party/boringssl/src/gen

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -0,0 +1,13 @@
Index: chromium-125.0.6422.41/third_party/skia/src/core/SkRasterPipeline.h
===================================================================
--- chromium-125.0.6422.41.orig/third_party/skia/src/core/SkRasterPipeline.h
+++ chromium-125.0.6422.41/third_party/skia/src/core/SkRasterPipeline.h
@@ -27,7 +27,7 @@ struct SkImageInfo;
struct skcms_TransferFunction;
#if __has_cpp_attribute(clang::musttail) && !defined(__EMSCRIPTEN__) && !defined(SK_CPU_ARM32) && \
- !defined(SK_CPU_LOONGARCH)
+ !defined(SK_CPU_LOONGARCH) && !defined(__powerpc64__)
#define SK_HAS_MUSTTAIL 1
#else
#define SK_HAS_MUSTTAIL 0

@ -513,20 +513,21 @@ Patch377: 0001-Add-PPC64-support-for-boringssl.patch
Patch378: 0001-third_party-libvpx-Properly-generate-gni-on-ppc64.patch
Patch379: 0001-third_party-lss-Don-t-look-for-mmap2-on-ppc64.patch
Patch380: 0001-third_party-pffft-Include-altivec.h-on-ppc64-with-SI.patch
Patch381: 0002-third_party-lss-kernel-structs.patch
Patch381: 0002-Add-PPC64-generated-files-for-boringssl.patch
Patch382: 0002-third_party-lss-kernel-structs.patch
Patch382: Rtc_base-system-arch.h-PPC.patch
Patch383: Rtc_base-system-arch.h-PPC.patch
Patch383: 0002-Include-cstddef-to-fix-build.patch
Patch384: 0004-third_party-crashpad-port-curl-transport-ppc64.patch
Patch384: 0002-Include-cstddef-to-fix-build.patch
Patch385: 0004-third_party-crashpad-port-curl-transport-ppc64.patch
Patch385: HACK-third_party-libvpx-use-generic-gnu.patch
Patch386: HACK-third_party-libvpx-use-generic-gnu.patch
Patch387: HACK-debian-clang-disable-skia-musttail.patch
Patch387: 0001-Add-ppc64-target-to-libaom.patch
Patch388: 0001-Add-pregenerated-config-for-libaom-on-ppc64.patch
Patch388: 0001-Add-ppc64-target-to-libaom.patch
Patch389: 0001-Add-pregenerated-config-for-libaom-on-ppc64.patch
Patch389: 0002-third_party-libvpx-Remove-bad-ppc64-config.patch
Patch390: 0002-third-party-boringssl-add-generated-files.patch
Patch390: 0002-third_party-libvpx-Remove-bad-ppc64-config.patch
Patch391: 0003-third_party-libvpx-Add-ppc64-generated-config.patch
# Enabling VSX causes artifacts to appear in VP9 videos
Patch394: 0004-third_party-libvpx-work-around-ambiguous-vsx.patch
@ -537,11 +538,12 @@ Patch395: skia-vsx-instructions.patch
Patch396: 0001-Implement-support-for-ppc64-on-Linux.patch
Patch397: 0001-Implement-support-for-PPC64-on-Linux.patch
Patch398: 0001-Force-baseline-POWER8-AltiVec-VSX-CPU-features-when-.patch
Patch399: fix-rustc.patch
Patch400: fix-rust-linking.patch
Patch401: fix-breakpad-compile.patch
Patch402: fix-partition-alloc-compile.patch
Patch403: 0002-Add-ppc64-trap-instructions.patch
Patch399: fix-clang-selection.patch
Patch400: fix-rustc.patch
Patch401: fix-rust-linking.patch
Patch402: fix-breakpad-compile.patch
Patch403: fix-partition-alloc-compile.patch
Patch404: 0002-Add-ppc64-trap-instructions.patch
Patch407: fix-ppc64-linux-syscalls-headers.patch
Patch409: use-sysconf-page-size-on-ppc64.patch
@ -554,8 +556,6 @@ Patch412: fix-swiftshader-compile.patch
# Suppress harmless compiler warning messages that appear on ppc64 due to arch-specific warning flags being passed
Patch413: fix-unknown-warning-option-messages.diff
Patch415: fix-clang-selection.patch
# upstream patches
# 64kpage support on el8
Patch500: chromium-124-el8-support-64kpage.patch
@ -1275,20 +1275,21 @@ udev.
%patch -P378 -p1 -b .0001-third_party-libvpx-Properly-generate-gni-on-ppc64
%patch -P379 -p1 -b .0001-third_party-lss-Don-t-look-for-mmap2-on-ppc64
%patch -P380 -p1 -b .0001-third_party-pffft-Include-altivec.h-on-ppc64-with-SI
%patch -P381 -p1 -b .0002-third_party-lss-kernel-structs
%patch -P381 -p1 -b .002-Add-PPC64-generated-files-for-boringssl
%patch -P382 -p1 -b .0002-third_party-lss-kernel-structs
%patch -P382 -p1 -b .Rtc_base-system-arch.h-PPC
%patch -P383 -p1 -b .Rtc_base-system-arch.h-PPC
%patch -P383 -p1 -b .0002-Include-cstddef-to-fix-build
%patch -P384 -p1 -b .0004-third_party-crashpad-port-curl-transport-ppc64
%patch -P384 -p1 -b .0002-Include-cstddef-to-fix-build
%patch -P385 -p1 -b .0004-third_party-crashpad-port-curl-transport-ppc64
%patch -P385 -p1 -b .HACK-third_party-libvpx-use-generic-gnu
%patch -P386 -p1 -b .HACK-third_party-libvpx-use-generic-gnu
%patch -P387 -p1 -b .HACK-debian-clang-disable-skia-musttail
%patch -P387 -p1 -b .0001-Add-ppc64-target-to-libaom
%patch -P388 -p1 -b .0001-Add-pregenerated-config-for-libaom-on-ppc64
%patch -P388 -p1 -b .0001-Add-ppc64-target-to-libaom
%patch -P389 -p1 -b .0001-Add-pregenerated-config-for-libaom-on-ppc64
%patch -P389 -p1 -b .0002-third_party-libvpx-Remove-bad-ppc64-config
%patch -P390 -p1 -b .0002-third-party-boringssl-add-generated-files
%patch -P390 -p1 -b .0002-third_party-libvpx-Remove-bad-ppc64-config
%patch -P391 -p1 -b .0003-third_party-libvpx-Add-ppc64-generated-config
%patch -P394 -p1 -b .0004-third_party-libvpx-work-around-ambiguous-vsx
@ -1297,11 +1298,12 @@ udev.
%patch -P396 -p1 -b .0001-Implement-support-for-ppc64-on-Linux
%patch -P397 -p1 -b .0001-Implement-support-for-PPC64-on-Linux
%patch -P398 -p1 -b .0001-Force-baseline-POWER8-AltiVec-VSX-CPU-features-when-
%patch -P399 -p1 -b .fix-rustc
%patch -P400 -p1 -b .fix-rust-linking
%patch -P401 -p1 -b .fix-breakpad-compile
%patch -P402 -p1 -b .fix-partition-alloc-compile
%patch -P403 -p1 -b .0002-Add-ppc64-trap-instructions
%patch -P399 -p1 -b .fix-clang-selection
%patch -P400 -p1 -b .fix-rustc
%patch -P401 -p1 -b .fix-rust-linking
%patch -P402 -p1 -b .fix-breakpad-compile
%patch -P403 -p1 -b .fix-partition-alloc-compile
%patch -P404 -p1 -b .0002-Add-ppc64-trap-instructions
%patch -P407 -p1 -b .fix-ppc64-linux-syscalls-headers
%patch -P409 -p1 -b .use-sysconf-page-size-on-ppc64
@ -1311,8 +1313,6 @@ udev.
%patch -P412 -p1 -b .fix-swiftshader-compile.patch
%patch -P413 -p1 -b .fix-unknown-warning-option-messages
%patch -P415 -p1 -b .fix-clang-selection
%endif
%%ifarch aarch64

@ -1,6 +1,7 @@
diff -up chromium-125.0.6422.41/third_party/skia/BUILD.gn.me chromium-125.0.6422.41/third_party/skia/BUILD.gn
--- chromium-125.0.6422.41/third_party/skia/BUILD.gn.me 2024-05-08 22:30:53.000000000 +0200
+++ chromium-125.0.6422.41/third_party/skia/BUILD.gn 2024-05-14 00:02:51.686315473 +0200
Index: chromium-125.0.6422.41/third_party/skia/BUILD.gn
===================================================================
--- chromium-125.0.6422.41.orig/third_party/skia/BUILD.gn
+++ chromium-125.0.6422.41/third_party/skia/BUILD.gn
@@ -188,6 +188,12 @@ opts("skx") {
}
}
@ -34,9 +35,10 @@ diff -up chromium-125.0.6422.41/third_party/skia/BUILD.gn.me chromium-125.0.6422
sources = []
sources += skia_pathops_sources
diff -up chromium-125.0.6422.41/third_party/skia/gn/skia/BUILD.gn.me chromium-125.0.6422.41/third_party/skia/gn/skia/BUILD.gn
--- chromium-125.0.6422.41/third_party/skia/gn/skia/BUILD.gn.me 2024-05-14 00:02:51.686315473 +0200
+++ chromium-125.0.6422.41/third_party/skia/gn/skia/BUILD.gn 2024-05-14 00:05:17.683137362 +0200
Index: chromium-125.0.6422.41/third_party/skia/gn/skia/BUILD.gn
===================================================================
--- chromium-125.0.6422.41.orig/third_party/skia/gn/skia/BUILD.gn
+++ chromium-125.0.6422.41/third_party/skia/gn/skia/BUILD.gn
@@ -163,6 +163,8 @@ config("default") {
"-mfpmath=sse",
]
@ -46,9 +48,10 @@ diff -up chromium-125.0.6422.41/third_party/skia/gn/skia/BUILD.gn.me chromium-12
} else if (current_cpu == "loong64") {
cflags += [
"-mlsx",
diff -up chromium-125.0.6422.41/third_party/skia/include/core/SkTypes.h.me chromium-125.0.6422.41/third_party/skia/include/core/SkTypes.h
--- chromium-125.0.6422.41/third_party/skia/include/core/SkTypes.h.me 2024-05-08 22:30:53.000000000 +0200
+++ chromium-125.0.6422.41/third_party/skia/include/core/SkTypes.h 2024-05-14 00:02:51.686315473 +0200
Index: chromium-125.0.6422.41/third_party/skia/include/core/SkTypes.h
===================================================================
--- chromium-125.0.6422.41.orig/third_party/skia/include/core/SkTypes.h
+++ chromium-125.0.6422.41/third_party/skia/include/core/SkTypes.h
@@ -195,5 +195,44 @@ static constexpr uint32_t SK_InvalidGenI
*/
static constexpr uint32_t SK_InvalidUniqueID = 0;
@ -94,32 +97,10 @@ diff -up chromium-125.0.6422.41/third_party/skia/include/core/SkTypes.h.me chrom
+
#endif
diff -up chromium-125.0.6422.41/third_party/skia/include/private/base/SkFeatures.h.me chromium-125.0.6422.41/third_party/skia/include/private/base/SkFeatures.h
--- chromium-125.0.6422.41/third_party/skia/include/private/base/SkFeatures.h.me 2024-05-08 22:30:53.000000000 +0200
+++ chromium-125.0.6422.41/third_party/skia/include/private/base/SkFeatures.h 2024-05-14 00:02:51.689315531 +0200
@@ -63,6 +63,8 @@
#if defined(__i386) || defined(_M_IX86) || defined(__x86_64__) || defined(_M_X64)
#define SK_CPU_X86 1
+#elif defined(__powerpc64__) || defined(__PPC64__)
+ #define SK_CPU_PPC64 1
#endif
#if defined(__loongarch__) || defined (__loongarch64)
diff -up chromium-125.0.6422.41/third_party/skia/modules/skcms/src/skcms_internals.h.me chromium-125.0.6422.41/third_party/skia/modules/skcms/src/skcms_internals.h
--- chromium-125.0.6422.41/third_party/skia/modules/skcms/src/skcms_internals.h.me 2024-05-08 22:30:54.000000000 +0200
+++ chromium-125.0.6422.41/third_party/skia/modules/skcms/src/skcms_internals.h 2024-05-14 00:02:51.689315531 +0200
@@ -47,6 +47,7 @@ extern "C" {
&& !defined(__EMSCRIPTEN__) \
&& !defined(__arm__) \
&& !defined(__riscv) \
+ && !defined(__powerpc64__) \
&& !defined(__loongarch__) \
&& !defined(_WIN32) && !defined(__SYMBIAN32__)
#define SKCMS_HAS_MUSTTAIL 1
diff -up chromium-125.0.6422.41/third_party/skia/src/base/SkSpinlock.cpp.me chromium-125.0.6422.41/third_party/skia/src/base/SkSpinlock.cpp
--- chromium-125.0.6422.41/third_party/skia/src/base/SkSpinlock.cpp.me 2024-05-08 22:30:55.000000000 +0200
+++ chromium-125.0.6422.41/third_party/skia/src/base/SkSpinlock.cpp 2024-05-14 00:02:51.686315473 +0200
Index: chromium-125.0.6422.41/third_party/skia/src/base/SkSpinlock.cpp
===================================================================
--- chromium-125.0.6422.41.orig/third_party/skia/src/base/SkSpinlock.cpp
+++ chromium-125.0.6422.41/third_party/skia/src/base/SkSpinlock.cpp
@@ -33,7 +33,8 @@
#endif
@ -130,119 +111,10 @@ diff -up chromium-125.0.6422.41/third_party/skia/src/base/SkSpinlock.cpp.me chro
#include <emmintrin.h>
static void do_pause() { _mm_pause(); }
#else
diff -up chromium-125.0.6422.41/third_party/skia/src/base/SkVx.h.me chromium-125.0.6422.41/third_party/skia/src/base/SkVx.h
--- chromium-125.0.6422.41/third_party/skia/src/base/SkVx.h.me 2024-05-08 22:30:55.000000000 +0200
+++ chromium-125.0.6422.41/third_party/skia/src/base/SkVx.h 2024-05-14 00:02:51.688315511 +0200
@@ -42,7 +42,13 @@
#if SKVX_USE_SIMD
#if SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSE1
- #include <immintrin.h>
+ #if __PPC64__
+ #include <mmintrin.h>
+ #include <emmintrin.h>
+ #include <tmmintrin.h>
+ #else
+ #include <immintrin.h>
+ #endif
#elif defined(SK_ARM_HAS_NEON)
#include <arm_neon.h>
#elif defined(__wasm_simd128__)
diff -up chromium-125.0.6422.41/third_party/skia/src/core/SkBitmapProcState_opts.cpp.me chromium-125.0.6422.41/third_party/skia/src/core/SkBitmapProcState_opts.cpp
--- chromium-125.0.6422.41/third_party/skia/src/core/SkBitmapProcState_opts.cpp.me 2024-05-08 22:30:55.000000000 +0200
+++ chromium-125.0.6422.41/third_party/skia/src/core/SkBitmapProcState_opts.cpp 2024-05-14 00:02:51.689315531 +0200
@@ -25,7 +25,7 @@ namespace SkOpts {
static bool init() {
#if defined(SK_ENABLE_OPTIMIZE_SIZE)
// All Init_foo functions are omitted when optimizing for size
- #elif defined(SK_CPU_X86)
+ #elif defined(SK_CPU_X86) || defined(SK_CPU_PPC64)
#if SK_CPU_SSE_LEVEL < SK_CPU_SSE_LEVEL_SSSE3
if (SkCpu::Supports(SkCpu::SSSE3)) { Init_BitmapProcState_ssse3(); }
#endif
diff -up chromium-125.0.6422.41/third_party/skia/src/core/SkBitmapProcState_opts_ssse3.cpp.me chromium-125.0.6422.41/third_party/skia/src/core/SkBitmapProcState_opts_ssse3.cpp
--- chromium-125.0.6422.41/third_party/skia/src/core/SkBitmapProcState_opts_ssse3.cpp.me 2024-05-08 22:30:55.000000000 +0200
+++ chromium-125.0.6422.41/third_party/skia/src/core/SkBitmapProcState_opts_ssse3.cpp 2024-05-14 00:02:51.689315531 +0200
@@ -8,7 +8,7 @@
#include "include/private/base/SkFeatures.h"
#include "src/core/SkOptsTargets.h"
-#if defined(SK_CPU_X86) && !defined(SK_ENABLE_OPTIMIZE_SIZE)
+#if (defined(SK_CPU_X86) || defined(SK_CPU_PPC64)) && !defined(SK_ENABLE_OPTIMIZE_SIZE)
// The order of these includes is important:
// 1) Select the target CPU architecture by defining SK_OPTS_TARGET and including SkOpts_SetTarget
diff -up chromium-125.0.6422.41/third_party/skia/src/core/SkBlitMask_opts.cpp.me chromium-125.0.6422.41/third_party/skia/src/core/SkBlitMask_opts.cpp
--- chromium-125.0.6422.41/third_party/skia/src/core/SkBlitMask_opts.cpp.me 2024-05-08 22:30:55.000000000 +0200
+++ chromium-125.0.6422.41/third_party/skia/src/core/SkBlitMask_opts.cpp 2024-05-14 00:02:51.689315531 +0200
@@ -25,7 +25,7 @@ namespace SkOpts {
static bool init() {
#if defined(SK_ENABLE_OPTIMIZE_SIZE)
// All Init_foo functions are omitted when optimizing for size
- #elif defined(SK_CPU_X86)
+ #elif defined(SK_CPU_X86) || defined(SK_CPU_PPC64)
#if SK_CPU_SSE_LEVEL < SK_CPU_SSE_LEVEL_SSSE3
if (SkCpu::Supports(SkCpu::SSSE3)) { Init_BlitMask_ssse3(); }
#endif
diff -up chromium-125.0.6422.41/third_party/skia/src/core/SkBlitMask_opts_ssse3.cpp.me chromium-125.0.6422.41/third_party/skia/src/core/SkBlitMask_opts_ssse3.cpp
--- chromium-125.0.6422.41/third_party/skia/src/core/SkBlitMask_opts_ssse3.cpp.me 2024-05-08 22:30:55.000000000 +0200
+++ chromium-125.0.6422.41/third_party/skia/src/core/SkBlitMask_opts_ssse3.cpp 2024-05-14 00:02:51.688315511 +0200
@@ -9,7 +9,7 @@
#include "src/core/SkBlitMask.h"
#include "src/core/SkOptsTargets.h"
-#if defined(SK_CPU_X86) && !defined(SK_ENABLE_OPTIMIZE_SIZE)
+#if (defined(SK_CPU_X86) || defined(SK_CPU_PPC64)) && !defined(SK_ENABLE_OPTIMIZE_SIZE)
// The order of these includes is important:
// 1) Select the target CPU architecture by defining SK_OPTS_TARGET and including SkOpts_SetTarget
diff -up chromium-125.0.6422.41/third_party/skia/src/core/SkBlitter_ARGB32.cpp.me chromium-125.0.6422.41/third_party/skia/src/core/SkBlitter_ARGB32.cpp
--- chromium-125.0.6422.41/third_party/skia/src/core/SkBlitter_ARGB32.cpp.me 2024-05-08 22:30:55.000000000 +0200
+++ chromium-125.0.6422.41/third_party/skia/src/core/SkBlitter_ARGB32.cpp 2024-05-14 00:02:51.690315550 +0200
@@ -126,6 +126,16 @@ static inline SkPMColor blend_lcd16_opaq
#if SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSE2
#include <emmintrin.h>
+#if defined(SK_CPU_PPC64)
+ /* Load signed 64-bit integer from P into vector element 0. The address need not be 16-byte aligned. */
+ extern __inline __m128i
+ __attribute__((__gnu_inline__, __always_inline__, __artificial__))
+ _mm_loadu_si64 (void const *__P)
+ {
+ return _mm_set_epi64((__m64)0LL, *(__m64 *)__P);
+ }
+#endif
+
// The following (left) shifts cause the top 5 bits of the mask components to
// line up with the corresponding components in an SkPMColor.
// Note that the mask's RGB16 order may differ from the SkPMColor order.
diff -up chromium-125.0.6422.41/third_party/skia/src/core/SkCpu.h.me chromium-125.0.6422.41/third_party/skia/src/core/SkCpu.h
--- chromium-125.0.6422.41/third_party/skia/src/core/SkCpu.h.me 2024-05-08 22:30:55.000000000 +0200
+++ chromium-125.0.6422.41/third_party/skia/src/core/SkCpu.h 2024-05-14 00:02:51.689315531 +0200
@@ -60,7 +60,7 @@ inline bool SkCpu::Supports(uint32_t mas
// If we mask in compile-time known lower limits, the compiler can
// often compile away this entire function.
-#if SK_CPU_X86
+#if SK_CPU_X86 || defined(SK_CPU_PPC64)
#if SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSE1
features |= SSE1;
#endif
diff -up chromium-125.0.6422.41/third_party/skia/src/core/SkSwizzler_opts_ssse3.cpp.me chromium-125.0.6422.41/third_party/skia/src/core/SkSwizzler_opts_ssse3.cpp
--- chromium-125.0.6422.41/third_party/skia/src/core/SkSwizzler_opts_ssse3.cpp.me 2024-05-08 22:30:55.000000000 +0200
+++ chromium-125.0.6422.41/third_party/skia/src/core/SkSwizzler_opts_ssse3.cpp 2024-05-14 00:02:51.688315511 +0200
@@ -10,7 +10,7 @@
#include "src/core/SkOptsTargets.h"
#include "src/core/SkSwizzlePriv.h"
-#if defined(SK_CPU_X86) && \
+#if (defined(SK_CPU_X86) || defined(SK_CPU_PPC64)) && \
!defined(SK_ENABLE_OPTIMIZE_SIZE) && \
SK_CPU_SSE_LEVEL < SK_CPU_SSE_LEVEL_SSSE3
diff -up chromium-125.0.6422.41/third_party/skia/src/opts/SkBitmapProcState_opts.h.me chromium-125.0.6422.41/third_party/skia/src/opts/SkBitmapProcState_opts.h
--- chromium-125.0.6422.41/third_party/skia/src/opts/SkBitmapProcState_opts.h.me 2024-05-08 22:30:55.000000000 +0200
+++ chromium-125.0.6422.41/third_party/skia/src/opts/SkBitmapProcState_opts.h 2024-05-14 00:02:51.686315473 +0200
Index: chromium-125.0.6422.41/third_party/skia/src/opts/SkBitmapProcState_opts.h
===================================================================
--- chromium-125.0.6422.41.orig/third_party/skia/src/opts/SkBitmapProcState_opts.h
+++ chromium-125.0.6422.41/third_party/skia/src/opts/SkBitmapProcState_opts.h
@@ -21,7 +21,13 @@
// The rest are scattershot at the moment but I want to get them
// all migrated to be normal code inside SkBitmapProcState.cpp.
@ -258,9 +130,10 @@ diff -up chromium-125.0.6422.41/third_party/skia/src/opts/SkBitmapProcState_opts
#include <immintrin.h>
#elif defined(SK_ARM_HAS_NEON)
#include <arm_neon.h>
diff -up chromium-125.0.6422.41/third_party/skia/src/opts/SkBlitRow_opts.h.me chromium-125.0.6422.41/third_party/skia/src/opts/SkBlitRow_opts.h
--- chromium-125.0.6422.41/third_party/skia/src/opts/SkBlitRow_opts.h.me 2024-05-08 22:30:55.000000000 +0200
+++ chromium-125.0.6422.41/third_party/skia/src/opts/SkBlitRow_opts.h 2024-05-14 00:02:51.687315492 +0200
Index: chromium-125.0.6422.41/third_party/skia/src/opts/SkBlitRow_opts.h
===================================================================
--- chromium-125.0.6422.41.orig/third_party/skia/src/opts/SkBlitRow_opts.h
+++ chromium-125.0.6422.41/third_party/skia/src/opts/SkBlitRow_opts.h
@@ -69,7 +69,7 @@
#endif
@ -270,13 +143,14 @@ diff -up chromium-125.0.6422.41/third_party/skia/src/opts/SkBlitRow_opts.h.me ch
static inline __m128i SkPMSrcOver_SSE2(const __m128i& src, const __m128i& dst) {
__m128i scale = _mm_sub_epi32(_mm_set1_epi32(256),
diff -up chromium-125.0.6422.41/third_party/skia/src/opts/SkRasterPipeline_opts.h.me chromium-125.0.6422.41/third_party/skia/src/opts/SkRasterPipeline_opts.h
--- chromium-125.0.6422.41/third_party/skia/src/opts/SkRasterPipeline_opts.h.me 2024-05-08 22:30:55.000000000 +0200
+++ chromium-125.0.6422.41/third_party/skia/src/opts/SkRasterPipeline_opts.h 2024-05-14 00:11:12.485694679 +0200
Index: chromium-125.0.6422.41/third_party/skia/src/opts/SkRasterPipeline_opts.h
===================================================================
--- chromium-125.0.6422.41.orig/third_party/skia/src/opts/SkRasterPipeline_opts.h
+++ chromium-125.0.6422.41/third_party/skia/src/opts/SkRasterPipeline_opts.h
@@ -1,5 +1,6 @@
/*
* Copyright 2018 Google Inc.
+ * Copyright 2023 Raptor Engineering, LLC
+ * Copyright 2023-2024 Raptor Engineering, LLC
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
@ -289,15 +163,15 @@ diff -up chromium-125.0.6422.41/third_party/skia/src/opts/SkRasterPipeline_opts.
#elif SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SKX
#define JUMPER_IS_SKX
#elif SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_AVX2
@@ -116,6 +119,8 @@ using NoCtx = const void*;
#include <lsxintrin.h>
#elif defined(JUMPER_IS_LSX)
#include <lsxintrin.h>
@@ -111,6 +114,8 @@ using NoCtx = const void*;
#include <math.h>
#elif defined(JUMPER_IS_NEON)
#include <arm_neon.h>
+#elif defined(JUMPER_IS_VSX)
+ #include <emmintrin.h>
#else
#include <immintrin.h>
#endif
#elif defined(JUMPER_IS_LASX)
#include <lasxintrin.h>
#include <lsxintrin.h>
@@ -209,6 +214,184 @@ namespace SK_OPTS_NS {
ptr[3] = a;
}
@ -525,28 +399,28 @@ diff -up chromium-125.0.6422.41/third_party/skia/src/opts/SkRasterPipeline_opts.
// These platforms are ideal for wider stages, and their default ABI is ideal.
#define ABI
#define JUMPER_NARROW_STAGES 0
@@ -5475,6 +5677,10 @@ SI F sqrt_(F x) {
__m128 lo,hi;
@@ -5467,6 +5669,10 @@ SI F sqrt_(F x) {
float32x4_t lo,hi;
split(x, &lo,&hi);
return join<F>(__lsx_vfsqrt_s(lo), __lsx_vfsqrt_s(hi));
return join<F>(sqrt(lo), sqrt(hi));
+#elif defined(JUMPER_IS_VSX)
+ vector float lo,hi;
+ split(x, &lo,&hi);
+ return join<F>(vec_sqrt(lo), vec_sqrt(hi));
#else
return F{
sqrtf(x[0]), sqrtf(x[1]), sqrtf(x[2]), sqrtf(x[3]),
@@ -5506,6 +5712,10 @@ SI F floor_(F x) {
#elif defined(JUMPER_IS_LASX)
__m256 lo,hi;
split(x, &lo,&hi);
@@ -5498,6 +5704,10 @@ SI F floor_(F x) {
__m128 lo,hi;
split(x, &lo,&hi);
return join<F>(__lsx_vfrintrm_s(lo), __lsx_vfrintrm_s(hi));
return join<F>(_mm_floor_ps(lo), _mm_floor_ps(hi));
+#elif defined(JUMPER_IS_VSX)
+ vector float lo,hi;
+ split(x, &lo,&hi);
+ return join<F>(vec_floor(lo), vec_floor(hi));
#else
F roundtrip = cast<F>(cast<I32>(x));
return roundtrip - if_then_else(roundtrip > x, F_(1), F_(0));
#elif defined(JUMPER_IS_LASX)
__m256 lo,hi;
split(x, &lo,&hi);
@@ -5517,6 +5727,7 @@ SI F floor_(F x) {
// (2 * a * b + (1 << 15)) >> 16
// The result is a number on [-1, 1).
@ -555,10 +429,10 @@ diff -up chromium-125.0.6422.41/third_party/skia/src/opts/SkRasterPipeline_opts.
SI I16 scaled_mult(I16 a, I16 b) {
#if defined(JUMPER_IS_SKX)
return (I16)_mm256_mulhrs_epi16((__m256i)a, (__m256i)b);
@@ -5534,6 +5745,22 @@ SI I16 scaled_mult(I16 a, I16 b) {
#elif defined(JUMPER_IS_LSX)
I16 res = __lsx_vmuh_h(a, b);
return __lsx_vslli_h(res, 1);
@@ -5528,6 +5739,22 @@ SI I16 scaled_mult(I16 a, I16 b) {
return vqrdmulhq_s16(a, b);
#elif defined(JUMPER_IS_NEON)
return vqrdmulhq_s16(a, b);
+#elif defined(JUMPER_IS_VSX)
+ const vector unsigned int shift = vec_splats((unsigned int)14);
+ const vector int ones = vec_splats((signed int)1);
@ -575,9 +449,9 @@ diff -up chromium-125.0.6422.41/third_party/skia/src/opts/SkRasterPipeline_opts.
+ d = vec_add(d, ones);
+ d = vec_sr(d,(vector unsigned int)ones);
+ return vec_pack(c, d);
#else
const I32 roundingTerm = I32_(1 << 14);
return cast<I16>((cast<I32>(a) * cast<I32>(b) + roundingTerm) >> 15);
#elif defined(JUMPER_IS_LASX)
I16 res = __lasx_xvmuh_h(a, b);
return __lasx_xvslli_h(res, 1);
@@ -5555,7 +5782,26 @@ SI U16 constrained_add(I16 a, U16 b) {
SkASSERT(-ib <= ia && ia <= 65535 - ib);
}
@ -650,9 +524,132 @@ diff -up chromium-125.0.6422.41/third_party/skia/src/opts/SkRasterPipeline_opts.
};
r = lerpY(topR, bottomR);
diff -up chromium-125.0.6422.41/third_party/skia/src/opts/SkSwizzler_opts.inc.me chromium-125.0.6422.41/third_party/skia/src/opts/SkSwizzler_opts.inc
--- chromium-125.0.6422.41/third_party/skia/src/opts/SkSwizzler_opts.inc.me 2024-05-08 22:30:55.000000000 +0200
+++ chromium-125.0.6422.41/third_party/skia/src/opts/SkSwizzler_opts.inc 2024-05-14 00:02:51.689315531 +0200
Index: chromium-125.0.6422.41/third_party/skia/src/base/SkVx.h
===================================================================
--- chromium-125.0.6422.41.orig/third_party/skia/src/base/SkVx.h
+++ chromium-125.0.6422.41/third_party/skia/src/base/SkVx.h
@@ -42,7 +42,13 @@
#if SKVX_USE_SIMD
#if SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSE1
- #include <immintrin.h>
+ #if __PPC64__
+ #include <mmintrin.h>
+ #include <emmintrin.h>
+ #include <tmmintrin.h>
+ #else
+ #include <immintrin.h>
+ #endif
#elif defined(SK_ARM_HAS_NEON)
#include <arm_neon.h>
#elif defined(__wasm_simd128__)
Index: chromium-125.0.6422.41/third_party/skia/src/core/SkBlitMask_opts_ssse3.cpp
===================================================================
--- chromium-125.0.6422.41.orig/third_party/skia/src/core/SkBlitMask_opts_ssse3.cpp
+++ chromium-125.0.6422.41/third_party/skia/src/core/SkBlitMask_opts_ssse3.cpp
@@ -9,7 +9,7 @@
#include "src/core/SkBlitMask.h"
#include "src/core/SkOptsTargets.h"
-#if defined(SK_CPU_X86) && !defined(SK_ENABLE_OPTIMIZE_SIZE)
+#if (defined(SK_CPU_X86) || defined(SK_CPU_PPC64)) && !defined(SK_ENABLE_OPTIMIZE_SIZE)
// The order of these includes is important:
// 1) Select the target CPU architecture by defining SK_OPTS_TARGET and including SkOpts_SetTarget
Index: chromium-125.0.6422.41/third_party/skia/src/core/SkSwizzler_opts_ssse3.cpp
===================================================================
--- chromium-125.0.6422.41.orig/third_party/skia/src/core/SkSwizzler_opts_ssse3.cpp
+++ chromium-125.0.6422.41/third_party/skia/src/core/SkSwizzler_opts_ssse3.cpp
@@ -10,7 +10,7 @@
#include "src/core/SkOptsTargets.h"
#include "src/core/SkSwizzlePriv.h"
-#if defined(SK_CPU_X86) && \
+#if (defined(SK_CPU_X86) || defined(SK_CPU_PPC64)) && \
!defined(SK_ENABLE_OPTIMIZE_SIZE) && \
SK_CPU_SSE_LEVEL < SK_CPU_SSE_LEVEL_SSSE3
Index: chromium-125.0.6422.41/third_party/skia/src/core/SkBlitMask_opts.cpp
===================================================================
--- chromium-125.0.6422.41.orig/third_party/skia/src/core/SkBlitMask_opts.cpp
+++ chromium-125.0.6422.41/third_party/skia/src/core/SkBlitMask_opts.cpp
@@ -25,7 +25,7 @@ namespace SkOpts {
static bool init() {
#if defined(SK_ENABLE_OPTIMIZE_SIZE)
// All Init_foo functions are omitted when optimizing for size
- #elif defined(SK_CPU_X86)
+ #elif defined(SK_CPU_X86) || defined(SK_CPU_PPC64)
#if SK_CPU_SSE_LEVEL < SK_CPU_SSE_LEVEL_SSSE3
if (SkCpu::Supports(SkCpu::SSSE3)) { Init_BlitMask_ssse3(); }
#endif
Index: chromium-125.0.6422.41/third_party/skia/src/core/SkBitmapProcState_opts.cpp
===================================================================
--- chromium-125.0.6422.41.orig/third_party/skia/src/core/SkBitmapProcState_opts.cpp
+++ chromium-125.0.6422.41/third_party/skia/src/core/SkBitmapProcState_opts.cpp
@@ -25,7 +25,7 @@ namespace SkOpts {
static bool init() {
#if defined(SK_ENABLE_OPTIMIZE_SIZE)
// All Init_foo functions are omitted when optimizing for size
- #elif defined(SK_CPU_X86)
+ #elif defined(SK_CPU_X86) || defined(SK_CPU_PPC64)
#if SK_CPU_SSE_LEVEL < SK_CPU_SSE_LEVEL_SSSE3
if (SkCpu::Supports(SkCpu::SSSE3)) { Init_BitmapProcState_ssse3(); }
#endif
Index: chromium-125.0.6422.41/third_party/skia/src/core/SkCpu.h
===================================================================
--- chromium-125.0.6422.41.orig/third_party/skia/src/core/SkCpu.h
+++ chromium-125.0.6422.41/third_party/skia/src/core/SkCpu.h
@@ -60,7 +60,7 @@ inline bool SkCpu::Supports(uint32_t mas
// If we mask in compile-time known lower limits, the compiler can
// often compile away this entire function.
-#if SK_CPU_X86
+#if SK_CPU_X86 || defined(SK_CPU_PPC64)
#if SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSE1
features |= SSE1;
#endif
Index: chromium-125.0.6422.41/third_party/skia/src/core/SkBitmapProcState_opts_ssse3.cpp
===================================================================
--- chromium-125.0.6422.41.orig/third_party/skia/src/core/SkBitmapProcState_opts_ssse3.cpp
+++ chromium-125.0.6422.41/third_party/skia/src/core/SkBitmapProcState_opts_ssse3.cpp
@@ -8,7 +8,7 @@
#include "include/private/base/SkFeatures.h"
#include "src/core/SkOptsTargets.h"
-#if defined(SK_CPU_X86) && !defined(SK_ENABLE_OPTIMIZE_SIZE)
+#if (defined(SK_CPU_X86) || defined(SK_CPU_PPC64)) && !defined(SK_ENABLE_OPTIMIZE_SIZE)
// The order of these includes is important:
// 1) Select the target CPU architecture by defining SK_OPTS_TARGET and including SkOpts_SetTarget
Index: chromium-125.0.6422.41/third_party/skia/include/private/base/SkFeatures.h
===================================================================
--- chromium-125.0.6422.41.orig/third_party/skia/include/private/base/SkFeatures.h
+++ chromium-125.0.6422.41/third_party/skia/include/private/base/SkFeatures.h
@@ -63,6 +63,8 @@
#if defined(__i386) || defined(_M_IX86) || defined(__x86_64__) || defined(_M_X64)
#define SK_CPU_X86 1
+#elif defined(__powerpc64__) || defined(__PPC64__)
+ #define SK_CPU_PPC64 1
#endif
#if defined(__loongarch__) || defined (__loongarch64)
Index: chromium-125.0.6422.41/third_party/skia/modules/skcms/src/skcms_internals.h
===================================================================
--- chromium-125.0.6422.41.orig/third_party/skia/modules/skcms/src/skcms_internals.h
+++ chromium-125.0.6422.41/third_party/skia/modules/skcms/src/skcms_internals.h
@@ -47,6 +47,7 @@ extern "C" {
&& !defined(__EMSCRIPTEN__) \
&& !defined(__arm__) \
&& !defined(__riscv) \
+ && !defined(__powerpc64__) \
&& !defined(__loongarch__) \
&& !defined(_WIN32) && !defined(__SYMBIAN32__)
#define SKCMS_HAS_MUSTTAIL 1
Index: chromium-125.0.6422.41/third_party/skia/src/opts/SkSwizzler_opts.inc
===================================================================
--- chromium-125.0.6422.41.orig/third_party/skia/src/opts/SkSwizzler_opts.inc
+++ chromium-125.0.6422.41/third_party/skia/src/opts/SkSwizzler_opts.inc
@@ -14,7 +14,10 @@
#include <cmath>
#include <utility>
@ -699,3 +696,24 @@ diff -up chromium-125.0.6422.41/third_party/skia/src/opts/SkSwizzler_opts.inc.me
#elif SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSE1 && (defined(__clang__) || !defined(_MSC_VER))
// -- SSE -- Harden against timing attacks -- MSVC is not supported.
using F4 = __m128;
Index: chromium-125.0.6422.41/third_party/skia/src/core/SkBlitter_ARGB32.cpp
===================================================================
--- chromium-125.0.6422.41.orig/third_party/skia/src/core/SkBlitter_ARGB32.cpp
+++ chromium-125.0.6422.41/third_party/skia/src/core/SkBlitter_ARGB32.cpp
@@ -126,6 +126,16 @@ static inline SkPMColor blend_lcd16_opaq
#if SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSE2
#include <emmintrin.h>
+#if defined(SK_CPU_PPC64)
+ /* Load signed 64-bit integer from P into vector element 0. The address need not be 16-byte aligned. */
+ extern __inline __m128i
+ __attribute__((__gnu_inline__, __always_inline__, __artificial__))
+ _mm_loadu_si64 (void const *__P)
+ {
+ return _mm_set_epi64((__m64)0LL, *(__m64 *)__P);
+ }
+#endif
+
// The following (left) shifts cause the top 5 bits of the mask components to
// line up with the corresponding components in an SkPMColor.
// Note that the mask's RGB16 order may differ from the SkPMColor order.

Loading…
Cancel
Save