(1) Add unaligned access fixup code to fix unaligned quad, long,

and IEEE S and T floating datum loads and stores.  VAX floating data
types not yet supported, and in the future will only be supported if
FIX_UNALIGNED_VAX_FP is defined.  (No point in wasting the space when
most of the time there will never be VAX FP loads and stores.)  Right
now, these features can be controlled only by sysctl.  The (boolean)
integer sysctls machdep.unaligned_print, machdep.unaligned_fix, and
machdep.unaligned_sigbus control printing about unaligned accesses
(defaults on), fixing up of unaligned accesses (defaults on), and
forcing a SIGBUS on unaligned accesses (defaults off).  If an access
is not fixed up (for lack of method or explicit decision), a SIGBUS is
always generated to keep programs from using bogus data.  At some point,
these three choices should be controlled by per-process flags, as well.
This commit is contained in:
cgd 1996-07-14 04:15:10 +00:00
parent 5a367fefb1
commit 5beb1a522c
1 changed files with 8 additions and 2 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: cpu.h,v 1.11 1996/07/11 05:31:30 cgd Exp $ */
/* $NetBSD: cpu.h,v 1.12 1996/07/14 04:15:10 cgd Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@ -106,12 +106,18 @@ u_int64_t want_resched; /* resched() was called */
*/
#define CPU_CONSDEV 1 /* dev_t: console terminal device */
#define CPU_ROOT_DEVICE 2 /* string: root device name */
#define CPU_MAXID 3 /* number of valid machdep ids */
#define CPU_UNALIGNED_PRINT 3 /* int: print unaligned accesses */
#define CPU_UNALIGNED_FIX 4 /* int: fix unaligned accesses */
#define CPU_UNALIGNED_SIGBUS 5 /* int: SIGBUS unaligned accesses */
#define CPU_MAXID 6 /* 5 valid machdep IDs */
#define CTL_MACHDEP_NAMES { \
{ 0, 0 }, \
{ "console_device", CTLTYPE_STRUCT }, \
{ "root_device", CTLTYPE_STRING }, \
{ "unaligned_print", CTLTYPE_INT }, \
{ "unaligned_fix", CTLTYPE_INT }, \
{ "unaligned_sigbus", CTLTYPE_INT }, \
}
#endif /* _ALPHA_CPU_H_ */