From patchwork Sun Mar 9 15:10:53 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 25935 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-vc0-f198.google.com (mail-vc0-f198.google.com [209.85.220.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 225FF206A6 for ; Sun, 9 Mar 2014 15:11:32 +0000 (UTC) Received: by mail-vc0-f198.google.com with SMTP id il7sf6936725vcb.9 for ; Sun, 09 Mar 2014 08:11:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe:content-type :content-transfer-encoding; bh=8FiKgt7VqGogUQwkZorbUC+wgcPJKnPDaa71/VxJYQ8=; b=N1nd8Nybn9Wujw9u2wsL1oM8zPI3/AeWVvazAbBAbpoTOdEBHFExBnGGZudIeEnI2y EV+gFa/t2esSUVCXA813iZQ+Pz4Sg48TiQChdPrg7osr19KX2IwWkvOyBJbQu8UjvErP pX6Xvl012zqzKHcPMy4TWy/baU9IS+iMt43xsZdptw174/m8IhF0kTS3mTkTHD0ULRuH GjmLI3vXX89FLdJdH8+Kr+haTK0G7MCRaE8gE1w58E2bPuH+mIG84s+o8yMzB8b7DukK PWn84XtO28IcGVGqc0oaOhxTgI6AzsPS1y8w3SAGuBzrVQ25fQl0ObGnWckJShBDLL5A kSaw== X-Gm-Message-State: ALoCoQl2I2mdQUBe1T4I9H2aLoW2lzXAoQf5e0sPTjIMn2ZycKtdnb8XcHVeccyShTsxkrmjcsjN X-Received: by 10.58.132.210 with SMTP id ow18mr9467974veb.8.1394377892824; Sun, 09 Mar 2014 08:11:32 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.83.75 with SMTP id i69ls1705752qgd.66.gmail; Sun, 09 Mar 2014 08:11:32 -0700 (PDT) X-Received: by 10.58.161.205 with SMTP id xu13mr18746134veb.4.1394377892661; Sun, 09 Mar 2014 08:11:32 -0700 (PDT) Received: from mail-vc0-f178.google.com (mail-vc0-f178.google.com [209.85.220.178]) by mx.google.com with ESMTPS id wt4si3887156vcb.115.2014.03.09.08.11.32 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 09 Mar 2014 08:11:32 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.178 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.178; Received: by mail-vc0-f178.google.com with SMTP id ik5so6162015vcb.9 for ; Sun, 09 Mar 2014 08:11:32 -0700 (PDT) X-Received: by 10.58.255.233 with SMTP id at9mr19500560ved.20.1394377892582; Sun, 09 Mar 2014 08:11:32 -0700 (PDT) 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.78.9 with SMTP id i9csp64538vck; Sun, 9 Mar 2014 08:11:32 -0700 (PDT) X-Received: by 10.194.58.180 with SMTP id s20mr25889wjq.54.1394377891595; Sun, 09 Mar 2014 08:11:31 -0700 (PDT) Received: from mnementh.archaic.org.uk (mnementh.archaic.org.uk. [2001:8b0:1d0::1]) by mx.google.com with ESMTPS id wp2si16513887wjc.153.2014.03.09.08.11.30 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sun, 09 Mar 2014 08:11:31 -0700 (PDT) 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 1WMfNb-0001rM-PT; Sun, 09 Mar 2014 15:11:07 +0000 From: Peter Maydell To: qemu-devel@nongnu.org Cc: patches@linaro.org, Alexander Graf , Michael Matz , Dirk Mueller , Laurent Desnogues , kvmarm@lists.cs.columbia.edu, Richard Henderson , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Christoffer Dall , Will Newton , Peter Crosthwaite Subject: [PATCH 02/16] target-arm: A64: Fix bug in add_sub_ext handling of rn Date: Sun, 9 Mar 2014 15:10:53 +0000 Message-Id: <1394377867-7115-3-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1394377867-7115-1-git-send-email-peter.maydell@linaro.org> References: <1394377867-7115-1-git-send-email-peter.maydell@linaro.org> MIME-Version: 1.0 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.178 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: , From: Alex Bennée rn == 31 always means SP (not XZR) whether an add_sub_ext instruction is setting the flags or not; only rd has behaviour dependent on whether we are setting flags. Reported-by: Laurent Desnogues Signed-off-by: Alex Bennée Signed-off-by: Peter Maydell Reviewed-by: Laurent Desnogues --- target-arm/translate-a64.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/target-arm/translate-a64.c b/target-arm/translate-a64.c index f89b0a5..90936cd 100644 --- a/target-arm/translate-a64.c +++ b/target-arm/translate-a64.c @@ -3096,12 +3096,11 @@ static void disas_add_sub_ext_reg(DisasContext *s, uint32_t insn) /* non-flag setting ops may use SP */ if (!setflags) { - tcg_rn = read_cpu_reg_sp(s, rn, sf); tcg_rd = cpu_reg_sp(s, rd); } else { - tcg_rn = read_cpu_reg(s, rn, sf); tcg_rd = cpu_reg(s, rd); } + tcg_rn = read_cpu_reg_sp(s, rn, sf); tcg_rm = read_cpu_reg(s, rm, sf); ext_and_shift_reg(tcg_rm, tcg_rm, option, imm3);