From: briggs Date: Wed, 18 Sep 1996 02:09:29 +0000 (+0000) Subject: NetBSD PR#2761 (wrong fmovem emulation) from Takeshi Nakayama X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=1c6e17d94cab3dd2487ee2722fe2481ea5a300b7;p=openbsd 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. --- 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,