From patchwork Thu Jan 16 11:13:30 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 23263 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pd0-f199.google.com (mail-pd0-f199.google.com [209.85.192.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 77FE1202FA for ; Thu, 16 Jan 2014 11:13:40 +0000 (UTC) Received: by mail-pd0-f199.google.com with SMTP id q10sf794317pdj.6 for ; Thu, 16 Jan 2014 03:13:39 -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=iVRUns0AZgYpnvGPLqQEM8WvJjNp4zu4i19VZ6M4dl8=; b=UjBD4xKEJHGQ5eSRY/H/u9talGoQcK12vVen0qGq7hPi2dZX2MevYOjQ4+HEMUkY7k 5zst6PGLC9CZ5btcIgWYYX6k/LQFGtOskC198dOQ9LWJQ4QBjuxDph+0OhYYwicDdT6p b/N0Kclyg3MtwvfP/MUH4TYHgTXxSgEaqVCMj7mg2E6z6nTc776SvaJIfZ0gEYRbKGB+ zkaulcZ4InKgz486/EXidOdiOpwdZP/DZwJXApONlzhtJu6EFL9zwD4VA5yBQKqSbdv3 ErzBjEFVuK8CzH4yf25i5A/gxsYvqqZGbHGZjtNszlyO3aHeZ4r6h397Nsf7alVS5rJW WyIg== X-Gm-Message-State: ALoCoQnx3DlG1KHbOqv/bcj7HcZ2rAYLZ9veYwYtvuLhnn2uhqCcKpcL/Vf4U7HbPGBkCTpvOAQj X-Received: by 10.66.144.41 with SMTP id sj9mr3266023pab.23.1389870819764; Thu, 16 Jan 2014 03:13:39 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.21.136 with SMTP id 8ls189449qgl.27.gmail; Thu, 16 Jan 2014 03:13:39 -0800 (PST) X-Received: by 10.58.67.9 with SMTP id j9mr6261485vet.3.1389870819597; Thu, 16 Jan 2014 03:13:39 -0800 (PST) Received: from mail-vc0-f175.google.com (mail-vc0-f175.google.com [209.85.220.175]) by mx.google.com with ESMTPS id sz9si3200781vdc.45.2014.01.16.03.13.39 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 16 Jan 2014 03:13:39 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.175 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.175; Received: by mail-vc0-f175.google.com with SMTP id ij19so889660vcb.6 for ; Thu, 16 Jan 2014 03:13:39 -0800 (PST) X-Received: by 10.58.235.129 with SMTP id um1mr6473561vec.17.1389870819437; Thu, 16 Jan 2014 03:13:39 -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.59.13.131 with SMTP id ey3csp338767ved; Thu, 16 Jan 2014 03:13:38 -0800 (PST) X-Received: by 10.14.149.139 with SMTP id x11mr11250850eej.35.1389870818354; Thu, 16 Jan 2014 03:13:38 -0800 (PST) Received: from mnementh.archaic.org.uk (mnementh.archaic.org.uk. [81.2.115.146]) by mx.google.com with ESMTPS id n47si13906425eey.98.2014.01.16.03.13.36 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 16 Jan 2014 03:13:38 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 81.2.115.146 as permitted sender) client-ip=81.2.115.146; Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.80) (envelope-from ) id 1W3kt9-0001BN-VB; Thu, 16 Jan 2014 11:13:31 +0000 From: Peter Maydell To: qemu-devel@nongnu.org Cc: patches@linaro.org, Alexander Graf , Claudio Fontana , kvmarm@lists.cs.columbia.edu, Richard Henderson , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Christoffer Dall , Anthony Liguori , Aurelien Jarno , Blue Swirl , Stefan Weil Subject: [PATCH v2 4/5] disas/libvixl: Fix upstream libvixl compilation issues Date: Thu, 16 Jan 2014 11:13:30 +0000 Message-Id: <1389870811-4504-5-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1389870811-4504-1-git-send-email-peter.maydell@linaro.org> References: <1389870811-4504-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.220.175 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 --- 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) \