diff options
author | 2001-09-10 16:34:49 +0000 | |
---|---|---|
committer | 2001-09-10 16:34:49 +0000 | |
commit | 127c2587301cb03ca3c280f1b0c74ee97392ac99 (patch) | |
tree | 9479e19ef2e1522e32a161716abc3e8dee8a6229 | |
parent | fix typo in comment; d.doroshenko@omnitel.net (diff) | |
download | wireguard-openbsd-127c2587301cb03ca3c280f1b0c74ee97392ac99.tar.xz wireguard-openbsd-127c2587301cb03ca3c280f1b0c74ee97392ac99.zip |
applying the same mask to rs2 and rd is bad ju-ju for F?TO? instructions. Fix up rd in those cases.
-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; |