$OpenBSD: patch-src_promemul_arcbios_cc,v 1.1 2018/04/07 10:55:54 espie Exp $

Index: src/promemul/arcbios.cc
--- src/promemul/arcbios.cc.orig
+++ src/promemul/arcbios.cc
@@ -953,7 +953,7 @@ ugly_goto:
 	    sector, sizeof(sector));
 	if (!res) {
 		fatal("[ arcbios_get_msdos_partition_size(): couldn't "
-		    "read the disk image, id %i, offset 0x%"PRIx64" ]\n",
+		    "read the disk image, id %i, offset 0x%" PRIx64" ]\n",
 		    disk_id, (uint64_t) offset);
 		return;
 	}
@@ -1236,7 +1236,7 @@ int arcbios_emul(struct cpu *cpu)
 				cpu->cd.mips.gpr[MIPS_GPR_V0] = (int64_t)
 				    (int32_t) cpu->cd.mips.gpr[MIPS_GPR_V0];
 		}
-		debug("[ ARCBIOS GetPeer(node 0x%016"PRIx64"): 0x%016"PRIx64
+		debug("[ ARCBIOS GetPeer(node 0x%016" PRIx64"): 0x%016" PRIx64
 		    " ]\n", (uint64_t) cpu->cd.mips.gpr[MIPS_GPR_A0],
 		    (uint64_t) cpu->cd.mips.gpr[MIPS_GPR_V0]);
 		break;
@@ -1287,7 +1287,7 @@ int arcbios_emul(struct cpu *cpu)
 				cpu->cd.mips.gpr[MIPS_GPR_V0] = (int64_t)
 				    (int32_t)cpu->cd.mips.gpr[MIPS_GPR_V0];
 		}
-		debug("[ ARCBIOS GetChild(node 0x%016"PRIx64"): 0x%016"
+		debug("[ ARCBIOS GetChild(node 0x%016" PRIx64"): 0x%016"
 		    PRIx64" ]\n", (uint64_t) cpu->cd.mips.gpr[MIPS_GPR_A0],
 		    (uint64_t) cpu->cd.mips.gpr[MIPS_GPR_V0]);
 		break;
@@ -1336,7 +1336,7 @@ int arcbios_emul(struct cpu *cpu)
 				cpu->cd.mips.gpr[MIPS_GPR_V0] = (int64_t)
 				    (int32_t) cpu->cd.mips.gpr[MIPS_GPR_V0];
 		}
