Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/powerpc/fpu Simplify logic to remove needless goto....
details: https://anonhg.NetBSD.org/src/rev/68f232c9c6ee
branches: trunk
changeset: 369857:68f232c9c6ee
user: rin <rin%NetBSD.org@localhost>
date: Sun Sep 04 13:17:33 2022 +0000
description:
Simplify logic to remove needless goto. NFC.
diffstat:
sys/arch/powerpc/fpu/fpu_implode.c | 9 ++++-----
1 files changed, 4 insertions(+), 5 deletions(-)
diffs (35 lines):
diff -r 2ab00ea10387 -r 68f232c9c6ee sys/arch/powerpc/fpu/fpu_implode.c
--- a/sys/arch/powerpc/fpu/fpu_implode.c Sun Sep 04 13:16:47 2022 +0000
+++ b/sys/arch/powerpc/fpu/fpu_implode.c Sun Sep 04 13:17:33 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: fpu_implode.c,v 1.21 2022/09/04 13:14:57 rin Exp $ */
+/* $NetBSD: fpu_implode.c,v 1.22 2022/09/04 13:17:33 rin Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -46,7 +46,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fpu_implode.c,v 1.21 2022/09/04 13:14:57 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fpu_implode.c,v 1.22 2022/09/04 13:17:33 rin Exp $");
#include <sys/types.h>
#include <sys/systm.h>
@@ -451,14 +451,13 @@
}
if (ISINF(fp)) {
*cx |= FPRF_SIGN(sign) | FPSCR_FU;
- sign |= DBL_EXP(DBL_EXP_INFNAN);
- goto zero;
+ return HI_WORD(sign | DBL_EXP(DBL_EXP_INFNAN));
}
if (ISZERO(fp)) {
*cx |= FPSCR_FE;
if (sign)
*cx |= FPSCR_C;
-zero: return HI_WORD(sign);
+ return HI_WORD(sign);
}
if ((exp = fp->fp_exp + DBL_EXP_BIAS) <= 0) {
Home |
Main Index |
Thread Index |
Old Index