summaryrefslogtreecommitdiff
path: root/sys/arch/i386
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>2001-02-06 23:01:33 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>2001-02-06 23:01:33 +0000
commit2ae97c7e53734073fa8a40a3924a90249b27135c (patch)
tree868058e13109651716c533e56769c2c353cab08d /sys/arch/i386
parentb027055a4e732b7187491870ce883f9321e1dac7 (diff)
i can be stooooopid
Diffstat (limited to 'sys/arch/i386')
-rw-r--r--sys/arch/i386/include/bus.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/arch/i386/include/bus.h b/sys/arch/i386/include/bus.h
index 9a9bbb59afc..f88ba9632db 100644
--- a/sys/arch/i386/include/bus.h
+++ b/sys/arch/i386/include/bus.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: bus.h,v 1.25 2001/02/04 06:51:14 aaron Exp $ */
+/* $OpenBSD: bus.h,v 1.26 2001/02/06 23:01:32 mickey Exp $ */
/* $NetBSD: bus.h,v 1.6 1996/11/10 03:19:25 thorpej Exp $ */
/*-
@@ -723,9 +723,8 @@ void bus_space_free __P((bus_space_tag_t t, bus_space_handle_t bsh,
"+S" (a1), "+D" (a2), "+c" (cnt) :: "memory", "cc");
#define i386_space_copy(a1, a2, sz, cnt) do { \
- int _len = (sz) * (cnt); \
- if ((void *)(a2) < ((void *)(a1) + _len)) { \
- a1 += (_len - (sz)); a2 += (_len - (sz)); \
+ if ((void *)(a1) < (void *)(a2) { \
+ a1 += ((cnt) - 1) * (sz); a2 += ((cnt) - 1) * (sz); \
switch (sz) { \
case 1: i386_space_copy1(a1,a2,cnt,"movsb","std");break;\
case 2: i386_space_copy1(a1,a2,cnt,"movsw","std");break;\