From patchwork Thu May 1 14:55:02 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 29499 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ie0-f200.google.com (mail-ie0-f200.google.com [209.85.223.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id A66D720675 for ; Thu, 1 May 2014 15:10:49 +0000 (UTC) Received: by mail-ie0-f200.google.com with SMTP id lx4sf17064170iec.7 for ; Thu, 01 May 2014 08:10:49 -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=LQnW4X2bRwabkKJ7GjjtBFt84PNI/fF6P7AJwjW5am8=; b=ONphyGS6mrR5dEvfu6aiyT7ea5YAWcExWjRwBje5bCM5nhNASf4XUkoGnZuOk8SYbq Dn/Nci8zCDiC0TTZsxEc+VgQmctV9JfTWusalnjMzTbTzbMiukiqRsTtGk4VuxomZ1Ls nLiGH0m4C/8TMCb/NMuGaWwIOLPxJ5ytq9568eVxZx+XMNPVx63iNUHxG+JmZ66ftkTY Cig0/9RskSjXL9AOKj52givjB7zjPvqnhFRk2vE2cJtAZEW5kvNRm9zOr09tEJEhApBf aRiJ7F7pkTU8l8qVWooK66M/hMkzc4mjSyjA6nfVM2y+2K3iASbrKSf3akzkrXSbfdF6 qIew== X-Gm-Message-State: ALoCoQnrOEYzBNYyiAlwp6idKmPRt83jPkcI8P4Cy2VAX/otmzkMSqGPczwSnzR8QZdgxJC4leKc X-Received: by 10.42.92.69 with SMTP id s5mr5156175icm.20.1398957049111; Thu, 01 May 2014 08:10:49 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.81.201 with SMTP id f67ls1092524qgd.91.gmail; Thu, 01 May 2014 08:10:49 -0700 (PDT) X-Received: by 10.52.118.212 with SMTP id ko20mr300364vdb.77.1398957048978; Thu, 01 May 2014 08:10:48 -0700 (PDT) Received: from mail-ve0-f180.google.com (mail-ve0-f180.google.com [209.85.128.180]) by mx.google.com with ESMTPS id fn10si6100726vdc.27.2014.05.01.08.10.48 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 01 May 2014 08:10:48 -0700 (PDT) Received-SPF: none (google.com: patch+caf_=patchwork-forward=linaro.org@linaro.org does not designate permitted sender hosts) client-ip=209.85.128.180; Received: by mail-ve0-f180.google.com with SMTP id db12so545210veb.11 for ; Thu, 01 May 2014 08:10:48 -0700 (PDT) X-Received: by 10.52.181.132 with SMTP id dw4mr282517vdc.86.1398957048906; Thu, 01 May 2014 08:10:48 -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.221.72 with SMTP id ib8csp31273vcb; Thu, 1 May 2014 08:10:48 -0700 (PDT) X-Received: by 10.140.101.99 with SMTP id t90mr12700190qge.115.1398957048362; Thu, 01 May 2014 08:10:48 -0700 (PDT) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id i1si12738259qab.251.2014.05.01.08.10.48 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 01 May 2014 08:10:48 -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]:40119 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WfsdL-0002u8-Pn for patch@linaro.org; Thu, 01 May 2014 11:10:47 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46311) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WfscD-0001u8-Di for qemu-devel@nongnu.org; Thu, 01 May 2014 11:09:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WfscA-0000SY-R1 for qemu-devel@nongnu.org; Thu, 01 May 2014 11:09:37 -0400 Received: from mnementh.archaic.org.uk ([2001:8b0:1d0::1]:47976) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WfscA-0000Ry-Jw for qemu-devel@nongnu.org; Thu, 01 May 2014 11:09:34 -0400 Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.80) (envelope-from ) id 1WfsOB-0001wJ-EC; Thu, 01 May 2014 15:55:07 +0100 From: Peter Maydell To: Anthony Liguori Date: Thu, 1 May 2014 15:55:02 +0100 Message-Id: <1398956107-7411-6-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1398956107-7411-1-git-send-email-peter.maydell@linaro.org> References: <1398956107-7411-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: qemu-devel@nongnu.org Subject: [Qemu-devel] [PULL 05/10] target-arm: A64: Handle blr lr 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: patch+caf_=patchwork-forward=linaro.org@linaro.org does not designate permitted sender hosts) 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: "Edgar E. Iglesias" For linked branches, updates to the link register happen conceptually after the read of the branch target register. Signed-off-by: Edgar E. Iglesias Reviewed-by: Alex Bennée Cc: qemu-stable@nongnu.org Message-id: 1398926097-28097-3-git-send-email-edgar.iglesias@gmail.com Signed-off-by: Peter Maydell --- target-arm/translate-a64.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/target-arm/translate-a64.c b/target-arm/translate-a64.c index e31e069..b62db4d 100644 --- a/target-arm/translate-a64.c +++ b/target-arm/translate-a64.c @@ -1509,8 +1509,10 @@ static void disas_uncond_b_reg(DisasContext *s, uint32_t insn) switch (opc) { case 0: /* BR */ case 2: /* RET */ + tcg_gen_mov_i64(cpu_pc, cpu_reg(s, rn)); break; case 1: /* BLR */ + tcg_gen_mov_i64(cpu_pc, cpu_reg(s, rn)); tcg_gen_movi_i64(cpu_reg(s, 30), s->pc); break; case 4: /* ERET */ @@ -1529,7 +1531,6 @@ static void disas_uncond_b_reg(DisasContext *s, uint32_t insn) return; } - tcg_gen_mov_i64(cpu_pc, cpu_reg(s, rn)); s->is_jmp = DISAS_JUMP; }