copr-andersrh/chromium-lts/0002-Add-ppc64-trap-instructions.patch
Anders da Silva Rytter Hansen 404c44c8fa Chromium 138.0.7204.183
2026-02-12 13:20:17 -03:00

18 lines
696 B
Diff

Index: chromium-128.0.6613.113/v8/src/base/immediate-crash.h
===================================================================
--- chromium-128.0.6613.113.orig/v8/src/base/immediate-crash.h
+++ chromium-128.0.6613.113/v8/src/base/immediate-crash.h
@@ -98,6 +98,13 @@
#define TRAP_SEQUENCE1_() asm volatile(".2byte 0x0001");
#define TRAP_SEQUENCE2_() asm volatile("")
+#elif V8_HOST_ARCH_PPC64
+
+#define TRAP_SEQUENCE1_() asm volatile("trap")
+// Intentionally empty: __builtin_unreachable() is always part of the sequence
+// (see IMMEDIATE_CRASH below)
+#define TRAP_SEQUENCE2_() asm volatile("")
+
#else
// Crash report accuracy will not be guaranteed on other architectures, but at