Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/vax/include GCC 2.96 wants the = constraint first. ...
details: https://anonhg.NetBSD.org/src/rev/93633d7a4b83
branches: trunk
changeset: 494093:93633d7a4b83
user: matt <matt%NetBSD.org@localhost>
date: Sat Jul 01 06:41:06 2000 +0000
description:
GCC 2.96 wants the = constraint first. Also change to be a bit more
efficient. Instead of using indirect register access, change the
constraint to memory and use the value directly. This allow PC-rel
access among other things.
diffstat:
sys/arch/vax/include/lock.h | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
diffs (37 lines):
diff -r 508c09dc22d0 -r 93633d7a4b83 sys/arch/vax/include/lock.h
--- a/sys/arch/vax/include/lock.h Sat Jul 01 06:38:53 2000 +0000
+++ b/sys/arch/vax/include/lock.h Sat Jul 01 06:41:06 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lock.h,v 1.4 2000/05/02 04:41:11 thorpej Exp $ */
+/* $NetBSD: lock.h,v 1.5 2000/07/01 06:41:06 matt Exp $ */
/*
* Copyright (c) 2000 Ludd, University of Lule}, Sweden.
@@ -47,9 +47,9 @@
static __inline void
__cpu_simple_lock(__cpu_simple_lock_t *alp)
{
- __asm__ __volatile ("1:;bbssi $0, (%0), 1b"
+ __asm__ __volatile ("1:;bbssi $0, %0, 1b"
: /* No output */
- : "r"(alp));
+ : "m"(*alp));
}
static __inline void
@@ -61,11 +61,11 @@
static __inline int
__cpu_simple_lock_try(__cpu_simple_lock_t *alp)
{
- register int ret;
+ int ret;
- __asm__ __volatile ("movl $0,%0;bbssi $0,(%1),1f;incl %0;1:"
- : "&=r"(ret)
- : "r"(alp));
+ __asm__ __volatile ("movl $0,%0;bbssi $0,%1,1f;incl %0;1:"
+ : "=&r"(ret)
+ : "m"(*alp));
return ret;
}
Home |
Main Index |
Thread Index |
Old Index