Module Name: src Committed By: tsutsui Date: Mon Sep 23 01:39:27 UTC 2013
Modified Files: src/sys/arch/mvme68k/include: prom.h src/sys/arch/mvme68k/stand/libbug: outln.c outstr.c Log Message: Make MVMEPROM_ARG2() macro take two args in a single asm statement. Fixes a problem that a wrong address is passed to the MVMEPROM outstr function (then caused garbages on screen) after we switched to gcc-4.5. Reported and confirmed by Andrew Gillham on port-mvme68k@: http://mail-index.NetBSD.org/port-mvme68k/2013/09/17/msg000084.html http://mail-index.NetBSD.org/port-mvme68k/2013/09/19/msg000085.html http://mail-index.NetBSD.org/port-mvme68k/2013/09/22/msg000095.html http://mail-index.NetBSD.org/port-mvme68k/2013/09/22/msg000097.html No error on "build.sh -m mvme68k build" builds. Should be pulled up to netbsd-6 branches. To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/sys/arch/mvme68k/include/prom.h cvs rdiff -u -r1.3 -r1.4 src/sys/arch/mvme68k/stand/libbug/outln.c \ src/sys/arch/mvme68k/stand/libbug/outstr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/mvme68k/include/prom.h diff -u src/sys/arch/mvme68k/include/prom.h:1.17 src/sys/arch/mvme68k/include/prom.h:1.18 --- src/sys/arch/mvme68k/include/prom.h:1.17 Sat Dec 24 23:24:01 2005 +++ src/sys/arch/mvme68k/include/prom.h Mon Sep 23 01:39:27 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: prom.h,v 1.17 2005/12/24 23:24:01 perry Exp $ */ +/* $NetBSD: prom.h,v 1.18 2013/09/23 01:39:27 tsutsui Exp $ */ /* * Copyright (c) 1995 Theo de Raadt @@ -155,8 +155,10 @@ struct mvmeprom_args { __asm volatile ("clrl %sp@-") #define MVMEPROM_ARG1(arg) \ __asm volatile ("movel %0, %%sp@-"::"d" (arg)) -#define MVMEPROM_ARG2(arg) \ - __asm volatile ("movel %0, %%sp@-"::"d" (arg)) +#define MVMEPROM_ARG2(arg0, arg1) \ + __asm volatile ("movel %0, %%sp@-;" \ + "movel %1, %%sp@-;" \ + :: "d" (arg0), "d" (arg1):) #define MVMEPROM_GETRES(ret) \ __asm volatile ("movel %%sp@+,%0": "=d" (ret):) #define MVMEPROM_GETSR(ret) \ Index: src/sys/arch/mvme68k/stand/libbug/outln.c diff -u src/sys/arch/mvme68k/stand/libbug/outln.c:1.3 src/sys/arch/mvme68k/stand/libbug/outln.c:1.4 --- src/sys/arch/mvme68k/stand/libbug/outln.c:1.3 Sat Jan 12 09:54:31 2008 +++ src/sys/arch/mvme68k/stand/libbug/outln.c Mon Sep 23 01:39:27 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: outln.c,v 1.3 2008/01/12 09:54:31 tsutsui Exp $ */ +/* $NetBSD: outln.c,v 1.4 2013/09/23 01:39:27 tsutsui Exp $ */ /* * bug routines -- assumes that the necessary sections of memory @@ -13,7 +13,6 @@ void mvmeprom_outln(char *start, char *end) { - MVMEPROM_ARG1(end); - MVMEPROM_ARG2(start); + MVMEPROM_ARG2(end, start); MVMEPROM_CALL(MVMEPROM_OUTSTRCRLF); } Index: src/sys/arch/mvme68k/stand/libbug/outstr.c diff -u src/sys/arch/mvme68k/stand/libbug/outstr.c:1.3 src/sys/arch/mvme68k/stand/libbug/outstr.c:1.4 --- src/sys/arch/mvme68k/stand/libbug/outstr.c:1.3 Sat Jan 12 09:54:31 2008 +++ src/sys/arch/mvme68k/stand/libbug/outstr.c Mon Sep 23 01:39:27 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: outstr.c,v 1.3 2008/01/12 09:54:31 tsutsui Exp $ */ +/* $NetBSD: outstr.c,v 1.4 2013/09/23 01:39:27 tsutsui Exp $ */ /* * bug routines -- assumes that the necessary sections of memory @@ -13,7 +13,6 @@ void mvmeprom_outstr(char *start, char *end) { - MVMEPROM_ARG1(end); - MVMEPROM_ARG2(start); + MVMEPROM_ARG2(end, start); MVMEPROM_CALL(MVMEPROM_OUTSTR); }