From patchwork Mon Mar 17 22:11:58 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 26429 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pb0-f69.google.com (mail-pb0-f69.google.com [209.85.160.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 1AF04202FA for ; Mon, 17 Mar 2014 22:25:21 +0000 (UTC) Received: by mail-pb0-f69.google.com with SMTP id md12sf15796029pbc.8 for ; Mon, 17 Mar 2014 15:25:21 -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:date:message-id:in-reply-to :references:mime-version: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:content-type :content-transfer-encoding; bh=qorTBkuBBMONzD9QyJoH6PQFG0RRZRF29/qYXPmBgYU=; b=KaaN8ucAOWcn0yo8fonhdQQictFJwlBG4uijK6G9YKD3GmTTccU4b5qbAL2gxfVp6A PPlrgtVvrngs2tklQsi8DttIEH0ubP3sgSwBfZfncusQapVasD9DSVvSH3FJ03v368xl t+fdRDPWgszhAYvYSDuHwCj8L4Hkx1RdF7dDuJFJL/NBaAnmtxNxApRLiO9v9GL7jlnC wOLsau7uOnGIK3GwYBtb1US050HGfbTIJhJLA6Ap2QmwedrWx/SDJ3Qa1gv3w8Vq1kT5 pAsc1VzUcIPzjEoTA2E9VehFzHGIjK6/KtTFg1aYSXFZuTKS5lQbiG04jjz9MxzSHX/t y59A== X-Gm-Message-State: ALoCoQk8AN1A6txg1ywYaqNVgw92anQO8ZyqlbO1E/FlqT1KpRPt09A1iYjl+9Al8RGkNuz2xxAQ X-Received: by 10.67.21.145 with SMTP id hk17mr9971782pad.35.1395095121163; Mon, 17 Mar 2014 15:25:21 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.21.213 with SMTP id 79ls1108723qgl.35.gmail; Mon, 17 Mar 2014 15:25:20 -0700 (PDT) X-Received: by 10.221.55.133 with SMTP id vy5mr21712087vcb.17.1395095120907; Mon, 17 Mar 2014 15:25:20 -0700 (PDT) Received: from mail-ve0-f175.google.com (mail-ve0-f175.google.com [209.85.128.175]) by mx.google.com with ESMTPS id s10si2888652vco.131.2014.03.17.15.25.20 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 17 Mar 2014 15:25:20 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.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.128.175; Received: by mail-ve0-f175.google.com with SMTP id oz11so6100200veb.6 for ; Mon, 17 Mar 2014 15:25:20 -0700 (PDT) X-Received: by 10.52.251.199 with SMTP id zm7mr18542007vdc.21.1395095120833; Mon, 17 Mar 2014 15:25:20 -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 i9csp159896vck; Mon, 17 Mar 2014 15:25:20 -0700 (PDT) X-Received: by 10.224.5.197 with SMTP id 5mr31701805qaw.72.1395095120253; Mon, 17 Mar 2014 15:25:20 -0700 (PDT) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id a10si4175093qcs.60.2014.03.17.15.25.20 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 17 Mar 2014 15:25:20 -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]:60692 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WPfyB-0002JE-Mp for patch@linaro.org; Mon, 17 Mar 2014 18:25:19 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51377) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WPfmQ-0004ik-Ar for qemu-devel@nongnu.org; Mon, 17 Mar 2014 18:13:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WPfmO-0007iF-VC for qemu-devel@nongnu.org; Mon, 17 Mar 2014 18:13:10 -0400 Received: from mnementh.archaic.org.uk ([2001:8b0:1d0::1]:46921) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WPfmO-0007Pr-Mp for qemu-devel@nongnu.org; Mon, 17 Mar 2014 18:13:08 -0400 Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.80) (envelope-from ) id 1WPfld-00052q-GG; Mon, 17 Mar 2014 22:12:21 +0000 From: Peter Maydell To: Anthony Liguori Date: Mon, 17 Mar 2014 22:11:58 +0000 Message-Id: <1395094341-19339-8-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1395094341-19339-1-git-send-email-peter.maydell@linaro.org> References: <1395094341-19339-1-git-send-email-peter.maydell@linaro.org> MIME-Version: 1.0 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 , =?UTF-8?q?Andreas=20F=C3=A4rber?= , qemu-devel@nongnu.org, Aurelien Jarno Subject: [Qemu-devel] [PULL 07/30] target-arm: A64: Fix bug in add_sub_ext handling of rn 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.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 Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 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: Richard Henderson Message-id: 1394822294-14837-3-git-send-email-peter.maydell@linaro.org --- 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 37252b7..444dd85 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);