summaryrefslogtreecommitdiff
path: root/sys/arch/m88k/include
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2013-08-18 22:04:52 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2013-08-18 22:04:52 +0000
commit2c8d4bd4dc7076ec8394c7fcc8594c8dad8b1172 (patch)
tree48c1e02ec57a4c0d4f6be3a4eae347730b5934de /sys/arch/m88k/include
parentcf32eda540fac96cc4f0bc45f1d7ada89088353f (diff)
Fix prototypes of do_load_half() and do_load_byte() - those return a
sign-extended 32-bit value. The previous prototypes used too narrow return types since the mvme88k/luna88k code unification 9 years ago. Amazingly this did not cause much harm and took quite a while to understand. The most visible occurence of this bug would be awk aborting early with a syntax error message, on valid output; this is no surprise as awk is probably the largest consumer of `short' types in the tree. Of course, the bug would not be reliably reproduceable, because it would only trigger if the DAE code path was taken, usually during page fault processing; and since uvm_fault() will attempt to fault neighbouring pages, depending upon the particular randomness (stackgap, shared library location) at the time one ran awk, it may (but quite often may not) trigger. [forcing all uvm_fault() narrow helped reproduce the issue reliably and eventually fix it]
Diffstat (limited to 'sys/arch/m88k/include')
-rw-r--r--sys/arch/m88k/include/m88100.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/arch/m88k/include/m88100.h b/sys/arch/m88k/include/m88100.h
index 82b6be45b3c..dfcb71c0c87 100644
--- a/sys/arch/m88k/include/m88100.h
+++ b/sys/arch/m88k/include/m88100.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: m88100.h,v 1.6 2011/03/23 16:54:35 pirofti Exp $ */
+/* $OpenBSD: m88100.h,v 1.7 2013/08/18 22:04:51 miod Exp $ */
/*
* Mach Operating System
* Copyright (c) 1993-1992 Carnegie Mellon University
@@ -62,8 +62,8 @@ void dae_print(u_int *);
void data_access_emulation(u_int *);
u_int32_t do_load_word(vaddr_t, int);
-u_int16_t do_load_half(vaddr_t, int);
-u_int8_t do_load_byte(vaddr_t, int);
+u_int32_t do_load_half(vaddr_t, int);
+u_int32_t do_load_byte(vaddr_t, int);
void do_store_word(vaddr_t, u_int32_t, int);
void do_store_half(vaddr_t, u_int16_t, int);
void do_store_byte(vaddr_t, u_int8_t, int);