Don't disable EA_DIRECT in fpu_load_ea(), which seems disabled
accidentally in rev 1.11 about six years ago, otherwise fmovel %dN,%fpN instructions cause unexpected memory access.
This commit is contained in:
parent
369fa66d6e
commit
2a92ad0d7f
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: fpu_calcea.c,v 1.17 2005/12/11 12:17:52 christos Exp $ */
|
||||
/* $NetBSD: fpu_calcea.c,v 1.18 2007/03/09 16:33:27 tsutsui Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995 Gordon W. Ross
|
||||
@ -32,7 +32,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: fpu_calcea.c,v 1.17 2005/12/11 12:17:52 christos Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: fpu_calcea.c,v 1.18 2007/03/09 16:33:27 tsutsui Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/signal.h>
|
||||
@ -371,7 +371,9 @@ fpu_load_ea(frame, insn, ea, dst)
|
||||
ea->ea_moffs += step;
|
||||
}
|
||||
/* That's it, folks */
|
||||
} else if (ea->ea_flags & EA_DIRECT) {
|
||||
} else
|
||||
#endif
|
||||
if (ea->ea_flags & EA_DIRECT) {
|
||||
if (len > 4) {
|
||||
#ifdef DEBUG
|
||||
printf("load_ea: operand doesn't fit CPU reg\n");
|
||||
@ -396,9 +398,7 @@ fpu_load_ea(frame, insn, ea, dst)
|
||||
printf("load_ea: src %p\n", src);
|
||||
#endif
|
||||
memcpy(dst, src, len);
|
||||
} else
|
||||
#endif
|
||||
if (ea->ea_flags & EA_IMMED) {
|
||||
} else if (ea->ea_flags & EA_IMMED) {
|
||||
#ifdef DEBUG_FPE
|
||||
printf("load_ea: immed %08x%08x%08x size %d\n",
|
||||
ea->ea_immed[0], ea->ea_immed[1], ea->ea_immed[2], len);
|
||||
|
Loading…
Reference in New Issue
Block a user