From patchwork Wed Feb 5 17:28:36 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 24217 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qa0-f71.google.com (mail-qa0-f71.google.com [209.85.216.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 8671A20675 for ; Wed, 5 Feb 2014 17:28:48 +0000 (UTC) Received: by mail-qa0-f71.google.com with SMTP id j5sf1226262qaq.6 for ; Wed, 05 Feb 2014 09:28:47 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=YCfIFEl2+/Kh/2Ks6HLgrShLuVYISgcWSZoY7h8Mr9Q=; b=cyTYkemPF2h10RU2jUO/ScXlZNL64hUol37KDnwoKMe9vC71YPjimv3h34qkCI1ax5 fFqIHNNMF4lYNRGhTzDaznQO8NBY80xKaJp4iEY59Li/0fIlCqk3gU0tyPQ1a27KJEn3 B7qr7bC8FOJUcSBLStCpC37asA/irwqxW8QDzXfLQDYGE+C6CMUhKyeGOv3VEZQ84tXo +h/ZMMMd3LQwQfpvxPR7+rY5sOpQEAK3hvuK8QxXORV5lNHMwEpBepPV62Wb4HqNRKxL QOZNzPLoJqRTjFf+w/rEjdU8uJxZPycf4JDTFU3TwIFuT4Wwr4L6f6S5LSazJmJqSfjb G0Pg== X-Gm-Message-State: ALoCoQkSvPlm0VByLm9urJ0HDd6vJ9lp8s08e//Unyj1U+YjYpDJa52/R1D46f0I4hpDUkYEiZyt X-Received: by 10.236.128.243 with SMTP id f79mr2317894yhi.27.1391621327666; Wed, 05 Feb 2014 09:28:47 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.92.240 with SMTP id b103ls243479qge.57.gmail; Wed, 05 Feb 2014 09:28:47 -0800 (PST) X-Received: by 10.52.104.68 with SMTP id gc4mr1512242vdb.2.1391621327552; Wed, 05 Feb 2014 09:28:47 -0800 (PST) Received: from mail-vb0-f44.google.com (mail-vb0-f44.google.com [209.85.212.44]) by mx.google.com with ESMTPS id z15si9888986vce.72.2014.02.05.09.28.47 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 05 Feb 2014 09:28:47 -0800 (PST) Received-SPF: neutral (google.com: 209.85.212.44 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.212.44; Received: by mail-vb0-f44.google.com with SMTP id f12so531545vbg.31 for ; Wed, 05 Feb 2014 09:28:47 -0800 (PST) X-Received: by 10.52.23.68 with SMTP id k4mr1523112vdf.24.1391621327446; Wed, 05 Feb 2014 09:28:47 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp67632vcz; Wed, 5 Feb 2014 09:28:46 -0800 (PST) X-Received: by 10.180.105.65 with SMTP id gk1mr18167823wib.12.1391621326333; Wed, 05 Feb 2014 09:28:46 -0800 (PST) Received: from mnementh.archaic.org.uk (mnementh.archaic.org.uk. [2001:8b0:1d0::1]) by mx.google.com with ESMTPS id p3si15508069wjw.95.2014.02.05.09.28.43 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 05 Feb 2014 09:28:46 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 2001:8b0:1d0::1 as permitted sender) client-ip=2001:8b0:1d0::1; Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.80) (envelope-from ) id 1WB6H7-00023b-T0; Wed, 05 Feb 2014 17:28:37 +0000 From: Peter Maydell To: qemu-devel@nongnu.org Cc: patches@linaro.org, Alexander Graf , Michael Matz , Claudio Fontana , Dirk Mueller , Laurent Desnogues , kvmarm@lists.cs.columbia.edu, Richard Henderson , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Christoffer Dall , Will Newton , Peter Crosthwaite , Paolo Bonzini Subject: [PATCH v3 4/5] disas/libvixl: Fix upstream libvixl compilation issues Date: Wed, 5 Feb 2014 17:28:36 +0000 Message-Id: <1391621317-7866-5-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1391621317-7866-1-git-send-email-peter.maydell@linaro.org> References: <1391621317-7866-1-git-send-email-peter.maydell@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: peter.maydell@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.212.44 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Fix various minor issues with upstream libvixl so that it will compile successfully on the platforms QEMU cares about: * remove unused GBytes constant (it clashes with the glib headers) * fix suffixes on constants to use 'LL' for 64 bit constants so we can compile on 32 bit hosts Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson --- disas/libvixl/a64/instructions-a64.h | 30 +++++++++++++++--------------- disas/libvixl/globals.h | 1 - disas/libvixl/utils.h | 4 ++-- 3 files changed, 17 insertions(+), 18 deletions(-) diff --git a/disas/libvixl/a64/instructions-a64.h b/disas/libvixl/a64/instructions-a64.h index 0f31fcd..ba9068c 100644 --- a/disas/libvixl/a64/instructions-a64.h +++ b/disas/libvixl/a64/instructions-a64.h @@ -53,19 +53,19 @@ const unsigned kSRegSizeInBytes = kSRegSize / 8; const unsigned kDRegSize = 64; const unsigned kDRegSizeLog2 = 6; const unsigned kDRegSizeInBytes = kDRegSize / 8; -const int64_t kWRegMask = 0x00000000ffffffffL; -const int64_t kXRegMask = 0xffffffffffffffffL; -const int64_t kSRegMask = 0x00000000ffffffffL; -const int64_t kDRegMask = 0xffffffffffffffffL; -const int64_t kXSignMask = 0x1L << 63; -const int64_t kWSignMask = 0x1L << 31; +const int64_t kWRegMask = 0x00000000ffffffffLL; +const int64_t kXRegMask = 0xffffffffffffffffLL; +const int64_t kSRegMask = 0x00000000ffffffffLL; +const int64_t kDRegMask = 0xffffffffffffffffLL; +const int64_t kXSignMask = 0x1LL << 63; +const int64_t kWSignMask = 0x1LL << 31; const int64_t kByteMask = 0xffL; const int64_t kHalfWordMask = 0xffffL; -const int64_t kWordMask = 0xffffffffL; -const uint64_t kXMaxUInt = 0xffffffffffffffffUL; -const uint64_t kWMaxUInt = 0xffffffffUL; -const int64_t kXMaxInt = 0x7fffffffffffffffL; -const int64_t kXMinInt = 0x8000000000000000L; +const int64_t kWordMask = 0xffffffffLL; +const uint64_t kXMaxUInt = 0xffffffffffffffffULL; +const uint64_t kWMaxUInt = 0xffffffffULL; +const int64_t kXMaxInt = 0x7fffffffffffffffLL; +const int64_t kXMinInt = 0x8000000000000000LL; const int32_t kWMaxInt = 0x7fffffff; const int32_t kWMinInt = 0x80000000; const unsigned kLinkRegCode = 30; @@ -81,16 +81,16 @@ const unsigned kFloatExponentBits = 8; const float kFP32PositiveInfinity = rawbits_to_float(0x7f800000); const float kFP32NegativeInfinity = rawbits_to_float(0xff800000); -const double kFP64PositiveInfinity = rawbits_to_double(0x7ff0000000000000UL); -const double kFP64NegativeInfinity = rawbits_to_double(0xfff0000000000000UL); +const double kFP64PositiveInfinity = rawbits_to_double(0x7ff0000000000000ULL); +const double kFP64NegativeInfinity = rawbits_to_double(0xfff0000000000000ULL); // This value is a signalling NaN as both a double and as a float (taking the // least-significant word). -static const double kFP64SignallingNaN = rawbits_to_double(0x7ff000007f800001); +static const double kFP64SignallingNaN = rawbits_to_double(0x7ff000007f800001ULL); static const float kFP32SignallingNaN = rawbits_to_float(0x7f800001); // A similar value, but as a quiet NaN. -static const double kFP64QuietNaN = rawbits_to_double(0x7ff800007fc00001); +static const double kFP64QuietNaN = rawbits_to_double(0x7ff800007fc00001ULL); static const float kFP32QuietNaN = rawbits_to_float(0x7fc00001); enum LSDataSize { diff --git a/disas/libvixl/globals.h b/disas/libvixl/globals.h index 859ea69..a6a3fcc 100644 --- a/disas/libvixl/globals.h +++ b/disas/libvixl/globals.h @@ -44,7 +44,6 @@ typedef uint8_t byte; const int KBytes = 1024; const int MBytes = 1024 * KBytes; -const int GBytes = 1024 * MBytes; #define ABORT() printf("in %s, line %i", __FILE__, __LINE__); abort() #ifdef DEBUG diff --git a/disas/libvixl/utils.h b/disas/libvixl/utils.h index 4e0b367..029341e 100644 --- a/disas/libvixl/utils.h +++ b/disas/libvixl/utils.h @@ -36,7 +36,7 @@ namespace vixl { // Check number width. inline bool is_intn(unsigned n, int64_t x) { ASSERT((0 < n) && (n < 64)); - int64_t limit = 1L << (n - 1); + int64_t limit = 1ULL << (n - 1); return (-limit <= x) && (x < limit); } @@ -47,7 +47,7 @@ inline bool is_uintn(unsigned n, int64_t x) { inline unsigned truncate_to_intn(unsigned n, int64_t x) { ASSERT((0 < n) && (n < 64)); - return (x & ((1L << n) - 1)); + return (x & ((1ULL << n) - 1)); } #define INT_1_TO_63_LIST(V) \