File: riscv-on-ppc64-gcc15-121689.patch

package info (click to toggle)
qemu 1%3A10.1.2%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 415,888 kB
  • sloc: ansic: 4,763,605; pascal: 115,173; python: 105,698; asm: 68,689; sh: 53,146; makefile: 27,519; perl: 18,863; cpp: 11,443; xml: 3,629; objc: 2,877; yacc: 2,505; php: 1,299; tcl: 1,296; lex: 1,110; sql: 71; awk: 43; sed: 35; javascript: 7
file content (23 lines) | stat: -rw-r--r-- 894 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
From: Michael Tokarev <mjt@tls.msk.ru>
Date: Sat, 13 Sep 2025 09:32:06 +0300
Subject: riscv-on-ppc64: work around gcc-15 bug 121689
Bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121689

See also: LP#2120835
https://lists.gnu.org/archive/html/qemu-devel/2025-08/msg03901.html

Based solely on work by Christian Ehrhardt.

diff --git a/target/riscv/pmu.c b/target/riscv/pmu.c
--- a/target/riscv/pmu.c
+++ b/target/riscv/pmu.c
@@ -189,6 +189,9 @@ static int riscv_pmu_incr_ctr_rv64(RISCVCPU *cpu, uint32_t ctr_idx)
  *  env->priv and env->virt_enabled contain old priv and old virt and
  *  new priv and new virt values are passed in as arguments.
  */
+#if defined(__powerpc64__) || defined(__ppc64__)
+__attribute__((optimize("no-gcse")))
+#endif
 static void riscv_pmu_icount_update_priv(CPURISCVState *env,
                                          target_ulong newpriv, bool new_virt)
 {