From patchwork Tue Aug 13 12:49:34 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 171184 Delivered-To: patch@linaro.org Received: by 2002:ac9:5c4b:0:0:0:0:0 with SMTP id r11csp857951ocp; Tue, 13 Aug 2019 05:50:43 -0700 (PDT) X-Google-Smtp-Source: APXvYqzFvWgtlozIBdU7yzZoym8rJRi0nj0haigwoSqD4Sw9LC3MfGEDnPgRLpKg0mKs6kEqgv3B X-Received: by 2002:a17:906:393:: with SMTP id b19mr7091766eja.140.1565700643261; Tue, 13 Aug 2019 05:50:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565700643; cv=none; d=google.com; s=arc-20160816; b=coRTHOFyLT0UVogv14baOs8BuryojPqMN9i7lrbdoNkrDxTYk8FpsiyOCP+EAj9rs8 6aPGtEPnyu/Hum2MBuJ/7c4X7u/kC3oOJbHZwhLCj8sBJT8GlLjmoaHOJmNrpYBTw/o9 Wn8GWNtxfJ5wEOz6j/leL+deKimFl34vlVkwTiL1C0B1XrIwRVIa/MrUe4/rNVE20mza yzLB1mt39XTRDQdtEt4sGxLArMp1Ri2L3ud9nZ5oXwfX6rDZJWGGE4DGo0wA/wYJmBXn nXf/1NWVdQ2fL5q4zKtXCEQK1XedVrhbxMdMRAfZ3VDpfAbEiU9tHw/al5TnEegvZ1Sj XocA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature; bh=ki6/qS5/kkWXkqIOjzkIPrV1IVbRhLJ3aywqEzrIZU8=; b=aeeByhQBEDTvG/PGIIJ2/95P7tEmwo9ThtGouLwiBxWug4tVDy0Hcmf8cWYYCCmBCr OgiXOoaBJR75QvJTt8qTmYOx0NOfWl3+nyl0Eaz7t9rJWYOUd0aWEYk1Yibf/QGOhELn yj+jrx/P7hG5JCuIm38F1pgpeECakaom3kVE14oERkZaJtIGa2BkTbRWAifcP6ZBg+U6 Xj5g2xxVJbNIQve7PQ79/DXS0UoehZAe5FMvZ6iT8H5ToSf/ozDBGi4wiYeiOskVc211 kovz83YQXes7nI/VaAgB9UY3JmUTvVdEjQ2+Vz0WYoc72lME6H4aoS5+H8jVH+G1AwdK NJ3g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="uND/gZqX"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id o31si2134949edc.142.2019.08.13.05.50.42 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 13 Aug 2019 05:50:43 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="uND/gZqX"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:51980 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hxWG9-0002Ij-R7 for patch@linaro.org; Tue, 13 Aug 2019 08:50:41 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53530) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hxWFK-0002Gd-SL for qemu-devel@nongnu.org; Tue, 13 Aug 2019 08:49:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hxWFJ-0000cd-OV for qemu-devel@nongnu.org; Tue, 13 Aug 2019 08:49:50 -0400 Received: from mail-wm1-x344.google.com ([2a00:1450:4864:20::344]:36754) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hxWFJ-0000bg-H1 for qemu-devel@nongnu.org; Tue, 13 Aug 2019 08:49:49 -0400 Received: by mail-wm1-x344.google.com with SMTP id g67so1349200wme.1 for ; Tue, 13 Aug 2019 05:49:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ki6/qS5/kkWXkqIOjzkIPrV1IVbRhLJ3aywqEzrIZU8=; b=uND/gZqXPc8xqzhQS4i+6ajDn5604DAUVmHBkL3UoOSYpG7qAxHGmMLLR7s6l9jh3A JLMfrrs4O0UJOLlcujvkyTyNaJvK2zztvAzpZ3vYwG+/Zr7GiXWlJv1pUddXNgI4EuKS r0yd3jL8rWmy4g7WTrq0LN4xJLGOJbHFPFEiIdP3pbLrOCt0CNiqw2ty9POnpyyBKWcw nHSj/8q3H5DFSzv9nRDcTRxL6DFWaVt0Pg+6pU6/1pyKJpH2qkCV4MQYGzt1KdcD6ZHC +56LqCQ8f3x7O14y6UD4M/t8RLZM17g2KTrpWBctO6Rbom7R5IgvsNw0y8sRXQKFZ8YG tfmA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ki6/qS5/kkWXkqIOjzkIPrV1IVbRhLJ3aywqEzrIZU8=; b=gxJklrWhwNzL2feqZLxVdx4sLb/1RUldvCfYIvEmtTk+ejpcKCgCmeizK6IfylbCu5 2fYUrO62FWPUpLbug+x7lOCEt4MJT6V7pgiyoyvyVdoZo2dMp5RmUp0MC8v4ZqbAYIUV GrTjfZ4qRsOPojevVTZ7MOEn5jZ/oaQJo5NfZAhpdMNtmy9bCWf/PstfY7FBxRPQY9Qt x5mG9L6ci+MeU7/UTGEiYSqmnkRT7v8HCwuSbwDuV9aqiNchh+FeTkfaegi9KyxPKdhA ICz0OYDSwkQIPoSkAK4/6OeKAUUzIvZvS0F2UvhoJeog2xQ6Gx9FbF0D3I37DWLJbOMf +GGA== X-Gm-Message-State: APjAAAVJX81UAw4zSzqm7OCHhnFi2FpjveEmYAaO+gNSE9cA/Y1tDyNa x7A1E/JaEXrjPR/pktyh1ah3rw== X-Received: by 2002:a05:600c:224c:: with SMTP id a12mr3016123wmm.12.1565700588351; Tue, 13 Aug 2019 05:49:48 -0700 (PDT) Received: from zen.linaroharston ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id c8sm4349416wrn.50.2019.08.13.05.49.47 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Tue, 13 Aug 2019 05:49:47 -0700 (PDT) Received: from zen.linaroharston. (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 044C91FF8C; Tue, 13 Aug 2019 13:49:47 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Date: Tue, 13 Aug 2019 13:49:34 +0100 Message-Id: <20190813124946.25322-2-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190813124946.25322-1-alex.bennee@linaro.org> References: <20190813124946.25322-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::344 Subject: [Qemu-devel] [PATCH v3 01/13] fpu: replace LIT64 usage with UINT64_C for specialize constants X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , =?utf-8?q?Alex_Benn=C3=A9e?= , armbru@redhat.com, Aurelien Jarno Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" We have a wrapper that does the right thing from stdint.h so lets use it for our constants in softfloat-specialize.h Signed-off-by: Alex Bennée --- fpu/softfloat-specialize.h | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) -- 2.20.1 Reviewed-by: Richard Henderson diff --git a/fpu/softfloat-specialize.h b/fpu/softfloat-specialize.h index 7b8895726c5..5ab2fa19415 100644 --- a/fpu/softfloat-specialize.h +++ b/fpu/softfloat-specialize.h @@ -196,11 +196,11 @@ floatx80 floatx80_default_nan(float_status *status) /* None of the targets that have snan_bit_is_one use floatx80. */ assert(!snan_bit_is_one(status)); #if defined(TARGET_M68K) - r.low = LIT64(0xFFFFFFFFFFFFFFFF); + r.low = UINT64_C(0xFFFFFFFFFFFFFFFF); r.high = 0x7FFF; #else /* X86 */ - r.low = LIT64(0xC000000000000000); + r.low = UINT64_C(0xC000000000000000); r.high = 0xFFFF; #endif return r; @@ -212,9 +212,9 @@ floatx80 floatx80_default_nan(float_status *status) #define floatx80_infinity_high 0x7FFF #if defined(TARGET_M68K) -#define floatx80_infinity_low LIT64(0x0000000000000000) +#define floatx80_infinity_low UINT64_C(0x0000000000000000) #else -#define floatx80_infinity_low LIT64(0x8000000000000000) +#define floatx80_infinity_low UINT64_C(0x8000000000000000) #endif const floatx80 floatx80_infinity @@ -667,7 +667,7 @@ int float64_is_signaling_nan(float64 a_, float_status *status) return ((a << 1) >= 0xFFF0000000000000ULL); } else { return (((a >> 51) & 0xFFF) == 0xFFE) - && (a & LIT64(0x0007FFFFFFFFFFFF)); + && (a & UINT64_C(0x0007FFFFFFFFFFFF)); } #endif } @@ -707,7 +707,7 @@ static float64 commonNaNToFloat64(commonNaNT a, float_status *status) if (mantissa) { return make_float64( (((uint64_t) a.sign) << 63) - | LIT64(0x7FF0000000000000) + | UINT64_C(0x7FF0000000000000) | (a.high >> 12)); } else { return float64_default_nan(status); @@ -790,7 +790,7 @@ int floatx80_is_quiet_nan(floatx80 a, float_status *status) && (a.low == aLow); } else { return ((a.high & 0x7FFF) == 0x7FFF) - && (LIT64(0x8000000000000000) <= ((uint64_t)(a.low << 1))); + && (UINT64_C(0x8000000000000000) <= ((uint64_t)(a.low << 1))); } #endif } @@ -812,7 +812,7 @@ int floatx80_is_signaling_nan(floatx80 a, float_status *status) } else { uint64_t aLow; - aLow = a.low & ~LIT64(0x4000000000000000); + aLow = a.low & ~UINT64_C(0x4000000000000000); return ((a.high & 0x7FFF) == 0x7FFF) && (uint64_t)(aLow << 1) && (a.low == aLow); @@ -829,7 +829,7 @@ floatx80 floatx80_silence_nan(floatx80 a, float_status *status) { /* None of the targets that have snan_bit_is_one use floatx80. */ assert(!snan_bit_is_one(status)); - a.low |= LIT64(0xC000000000000000); + a.low |= UINT64_C(0xC000000000000000); return a; } @@ -874,7 +874,7 @@ static floatx80 commonNaNToFloatx80(commonNaNT a, float_status *status) } if (a.high >> 1) { - z.low = LIT64(0x8000000000000000) | a.high >> 1; + z.low = UINT64_C(0x8000000000000000) | a.high >> 1; z.high = (((uint16_t)a.sign) << 15) | 0x7FFF; } else { z = floatx80_default_nan(status); @@ -969,7 +969,7 @@ int float128_is_signaling_nan(float128 a, float_status *status) && (a.low || (a.high & 0x0000FFFFFFFFFFFFULL)); } else { return (((a.high >> 47) & 0xFFFF) == 0xFFFE) - && (a.low || (a.high & LIT64(0x00007FFFFFFFFFFF))); + && (a.low || (a.high & UINT64_C(0x00007FFFFFFFFFFF))); } #endif } @@ -987,7 +987,7 @@ float128 float128_silence_nan(float128 a, float_status *status) if (snan_bit_is_one(status)) { return float128_default_nan(status); } else { - a.high |= LIT64(0x0000800000000000); + a.high |= UINT64_C(0x0000800000000000); return a; } #endif @@ -1025,7 +1025,7 @@ static float128 commonNaNToFloat128(commonNaNT a, float_status *status) } shift128Right(a.high, a.low, 16, &z.high, &z.low); - z.high |= (((uint64_t)a.sign) << 63) | LIT64(0x7FFF000000000000); + z.high |= (((uint64_t)a.sign) << 63) | UINT64_C(0x7FFF000000000000); return z; }