From patchwork Sat Feb 8 15:57:58 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 24368 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yh0-f72.google.com (mail-yh0-f72.google.com [209.85.213.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 11D1F20967 for ; Sat, 8 Feb 2014 16:10:19 +0000 (UTC) Received: by mail-yh0-f72.google.com with SMTP id f73sf11510322yha.11 for ; Sat, 08 Feb 2014 08:10:19 -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:date :message-id:in-reply-to:references:cc:subject:precedence:list-id :list-unsubscribe:list-archive:list-post:list-help:list-subscribe :errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list; bh=YCfIFEl2+/Kh/2Ks6HLgrShLuVYISgcWSZoY7h8Mr9Q=; b=dz/x4Z5Jt046NtuUgVmg1vmppmNkOc0vlQ5sudpEGwUmsE54VnLLBJaECR87XIoech 7MzOG+UfRBJANekYkp4EnNUAxZawurjN60Ubhv70i7g7U+3MjZmKJ5uq13a9nVw8pMrA erQhsOsYa8JqtdtHo9QXgmK8cyl9SkN/RQXm2zBenac39nZ8ypBKvLIMyJx54Im1+MXH Wun6kcs/IQ4EgSPCDlAX/d4FBiE3J3HDRxSYJaQEMk1tAVWHT/5xPhJRfN+cPFl5GYIc HZ8zW9TKAnnH/LHxpzBlRq3xHjPMbl12K4IRRiOBgbFb4fuXzHThzke7L0g7QIIu4LqG +01g== X-Gm-Message-State: ALoCoQk/FiyAK8W+k+UbCWVIuNlu1ch1LxXNP1LROVcDTCAcPZCcLA2q0YgmS53084stBxLjCnvD X-Received: by 10.236.4.136 with SMTP id 8mr5436658yhj.21.1391875819234; Sat, 08 Feb 2014 08:10:19 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.21.8 with SMTP id 8ls1482330qgk.51.gmail; Sat, 08 Feb 2014 08:10:19 -0800 (PST) X-Received: by 10.52.106.107 with SMTP id gt11mr13083522vdb.7.1391875819000; Sat, 08 Feb 2014 08:10:19 -0800 (PST) Received: from mail-ve0-f177.google.com (mail-ve0-f177.google.com [209.85.128.177]) by mx.google.com with ESMTPS id dr8si2631354vcb.88.2014.02.08.08.10.18 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 08 Feb 2014 08:10:18 -0800 (PST) Received-SPF: neutral (google.com: 209.85.128.177 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.177; Received: by mail-ve0-f177.google.com with SMTP id jz11so3654401veb.8 for ; Sat, 08 Feb 2014 08:10:18 -0800 (PST) X-Received: by 10.52.232.168 with SMTP id tp8mr334802vdc.38.1391875818908; Sat, 08 Feb 2014 08:10:18 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.174.196 with SMTP id u4csp40919vcz; Sat, 8 Feb 2014 08:10:18 -0800 (PST) X-Received: by 10.140.32.133 with SMTP id h5mr15246116qgh.49.1391875817826; Sat, 08 Feb 2014 08:10:17 -0800 (PST) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id p10si6157318qag.118.2014.02.08.08.10.17 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Sat, 08 Feb 2014 08:10:17 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Received: from localhost ([::1]:47106 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WCATx-0001JQ-9Z for patch@linaro.org; Sat, 08 Feb 2014 11:10:17 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47071) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WCAIR-0007SN-SM for qemu-devel@nongnu.org; Sat, 08 Feb 2014 10:58:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WCAIQ-0002ty-9d for qemu-devel@nongnu.org; Sat, 08 Feb 2014 10:58:23 -0500 Received: from mnementh.archaic.org.uk ([2001:8b0:1d0::1]:45684) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WCAIQ-0002tl-1V for qemu-devel@nongnu.org; Sat, 08 Feb 2014 10:58:22 -0500 Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.80) (envelope-from ) id 1WCAI9-0003Lw-Oi; Sat, 08 Feb 2014 15:58:05 +0000 From: Peter Maydell To: Anthony Liguori Date: Sat, 8 Feb 2014 15:57:58 +0000 Message-Id: <1391875084-12772-24-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1391875084-12772-1-git-send-email-peter.maydell@linaro.org> References: <1391875084-12772-1-git-send-email-peter.maydell@linaro.org> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:8b0:1d0::1 Cc: Blue Swirl , qemu-devel@nongnu.org, Aurelien Jarno Subject: [Qemu-devel] [PULL 23/29] disas/libvixl: Fix upstream libvixl compilation issues X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.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.128.177 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 Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 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) \