-		debug("[ ARCBIOS GetParent(node 0x%016"PRIx64"): 0x%016"
+		debug("[ ARCBIOS GetParent(node 0x%016" PRIx64"): 0x%016"
 		    PRIx64" ]\n", (uint64_t) cpu->cd.mips.gpr[MIPS_GPR_A0],
 		    (uint64_t) cpu->cd.mips.gpr[MIPS_GPR_V0]);
 		break;
@@ -1671,7 +1671,7 @@ int arcbios_emul(struct cpu *cpu)
 			arcbios_handle_to_start_and_size(machine,
 			    handleTmp, &partition_offset, &size);
 
-			debug("[ ARCBIOS Write(%i,0x%08"PRIx64",%i,0x%08"
+			debug("[ ARCBIOS Write(%i,0x%08" PRIx64",%i,0x%08"
 			    PRIx64") ]\n", (int) cpu->cd.mips.gpr[MIPS_GPR_A0],
 			    (uint64_t) cpu->cd.mips.gpr[MIPS_GPR_A1],
 			    (int) cpu->cd.mips.gpr[MIPS_GPR_A2],
@@ -1718,13 +1718,13 @@ int arcbios_emul(struct cpu *cpu)
 		break;
 	case 0x70:	/*  Seek(uint32_t handle, int64_t *ofs,
 				 uint32_t whence): uint32_t  */
-		debug("[ ARCBIOS Seek(%i,0x%08"PRIx64",%i): ",
+		debug("[ ARCBIOS Seek(%i,0x%08" PRIx64",%i): ",
 		    (int) cpu->cd.mips.gpr[MIPS_GPR_A0],
 		    (uint64_t)cpu->cd.mips.gpr[MIPS_GPR_A1],
 		    (int) cpu->cd.mips.gpr[MIPS_GPR_A2]);
 
 		if (cpu->cd.mips.gpr[MIPS_GPR_A2] != 0) {
-			fatal("[ ARCBIOS Seek(%i,0x%08"PRIx64",%i): "
+			fatal("[ ARCBIOS Seek(%i,0x%08" PRIx64",%i): "
 			    "UNIMPLEMENTED whence=%i ]\n",
 			    (int) cpu->cd.mips.gpr[MIPS_GPR_A0],
 			    (uint64_t) cpu->cd.mips.gpr[MIPS_GPR_A1],
@@ -1752,7 +1752,7 @@ int arcbios_emul(struct cpu *cpu)
 			    
 			machine->md.arc->current_seek_offset[
 			    cpu->cd.mips.gpr[MIPS_GPR_A0]] = ofs;
-			debug("%016"PRIx64" ]\n", (uint64_t) ofs);
+			debug("%016" PRIx64" ]\n", (uint64_t) ofs);
 		}
 
 		cpu->cd.mips.gpr[MIPS_GPR_V0] = 0;	/*  Success.  */
@@ -2456,7 +2456,7 @@ void arcbios_init(struct machine *machine, int is64bit
 		machine->md.arc->console_curx = 0;
 		machine->md.arc->console_cury = 0;
 
-		arcbios_putstring(cpu, "GXemul "VERSION"  ARCBIOS emulation\n");
+		arcbios_putstring(cpu, "GXemul " VERSION"  ARCBIOS emulation\n");
 
 		snprintf(tmpstr, sizeof(tmpstr), "%i cpu%s (%s), %i MB "
 		    "memory\n\n", machine->ncpus, machine->ncpus > 1? "s" : "",
@@ -2609,7 +2609,7 @@ void arcbios_init(struct machine *machine, int is64bit
 
 	system = arcbios_addchild_manual(cpu, COMPONENT_CLASS_SystemClass,
 	    COMPONENT_TYPE_ARC, 0,1,2,0, 0xffffffff, name, 0/*ROOT*/, NULL, 0);
-	debug("ARC system @ 0x%"PRIx64" (\"%s\")\n", (uint64_t) system, name);
+	debug("ARC system @ 0x%" PRIx64" (\"%s\")\n", (uint64_t) system, name);
 
 
 	/*
@@ -2720,18 +2720,18 @@ void arcbios_init(struct machine *machine, int is64bit
 			    0xffffffff, NULL, cpuaddr, NULL, 0);
 		}
 
-		debug("ARC cpu%i @ 0x%"PRIx64, i, (uint64_t) cpuaddr);
+		debug("ARC cpu%i @ 0x%" PRIx64, i, (uint64_t) cpuaddr);
 
 		if (fpu != 0)
-			debug(" (fpu @ 0x%"PRIx64")\n", (uint64_t) fpu);
+			debug(" (fpu @ 0x%" PRIx64")\n", (uint64_t) fpu);
 		else
 			debug("\n");
 
-		debug("    picache @ 0x%"PRIx64", pdcache @ 0x%"PRIx64"\n",
+		debug("    picache @ 0x%" PRIx64", pdcache @ 0x%" PRIx64"\n",
 		    (uint64_t) picache, (uint64_t) pdcache);
 
 		if (cpu->cd.mips.cache_secondary >= 12)
-			debug("    sdcache @ 0x%"PRIx64"\n",
+			debug("    sdcache @ 0x%" PRIx64"\n",
 			    (uint64_t) sdcache);
 
 		if (machine->machine_type == MACHINE_SGI) {
@@ -2740,7 +2740,7 @@ void arcbios_init(struct machine *machine, int is64bit
 			    COMPONENT_CLASS_MemoryClass,
 			    COMPONENT_TYPE_MemoryUnit, 0, 1, 2, 0,
 			    0xffffffff, "memory", cpuaddr, NULL, 0);
-			debug("ARC memory @ 0x%"PRIx64"\n", (uint64_t) memory);
+			debug("ARC memory @ 0x%" PRIx64"\n", (uint64_t) memory);
 		}
 	}
 
