summaryrefslogtreecommitdiff
path: root/emulators/gxemul/patches
diff options
context:
space:
mode:
authorrillig <rillig@pkgsrc.org>2005-11-30 19:11:01 +0000
committerrillig <rillig@pkgsrc.org>2005-11-30 19:11:01 +0000
commit97cf41db6f27eedf6e2795695456cf2f7e076c63 (patch)
tree2493f2380d17c07d099a206f9f1643796e22a584 /emulators/gxemul/patches
parenta658c87fb451919350c1a2299e8d3a2b7e8fd381 (diff)
downloadpkgsrc-97cf41db6f27eedf6e2795695456cf2f7e076c63.tar.gz
Added a patch for ISO C90 compatibility.
Diffstat (limited to 'emulators/gxemul/patches')
-rw-r--r--emulators/gxemul/patches/patch-aa24
1 files changed, 24 insertions, 0 deletions
diff --git a/emulators/gxemul/patches/patch-aa b/emulators/gxemul/patches/patch-aa
new file mode 100644
index 00000000000..3f1a1e747b5
--- /dev/null
+++ b/emulators/gxemul/patches/patch-aa
@@ -0,0 +1,24 @@
+$NetBSD: patch-aa,v 1.1 2005/11/30 19:11:01 rillig Exp $
+
+ISO C90 does not allow code intermixed with declarations.
+
+--- src/cpus/memory_ppc.c.orig Tue Nov 22 22:56:18 2005
++++ src/cpus/memory_ppc.c Wed Nov 30 20:08:16 2005
+@@ -57,11 +57,13 @@ int ppc_bat(struct cpu *cpu, uint64_t va
+
+ /* 4 instruction BATs, 4 data BATs... */
+ for (i=0; i<8; i++) {
++ uint32_t upper, lower, phys, ebs, mask;
++
+ regnr = SPR_IBAT0U + i * 2;
+- uint32_t upper = cpu->cd.ppc.spr[regnr];
+- uint32_t lower = cpu->cd.ppc.spr[regnr + 1];
+- uint32_t phys = lower & BAT_RPN, ebs = upper & BAT_EPI;
+- uint32_t mask = ((upper & BAT_BL) << 15) | 0x1ffff;
++ upper = cpu->cd.ppc.spr[regnr];
++ lower = cpu->cd.ppc.spr[regnr + 1];
++ phys = lower & BAT_RPN, ebs = upper & BAT_EPI;
++ mask = ((upper & BAT_BL) << 15) | 0x1ffff;
+
+ /* Instruction BAT, but not instruction lookup? Then skip. */
+ if (i < 4 && !(flags & FLAG_INSTR))