From patchwork Mon Oct 10 18:11:17 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Hanson X-Patchwork-Id: 77452 Delivered-To: patch@linaro.org Received: by 10.140.97.247 with SMTP id m110csp37538qge; Mon, 10 Oct 2016 11:13:55 -0700 (PDT) X-Received: by 10.237.47.194 with SMTP id m60mr18832930qtd.55.1476123235660; Mon, 10 Oct 2016 11:13:55 -0700 (PDT) Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id q88si11536494qkl.166.2016.10.10.11.13.55 for (version=TLS1 cipher=AES128-SHA bits=128/128); Mon, 10 Oct 2016 11:13:55 -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; Authentication-Results: mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:51854 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1btf5H-0002cw-72 for patch@linaro.org; Mon, 10 Oct 2016 14:13:55 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49280) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1btf3O-0001o2-0U for qemu-devel@nongnu.org; Mon, 10 Oct 2016 14:11:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1btf3J-0003tU-Mh for qemu-devel@nongnu.org; Mon, 10 Oct 2016 14:11:56 -0400 Received: from g4t3427.houston.hpe.com ([15.241.140.73]:7277) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1btf3J-0003rV-H2 for qemu-devel@nongnu.org; Mon, 10 Oct 2016 14:11:53 -0400 Received: from TomH-Z-Workstation.americas.hpqcorp.net (tomh-z-workstation.americas.hpqcorp.net [16.78.178.129]) by g4t3427.houston.hpe.com (Postfix) with ESMTP id 9D2D456; Mon, 10 Oct 2016 18:11:49 +0000 (UTC) From: Thomas Hanson To: qemu-devel@nongnu.org Date: Mon, 10 Oct 2016 12:11:17 -0600 Message-Id: <1476123077-35698-5-git-send-email-thomas.hanson@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1476123077-35698-1-git-send-email-thomas.hanson@linaro.org> References: <1476123077-35698-1-git-send-email-thomas.hanson@linaro.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 15.241.140.73 Subject: [Qemu-devel] [PATCH v2 4/4] target-arm: Comments added to identify cases in a switch X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: grant.likely@hpe.com, peter.maydell@linaro.org, thomas.hanson@linaro.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 3 cases in a switch in disas_exc() require reference to the ARM ARM spec in order to determine what case they're handling. Signed-off-by: Thomas Hanson --- target-arm/translate-a64.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- 1.9.1 diff --git a/target-arm/translate-a64.c b/target-arm/translate-a64.c index a1e5f2c..728e929 100644 --- a/target-arm/translate-a64.c +++ b/target-arm/translate-a64.c @@ -1678,12 +1678,12 @@ static void disas_exc(DisasContext *s, uint32_t insn) * instruction works properly. */ switch (op2_ll) { - case 1: + case 1: /* SVC */ gen_ss_advance(s); gen_exception_insn(s, 0, EXCP_SWI, syn_aa64_svc(imm16), default_exception_el(s)); break; - case 2: + case 2: /* HVC */ if (s->current_el == 0) { unallocated_encoding(s); break; @@ -1696,7 +1696,7 @@ static void disas_exc(DisasContext *s, uint32_t insn) gen_ss_advance(s); gen_exception_insn(s, 0, EXCP_HVC, syn_aa64_hvc(imm16), 2); break; - case 3: + case 3: /* SMC */ if (s->current_el == 0) { unallocated_encoding(s); break;