From patchwork Mon Mar 10 15:09:15 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 25977 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pd0-f197.google.com (mail-pd0-f197.google.com [209.85.192.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 328C12055F for ; Mon, 10 Mar 2014 15:10:37 +0000 (UTC) Received: by mail-pd0-f197.google.com with SMTP id fp1sf17503358pdb.8 for ; Mon, 10 Mar 2014 08:10:33 -0700 (PDT) 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=TZ4o0xGesCwrkmwuVMOmx+ddmzZ25tRAnBDsKowxsRY=; b=I+NTBzFaXNQhnglSocYHarKv1dC6hccdLWPCeZh1z4UXgkQe7lHGxP3BIAihHv42r6 2B4eKv7N+CkxYybn2iLo2hYWRrj8hbQpPa5L3KFgARwm15sIkcHiabNQTdpGZ7E/kEQI I7PWcsKHOZ09r/2ZI8wB92YJRl8gQTHeGiDoCKmN+HkajD25ZufcYWB3c6IBiOJe/3sK SXdGOywP8lz7JDn3gn/cZfbZ4KLhVcoBwpjqtI2Kmdr+P5bAAVRPaRuoA7/ADfFnZhQI AIi11++qUI+LORtVXB7lb09rm7gerH9MecPfiaElXua9k36H19gNRZ06Jc2OAtISowqR 18+w== X-Gm-Message-State: ALoCoQmVPGEkCmPFXKa2hMZflWWKX1SPeVVwmfgr/UoTkJgbabRcEixJidgPHtwyQq746usUOVQZ X-Received: by 10.66.142.131 with SMTP id rw3mr14106709pab.18.1394464232993; Mon, 10 Mar 2014 08:10:32 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.82.148 with SMTP id h20ls2119883qgd.36.gmail; Mon, 10 Mar 2014 08:10:32 -0700 (PDT) X-Received: by 10.220.131.210 with SMTP id y18mr23413143vcs.12.1394464232832; Mon, 10 Mar 2014 08:10:32 -0700 (PDT) Received: from mail-ve0-f174.google.com (mail-ve0-f174.google.com [209.85.128.174]) by mx.google.com with ESMTPS id sq4si5482313vdc.54.2014.03.10.08.10.32 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 10 Mar 2014 08:10:32 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.174 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.174; Received: by mail-ve0-f174.google.com with SMTP id oz11so7199540veb.33 for ; Mon, 10 Mar 2014 08:10:32 -0700 (PDT) X-Received: by 10.58.178.238 with SMTP id db14mr2716218vec.25.1394464232759; Mon, 10 Mar 2014 08:10:32 -0700 (PDT) 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.78.9 with SMTP id i9csp125627vck; Mon, 10 Mar 2014 08:10:32 -0700 (PDT) X-Received: by 10.224.87.193 with SMTP id x1mr41801982qal.70.1394464232106; Mon, 10 Mar 2014 08:10:32 -0700 (PDT) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id k5si377030qcr.83.2014.03.10.08.10.31 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 10 Mar 2014 08:10:32 -0700 (PDT) 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]:49286 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WN1qZ-00015L-FL for patch@linaro.org; Mon, 10 Mar 2014 11:10:31 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50460) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WN1pZ-0008Iu-Ks for qemu-devel@nongnu.org; Mon, 10 Mar 2014 11:09:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WN1pY-0004Wy-HN for qemu-devel@nongnu.org; Mon, 10 Mar 2014 11:09:29 -0400 Received: from mnementh.archaic.org.uk ([2001:8b0:1d0::1]:46616) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WN1pY-0004Wn-9l for qemu-devel@nongnu.org; Mon, 10 Mar 2014 11:09:28 -0400 Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.80) (envelope-from ) id 1WN1pQ-0002N5-BR; Mon, 10 Mar 2014 15:09:20 +0000 From: Peter Maydell To: Anthony Liguori Date: Mon, 10 Mar 2014 15:09:15 +0000 Message-Id: <1394464160-9074-5-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1394464160-9074-1-git-send-email-peter.maydell@linaro.org> References: <1394464160-9074-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 4/9] libvixl: Fix format strings for several int64_t values 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.174 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 From: Stefan Weil "%d" or "%x" won't work on hosts where int values are smaller than 64 bit. Signed-off-by: Stefan Weil Message-id: 1394219753-26106-1-git-send-email-sw@weilnetz.de Signed-off-by: Peter Maydell --- disas/libvixl/a64/disasm-a64.cc | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/disas/libvixl/a64/disasm-a64.cc b/disas/libvixl/a64/disasm-a64.cc index 5c6b898..5f172da 100644 --- a/disas/libvixl/a64/disasm-a64.cc +++ b/disas/libvixl/a64/disasm-a64.cc @@ -1342,7 +1342,7 @@ int Disassembler::SubstituteImmediateField(Instruction* instr, ASSERT(format[5] == 'L'); AppendToOutput("#0x%" PRIx64, instr->ImmMoveWide()); if (instr->ShiftMoveWide() > 0) { - AppendToOutput(", lsl #%d", 16 * instr->ShiftMoveWide()); + AppendToOutput(", lsl #%" PRId64, 16 * instr->ShiftMoveWide()); } } return 8; @@ -1391,7 +1391,7 @@ int Disassembler::SubstituteImmediateField(Instruction* instr, } case 'F': { // IFPSingle, IFPDouble or IFPFBits. if (format[3] == 'F') { // IFPFbits. - AppendToOutput("#%d", 64 - instr->FPScale()); + AppendToOutput("#%" PRId64, 64 - instr->FPScale()); return 8; } else { AppendToOutput("#0x%" PRIx64 " (%.4f)", instr->ImmFP(), @@ -1412,23 +1412,23 @@ int Disassembler::SubstituteImmediateField(Instruction* instr, return 5; } case 'P': { // IP - Conditional compare. - AppendToOutput("#%d", instr->ImmCondCmp()); + AppendToOutput("#%" PRId64, instr->ImmCondCmp()); return 2; } case 'B': { // Bitfields. return SubstituteBitfieldImmediateField(instr, format); } case 'E': { // IExtract. - AppendToOutput("#%d", instr->ImmS()); + AppendToOutput("#%" PRId64, instr->ImmS()); return 8; } case 'S': { // IS - Test and branch bit. - AppendToOutput("#%d", (instr->ImmTestBranchBit5() << 5) | - instr->ImmTestBranchBit40()); + AppendToOutput("#%" PRId64, (instr->ImmTestBranchBit5() << 5) | + instr->ImmTestBranchBit40()); return 2; } case 'D': { // IDebug - HLT and BRK instructions. - AppendToOutput("#0x%x", instr->ImmException()); + AppendToOutput("#0x%" PRIx64, instr->ImmException()); return 6; } default: { @@ -1598,12 +1598,12 @@ int Disassembler::SubstituteExtendField(Instruction* instr, (((instr->ExtendMode() == UXTW) && (instr->SixtyFourBits() == 0)) || (instr->ExtendMode() == UXTX))) { if (instr->ImmExtendShift() > 0) { - AppendToOutput(", lsl #%d", instr->ImmExtendShift()); + AppendToOutput(", lsl #%" PRId64, instr->ImmExtendShift()); } } else { AppendToOutput(", %s", extend_mode[instr->ExtendMode()]); if (instr->ImmExtendShift() > 0) { - AppendToOutput(" #%d", instr->ImmExtendShift()); + AppendToOutput(" #%" PRId64, instr->ImmExtendShift()); } } return 3; @@ -1632,7 +1632,7 @@ int Disassembler::SubstituteLSRegOffsetField(Instruction* instr, if (!((ext == UXTX) && (shift == 0))) { AppendToOutput(", %s", extend_mode[ext]); if (shift != 0) { - AppendToOutput(" #%d", instr->SizeLS()); + AppendToOutput(" #%" PRId64, instr->SizeLS()); } } return 9;