From patchwork Tue Apr 12 12:58:06 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aleksandar Markovic X-Patchwork-Id: 8810221 Return-Path: X-Original-To: patchwork-qemu-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 8D6079F54F for ; Tue, 12 Apr 2016 13:01:51 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6380E20121 for ; Tue, 12 Apr 2016 13:01:50 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 725F5200FE for ; Tue, 12 Apr 2016 13:01:46 +0000 (UTC) Received: from localhost ([::1]:48974 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1apxwv-00063q-Sc for patchwork-qemu-devel@patchwork.kernel.org; Tue, 12 Apr 2016 09:01:45 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38288) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1apxtj-0008Dt-4P for qemu-devel@nongnu.org; Tue, 12 Apr 2016 08:58:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1apxti-0006xi-15 for qemu-devel@nongnu.org; Tue, 12 Apr 2016 08:58:27 -0400 Received: from mx2.rt-rk.com ([89.216.37.149]:43662 helo=mail.rt-rk.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1apxtb-0006uW-Rt; Tue, 12 Apr 2016 08:58:20 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.rt-rk.com (Postfix) with ESMTP id 93B721A4170; Tue, 12 Apr 2016 14:58:17 +0200 (CEST) X-Virus-Scanned: amavisd-new at rt-rk.com Received: from rtrkw197-lin.domain.local (rtrkw197-lin.domain.local [10.10.13.82]) by mail.rt-rk.com (Postfix) with ESMTPSA id 63E021A20B5; Tue, 12 Apr 2016 14:58:17 +0200 (CEST) From: Aleksandar Markovic To: qemu-devel@nongnu.org Date: Tue, 12 Apr 2016 14:58:06 +0200 Message-Id: <1460465891-6142-5-git-send-email-aleksandar.markovic@rt-rk.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1460465891-6142-1-git-send-email-aleksandar.markovic@rt-rk.com> References: <1460465891-6142-1-git-send-email-aleksandar.markovic@rt-rk.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 89.216.37.149 Subject: [Qemu-devel] [PATCH v4 4/9] softfloat: Clean up hex constants capitalization in softfloat-specialize.h X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: proljc@gmail.com, kbastian@mail.uni-paderborn.de, mark.cave-ayland@ilande.co.uk, agraf@suse.de, maciej.rozycki@imgtec.com, petar.jovanovic@imgtec.com, blauwirbel@gmail.com, jcmvbkbc@gmail.com, aleksandar.markovic@imgtec.com, qemu-arm@nongnu.org, qemu-ppc@nongnu.org, edgar.iglesias@gmail.com, miodrag.dinic@imgtec.com, pbonzini@redhat.com, gxt@mprc.pku.edu.cn, leon.alrae@imgtec.com, afaerber@suse.de, aurelien@aurel32.net, rth@twiddle.net Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Aleksandar Markovic With this partch, capitals A, B, C, D, E, F are always used for hex constants in softfloat-specialize.h. The large latter size is chosen just beacause it is currently prevalent in this file. Signed-off-by: Aleksandar Markovic --- fpu/softfloat-specialize.h | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/fpu/softfloat-specialize.h b/fpu/softfloat-specialize.h index 807ecc0..a5680e0 100644 --- a/fpu/softfloat-specialize.h +++ b/fpu/softfloat-specialize.h @@ -230,7 +230,7 @@ int float16_is_quiet_nan(float16 a_, float_status *status) if (status->snan_bit_is_one) { return (((a >> 9) & 0x3F) == 0x3E) && (a & 0x1FF); } else { - return ((a & ~0x8000) >= 0x7c80); + return ((a & ~0x8000) >= 0x7C80); } } @@ -243,7 +243,7 @@ int float16_is_signaling_nan(float16 a_, float_status *status) { uint16_t a = float16_val(a_); if (status->snan_bit_is_one) { - return ((a & ~0x8000) >= 0x7c80); + return ((a & ~0x8000) >= 0x7C80); } else { return (((a >> 9) & 0x3F) == 0x3E) && (a & 0x1FF); } @@ -328,9 +328,9 @@ int float32_is_quiet_nan( float32 a_, float_status *status ) { uint32_t a = float32_val(a_); if (status->snan_bit_is_one) { - return (((a >> 22) & 0x1ff) == 0x1fe) && (a & 0x003fffff); + return (((a >> 22) & 0x1FF) == 0x1FE) && (a & 0x003FFFFF); } else { - return ((uint32_t)(a << 1) >= 0xff800000); + return ((uint32_t)(a << 1) >= 0xFF800000); } } @@ -343,7 +343,7 @@ int float32_is_signaling_nan( float32 a_, float_status *status ) { uint32_t a = float32_val(a_); if (status->snan_bit_is_one) { - return ((uint32_t)(a << 1) >= 0xff800000); + return ((uint32_t)(a << 1) >= 0xFF800000); } else { return ( ( ( a>>22 ) & 0x1FF ) == 0x1FE ) && ( a & 0x003FFFFF ); } @@ -758,10 +758,10 @@ int float64_is_quiet_nan( float64 a_, float_status *status) { uint64_t a = float64_val(a_); if (status->snan_bit_is_one) { - return (((a >> 51) & 0xfff) == 0xffe) - && (a & 0x0007ffffffffffffULL); + return (((a >> 51) & 0xFFF) == 0xFFE) + && (a & 0x0007FFFFFFFFFFFFULL); } else { - return ((a << 1) >= 0xfff0000000000000ULL); + return ((a << 1) >= 0xFFF0000000000000ULL); } } @@ -774,7 +774,7 @@ int float64_is_signaling_nan( float64 a_, float_status *status ) { uint64_t a = float64_val(a_); if (status->snan_bit_is_one) { - return ((a << 1) >= 0xfff0000000000000ULL); + return ((a << 1) >= 0xFFF0000000000000ULL); } else { return ( ( ( a>>51 ) & 0xFFF ) == 0xFFE ) @@ -961,7 +961,7 @@ int floatx80_is_quiet_nan( floatx80 a, float_status *status ) uint64_t aLow; aLow = a.low & ~0x4000000000000000ULL; - return ((a.high & 0x7fff) == 0x7fff) + return ((a.high & 0x7FFF) == 0x7FFF) && (aLow << 1) && (a.low == aLow); } else { @@ -979,7 +979,7 @@ int floatx80_is_quiet_nan( floatx80 a, float_status *status ) int floatx80_is_signaling_nan( floatx80 a, float_status *status ) { if (status->snan_bit_is_one) { - return ((a.high & 0x7fff) == 0x7fff) + return ((a.high & 0x7FFF) == 0x7FFF) && ((a.low << 1) >= 0x8000000000000000ULL); } else { uint64_t aLow; @@ -1120,12 +1120,12 @@ int float128_is_signaling_nan(float128 a_, float_status *status) int float128_is_quiet_nan( float128 a, float_status *status ) { if (status->snan_bit_is_one) { - return (((a.high >> 47) & 0xffff) == 0xfffe) - && (a.low || (a.high & 0x00007fffffffffffULL)); + return (((a.high >> 47) & 0xFFFF) == 0xFFFE) + && (a.low || (a.high & 0x00007FFFFFFFFFFFULL)); } else { return - ((a.high << 1) >= 0xffff000000000000ULL) - && (a.low || (a.high & 0x0000ffffffffffffULL)); + ((a.high << 1) >= 0xFFFF000000000000ULL) + && (a.low || (a.high & 0x0000FFFFFFFFFFFFULL)); } } @@ -1138,8 +1138,8 @@ int float128_is_signaling_nan( float128 a, float_status *status ) { if (status->snan_bit_is_one) { return - ((a.high << 1) >= 0xffff000000000000ULL) - && (a.low || (a.high & 0x0000ffffffffffffULL)); + ((a.high << 1) >= 0xFFFF000000000000ULL) + && (a.low || (a.high & 0x0000FFFFFFFFFFFFULL)); } else { return ( ( ( a.high>>47 ) & 0xFFFF ) == 0xFFFE )