Message ID | 1408471784-2652-2-git-send-email-peter.maydell@linaro.org |
---|---|
State | Accepted |
Commit | 229a138d740142885dd4e7063e25147d7f71fdef |
Headers | show
Return-Path: <patchwork-forward+bncBC6Z756YVMIBBTVLZ2PQKGQE2OTLIUY@linaro.org> X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yk0-f197.google.com (mail-yk0-f197.google.com [209.85.160.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 291262034C for <linaro@patches.linaro.org>; Tue, 19 Aug 2014 18:22:07 +0000 (UTC) Received: by mail-yk0-f197.google.com with SMTP id 142sf22559944ykq.4 for <linaro@patches.linaro.org>; Tue, 19 Aug 2014 11:22:07 -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: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=YfubybdD/pQtTOK+fIGhDp2S6cjRDTzFCtTsOPtsqIs=; b=GOQCWOVZJv4MTjPq3r3lT1MY3zl/2HB9CvoCNNZINVVMfdLrWddDiOlpMLvTpK45JT pZSULl+tHANkvhYJKUr5QWdPtwnFcehChWtkEdYpXha5tS9yx/7CbpeICc3rF1C+pkdT PNqX5LkDBZTD1fmXWYn6VTssN8eI7VsUmYlhtME8Vuj2HBN19KpSfOyEm7KZVWWaFL2Y QxWh/zcvqaqDFpnfW7uaVWKtORmxnSDbXQL2J+WQR7R3yC7tDsN5Z3ZNoabcWCoBCg4T gBfHZ28WiyibmV6Y2QgBdSGyAQNtjOaFXVjL3unj0vwU25qJLVbjSe4dm6HiYNUs42Z5 KUaA== X-Gm-Message-State: ALoCoQnaSYDTcJBsDJhQxs3HRkbb2EoQj+70ub0PufuYP1F15GlV6sSDO/hA3VH9QABDiuI8PM7Z X-Received: by 10.236.105.197 with SMTP id k45mr19364163yhg.19.1408472527001; Tue, 19 Aug 2014 11:22:07 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.97.134 with SMTP id m6ls1674452qge.8.gmail; Tue, 19 Aug 2014 11:22:06 -0700 (PDT) X-Received: by 10.52.98.201 with SMTP id ek9mr8643063vdb.35.1408472526878; Tue, 19 Aug 2014 11:22:06 -0700 (PDT) Received: from mail-vc0-f174.google.com (mail-vc0-f174.google.com [209.85.220.174]) by mx.google.com with ESMTPS id j3si9309549vcn.48.2014.08.19.11.22.06 for <patchwork-forward@linaro.org> (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 19 Aug 2014 11:22:06 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.174 as permitted sender) client-ip=209.85.220.174; Received: by mail-vc0-f174.google.com with SMTP id la4so7963796vcb.33 for <patchwork-forward@linaro.org>; Tue, 19 Aug 2014 11:22:06 -0700 (PDT) X-Received: by 10.220.187.134 with SMTP id cw6mr1053933vcb.71.1408472526803; Tue, 19 Aug 2014 11:22:06 -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.221.37.5 with SMTP id tc5csp260823vcb; Tue, 19 Aug 2014 11:22:06 -0700 (PDT) X-Received: by 10.224.40.145 with SMTP id k17mr18230056qae.4.1408472526255; Tue, 19 Aug 2014 11:22:06 -0700 (PDT) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id gw7si30119564qcb.7.2014.08.19.11.22.06 for <patch@linaro.org> (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 19 Aug 2014 11:22:06 -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]:52525 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <qemu-devel-bounces+patch=linaro.org@nongnu.org>) id 1XJo2n-00025O-Ro for patch@linaro.org; Tue, 19 Aug 2014 14:22:05 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51025) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <pm215@archaic.org.uk>) id 1XJnsI-0001Fa-Ks for qemu-devel@nongnu.org; Tue, 19 Aug 2014 14:11:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <pm215@archaic.org.uk>) id 1XJns4-0004Ay-Jg for qemu-devel@nongnu.org; Tue, 19 Aug 2014 14:11:14 -0400 Received: from mnementh.archaic.org.uk ([81.2.115.146]:42051) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <pm215@archaic.org.uk>) id 1XJns4-0003wv-BJ for qemu-devel@nongnu.org; Tue, 19 Aug 2014 14:11:00 -0400 Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.80) (envelope-from <pm215@archaic.org.uk>) id 1XJnqq-0000hJ-7b for qemu-devel@nongnu.org; Tue, 19 Aug 2014 19:09:44 +0100 From: Peter Maydell <peter.maydell@linaro.org> To: qemu-devel@nongnu.org Date: Tue, 19 Aug 2014 19:09:26 +0100 Message-Id: <1408471784-2652-2-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1408471784-2652-1-git-send-email-peter.maydell@linaro.org> References: <1408471784-2652-1-git-send-email-peter.maydell@linaro.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 81.2.115.146 Subject: [Qemu-devel] [PULL 01/19] target-arm: Fix return address for A64 BRK instructions X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: <patchwork-forward.linaro.org> List-Unsubscribe: <mailto:googlegroups-manage+836684582541+unsubscribe@googlegroups.com>, <http://groups.google.com/a/linaro.org/group/patchwork-forward/subscribe> List-Archive: <http://groups.google.com/a/linaro.org/group/patchwork-forward/> List-Post: <http://groups.google.com/a/linaro.org/group/patchwork-forward/post>, <mailto:patchwork-forward@linaro.org> List-Help: <http://support.google.com/a/linaro.org/bin/topic.py?topic=25838>, <mailto:patchwork-forward+help@linaro.org> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=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=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.174 as permitted sender) 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 |
diff --git a/target-arm/translate-a64.c b/target-arm/translate-a64.c index f04ca49..2e21948 100644 --- a/target-arm/translate-a64.c +++ b/target-arm/translate-a64.c @@ -1456,7 +1456,7 @@ static void disas_exc(DisasContext *s, uint32_t insn) break; } /* BRK */ - gen_exception_insn(s, 0, EXCP_BKPT, syn_aa64_bkpt(imm16)); + gen_exception_insn(s, 4, EXCP_BKPT, syn_aa64_bkpt(imm16)); break; case 2: if (op2_ll != 0) {
When we take an exception resulting from a BRK instruction, the architecture requires that the "preferred return address" reported to the exception handler is the address of the BRK itself, not the following instruction (like undefined insns, and in contrast with SVC, HVC and SMC). Follow this, rather than incorrectly reporting the address of the following insn. (We do get this correct for the A32/T32 BKPT insns.) Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Cc: qemu-stable@nongnu.org --- target-arm/translate-a64.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)