From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40792) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fSYQm-00045z-P2 for qemu-devel@nongnu.org; Mon, 11 Jun 2018 21:49:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fSYQi-0003MC-7e for qemu-devel@nongnu.org; Mon, 11 Jun 2018 21:49:08 -0400 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:38467) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fSYQi-0003L1-0u for qemu-devel@nongnu.org; Mon, 11 Jun 2018 21:49:04 -0400 From: "Emilio G. Cota" Date: Mon, 11 Jun 2018 21:48:53 -0400 Message-Id: <1528768140-17894-8-git-send-email-cota@braap.org> In-Reply-To: <1528768140-17894-1-git-send-email-cota@braap.org> References: <1528768140-17894-1-git-send-email-cota@braap.org> Subject: [Qemu-devel] [PATCH v4 07/14] softfloat: add float{32, 64}_is_zero_or_normal List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Aurelien Jarno , Peter Maydell , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Laurent Vivier , Richard Henderson , Paolo Bonzini , Mark Cave-Ayland These will gain some users very soon. Signed-off-by: Emilio G. Cota --- include/fpu/softfloat.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/include/fpu/softfloat.h b/include/fpu/softfloat.h index 1fbece5..08f63ae 100644 --- a/include/fpu/softfloat.h +++ b/include/fpu/softfloat.h @@ -422,6 +422,11 @@ static inline bool float32_is_denormal(float32 a) return float32_is_zero_or_denormal(a) && !float32_is_zero(a); } +static inline bool float32_is_zero_or_normal(float32 a) +{ + return float32_is_normal(a) || float32_is_zero(a); +} + static inline float32 float32_set_sign(float32 a, int sign) { return make_float32((float32_val(a) & 0x7fffffff) | (sign << 31)); @@ -561,6 +566,11 @@ static inline bool float64_is_denormal(float64 a) return float64_is_zero_or_denormal(a) && !float64_is_zero(a); } +static inline bool float64_is_zero_or_normal(float64 a) +{ + return float64_is_normal(a) || float64_is_zero(a); +} + static inline float64 float64_set_sign(float64 a, int sign) { return make_float64((float64_val(a) & 0x7fffffffffffffffULL) -- 2.7.4