Module Name: src Committed By: isaki Date: Mon Mar 8 14:37:55 UTC 2021
Modified Files: src/sys/arch/m68k/fpe: fpu_explode.c Log Message: Remove incorrect byte and word conversions from fpu_explode. The correct operation here is arithmetic right shift, but nobody calls it. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/sys/arch/m68k/fpe/fpu_explode.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/m68k/fpe/fpu_explode.c diff -u src/sys/arch/m68k/fpe/fpu_explode.c:1.15 src/sys/arch/m68k/fpe/fpu_explode.c:1.16 --- src/sys/arch/m68k/fpe/fpu_explode.c:1.15 Thu Feb 5 12:23:27 2015 +++ src/sys/arch/m68k/fpe/fpu_explode.c Mon Mar 8 14:37:55 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: fpu_explode.c,v 1.15 2015/02/05 12:23:27 isaki Exp $ */ +/* $NetBSD: fpu_explode.c,v 1.16 2021/03/08 14:37:55 isaki Exp $ */ /* * Copyright (c) 1992, 1993 @@ -46,7 +46,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: fpu_explode.c,v 1.15 2015/02/05 12:23:27 isaki Exp $"); +__KERNEL_RCSID(0, "$NetBSD: fpu_explode.c,v 1.16 2021/03/08 14:37:55 isaki Exp $"); #include <sys/types.h> #include <sys/systm.h> @@ -230,11 +230,6 @@ fpu_explode(struct fpemu *fe, struct fpn fp->fp_sign = s >> 31; fp->fp_sticky = 0; switch (type) { - - case FTYPE_BYT: - s >>= 8; - case FTYPE_WRD: - s >>= 16; case FTYPE_LNG: s = fpu_itof(fp, s); break; @@ -251,6 +246,10 @@ fpu_explode(struct fpemu *fe, struct fpn s = fpu_xtof(fp, s, space[1], space[2]); break; + case FTYPE_BYT: + case FTYPE_WRD: + /* Caller must cast it to signed LNG instead of calling this */ + /* FALLTHROUGH */ default: panic("fpu_explode"); }