diff options
author | Jason Wright <jason@cvs.openbsd.org> | 2001-09-10 16:34:50 +0000 |
---|---|---|
committer | Jason Wright <jason@cvs.openbsd.org> | 2001-09-10 16:34:50 +0000 |
commit | e0088f423fb73c20d87a4cd047bf10a2a5866df4 (patch) | |
tree | 766f578ffdd2d883a1666b2177a7e192a489f998 /sys/arch/sparc/fpu | |
parent | e187da07b14b970fdbff3ba6d1001b453b5aa87d (diff) |
applying the same mask to rs2 and rd is bad ju-ju for F?TO? instructions. Fix up rd in those cases.
Diffstat (limited to 'sys/arch/sparc/fpu')
-rw-r--r-- | sys/arch/sparc/fpu/fpu.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/sys/arch/sparc/fpu/fpu.c b/sys/arch/sparc/fpu/fpu.c index fbf5d7bddae..e71a5e0868e 100644 --- a/sys/arch/sparc/fpu/fpu.c +++ b/sys/arch/sparc/fpu/fpu.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fpu.c,v 1.9 1998/03/01 09:05:29 johns Exp $ */ +/* $OpenBSD: fpu.c,v 1.10 2001/09/10 16:34:49 jason Exp $ */ /* $NetBSD: fpu.c,v 1.6 1997/07/29 10:09:51 fair Exp $ */ /* @@ -362,10 +362,17 @@ fpu_execute(fe, instr) fp = fpu_mul(fe); break; + case FTOI >> 2: case FTOS >> 2: + rd = instr.i_opf.i_rd; + goto fto; case FTOD >> 2: + rd = instr.i_opf.i_rd & (~1); + goto fto; case FTOX >> 2: - case FTOI >> 2: + rd = instr.i_opf.i_rd & (~3); + +fto: fpu_explode(fe, fp = &fe->fe_f1, type, rs2); type = opf & 3; /* sneaky; depends on instruction encoding */ break; |