summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorbriggs <briggs@cvs.openbsd.org>1996-09-18 02:09:30 +0000
committerbriggs <briggs@cvs.openbsd.org>1996-09-18 02:09:30 +0000
commit0c259a9dfdcd1e340f1c8d53e4803f40ec8ff8ec (patch)
tree2d6b27f4cb2c5699b80facd57cc11634cfe26bdb /sys/arch
parent799bb3596ca6e0b323f3849d44f734cd63b7d5c6 (diff)
NetBSD PR#2761 (wrong fmovem emulation) from Takeshi Nakayama
(takeshi@sakabe.nuie.nagoya-u.ac.jp). Untested by me, but it looks correct against the FP User's manual.
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/m68k/fpe/fpu_emulate.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/sys/arch/m68k/fpe/fpu_emulate.c b/sys/arch/m68k/fpe/fpu_emulate.c
index 172f393a99b..472ec39e52d 100644
--- a/sys/arch/m68k/fpe/fpu_emulate.c
+++ b/sys/arch/m68k/fpe/fpu_emulate.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fpu_emulate.c,v 1.4 1996/05/29 11:29:30 niklas Exp $ */
+/* $OpenBSD: fpu_emulate.c,v 1.5 1996/09/18 02:09:29 briggs Exp $ */
/* $NetBSD: fpu_emulate.c,v 1.6 1996/05/15 07:31:55 leo Exp $ */
/*
@@ -446,7 +446,7 @@ fpu_emul_fmovm(fe, insn)
int word1, sig;
int reglist, regmask, regnum;
int fpu_to_mem, order;
- int w1_post_incr; /* XXX - FP regs order? */
+ int w1_post_incr;
int *fpregs;
insn->is_advance = 4;
@@ -488,7 +488,11 @@ fpu_emul_fmovm(fe, insn)
}
while ((0 <= regnum) && (regnum < 8)) {
- regmask = 1 << regnum;
+ if (w1_post_incr) {
+ regmask = 0x80 >> regnum;
+ } else {
+ regmask = 1 << regnum;
+ }
if (regmask & reglist) {
if (fpu_to_mem) {
sig = fpu_store_ea(frame, insn, &insn->is_ea0,