Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/mvme68k Make MVMEPROM_ARG2() macro take two args in...
details: https://anonhg.NetBSD.org/src/rev/e929cbf2e621
branches: trunk
changeset: 790162:e929cbf2e621
user: tsutsui <tsutsui%NetBSD.org@localhost>
date: Mon Sep 23 01:39:27 2013 +0000
description:
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.
diffstat:
sys/arch/mvme68k/include/prom.h | 8 +++++---
sys/arch/mvme68k/stand/libbug/outln.c | 5 ++---
sys/arch/mvme68k/stand/libbug/outstr.c | 5 ++---
3 files changed, 9 insertions(+), 9 deletions(-)
diffs (58 lines):
diff -r 8cc584b6c290 -r e929cbf2e621 sys/arch/mvme68k/include/prom.h
--- a/sys/arch/mvme68k/include/prom.h Sun Sep 22 20:51:18 2013 +0000
+++ b/sys/arch/mvme68k/include/prom.h Mon Sep 23 01:39:27 2013 +0000
@@ -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 @@
__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) \
diff -r 8cc584b6c290 -r e929cbf2e621 sys/arch/mvme68k/stand/libbug/outln.c
--- a/sys/arch/mvme68k/stand/libbug/outln.c Sun Sep 22 20:51:18 2013 +0000
+++ b/sys/arch/mvme68k/stand/libbug/outln.c Mon Sep 23 01:39:27 2013 +0000
@@ -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 @@
mvmeprom_outln(char *start, char *end)
{
- MVMEPROM_ARG1(end);
- MVMEPROM_ARG2(start);
+ MVMEPROM_ARG2(end, start);
MVMEPROM_CALL(MVMEPROM_OUTSTRCRLF);
}
diff -r 8cc584b6c290 -r e929cbf2e621 sys/arch/mvme68k/stand/libbug/outstr.c
--- a/sys/arch/mvme68k/stand/libbug/outstr.c Sun Sep 22 20:51:18 2013 +0000
+++ b/sys/arch/mvme68k/stand/libbug/outstr.c Mon Sep 23 01:39:27 2013 +0000
@@ -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 @@
mvmeprom_outstr(char *start, char *end)
{
- MVMEPROM_ARG1(end);
- MVMEPROM_ARG2(start);
+ MVMEPROM_ARG2(end, start);
MVMEPROM_CALL(MVMEPROM_OUTSTR);
}
Home |
Main Index |
Thread Index |
Old Index