From e0088f423fb73c20d87a4cd047bf10a2a5866df4 Mon Sep 17 00:00:00 2001 From: Jason Wright Date: Mon, 10 Sep 2001 16:34:50 +0000 Subject: applying the same mask to rs2 and rd is bad ju-ju for F?TO? instructions. Fix up rd in those cases. --- sys/arch/sparc/fpu/fpu.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'sys/arch/sparc') 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; -- cgit v1.2.3