refreshed ppc64 patches

epel9
Than Ngo 7 months ago
parent 12d233916f
commit 3f8e3da9d7

@ -54,10 +54,8 @@ https://wiki.raptorcs.com/wiki/Porting/Chromium
src/tools/linux/md2core/minidump-2-core.cc | 45 +++++++++++++++
25 files changed, 281 insertions(+), 35 deletions(-)
Index: chromium-120.0.6099.71/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/raw_context_cpu.h
===================================================================
--- chromium-120.0.6099.71.orig/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/raw_context_cpu.h
+++ chromium-120.0.6099.71/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/raw_context_cpu.h
--- a/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/raw_context_cpu.h
+++ b/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/raw_context_cpu.h
@@ -51,6 +51,8 @@ typedef MDRawContextRISCV64 RawContextCP
# else
# error "Unexpected __riscv_xlen"
@ -67,10 +65,8 @@ Index: chromium-120.0.6099.71/third_party/breakpad/breakpad/src/client/linux/dum
#else
#error "This code has not been ported to your platform yet."
#endif
Index: chromium-120.0.6099.71/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/thread_info.cc
===================================================================
--- chromium-120.0.6099.71.orig/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/thread_info.cc
+++ chromium-120.0.6099.71/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/thread_info.cc
--- a/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/thread_info.cc
+++ b/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/thread_info.cc
@@ -336,7 +336,42 @@ void ThreadInfo::FillCPUContext(RawConte
#error "Unexpected __riscv_xlen"
#endif
@ -153,10 +149,8 @@ Index: chromium-120.0.6099.71/third_party/breakpad/breakpad/src/client/linux/dum
+#endif
+
} // namespace google_breakpad
Index: chromium-120.0.6099.71/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/thread_info.h
===================================================================
--- chromium-120.0.6099.71.orig/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/thread_info.h
+++ chromium-120.0.6099.71/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/thread_info.h
--- a/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/thread_info.h
+++ b/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/thread_info.h
@@ -67,6 +67,10 @@ struct ThreadInfo {
// Use the structures defined in <sys/user.h>
struct user_regs_struct regs;
@ -180,10 +174,8 @@ Index: chromium-120.0.6099.71/third_party/breakpad/breakpad/src/client/linux/dum
};
} // namespace google_breakpad
Index: chromium-120.0.6099.71/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.cc
===================================================================
--- chromium-120.0.6099.71.orig/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.cc
+++ chromium-120.0.6099.71/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.cc
--- a/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.cc
+++ b/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.cc
@@ -324,6 +324,48 @@ void UContextReader::FillCPUContext(RawC
#error "Unexpected __riscv_xlen"
#endif
@ -233,10 +225,8 @@ Index: chromium-120.0.6099.71/third_party/breakpad/breakpad/src/client/linux/dum
#endif
} // namespace google_breakpad
Index: chromium-120.0.6099.71/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.h
===================================================================
--- chromium-120.0.6099.71.orig/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.h
+++ chromium-120.0.6099.71/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.h
--- a/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.h
+++ b/third_party/breakpad/breakpad/src/client/linux/dump_writer_common/ucontext_reader.h
@@ -54,6 +54,9 @@ struct UContextReader {
#elif defined(__aarch64__)
static void FillCPUContext(RawContextCPU* out, const ucontext_t* uc,
@ -247,10 +237,8 @@ Index: chromium-120.0.6099.71/third_party/breakpad/breakpad/src/client/linux/dum
#else
static void FillCPUContext(RawContextCPU* out, const ucontext_t* uc);
#endif
Index: chromium-120.0.6099.71/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc
===================================================================
--- chromium-120.0.6099.71.orig/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc
+++ chromium-120.0.6099.71/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc
--- a/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc
+++ b/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc
@@ -464,6 +464,13 @@ bool ExceptionHandler::HandleSignal(int
memcpy(&g_crash_context_.float_state, fp_ptr,
sizeof(g_crash_context_.float_state));
@ -295,10 +283,8 @@ Index: chromium-120.0.6099.71/third_party/breakpad/breakpad/src/client/linux/han
#elif defined(__riscv)
context.siginfo.si_addr =
reinterpret_cast<void*>(context.context.uc_mcontext.__gregs[REG_PC]);
Index: chromium-120.0.6099.71/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.h
===================================================================
--- chromium-120.0.6099.71.orig/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.h
+++ chromium-120.0.6099.71/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.h
--- a/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.h
+++ b/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.h
@@ -200,7 +200,11 @@ class ExceptionHandler {
siginfo_t siginfo;
pid_t tid; // the crashing thread.
@ -312,10 +298,8 @@ Index: chromium-120.0.6099.71/third_party/breakpad/breakpad/src/client/linux/han
fpstate_t float_state;
#endif
};
Index: chromium-120.0.6099.71/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler_unittest.cc
===================================================================
--- chromium-120.0.6099.71.orig/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler_unittest.cc
+++ chromium-120.0.6099.71/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler_unittest.cc
--- a/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler_unittest.cc
+++ b/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler_unittest.cc
@@ -321,7 +321,7 @@ TEST(ExceptionHandlerTest, ParallelChild
ASSERT_EQ(SIGSEGV, WTERMSIG(status));
return;
@ -347,10 +331,8 @@ Index: chromium-120.0.6099.71/third_party/breakpad/breakpad/src/client/linux/han
const int kOffset = kMemorySize - sizeof(kIllegalInstruction);
const pid_t child = fork();
Index: chromium-120.0.6099.71/third_party/breakpad/breakpad/src/client/linux/microdump_writer/microdump_writer.cc
===================================================================
--- chromium-120.0.6099.71.orig/third_party/breakpad/breakpad/src/client/linux/microdump_writer/microdump_writer.cc
+++ chromium-120.0.6099.71/third_party/breakpad/breakpad/src/client/linux/microdump_writer/microdump_writer.cc
--- a/third_party/breakpad/breakpad/src/client/linux/microdump_writer/microdump_writer.cc
+++ b/third_party/breakpad/breakpad/src/client/linux/microdump_writer/microdump_writer.cc
@@ -141,7 +141,9 @@ class MicrodumpWriter {
const MicrodumpExtraInfo& microdump_extra_info,
LinuxDumper* dumper)
@ -393,10 +375,8 @@ Index: chromium-120.0.6099.71/third_party/breakpad/breakpad/src/client/linux/mic
const google_breakpad::fpstate_t* const float_state_;
#endif
LinuxDumper* dumper_;
Index: chromium-120.0.6099.71/third_party/breakpad/breakpad/src/client/linux/microdump_writer/microdump_writer_unittest.cc
===================================================================
--- chromium-120.0.6099.71.orig/third_party/breakpad/breakpad/src/client/linux/microdump_writer/microdump_writer_unittest.cc
+++ chromium-120.0.6099.71/third_party/breakpad/breakpad/src/client/linux/microdump_writer/microdump_writer_unittest.cc
--- a/third_party/breakpad/breakpad/src/client/linux/microdump_writer/microdump_writer_unittest.cc
+++ b/third_party/breakpad/breakpad/src/client/linux/microdump_writer/microdump_writer_unittest.cc
@@ -282,10 +282,19 @@ TEST(MicrodumpWriterTest, BasicWithMappi
CrashAndGetMicrodump(mappings, MicrodumpExtraInfo(), &buf);
ASSERT_TRUE(ContainsMicrodump(buf));
@ -420,10 +400,8 @@ Index: chromium-120.0.6099.71/third_party/breakpad/breakpad/src/client/linux/mic
#else
ASSERT_NE(std::string::npos,
buf.find("M 00001000 0000002A 00001000 "
Index: chromium-120.0.6099.71/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_core_dumper.cc
===================================================================
--- chromium-120.0.6099.71.orig/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_core_dumper.cc
+++ chromium-120.0.6099.71/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_core_dumper.cc
--- a/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_core_dumper.cc
+++ b/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_core_dumper.cc
@@ -118,6 +118,9 @@ bool LinuxCoreDumper::GetThreadInfoByInd
#elif defined(__riscv)
stack_pointer = reinterpret_cast<uint8_t*>(
@ -446,10 +424,8 @@ Index: chromium-120.0.6099.71/third_party/breakpad/breakpad/src/client/linux/min
# if defined(__ANDROID__)
for (int i = EF_R0; i <= EF_R31; i++)
info.mcontext.gregs[i - EF_R0] = status->pr_reg[i];
Index: chromium-120.0.6099.71/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_dumper.cc
===================================================================
--- chromium-120.0.6099.71.orig/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_dumper.cc
+++ chromium-120.0.6099.71/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_dumper.cc
--- a/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_dumper.cc
+++ b/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_dumper.cc
@@ -770,7 +770,9 @@ bool LinuxDumper::GetStackInfo(const voi
reinterpret_cast<uint8_t*>(int_stack_pointer & ~(page_size - 1));
@ -461,10 +437,8 @@ Index: chromium-120.0.6099.71/third_party/breakpad/breakpad/src/client/linux/min
const MappingInfo* mapping = FindMapping(stack_pointer);
if (!mapping)
Index: chromium-120.0.6099.71/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_dumper.h
===================================================================
--- chromium-120.0.6099.71.orig/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_dumper.h
+++ chromium-120.0.6099.71/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_dumper.h
--- a/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_dumper.h
+++ b/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_dumper.h
@@ -64,7 +64,8 @@ namespace google_breakpad {
typedef Elf32_auxv_t elf_aux_entry;
#elif defined(__x86_64) || defined(__aarch64__) || \
@ -475,10 +449,8 @@ Index: chromium-120.0.6099.71/third_party/breakpad/breakpad/src/client/linux/min
typedef Elf64_auxv_t elf_aux_entry;
#endif
Index: chromium-120.0.6099.71/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_dumper_unittest_helper.cc
===================================================================
--- chromium-120.0.6099.71.orig/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_dumper_unittest_helper.cc
+++ chromium-120.0.6099.71/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_dumper_unittest_helper.cc
--- a/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_dumper_unittest_helper.cc
+++ b/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_dumper_unittest_helper.cc
@@ -56,6 +56,8 @@
#define TID_PTR_REGISTER "$1"
#elif defined(__riscv)
@ -488,17 +460,9 @@ Index: chromium-120.0.6099.71/third_party/breakpad/breakpad/src/client/linux/min
#else
#error This test has not been ported to this platform.
#endif
Index: chromium-120.0.6099.71/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_ptrace_dumper.cc
===================================================================
--- chromium-120.0.6099.71.orig/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_ptrace_dumper.cc
+++ chromium-120.0.6099.71/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_ptrace_dumper.cc
@@ -152,19 +152,27 @@ bool LinuxPtraceDumper::CopyFromProcess(
return true;
}
-bool LinuxPtraceDumper::ReadRegisterSet(ThreadInfo* info, pid_t tid)
-{
+bool LinuxPtraceDumper::ReadRegisterSet(ThreadInfo* info, pid_t tid) {
--- a/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_ptrace_dumper.cc
+++ b/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_ptrace_dumper.cc
@@ -189,12 +189,12 @@ bool LinuxPtraceDumper::ReadRegisterSet(
#ifdef PTRACE_GETREGSET
struct iovec io;
info->GetGeneralPurposeRegisters(&io.iov_base, &io.iov_len);
@ -510,7 +474,12 @@ Index: chromium-120.0.6099.71/third_party/breakpad/breakpad/src/client/linux/min
info->GetFloatingPointRegisters(&io.iov_base, &io.iov_len);
- if (sys_ptrace(PTRACE_GETREGSET, tid, (void*)NT_FPREGSET, (void*)&io) == -1) {
+ if (ptrace(PTRACE_GETREGSET, tid, (void*)NT_FPREGSET, (void*)&io) == -1) {
return false;
// We are going to check if we can read VFP registers on ARM32.
// Currently breakpad does not support VFP registers to be a part of minidump,
// so this is only to confirm that we can actually read FP registers.
@@ -214,6 +214,15 @@ bool LinuxPtraceDumper::ReadRegisterSet(
}
#endif // defined(__arm__)
}
+
+#if defined(__powerpc64__)
@ -524,7 +493,7 @@ Index: chromium-120.0.6099.71/third_party/breakpad/breakpad/src/client/linux/min
return true;
#else
return false;
@@ -312,6 +320,9 @@ bool LinuxPtraceDumper::GetThreadInfoByI
@@ -378,6 +387,9 @@ bool LinuxPtraceDumper::GetThreadInfoByI
#elif defined(__riscv)
stack_pointer = reinterpret_cast<uint8_t*>(
info->mcontext.__gregs[MD_CONTEXT_RISCV_REG_SP]);
@ -534,10 +503,8 @@ Index: chromium-120.0.6099.71/third_party/breakpad/breakpad/src/client/linux/min
#else
# error "This code hasn't been ported to your platform yet."
#endif
Index: chromium-120.0.6099.71/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_ptrace_dumper_unittest.cc
===================================================================
--- chromium-120.0.6099.71.orig/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_ptrace_dumper_unittest.cc
+++ chromium-120.0.6099.71/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_ptrace_dumper_unittest.cc
--- a/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_ptrace_dumper_unittest.cc
+++ b/third_party/breakpad/breakpad/src/client/linux/minidump_writer/linux_ptrace_dumper_unittest.cc
@@ -470,6 +470,9 @@ TEST(LinuxPtraceDumperTest, VerifyStackR
#elif defined(__riscv)
pid_t* process_tid_location =
@ -557,10 +524,8 @@ Index: chromium-120.0.6099.71/third_party/breakpad/breakpad/src/client/linux/min
#else
#error This test has not been ported to this platform.
#endif
Index: chromium-120.0.6099.71/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.cc
===================================================================
--- chromium-120.0.6099.71.orig/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.cc
+++ chromium-120.0.6099.71/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.cc
--- a/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.cc
+++ b/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.cc
@@ -144,7 +144,9 @@ class MinidumpWriter {
: fd_(minidump_fd),
path_(minidump_path),
@ -614,10 +579,8 @@ Index: chromium-120.0.6099.71/third_party/breakpad/breakpad/src/client/linux/min
const google_breakpad::fpstate_t* const float_state_; // ditto
#endif
LinuxDumper* dumper_;
Index: chromium-120.0.6099.71/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.h
===================================================================
--- chromium-120.0.6099.71.orig/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.h
+++ chromium-120.0.6099.71/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.h
--- a/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.h
+++ b/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer.h
@@ -47,6 +47,8 @@ class ExceptionHandler;
#if defined(__aarch64__)
@ -627,10 +590,8 @@ Index: chromium-120.0.6099.71/third_party/breakpad/breakpad/src/client/linux/min
#elif !defined(__ARM_EABI__) && !defined(__mips__)
typedef std::remove_pointer<fpregset_t>::type fpstate_t;
#endif
Index: chromium-120.0.6099.71/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer_unittest.cc
===================================================================
--- chromium-120.0.6099.71.orig/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer_unittest.cc
+++ chromium-120.0.6099.71/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer_unittest.cc
--- a/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer_unittest.cc
+++ b/third_party/breakpad/breakpad/src/client/linux/minidump_writer/minidump_writer_unittest.cc
@@ -723,6 +723,9 @@ TEST(MinidumpWriterTest, InvalidStackPoi
#elif defined(__riscv)
context.context.uc_mcontext.__gregs[MD_CONTEXT_RISCV_REG_SP] =
@ -641,10 +602,8 @@ Index: chromium-120.0.6099.71/third_party/breakpad/breakpad/src/client/linux/min
#else
# error "This code has not been ported to your platform yet."
#endif
Index: chromium-120.0.6099.71/third_party/breakpad/breakpad/src/common/linux/memory_mapped_file.cc
===================================================================
--- chromium-120.0.6099.71.orig/third_party/breakpad/breakpad/src/common/linux/memory_mapped_file.cc
+++ chromium-120.0.6099.71/third_party/breakpad/breakpad/src/common/linux/memory_mapped_file.cc
--- a/third_party/breakpad/breakpad/src/common/linux/memory_mapped_file.cc
+++ b/third_party/breakpad/breakpad/src/common/linux/memory_mapped_file.cc
@@ -72,8 +72,7 @@ bool MemoryMappedFile::Map(const char* p
#if defined(__x86_64__) || defined(__aarch64__) || \
@ -655,10 +614,8 @@ Index: chromium-120.0.6099.71/third_party/breakpad/breakpad/src/common/linux/mem
struct kernel_stat st;
if (sys_fstat(fd, &st) == -1 || st.st_size < 0) {
#else
Index: chromium-120.0.6099.71/third_party/breakpad/breakpad/src/common/linux/memory_mapped_file_unittest.cc
===================================================================
--- chromium-120.0.6099.71.orig/third_party/breakpad/breakpad/src/common/linux/memory_mapped_file_unittest.cc
+++ chromium-120.0.6099.71/third_party/breakpad/breakpad/src/common/linux/memory_mapped_file_unittest.cc
--- a/third_party/breakpad/breakpad/src/common/linux/memory_mapped_file_unittest.cc
+++ b/third_party/breakpad/breakpad/src/common/linux/memory_mapped_file_unittest.cc
@@ -179,9 +179,10 @@ TEST_F(MemoryMappedFileTest, RemapAfterM
TEST_F(MemoryMappedFileTest, MapWithOffset) {
// Put more data in the test file this time. Offsets can only be
@ -673,10 +630,8 @@ Index: chromium-120.0.6099.71/third_party/breakpad/breakpad/src/common/linux/mem
for (size_t i = 0; i < data1_size; ++i) {
data1[i] = i & 0x7f;
}
Index: chromium-120.0.6099.71/third_party/breakpad/breakpad/src/common/memory_allocator_unittest.cc
===================================================================
--- chromium-120.0.6099.71.orig/third_party/breakpad/breakpad/src/common/memory_allocator_unittest.cc
+++ chromium-120.0.6099.71/third_party/breakpad/breakpad/src/common/memory_allocator_unittest.cc
--- a/third_party/breakpad/breakpad/src/common/memory_allocator_unittest.cc
+++ b/third_party/breakpad/breakpad/src/common/memory_allocator_unittest.cc
@@ -60,8 +60,9 @@ TEST(PageAllocatorTest, LargeObject) {
EXPECT_EQ(0U, allocator.pages_allocated());
@ -688,10 +643,8 @@ Index: chromium-120.0.6099.71/third_party/breakpad/breakpad/src/common/memory_al
for (unsigned i = 1; i < 10; ++i) {
uint8_t* p = reinterpret_cast<uint8_t*>(allocator.Alloc(i));
ASSERT_FALSE(p == NULL);
Index: chromium-120.0.6099.71/third_party/breakpad/breakpad/src/tools/linux/md2core/minidump-2-core.cc
===================================================================
--- chromium-120.0.6099.71.orig/third_party/breakpad/breakpad/src/tools/linux/md2core/minidump-2-core.cc
+++ chromium-120.0.6099.71/third_party/breakpad/breakpad/src/tools/linux/md2core/minidump-2-core.cc
--- a/third_party/breakpad/breakpad/src/tools/linux/md2core/minidump-2-core.cc
+++ b/third_party/breakpad/breakpad/src/tools/linux/md2core/minidump-2-core.cc
@@ -82,6 +82,8 @@
#define ELF_ARCH EM_AARCH64
#elif defined(__riscv)

@ -1,6 +1,3 @@
diff --git a/third_party/libvpx/source/config/linux/ppc64/vp8_rtcd.h b/third_party/libvpx/source/config/linux/ppc64/vp8_rtcd.h
deleted file mode 100644
index 225647f..0000000
--- a/third_party/libvpx/source/config/linux/ppc64/vp8_rtcd.h
+++ /dev/null
@@ -1,320 +0,0 @@
@ -324,9 +321,6 @@ index 225647f..0000000
-#endif
-
-#endif
diff --git a/third_party/libvpx/source/config/linux/ppc64/vp9_rtcd.h b/third_party/libvpx/source/config/linux/ppc64/vp9_rtcd.h
deleted file mode 100644
index d0ceec1..0000000
--- a/third_party/libvpx/source/config/linux/ppc64/vp9_rtcd.h
+++ /dev/null
@@ -1,193 +0,0 @@
@ -523,12 +517,9 @@ index d0ceec1..0000000
-#endif
-
-#endif
diff --git a/third_party/libvpx/source/config/linux/ppc64/vpx_config.asm b/third_party/libvpx/source/config/linux/ppc64/vpx_config.asm
deleted file mode 100644
index cf14597..0000000
--- a/third_party/libvpx/source/config/linux/ppc64/vpx_config.asm
+++ /dev/null
@@ -1,107 +0,0 @@
@@ -1,108 +0,0 @@
-@ This file was created from a .asm file
-@ using the ads2gas.pl script.
-.syntax unified
@ -551,6 +542,7 @@ index cf14597..0000000
-.equ HAVE_NEON_DOTPROD , 0
-.equ HAVE_NEON_I8MM , 0
-.equ HAVE_SVE , 0
-.equ HAVE_SVE2 , 0
-.equ HAVE_MIPS32 , 0
-.equ HAVE_DSPR2 , 0
-.equ HAVE_MSA , 0
@ -636,9 +628,6 @@ index cf14597..0000000
-.equ DECODE_WIDTH_LIMIT , 16384
-.equ DECODE_HEIGHT_LIMIT , 16384
- .section .note.GNU-stack,"",%progbits
diff --git a/third_party/libvpx/source/config/linux/ppc64/vpx_config.c b/third_party/libvpx/source/config/linux/ppc64/vpx_config.c
deleted file mode 100644
index 9b870e7..0000000
--- a/third_party/libvpx/source/config/linux/ppc64/vpx_config.c
+++ /dev/null
@@ -1,10 +0,0 @@
@ -652,12 +641,9 @@ index 9b870e7..0000000
-#include "vpx/vpx_codec.h"
-static const char* const cfg = "--target=ppc64le-linux-gcc --enable-external-build --enable-postproc --enable-multi-res-encoding --enable-temporal-denoising --enable-vp9-temporal-denoising --enable-vp9-postproc --size-limit=16384x16384 --enable-realtime-only --disable-install-docs --disable-libyuv";
-const char *vpx_codec_build_config(void) {return cfg;}
diff --git a/third_party/libvpx/source/config/linux/ppc64/vpx_config.h b/third_party/libvpx/source/config/linux/ppc64/vpx_config.h
deleted file mode 100644
index 8be04cc..0000000
--- a/third_party/libvpx/source/config/linux/ppc64/vpx_config.h
+++ /dev/null
@@ -1,116 +0,0 @@
@@ -1,117 +0,0 @@
-/* Copyright (c) 2011 The WebM project authors. All Rights Reserved. */
-/* */
-/* Use of this source code is governed by a BSD-style license */
@ -689,6 +675,7 @@ index 8be04cc..0000000
-#define HAVE_NEON_DOTPROD 0
-#define HAVE_NEON_I8MM 0
-#define HAVE_SVE 0
-#define HAVE_SVE2 0
-#define HAVE_MIPS32 0
-#define HAVE_DSPR2 0
-#define HAVE_MSA 0
@ -774,9 +761,6 @@ index 8be04cc..0000000
-#define DECODE_WIDTH_LIMIT 16384
-#define DECODE_HEIGHT_LIMIT 16384
-#endif /* VPX_CONFIG_H */
diff --git a/third_party/libvpx/source/config/linux/ppc64/vpx_dsp_rtcd.h b/third_party/libvpx/source/config/linux/ppc64/vpx_dsp_rtcd.h
deleted file mode 100644
index 8749b43..0000000
--- a/third_party/libvpx/source/config/linux/ppc64/vpx_dsp_rtcd.h
+++ /dev/null
@@ -1,2128 +0,0 @@
@ -2908,9 +2892,6 @@ index 8749b43..0000000
-#endif
-
-#endif
diff --git a/third_party/libvpx/source/config/linux/ppc64/vpx_scale_rtcd.h b/third_party/libvpx/source/config/linux/ppc64/vpx_scale_rtcd.h
deleted file mode 100644
index 37be459..0000000
--- a/third_party/libvpx/source/config/linux/ppc64/vpx_scale_rtcd.h
+++ /dev/null
@@ -1,100 +0,0 @@

@ -1,7 +1,5 @@
Index: chromium-123.0.6312.58/third_party/ffmpeg/chromium/config/Chrome/linux/ppc64/config.h
===================================================================
--- /dev/null
+++ chromium-123.0.6312.58/third_party/ffmpeg/chromium/config/Chrome/linux/ppc64/config.h
+++ b/third_party/ffmpeg/chromium/config/Chrome/linux/ppc64/config.h
@@ -0,0 +1,768 @@
+/* Automatically generated by configure - do not modify! */
+#ifndef FFMPEG_CONFIG_H
@ -771,10 +769,8 @@ Index: chromium-123.0.6312.58/third_party/ffmpeg/chromium/config/Chrome/linux/pp
+#define CONFIG_WMA_FREQS 0
+#define CONFIG_WMV2DSP 0
+#endif /* FFMPEG_CONFIG_H */
Index: chromium-123.0.6312.58/third_party/ffmpeg/chromium/config/Chrome/linux/ppc64/config_components.h
===================================================================
--- /dev/null
+++ chromium-123.0.6312.58/third_party/ffmpeg/chromium/config/Chrome/linux/ppc64/config_components.h
+++ b/third_party/ffmpeg/chromium/config/Chrome/linux/ppc64/config_components.h
@@ -0,0 +1,2217 @@
+/* Automatically generated by configure - do not modify! */
+#ifndef FFMPEG_CONFIG_COMPONENTS_H
@ -2993,17 +2989,13 @@ Index: chromium-123.0.6312.58/third_party/ffmpeg/chromium/config/Chrome/linux/pp
+#define CONFIG_IPFS_GATEWAY_PROTOCOL 0
+#define CONFIG_IPNS_GATEWAY_PROTOCOL 0
+#endif /* FFMPEG_CONFIG_COMPONENTS_H */
Index: chromium-123.0.6312.58/third_party/ffmpeg/chromium/config/Chrome/linux/ppc64/libavcodec/bsf_list.c
===================================================================
--- /dev/null
+++ chromium-123.0.6312.58/third_party/ffmpeg/chromium/config/Chrome/linux/ppc64/libavcodec/bsf_list.c
+++ b/third_party/ffmpeg/chromium/config/Chrome/linux/ppc64/libavcodec/bsf_list.c
@@ -0,0 +1,2 @@
+static const FFBitStreamFilter * const bitstream_filters[] = {
+ NULL };
Index: chromium-123.0.6312.58/third_party/ffmpeg/chromium/config/Chrome/linux/ppc64/libavcodec/codec_list.c
===================================================================
--- /dev/null
+++ chromium-123.0.6312.58/third_party/ffmpeg/chromium/config/Chrome/linux/ppc64/libavcodec/codec_list.c
+++ b/third_party/ffmpeg/chromium/config/Chrome/linux/ppc64/libavcodec/codec_list.c
@@ -0,0 +1,20 @@
+static const FFCodec * const codec_list[] = {
+ &ff_h264_decoder,
@ -3025,10 +3017,8 @@ Index: chromium-123.0.6312.58/third_party/ffmpeg/chromium/config/Chrome/linux/pp
+ &ff_pcm_u8_decoder,
+ &ff_libopus_decoder,
+ NULL };
Index: chromium-123.0.6312.58/third_party/ffmpeg/chromium/config/Chrome/linux/ppc64/libavcodec/parser_list.c
===================================================================
--- /dev/null
+++ chromium-123.0.6312.58/third_party/ffmpeg/chromium/config/Chrome/linux/ppc64/libavcodec/parser_list.c
+++ b/third_party/ffmpeg/chromium/config/Chrome/linux/ppc64/libavcodec/parser_list.c
@@ -0,0 +1,11 @@
+static const AVCodecParser * const parser_list[] = {
+ &ff_aac_parser,
@ -3041,10 +3031,8 @@ Index: chromium-123.0.6312.58/third_party/ffmpeg/chromium/config/Chrome/linux/pp
+ &ff_vp8_parser,
+ &ff_vp9_parser,
+ NULL };
Index: chromium-123.0.6312.58/third_party/ffmpeg/chromium/config/Chrome/linux/ppc64/libavformat/demuxer_list.c
===================================================================
--- /dev/null
+++ chromium-123.0.6312.58/third_party/ffmpeg/chromium/config/Chrome/linux/ppc64/libavformat/demuxer_list.c
+++ b/third_party/ffmpeg/chromium/config/Chrome/linux/ppc64/libavformat/demuxer_list.c
@@ -0,0 +1,9 @@
+static const AVInputFormat * const demuxer_list[] = {
+ &ff_aac_demuxer,
@ -3055,24 +3043,18 @@ Index: chromium-123.0.6312.58/third_party/ffmpeg/chromium/config/Chrome/linux/pp
+ &ff_ogg_demuxer,
+ &ff_wav_demuxer,
+ NULL };
Index: chromium-123.0.6312.58/third_party/ffmpeg/chromium/config/Chrome/linux/ppc64/libavformat/muxer_list.c
===================================================================
--- /dev/null
+++ chromium-123.0.6312.58/third_party/ffmpeg/chromium/config/Chrome/linux/ppc64/libavformat/muxer_list.c
+++ b/third_party/ffmpeg/chromium/config/Chrome/linux/ppc64/libavformat/muxer_list.c
@@ -0,0 +1,2 @@
+static const FFOutputFormat * const muxer_list[] = {
+ NULL };
Index: chromium-123.0.6312.58/third_party/ffmpeg/chromium/config/Chrome/linux/ppc64/libavformat/protocol_list.c
===================================================================
--- /dev/null
+++ chromium-123.0.6312.58/third_party/ffmpeg/chromium/config/Chrome/linux/ppc64/libavformat/protocol_list.c
+++ b/third_party/ffmpeg/chromium/config/Chrome/linux/ppc64/libavformat/protocol_list.c
@@ -0,0 +1,2 @@
+static const URLProtocol * const url_protocols[] = {
+ NULL };
Index: chromium-123.0.6312.58/third_party/ffmpeg/chromium/config/Chrome/linux/ppc64/libavutil/avconfig.h
===================================================================
--- /dev/null
+++ chromium-123.0.6312.58/third_party/ffmpeg/chromium/config/Chrome/linux/ppc64/libavutil/avconfig.h
+++ b/third_party/ffmpeg/chromium/config/Chrome/linux/ppc64/libavutil/avconfig.h
@@ -0,0 +1,6 @@
+/* Generated by ffmpeg configure */
+#ifndef AVUTIL_AVCONFIG_H
@ -3080,20 +3062,16 @@ Index: chromium-123.0.6312.58/third_party/ffmpeg/chromium/config/Chrome/linux/pp
+#define AV_HAVE_BIGENDIAN 0
+#define AV_HAVE_FAST_UNALIGNED 1
+#endif /* AVUTIL_AVCONFIG_H */
Index: chromium-123.0.6312.58/third_party/ffmpeg/chromium/config/Chrome/linux/ppc64/libavutil/ffversion.h
===================================================================
--- /dev/null
+++ chromium-123.0.6312.58/third_party/ffmpeg/chromium/config/Chrome/linux/ppc64/libavutil/ffversion.h
+++ b/third_party/ffmpeg/chromium/config/Chrome/linux/ppc64/libavutil/ffversion.h
@@ -0,0 +1,5 @@
+/* Automatically generated by version.sh, do not manually edit! */
+#ifndef AVUTIL_FFVERSION_H
+#define AVUTIL_FFVERSION_H
+#define FFMPEG_VERSION "N-113309-gf89a6e7576"
+#endif /* AVUTIL_FFVERSION_H */
Index: chromium-123.0.6312.58/third_party/ffmpeg/chromium/config/ChromeOS/linux/ppc64/config.h
===================================================================
--- /dev/null
+++ chromium-123.0.6312.58/third_party/ffmpeg/chromium/config/ChromeOS/linux/ppc64/config.h
+++ b/third_party/ffmpeg/chromium/config/ChromeOS/linux/ppc64/config.h
@@ -0,0 +1,768 @@
+/* Automatically generated by configure - do not modify! */
+#ifndef FFMPEG_CONFIG_H
@ -3863,10 +3841,8 @@ Index: chromium-123.0.6312.58/third_party/ffmpeg/chromium/config/ChromeOS/linux/
+#define CONFIG_WMA_FREQS 0
+#define CONFIG_WMV2DSP 0
+#endif /* FFMPEG_CONFIG_H */
Index: chromium-123.0.6312.58/third_party/ffmpeg/chromium/config/ChromeOS/linux/ppc64/config_components.h
===================================================================
--- /dev/null
+++ chromium-123.0.6312.58/third_party/ffmpeg/chromium/config/ChromeOS/linux/ppc64/config_components.h
+++ b/third_party/ffmpeg/chromium/config/ChromeOS/linux/ppc64/config_components.h
@@ -0,0 +1,2217 @@
+/* Automatically generated by configure - do not modify! */
+#ifndef FFMPEG_CONFIG_COMPONENTS_H
@ -6085,17 +6061,13 @@ Index: chromium-123.0.6312.58/third_party/ffmpeg/chromium/config/ChromeOS/linux/
+#define CONFIG_IPFS_GATEWAY_PROTOCOL 0
+#define CONFIG_IPNS_GATEWAY_PROTOCOL 0
+#endif /* FFMPEG_CONFIG_COMPONENTS_H */
Index: chromium-123.0.6312.58/third_party/ffmpeg/chromium/config/ChromeOS/linux/ppc64/libavcodec/bsf_list.c
===================================================================
--- /dev/null
+++ chromium-123.0.6312.58/third_party/ffmpeg/chromium/config/ChromeOS/linux/ppc64/libavcodec/bsf_list.c
+++ b/third_party/ffmpeg/chromium/config/ChromeOS/linux/ppc64/libavcodec/bsf_list.c
@@ -0,0 +1,2 @@
+static const FFBitStreamFilter * const bitstream_filters[] = {
+ NULL };
Index: chromium-123.0.6312.58/third_party/ffmpeg/chromium/config/ChromeOS/linux/ppc64/libavcodec/codec_list.c
===================================================================
--- /dev/null
+++ chromium-123.0.6312.58/third_party/ffmpeg/chromium/config/ChromeOS/linux/ppc64/libavcodec/codec_list.c
+++ b/third_party/ffmpeg/chromium/config/ChromeOS/linux/ppc64/libavcodec/codec_list.c
@@ -0,0 +1,22 @@
+static const FFCodec * const codec_list[] = {
+ &ff_h263_decoder,
@ -6119,10 +6091,8 @@ Index: chromium-123.0.6312.58/third_party/ffmpeg/chromium/config/ChromeOS/linux/
+ &ff_pcm_u8_decoder,
+ &ff_libopus_decoder,
+ NULL };
Index: chromium-123.0.6312.58/third_party/ffmpeg/chromium/config/ChromeOS/linux/ppc64/libavcodec/parser_list.c
===================================================================
--- /dev/null
+++ chromium-123.0.6312.58/third_party/ffmpeg/chromium/config/ChromeOS/linux/ppc64/libavcodec/parser_list.c
+++ b/third_party/ffmpeg/chromium/config/ChromeOS/linux/ppc64/libavcodec/parser_list.c
@@ -0,0 +1,13 @@
+static const AVCodecParser * const parser_list[] = {
+ &ff_aac_parser,
@ -6137,10 +6107,8 @@ Index: chromium-123.0.6312.58/third_party/ffmpeg/chromium/config/ChromeOS/linux/
+ &ff_vp8_parser,
+ &ff_vp9_parser,
+ NULL };
Index: chromium-123.0.6312.58/third_party/ffmpeg/chromium/config/ChromeOS/linux/ppc64/libavformat/demuxer_list.c
===================================================================
--- /dev/null
+++ chromium-123.0.6312.58/third_party/ffmpeg/chromium/config/ChromeOS/linux/ppc64/libavformat/demuxer_list.c
+++ b/third_party/ffmpeg/chromium/config/ChromeOS/linux/ppc64/libavformat/demuxer_list.c
@@ -0,0 +1,10 @@
+static const AVInputFormat * const demuxer_list[] = {
+ &ff_aac_demuxer,
@ -6152,24 +6120,18 @@ Index: chromium-123.0.6312.58/third_party/ffmpeg/chromium/config/ChromeOS/linux/
+ &ff_ogg_demuxer,
+ &ff_wav_demuxer,
+ NULL };
Index: chromium-123.0.6312.58/third_party/ffmpeg/chromium/config/ChromeOS/linux/ppc64/libavformat/muxer_list.c
===================================================================
--- /dev/null
+++ chromium-123.0.6312.58/third_party/ffmpeg/chromium/config/ChromeOS/linux/ppc64/libavformat/muxer_list.c
+++ b/third_party/ffmpeg/chromium/config/ChromeOS/linux/ppc64/libavformat/muxer_list.c
@@ -0,0 +1,2 @@
+static const FFOutputFormat * const muxer_list[] = {
+ NULL };
Index: chromium-123.0.6312.58/third_party/ffmpeg/chromium/config/ChromeOS/linux/ppc64/libavformat/protocol_list.c
===================================================================
--- /dev/null
+++ chromium-123.0.6312.58/third_party/ffmpeg/chromium/config/ChromeOS/linux/ppc64/libavformat/protocol_list.c
+++ b/third_party/ffmpeg/chromium/config/ChromeOS/linux/ppc64/libavformat/protocol_list.c
@@ -0,0 +1,2 @@
+static const URLProtocol * const url_protocols[] = {
+ NULL };
Index: chromium-123.0.6312.58/third_party/ffmpeg/chromium/config/ChromeOS/linux/ppc64/libavutil/avconfig.h
===================================================================
--- /dev/null
+++ chromium-123.0.6312.58/third_party/ffmpeg/chromium/config/ChromeOS/linux/ppc64/libavutil/avconfig.h
+++ b/third_party/ffmpeg/chromium/config/ChromeOS/linux/ppc64/libavutil/avconfig.h
@@ -0,0 +1,6 @@
+/* Generated by ffmpeg configure */
+#ifndef AVUTIL_AVCONFIG_H
@ -6177,20 +6139,16 @@ Index: chromium-123.0.6312.58/third_party/ffmpeg/chromium/config/ChromeOS/linux/
+#define AV_HAVE_BIGENDIAN 0
+#define AV_HAVE_FAST_UNALIGNED 1
+#endif /* AVUTIL_AVCONFIG_H */
Index: chromium-123.0.6312.58/third_party/ffmpeg/chromium/config/ChromeOS/linux/ppc64/libavutil/ffversion.h
===================================================================
--- /dev/null
+++ chromium-123.0.6312.58/third_party/ffmpeg/chromium/config/ChromeOS/linux/ppc64/libavutil/ffversion.h
+++ b/third_party/ffmpeg/chromium/config/ChromeOS/linux/ppc64/libavutil/ffversion.h
@@ -0,0 +1,5 @@
+/* Automatically generated by version.sh, do not manually edit! */
+#ifndef AVUTIL_FFVERSION_H
+#define AVUTIL_FFVERSION_H
+#define FFMPEG_VERSION "N-113309-gf89a6e7576"
+#endif /* AVUTIL_FFVERSION_H */
Index: chromium-123.0.6312.58/third_party/ffmpeg/chromium/config/Chromium/linux/ppc64/config.h
===================================================================
--- /dev/null
+++ chromium-123.0.6312.58/third_party/ffmpeg/chromium/config/Chromium/linux/ppc64/config.h
+++ b/third_party/ffmpeg/chromium/config/Chromium/linux/ppc64/config.h
@@ -0,0 +1,768 @@
+/* Automatically generated by configure - do not modify! */
+#ifndef FFMPEG_CONFIG_H
@ -6960,10 +6918,8 @@ Index: chromium-123.0.6312.58/third_party/ffmpeg/chromium/config/Chromium/linux/
+#define CONFIG_WMA_FREQS 0
+#define CONFIG_WMV2DSP 0
+#endif /* FFMPEG_CONFIG_H */
Index: chromium-123.0.6312.58/third_party/ffmpeg/chromium/config/Chromium/linux/ppc64/config_components.h
===================================================================
--- /dev/null
+++ chromium-123.0.6312.58/third_party/ffmpeg/chromium/config/Chromium/linux/ppc64/config_components.h
+++ b/third_party/ffmpeg/chromium/config/Chromium/linux/ppc64/config_components.h
@@ -0,0 +1,2217 @@
+/* Automatically generated by configure - do not modify! */
+#ifndef FFMPEG_CONFIG_COMPONENTS_H
@ -9182,17 +9138,13 @@ Index: chromium-123.0.6312.58/third_party/ffmpeg/chromium/config/Chromium/linux/
+#define CONFIG_IPFS_GATEWAY_PROTOCOL 0
+#define CONFIG_IPNS_GATEWAY_PROTOCOL 0
+#endif /* FFMPEG_CONFIG_COMPONENTS_H */
Index: chromium-123.0.6312.58/third_party/ffmpeg/chromium/config/Chromium/linux/ppc64/libavcodec/bsf_list.c
===================================================================
--- /dev/null
+++ chromium-123.0.6312.58/third_party/ffmpeg/chromium/config/Chromium/linux/ppc64/libavcodec/bsf_list.c
+++ b/third_party/ffmpeg/chromium/config/Chromium/linux/ppc64/libavcodec/bsf_list.c
@@ -0,0 +1,2 @@
+static const FFBitStreamFilter * const bitstream_filters[] = {
+ NULL };
Index: chromium-123.0.6312.58/third_party/ffmpeg/chromium/config/Chromium/linux/ppc64/libavcodec/codec_list.c
===================================================================
--- /dev/null
+++ chromium-123.0.6312.58/third_party/ffmpeg/chromium/config/Chromium/linux/ppc64/libavcodec/codec_list.c
+++ b/third_party/ffmpeg/chromium/config/Chromium/linux/ppc64/libavcodec/codec_list.c
@@ -0,0 +1,18 @@
+static const FFCodec * const codec_list[] = {
+ &ff_theora_decoder,
@ -9212,10 +9164,8 @@ Index: chromium-123.0.6312.58/third_party/ffmpeg/chromium/config/Chromium/linux/
+ &ff_pcm_u8_decoder,
+ &ff_libopus_decoder,
+ NULL };
Index: chromium-123.0.6312.58/third_party/ffmpeg/chromium/config/Chromium/linux/ppc64/libavcodec/parser_list.c
===================================================================
--- /dev/null
+++ chromium-123.0.6312.58/third_party/ffmpeg/chromium/config/Chromium/linux/ppc64/libavcodec/parser_list.c
+++ b/third_party/ffmpeg/chromium/config/Chromium/linux/ppc64/libavcodec/parser_list.c
@@ -0,0 +1,9 @@
+static const AVCodecParser * const parser_list[] = {
+ &ff_flac_parser,
@ -9226,10 +9176,8 @@ Index: chromium-123.0.6312.58/third_party/ffmpeg/chromium/config/Chromium/linux/
+ &ff_vp8_parser,
+ &ff_vp9_parser,
+ NULL };
Index: chromium-123.0.6312.58/third_party/ffmpeg/chromium/config/Chromium/linux/ppc64/libavformat/demuxer_list.c
===================================================================
--- /dev/null
+++ chromium-123.0.6312.58/third_party/ffmpeg/chromium/config/Chromium/linux/ppc64/libavformat/demuxer_list.c
+++ b/third_party/ffmpeg/chromium/config/Chromium/linux/ppc64/libavformat/demuxer_list.c
@@ -0,0 +1,8 @@
+static const AVInputFormat * const demuxer_list[] = {
+ &ff_flac_demuxer,
@ -9239,24 +9187,18 @@ Index: chromium-123.0.6312.58/third_party/ffmpeg/chromium/config/Chromium/linux/
+ &ff_ogg_demuxer,
+ &ff_wav_demuxer,
+ NULL };
Index: chromium-123.0.6312.58/third_party/ffmpeg/chromium/config/Chromium/linux/ppc64/libavformat/muxer_list.c
===================================================================
--- /dev/null
+++ chromium-123.0.6312.58/third_party/ffmpeg/chromium/config/Chromium/linux/ppc64/libavformat/muxer_list.c
+++ b/third_party/ffmpeg/chromium/config/Chromium/linux/ppc64/libavformat/muxer_list.c
@@ -0,0 +1,2 @@
+static const FFOutputFormat * const muxer_list[] = {
+ NULL };
Index: chromium-123.0.6312.58/third_party/ffmpeg/chromium/config/Chromium/linux/ppc64/libavformat/protocol_list.c
===================================================================
--- /dev/null
+++ chromium-123.0.6312.58/third_party/ffmpeg/chromium/config/Chromium/linux/ppc64/libavformat/protocol_list.c
+++ b/third_party/ffmpeg/chromium/config/Chromium/linux/ppc64/libavformat/protocol_list.c
@@ -0,0 +1,2 @@
+static const URLProtocol * const url_protocols[] = {
+ NULL };
Index: chromium-123.0.6312.58/third_party/ffmpeg/chromium/config/Chromium/linux/ppc64/libavutil/avconfig.h
===================================================================
--- /dev/null
+++ chromium-123.0.6312.58/third_party/ffmpeg/chromium/config/Chromium/linux/ppc64/libavutil/avconfig.h
+++ b/third_party/ffmpeg/chromium/config/Chromium/linux/ppc64/libavutil/avconfig.h
@@ -0,0 +1,6 @@
+/* Generated by ffmpeg configure */
+#ifndef AVUTIL_AVCONFIG_H
@ -9264,21 +9206,17 @@ Index: chromium-123.0.6312.58/third_party/ffmpeg/chromium/config/Chromium/linux/
+#define AV_HAVE_BIGENDIAN 0
+#define AV_HAVE_FAST_UNALIGNED 1
+#endif /* AVUTIL_AVCONFIG_H */
Index: chromium-123.0.6312.58/third_party/ffmpeg/chromium/config/Chromium/linux/ppc64/libavutil/ffversion.h
===================================================================
--- /dev/null
+++ chromium-123.0.6312.58/third_party/ffmpeg/chromium/config/Chromium/linux/ppc64/libavutil/ffversion.h
+++ b/third_party/ffmpeg/chromium/config/Chromium/linux/ppc64/libavutil/ffversion.h
@@ -0,0 +1,5 @@
+/* Automatically generated by version.sh, do not manually edit! */
+#ifndef AVUTIL_FFVERSION_H
+#define AVUTIL_FFVERSION_H
+#define FFMPEG_VERSION "N-113309-gf89a6e7576"
+#endif /* AVUTIL_FFVERSION_H */
Index: chromium-123.0.6312.58/third_party/ffmpeg/ffmpeg_generated.gni
===================================================================
--- chromium-123.0.6312.58.orig/third_party/ffmpeg/ffmpeg_generated.gni
+++ chromium-123.0.6312.58/third_party/ffmpeg/ffmpeg_generated.gni
@@ -315,6 +315,40 @@ if ((use_linux_config && current_cpu ==
--- a/third_party/ffmpeg/ffmpeg_generated.gni
+++ b/third_party/ffmpeg/ffmpeg_generated.gni
@@ -281,6 +281,40 @@ if ((is_apple && ffmpeg_branding == "Chr
]
}
@ -9316,13 +9254,11 @@ Index: chromium-123.0.6312.58/third_party/ffmpeg/ffmpeg_generated.gni
+ ]
+}
+
if ((is_apple && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_win && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_win && current_cpu == "x86" && ffmpeg_branding == "Chrome") || (use_linux_config && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (use_linux_config && current_cpu == "x64" && ffmpeg_branding == "ChromeOS") || (use_linux_config && current_cpu == "x86" && ffmpeg_branding == "Chrome") || (use_linux_config && current_cpu == "x86" && ffmpeg_branding == "ChromeOS")) {
ffmpeg_c_sources += [
"libavcodec/x86/h264_qpel.c",
Index: chromium-123.0.6312.58/third_party/ffmpeg/libavcodec/ppc/h264dsp_ppc.c
===================================================================
if ((is_apple && current_cpu == "x64" && ffmpeg_branding == "Chrome") ||
(is_win && current_cpu == "x64" && ffmpeg_branding == "Chrome") ||
(is_win && current_cpu == "x86" && ffmpeg_branding == "Chrome") ||
--- /dev/null
+++ chromium-123.0.6312.58/third_party/ffmpeg/libavcodec/ppc/h264dsp_ppc.c
+++ b/third_party/ffmpeg/libavcodec/ppc/h264dsp_ppc.c
@@ -0,0 +1,815 @@
+/*
+ * Copyright (c) 2004 Romain Dolbeau <romain@dolbeau.org>
@ -10139,10 +10075,8 @@ Index: chromium-123.0.6312.58/third_party/ffmpeg/libavcodec/ppc/h264dsp_ppc.c
+ }
+#endif /* HAVE_ALTIVEC */
+}
Index: chromium-123.0.6312.58/third_party/ffmpeg/libavcodec/ppc/h264qpel_ppc.c
===================================================================
--- /dev/null
+++ chromium-123.0.6312.58/third_party/ffmpeg/libavcodec/ppc/h264qpel_ppc.c
+++ b/third_party/ffmpeg/libavcodec/ppc/h264qpel_ppc.c
@@ -0,0 +1,315 @@
+/*
+ * Copyright (c) 2004 Romain Dolbeau <romain@dolbeau.org>

@ -1,8 +1,6 @@
Index: chromium-120.0.6099.71/third_party/libvpx/generate_gni.sh
===================================================================
--- chromium-120.0.6099.71.orig/third_party/libvpx/generate_gni.sh
+++ chromium-120.0.6099.71/third_party/libvpx/generate_gni.sh
@@ -411,7 +411,7 @@ gen_config_files linux/mipsel "--target=
--- a/third_party/libvpx/generate_gni.sh
+++ b/third_party/libvpx/generate_gni.sh
@@ -423,7 +423,7 @@ gen_config_files linux/mipsel "--target=
gen_config_files linux/mips64el "--target=mips64-linux-gcc ${all_platforms}"
gen_config_files linux/loongarch \
"--target=loongarch64-linux-gcc ${all_platforms}"
@ -10,11 +8,9 @@ Index: chromium-120.0.6099.71/third_party/libvpx/generate_gni.sh
+gen_config_files linux/ppc64 "--target=generic-gnu $HIGHBD ${all_platforms}"
gen_config_files linux/generic "--target=generic-gnu $HIGHBD ${all_platforms}"
gen_config_files win/arm64-highbd \
"--target=arm64-win64-vs15 ${all_platforms} ${HIGHBD}"
Index: chromium-120.0.6099.71/third_party/libvpx/source/libvpx/build/make/rtcd.pl
===================================================================
--- chromium-120.0.6099.71.orig/third_party/libvpx/source/libvpx/build/make/rtcd.pl
+++ chromium-120.0.6099.71/third_party/libvpx/source/libvpx/build/make/rtcd.pl
"--target=arm64-win64-vs15 ${all_platforms} ${HIGHBD} ${disable_sve}"
--- a/third_party/libvpx/source/libvpx/build/make/rtcd.pl
+++ b/third_party/libvpx/source/libvpx/build/make/rtcd.pl
@@ -492,8 +492,9 @@ if ($opts{arch} eq 'x86') {
&require(@REQUIRES);
arm;
@ -27,11 +23,9 @@ Index: chromium-120.0.6099.71/third_party/libvpx/source/libvpx/build/make/rtcd.p
} elsif ($opts{arch} =~ /loongarch/ ) {
@ALL_ARCHS = filter(qw/lsx lasx/);
loongarch;
Index: chromium-120.0.6099.71/third_party/libvpx/BUILD.gn
===================================================================
--- chromium-120.0.6099.71.orig/third_party/libvpx/BUILD.gn
+++ chromium-120.0.6099.71/third_party/libvpx/BUILD.gn
@@ -93,6 +93,14 @@ config("libvpx_config") {
--- a/third_party/libvpx/BUILD.gn
+++ b/third_party/libvpx/BUILD.gn
@@ -94,6 +94,14 @@ config("libvpx_config") {
"-Wno-sign-compare",
]
}

@ -1269,7 +1269,7 @@ udev.
%patch -P375 -p1 -b .0008-sandbox-fix-ppc64le-glibc234
%patch -P376 -p1 -b .0001-third_party-angle-Include-missing-header-cstddef-in-
%patch -P377 -p1 -b .0001-Add-PPC64-support-for-boringssl
#patch -P377 -p1 -b .0001-Add-PPC64-support-for-boringssl
%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
@ -1287,7 +1287,7 @@ udev.
%patch -P388 -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-boringssl-add-generated-files
%patch -P391 -p1 -b .0003-third_party-libvpx-Add-ppc64-generated-config
#patch -P392 -p1 -b .0003-third_party-libvpx-Add-ppc64-vsx-files
#patch -P393 -p1 -b .0003-third_party-ffmpeg-Add-ppc64-generated-config

@ -1,8 +1,6 @@
Index: chromium-123.0.6312.58/third_party/skia/BUILD.gn
===================================================================
--- chromium-123.0.6312.58.orig/third_party/skia/BUILD.gn
+++ chromium-123.0.6312.58/third_party/skia/BUILD.gn
@@ -199,6 +199,12 @@ opts("skx") {
--- a/third_party/skia/BUILD.gn
+++ b/third_party/skia/BUILD.gn
@@ -191,6 +191,12 @@ opts("skx") {
}
}
@ -15,7 +13,7 @@ Index: chromium-123.0.6312.58/third_party/skia/BUILD.gn
# Any feature of Skia that requires third-party code should be optional and use this template.
template("optional") {
if (invoker.enabled) {
@@ -1474,6 +1480,7 @@ skia_component("skia") {
@@ -1482,6 +1488,7 @@ skia_component("skia") {
":skx",
":typeface_fontations",
":vello",
@ -23,7 +21,7 @@ Index: chromium-123.0.6312.58/third_party/skia/BUILD.gn
":webp_decode",
":wuffs",
":xml",
@@ -1651,7 +1658,10 @@ skia_static_library("pathkit") {
@@ -1659,7 +1666,10 @@ skia_static_library("pathkit") {
public_configs = [ ":skia_public" ]
configs = skia_library_configs
@ -35,10 +33,8 @@ Index: chromium-123.0.6312.58/third_party/skia/BUILD.gn
sources = []
sources += skia_pathops_sources
Index: chromium-123.0.6312.58/third_party/skia/gn/skia/BUILD.gn
===================================================================
--- chromium-123.0.6312.58.orig/third_party/skia/gn/skia/BUILD.gn
+++ chromium-123.0.6312.58/third_party/skia/gn/skia/BUILD.gn
--- a/third_party/skia/gn/skia/BUILD.gn
+++ b/third_party/skia/gn/skia/BUILD.gn
@@ -163,6 +163,8 @@ config("default") {
"-mfpmath=sse",
]
@ -48,10 +44,8 @@ Index: chromium-123.0.6312.58/third_party/skia/gn/skia/BUILD.gn
}
if (malloc != "" && !is_win) {
Index: chromium-123.0.6312.58/third_party/skia/include/core/SkTypes.h
===================================================================
--- chromium-123.0.6312.58.orig/third_party/skia/include/core/SkTypes.h
+++ chromium-123.0.6312.58/third_party/skia/include/core/SkTypes.h
--- a/third_party/skia/include/core/SkTypes.h
+++ b/third_party/skia/include/core/SkTypes.h
@@ -195,5 +195,44 @@ static constexpr uint32_t SK_InvalidGenI
*/
static constexpr uint32_t SK_InvalidUniqueID = 0;
@ -97,10 +91,8 @@ Index: chromium-123.0.6312.58/third_party/skia/include/core/SkTypes.h
+
#endif
Index: chromium-123.0.6312.58/third_party/skia/src/base/SkSpinlock.cpp
===================================================================
--- chromium-123.0.6312.58.orig/third_party/skia/src/base/SkSpinlock.cpp
+++ chromium-123.0.6312.58/third_party/skia/src/base/SkSpinlock.cpp
--- a/third_party/skia/src/base/SkSpinlock.cpp
+++ b/third_party/skia/src/base/SkSpinlock.cpp
@@ -33,7 +33,8 @@
#endif
@ -111,10 +103,8 @@ Index: chromium-123.0.6312.58/third_party/skia/src/base/SkSpinlock.cpp
#include <emmintrin.h>
static void do_pause() { _mm_pause(); }
#else
Index: chromium-123.0.6312.58/third_party/skia/src/opts/SkBitmapProcState_opts.h
===================================================================
--- chromium-123.0.6312.58.orig/third_party/skia/src/opts/SkBitmapProcState_opts.h
+++ chromium-123.0.6312.58/third_party/skia/src/opts/SkBitmapProcState_opts.h
--- a/third_party/skia/src/opts/SkBitmapProcState_opts.h
+++ b/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.
@ -130,10 +120,8 @@ Index: chromium-123.0.6312.58/third_party/skia/src/opts/SkBitmapProcState_opts.h
#include <immintrin.h>
#elif defined(SK_ARM_HAS_NEON)
#include <arm_neon.h>
Index: chromium-123.0.6312.58/third_party/skia/src/opts/SkBlitRow_opts.h
===================================================================
--- chromium-123.0.6312.58.orig/third_party/skia/src/opts/SkBlitRow_opts.h
+++ chromium-123.0.6312.58/third_party/skia/src/opts/SkBlitRow_opts.h
--- a/third_party/skia/src/opts/SkBlitRow_opts.h
+++ b/third_party/skia/src/opts/SkBlitRow_opts.h
@@ -69,7 +69,7 @@
#endif
@ -143,10 +131,8 @@ Index: chromium-123.0.6312.58/third_party/skia/src/opts/SkBlitRow_opts.h
static inline __m128i SkPMSrcOver_SSE2(const __m128i& src, const __m128i& dst) {
__m128i scale = _mm_sub_epi32(_mm_set1_epi32(256),
Index: chromium-123.0.6312.58/third_party/skia/src/opts/SkRasterPipeline_opts.h
===================================================================
--- chromium-123.0.6312.58.orig/third_party/skia/src/opts/SkRasterPipeline_opts.h
+++ chromium-123.0.6312.58/third_party/skia/src/opts/SkRasterPipeline_opts.h
--- a/third_party/skia/src/opts/SkRasterPipeline_opts.h
+++ b/third_party/skia/src/opts/SkRasterPipeline_opts.h
@@ -1,5 +1,6 @@
/*
* Copyright 2018 Google Inc.
@ -154,7 +140,7 @@ Index: chromium-123.0.6312.58/third_party/skia/src/opts/SkRasterPipeline_opts.h
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
@@ -74,6 +75,8 @@ using NoCtx = const void*;
@@ -75,6 +76,8 @@ using NoCtx = const void*;
#define JUMPER_IS_SCALAR
#elif defined(SK_ARM_HAS_NEON)
#define JUMPER_IS_NEON
@ -163,7 +149,7 @@ Index: chromium-123.0.6312.58/third_party/skia/src/opts/SkRasterPipeline_opts.h
#elif SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SKX
#define JUMPER_IS_SKX
#elif SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_AVX2
@@ -106,6 +109,8 @@ using NoCtx = const void*;
@@ -107,6 +110,8 @@ using NoCtx = const void*;
#include <math.h>
#elif defined(JUMPER_IS_NEON)
#include <arm_neon.h>
@ -172,7 +158,7 @@ Index: chromium-123.0.6312.58/third_party/skia/src/opts/SkRasterPipeline_opts.h
#else
#include <immintrin.h>
#endif
@@ -197,6 +202,182 @@ namespace SK_OPTS_NS {
@@ -200,6 +205,182 @@ namespace SK_OPTS_NS {
ptr[3] = a;
}
@ -355,7 +341,7 @@ Index: chromium-123.0.6312.58/third_party/skia/src/opts/SkRasterPipeline_opts.h
#elif defined(JUMPER_IS_NEON)
template <typename T> using V = Vec<4, T>;
using F = V<float >;
@@ -1004,6 +1185,15 @@ SI F from_half(U16 h) {
@@ -1025,6 +1206,15 @@ SI F from_half(U16 h) {
#elif defined(JUMPER_IS_HSW)
return _mm256_cvtph_ps((__m128i)h);
@ -371,7 +357,7 @@ Index: chromium-123.0.6312.58/third_party/skia/src/opts/SkRasterPipeline_opts.h
#else
// Remember, a half is 1-5-10 (sign-exponent-mantissa) with 15 exponent bias.
U32 sem = expand(h),
@@ -1027,6 +1217,16 @@ SI U16 to_half(F f) {
@@ -1048,6 +1238,16 @@ SI U16 to_half(F f) {
#elif defined(JUMPER_IS_HSW)
return (U16)_mm256_cvtps_ph(f, _MM_FROUND_CUR_DIRECTION);
@ -388,7 +374,7 @@ Index: chromium-123.0.6312.58/third_party/skia/src/opts/SkRasterPipeline_opts.h
#else
// Remember, a float is 1-8-23 (sign-exponent-mantissa) with 127 exponent bias.
U32 sem = sk_bit_cast<U32>(f),
@@ -1102,7 +1302,7 @@ static constexpr size_t N = sizeof(F) /
@@ -1123,7 +1323,7 @@ static constexpr size_t N = sizeof(F) /
// instead of {b,a} on the stack. Narrow stages work best for __vectorcall.
#define ABI __vectorcall
#define JUMPER_NARROW_STAGES 1
@ -397,7 +383,7 @@ Index: chromium-123.0.6312.58/third_party/skia/src/opts/SkRasterPipeline_opts.h
// These platforms are ideal for wider stages, and their default ABI is ideal.
#define ABI
#define JUMPER_NARROW_STAGES 0
@@ -4874,6 +5074,10 @@ SI F sqrt_(F x) {
@@ -5023,6 +5223,10 @@ SI F sqrt_(F x) {
float32x4_t lo,hi;
split(x, &lo,&hi);
return join<F>(sqrt(lo), sqrt(hi));
@ -408,7 +394,7 @@ Index: chromium-123.0.6312.58/third_party/skia/src/opts/SkRasterPipeline_opts.h
#else
return F{
sqrtf(x[0]), sqrtf(x[1]), sqrtf(x[2]), sqrtf(x[3]),
@@ -4897,6 +5101,10 @@ SI F floor_(F x) {
@@ -5046,6 +5250,10 @@ SI F floor_(F x) {
__m128 lo,hi;
split(x, &lo,&hi);
return join<F>(_mm_floor_ps(lo), _mm_floor_ps(hi));
@ -419,7 +405,7 @@ Index: chromium-123.0.6312.58/third_party/skia/src/opts/SkRasterPipeline_opts.h
#else
F roundtrip = cast<F>(cast<I32>(x));
return roundtrip - if_then_else(roundtrip > x, F_(1), F_(0));
@@ -4908,6 +5116,7 @@ SI F floor_(F x) {
@@ -5057,6 +5265,7 @@ SI F floor_(F x) {
// (2 * a * b + (1 << 15)) >> 16
// The result is a number on [-1, 1).
// Note: on neon this is a saturating multiply while the others are not.
@ -427,7 +413,7 @@ Index: chromium-123.0.6312.58/third_party/skia/src/opts/SkRasterPipeline_opts.h
SI I16 scaled_mult(I16 a, I16 b) {
#if defined(JUMPER_IS_SKX)
return (I16)_mm256_mulhrs_epi16((__m256i)a, (__m256i)b);
@@ -4919,6 +5128,22 @@ SI I16 scaled_mult(I16 a, I16 b) {
@@ -5068,6 +5277,22 @@ SI I16 scaled_mult(I16 a, I16 b) {
return vqrdmulhq_s16(a, b);
#elif defined(JUMPER_IS_NEON)
return vqrdmulhq_s16(a, b);
@ -450,7 +436,7 @@ Index: chromium-123.0.6312.58/third_party/skia/src/opts/SkRasterPipeline_opts.h
#else
const I32 roundingTerm = I32_(1 << 14);
return cast<I16>((cast<I32>(a) * cast<I32>(b) + roundingTerm) >> 15);
@@ -4940,7 +5165,26 @@ SI U16 constrained_add(I16 a, U16 b) {
@@ -5089,7 +5314,26 @@ SI U16 constrained_add(I16 a, U16 b) {
SkASSERT(-ib <= ia && ia <= 65535 - ib);
}
#endif
@ -477,7 +463,7 @@ Index: chromium-123.0.6312.58/third_party/skia/src/opts/SkRasterPipeline_opts.h
}
SI F fract(F x) { return x - floor_(x); }
@@ -5798,8 +6042,14 @@ STAGE_GP(bilerp_clamp_8888, const SkRast
@@ -5947,8 +6191,14 @@ STAGE_GP(bilerp_clamp_8888, const SkRast
// 2^-8 * v = 2^-9 * (tx*(R - L) + (R + L))
// v = 1/2 * (tx*(R - L) + (R + L))
auto lerpX = [&](U16 left, U16 right) -> U16 {
@ -492,7 +478,7 @@ Index: chromium-123.0.6312.58/third_party/skia/src/opts/SkRasterPipeline_opts.h
// The constrained_add is the most subtle part of lerp. The first term is on the interval
// [-1, 1), and the second term is on the interval is on the interval [0, 1) because
// both terms are too high by a factor of 2 which will be handled below. (Both R and L are
@@ -5811,7 +6061,12 @@ STAGE_GP(bilerp_clamp_8888, const SkRast
@@ -5960,7 +6210,12 @@ STAGE_GP(bilerp_clamp_8888, const SkRast
U16 v2 = constrained_add(scaled_mult(tx, width), middle) + 1;
// Divide by 2 to calculate v and at the same time bring the intermediate value onto the
// interval [0, 1/2] to set up for the lerpY.
@ -505,7 +491,7 @@ Index: chromium-123.0.6312.58/third_party/skia/src/opts/SkRasterPipeline_opts.h
};
const uint32_t* ptr;
@@ -5845,9 +6100,15 @@ STAGE_GP(bilerp_clamp_8888, const SkRast
@@ -5994,9 +6249,15 @@ STAGE_GP(bilerp_clamp_8888, const SkRast
I16 width = (I16)bottom - (I16)top;
U16 middle = bottom + top;
// Add + 0x80 for rounding.
@ -522,60 +508,8 @@ Index: chromium-123.0.6312.58/third_party/skia/src/opts/SkRasterPipeline_opts.h
};
r = lerpY(topR, bottomR);
Index: chromium-123.0.6312.58/third_party/skia/src/opts/SkSwizzler_opts.h
===================================================================
--- chromium-123.0.6312.58.orig/third_party/skia/src/opts/SkSwizzler_opts.h
+++ chromium-123.0.6312.58/third_party/skia/src/opts/SkSwizzler_opts.h
@@ -17,7 +17,10 @@
#include <cmath>
#include <utility>
-#if SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSE1
+#if defined(SK_PPC64_HAS_SSE_COMPAT)
+ #include <emmintrin.h>
+ #include <tmmintrin.h>
+#elif SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSE1
#include <immintrin.h>
#elif defined(SK_ARM_HAS_NEON)
#include <arm_neon.h>
@@ -43,6 +43,33 @@
static inline float SkReciprocalAlpha(float a) {
return SkReciprocalAlpha_portable(a);
}
+#elif defined(SK_PPC64_HAS_SSE_COMPAT)
+// -- VSX -- Harden against timing attacks
+SK_NO_SANITIZE("float-divide-by-zero")
+static inline float SkReciprocalAlphaTimes255(float a) {
+ SkASSERT(0 <= a && a <= 255);
+
+ vector float vA{a,a,a,a};
+ vector float vB{255.0f,255.0f,255.0f,255.0f};
+ vector float vC{0.0f,0.0f,0.0f,0.0f};
+ vector float q = vec_div(vB, vA);
+ vector float vCmp{static_cast<float>(vA != vC)};
+
+ return vec_and(vCmp, q)[0];
+}
+
+SK_NO_SANITIZE("float-divide-by-zero")
+static inline float SkReciprocalAlpha(float a) {
+ SkASSERT(0 <= a && a <= 1);
+
+ vector float vA{a,a,a,a};
+ vector float vB{1.0f,1.0f,1.0f,1.0f};
+ vector float vC{0.0f,0.0f,0.0f,0.0f};
+ vector float q = vec_div(vB, vA);
+ vector float vCmp{static_cast<float>(vA != vC)};
+
+ return vec_and(vCmp, q)[0];
+}
#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-123.0.6312.58/third_party/skia/src/base/SkVx.h
===================================================================
--- chromium-123.0.6312.58.orig/third_party/skia/src/base/SkVx.h
+++ chromium-123.0.6312.58/third_party/skia/src/base/SkVx.h
--- a/third_party/skia/src/base/SkVx.h
+++ b/third_party/skia/src/base/SkVx.h
@@ -42,7 +42,13 @@
#if SKVX_USE_SIMD
@ -591,10 +525,8 @@ Index: chromium-123.0.6312.58/third_party/skia/src/base/SkVx.h
#elif defined(SK_ARM_HAS_NEON)
#include <arm_neon.h>
#elif defined(__wasm_simd128__)
Index: chromium-123.0.6312.58/third_party/skia/src/core/SkBlitMask_opts_ssse3.cpp
===================================================================
--- chromium-123.0.6312.58.orig/third_party/skia/src/core/SkBlitMask_opts_ssse3.cpp
+++ chromium-123.0.6312.58/third_party/skia/src/core/SkBlitMask_opts_ssse3.cpp
--- a/third_party/skia/src/core/SkBlitMask_opts_ssse3.cpp
+++ b/third_party/skia/src/core/SkBlitMask_opts_ssse3.cpp
@@ -9,7 +9,7 @@
#include "src/core/SkBlitMask.h"
#include "src/core/SkOptsTargets.h"
@ -604,23 +536,19 @@ Index: chromium-123.0.6312.58/third_party/skia/src/core/SkBlitMask_opts_ssse3.cp
// The order of these includes is important:
// 1) Select the target CPU architecture by defining SK_OPTS_TARGET and including SkOpts_SetTarget
Index: chromium-123.0.6312.58/third_party/skia/src/core/SkSwizzler_opts_ssse3.cpp
===================================================================
--- chromium-123.0.6312.58.orig/third_party/skia/src/core/SkSwizzler_opts_ssse3.cpp
+++ chromium-123.0.6312.58/third_party/skia/src/core/SkSwizzler_opts_ssse3.cpp
@@ -11,7 +11,7 @@
--- a/third_party/skia/src/core/SkSwizzler_opts_ssse3.cpp
+++ b/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) && !defined(SK_ENABLE_OPTIMIZE_SIZE)
+#if (defined(SK_CPU_X86) || defined(SK_CPU_PPC64)) && !defined(SK_ENABLE_OPTIMIZE_SIZE)
-#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
// The order of these includes is important:
// 1) Select the target CPU architecture by defining SK_OPTS_TARGET and including SkOpts_SetTarget
Index: chromium-123.0.6312.58/third_party/skia/src/core/SkBlitMask_opts.cpp
===================================================================
--- chromium-123.0.6312.58.orig/third_party/skia/src/core/SkBlitMask_opts.cpp
+++ chromium-123.0.6312.58/third_party/skia/src/core/SkBlitMask_opts.cpp
--- a/third_party/skia/src/core/SkBlitMask_opts.cpp
+++ b/third_party/skia/src/core/SkBlitMask_opts.cpp
@@ -25,7 +25,7 @@ namespace SkOpts {
static bool init() {
#if defined(SK_ENABLE_OPTIMIZE_SIZE)
@ -630,10 +558,8 @@ Index: chromium-123.0.6312.58/third_party/skia/src/core/SkBlitMask_opts.cpp
#if SK_CPU_SSE_LEVEL < SK_CPU_SSE_LEVEL_SSSE3
if (SkCpu::Supports(SkCpu::SSSE3)) { Init_BlitMask_ssse3(); }
#endif
Index: chromium-123.0.6312.58/third_party/skia/src/core/SkBitmapProcState_opts.cpp
===================================================================
--- chromium-123.0.6312.58.orig/third_party/skia/src/core/SkBitmapProcState_opts.cpp
+++ chromium-123.0.6312.58/third_party/skia/src/core/SkBitmapProcState_opts.cpp
--- a/third_party/skia/src/core/SkBitmapProcState_opts.cpp
+++ b/third_party/skia/src/core/SkBitmapProcState_opts.cpp
@@ -25,7 +25,7 @@ namespace SkOpts {
static bool init() {
#if defined(SK_ENABLE_OPTIMIZE_SIZE)
@ -643,10 +569,8 @@ Index: chromium-123.0.6312.58/third_party/skia/src/core/SkBitmapProcState_opts.c
#if SK_CPU_SSE_LEVEL < SK_CPU_SSE_LEVEL_SSSE3
if (SkCpu::Supports(SkCpu::SSSE3)) { Init_BitmapProcState_ssse3(); }
#endif
Index: chromium-123.0.6312.58/third_party/skia/src/core/SkCpu.h
===================================================================
--- chromium-123.0.6312.58.orig/third_party/skia/src/core/SkCpu.h
+++ chromium-123.0.6312.58/third_party/skia/src/core/SkCpu.h
--- a/third_party/skia/src/core/SkCpu.h
+++ b/third_party/skia/src/core/SkCpu.h
@@ -55,7 +55,7 @@ inline bool SkCpu::Supports(uint32_t mas
// If we mask in compile-time known lower limits, the compiler can
@ -656,10 +580,8 @@ Index: chromium-123.0.6312.58/third_party/skia/src/core/SkCpu.h
#if SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSE1
features |= SSE1;
#endif
Index: chromium-123.0.6312.58/third_party/skia/src/core/SkBitmapProcState_opts_ssse3.cpp
===================================================================
--- chromium-123.0.6312.58.orig/third_party/skia/src/core/SkBitmapProcState_opts_ssse3.cpp
+++ chromium-123.0.6312.58/third_party/skia/src/core/SkBitmapProcState_opts_ssse3.cpp
--- a/third_party/skia/src/core/SkBitmapProcState_opts_ssse3.cpp
+++ b/third_party/skia/src/core/SkBitmapProcState_opts_ssse3.cpp
@@ -8,7 +8,7 @@
#include "include/private/base/SkFeatures.h"
#include "src/core/SkOptsTargets.h"
@ -669,10 +591,8 @@ Index: chromium-123.0.6312.58/third_party/skia/src/core/SkBitmapProcState_opts_s
// The order of these includes is important:
// 1) Select the target CPU architecture by defining SK_OPTS_TARGET and including SkOpts_SetTarget
Index: chromium-123.0.6312.58/third_party/skia/include/private/base/SkFeatures.h
===================================================================
--- chromium-123.0.6312.58.orig/third_party/skia/include/private/base/SkFeatures.h
+++ chromium-123.0.6312.58/third_party/skia/include/private/base/SkFeatures.h
--- a/third_party/skia/include/private/base/SkFeatures.h
+++ b/third_party/skia/include/private/base/SkFeatures.h
@@ -63,6 +63,8 @@
#if defined(__i386) || defined(_M_IX86) || defined(__x86_64__) || defined(_M_X64)
@ -682,15 +602,61 @@ Index: chromium-123.0.6312.58/third_party/skia/include/private/base/SkFeatures.h
#endif
/**
Index: chromium-123.0.6312.58/third_party/skia/modules/skcms/src/skcms_internals.h
===================================================================
--- chromium-123.0.6312.58.orig/third_party/skia/modules/skcms/src/skcms_internals.h
+++ chromium-123.0.6312.58/third_party/skia/modules/skcms/src/skcms_internals.h
@@ -46,6 +46,7 @@ extern "C" {
--- a/third_party/skia/modules/skcms/src/skcms_internals.h
+++ b/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
#endif
--- a/third_party/skia/src/opts/SkSwizzler_opts.inc
+++ b/third_party/skia/src/opts/SkSwizzler_opts.inc
@@ -14,7 +14,10 @@
#include <cmath>
#include <utility>
-#if SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSE1
+#if defined(SK_PPC64_HAS_SSE_COMPAT)
+ #include <emmintrin.h>
+ #include <tmmintrin.h>
+#elif SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSE1
#include <immintrin.h>
#elif defined(SK_ARM_HAS_NEON)
#include <arm_neon.h>
@@ -61,6 +64,33 @@ SI float reciprocal_alpha_times_255(floa
SI float reciprocal_alpha(float a) {
return reciprocal_alpha_portable(a);
}
+#elif defined(SK_PPC64_HAS_SSE_COMPAT)
+// -- VSX -- Harden against timing attacks
+SK_NO_SANITIZE("float-divide-by-zero")
+static inline float SkReciprocalAlphaTimes255(float a) {
+ SkASSERT(0 <= a && a <= 255);
+
+ vector float vA{a,a,a,a};
+ vector float vB{255.0f,255.0f,255.0f,255.0f};
+ vector float vC{0.0f,0.0f,0.0f,0.0f};
+ vector float q = vec_div(vB, vA);
+ vector float vCmp{static_cast<float>(vA != vC)};
+
+ return vec_and(vCmp, q)[0];
+}
+
+SK_NO_SANITIZE("float-divide-by-zero")
+static inline float SkReciprocalAlpha(float a) {
+ SkASSERT(0 <= a && a <= 1);
+
+ vector float vA{a,a,a,a};
+ vector float vB{1.0f,1.0f,1.0f,1.0f};
+ vector float vC{0.0f,0.0f,0.0f,0.0f};
+ vector float q = vec_div(vB, vA);
+ vector float vCmp{static_cast<float>(vA != vC)};
+
+ return vec_and(vCmp, q)[0];
+}
#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;

@ -1,8 +1,6 @@
Index: chromium-120.0.6099.71/base/allocator/partition_allocator/src/partition_alloc/page_allocator_constants.h
===================================================================
--- chromium-120.0.6099.71.orig/base/allocator/partition_allocator/src/partition_alloc/page_allocator_constants.h
+++ chromium-120.0.6099.71/base/allocator/partition_allocator/src/partition_alloc/page_allocator_constants.h
@@ -172,7 +172,11 @@ SystemPageBaseMask() {
--- a/base/allocator/partition_allocator/src/partition_alloc/page_allocator_constants.h
+++ b/base/allocator/partition_allocator/src/partition_alloc/page_allocator_constants.h
@@ -176,7 +176,11 @@ SystemPageBaseMask() {
return ~SystemPageOffsetMask();
}
@ -13,12 +11,10 @@ Index: chromium-120.0.6099.71/base/allocator/partition_allocator/src/partition_a
+#endif
constexpr size_t kPageMetadataSize = 1 << kPageMetadataShift;
} // namespace partition_alloc::internal
Index: chromium-120.0.6099.71/base/allocator/partition_allocator/src/partition_alloc/partition_page.h
===================================================================
--- chromium-120.0.6099.71.orig/base/allocator/partition_allocator/src/partition_alloc/partition_page.h
+++ chromium-120.0.6099.71/base/allocator/partition_allocator/src/partition_alloc/partition_page.h
@@ -90,7 +90,11 @@ struct SlotSpanMetadata {
} // namespace internal
--- a/base/allocator/partition_allocator/src/partition_alloc/partition_page.h
+++ b/base/allocator/partition_allocator/src/partition_alloc/partition_page.h
@@ -86,7 +86,11 @@ struct SlotSpanMetadata {
// CHECK()ed in AllocNewSlotSpan().
// The maximum number of bits needed to cover all currently supported OSes.
@ -30,7 +26,7 @@ Index: chromium-120.0.6099.71/base/allocator/partition_allocator/src/partition_a
static_assert(kMaxSlotsPerSlotSpan < (1 << kMaxSlotsPerSlotSpanBits), "");
// |marked_full| isn't equivalent to being full. Slot span is marked as full
@@ -104,7 +108,11 @@ struct SlotSpanMetadata {
@@ -100,7 +104,11 @@ struct SlotSpanMetadata {
private:
const uint32_t can_store_raw_size_ : 1;
uint32_t freelist_is_sorted_ : 1;
@ -42,10 +38,8 @@ Index: chromium-120.0.6099.71/base/allocator/partition_allocator/src/partition_a
// If |in_empty_cache_|==1, |empty_cache_index| is undefined and mustn't be
// used.
uint16_t in_empty_cache_ : 1;
Index: chromium-120.0.6099.71/base/allocator/partition_allocator/src/partition_alloc/partition_page_constants.h
===================================================================
--- chromium-120.0.6099.71.orig/base/allocator/partition_allocator/src/partition_alloc/partition_page_constants.h
+++ chromium-120.0.6099.71/base/allocator/partition_allocator/src/partition_alloc/partition_page_constants.h
--- a/base/allocator/partition_allocator/src/partition_alloc/partition_page_constants.h
+++ b/base/allocator/partition_allocator/src/partition_alloc/partition_page_constants.h
@@ -21,6 +21,11 @@ static constexpr size_t kMaxSlotsPerSlot
// currently (kMaxSlotsPerSlotSpanBits == 13) not supported by the code,
// so we use the 16 kiB maximum (64 kiB will crash).

Loading…
Cancel
Save