From patchwork Wed Feb 26 18:02:22 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 25392 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ob0-f200.google.com (mail-ob0-f200.google.com [209.85.214.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 62CD720636 for ; Wed, 26 Feb 2014 18:21:51 +0000 (UTC) Received: by mail-ob0-f200.google.com with SMTP id gq1sf4245948obb.7 for ; Wed, 26 Feb 2014 10:21:50 -0800 (PST) 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: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; bh=m4qLm60WIHkXvHOMs2VyWBMMvwEiQwMLkXbB6q+yNrY=; b=fIT5JDHEIDmcVgE+34FlgDoGfpJhDvUUyn2RUv6YK2Oj70o8Xg1ikRpWy8xGlFoNfE q2/y+vUnFO8YhIHAHj3pFe+2SC/k+17npcntAzkDfM/OAbeidRlUN3Vti8w3E0iiY8Ww w3hZWDI0pUGGlBRiMMcrqvH5+hxFwuqR6C/J6ICtLuvTR3TJlmZ8YqV/citz9REkSlCJ TXoc7+qrqSwUKwZSRrrfz2K/7oqvyJIdTvwwDgPx6QhpFLZccj2raJUKYT7An764o8fy P8GwDqjBERlOgozp3MGc0bY5fBL/KzAO8SlWTsRmLnT2xDmJd+ZrFk5ljxNRtKvs83cD Bx8A== X-Gm-Message-State: ALoCoQmdOI8taQ6j6dt49g0i4dGSAY4uVTQFKDtVJ62+D7uoUCPwpmMa37tXvvO057WPuPTCknS5 X-Received: by 10.50.26.65 with SMTP id j1mr421482igg.7.1393438910916; Wed, 26 Feb 2014 10:21:50 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.96.200 with SMTP id k66ls377001qge.85.gmail; Wed, 26 Feb 2014 10:21:50 -0800 (PST) X-Received: by 10.52.165.237 with SMTP id zb13mr8298vdb.76.1393438910597; Wed, 26 Feb 2014 10:21:50 -0800 (PST) Received: from mail-ve0-f177.google.com (mail-ve0-f177.google.com [209.85.128.177]) by mx.google.com with ESMTPS id uw4si445262vdc.27.2014.02.26.10.21.50 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 26 Feb 2014 10:21:50 -0800 (PST) Received-SPF: neutral (google.com: 209.85.128.177 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.177; Received: by mail-ve0-f177.google.com with SMTP id db12so2551288veb.8 for ; Wed, 26 Feb 2014 10:21:50 -0800 (PST) X-Received: by 10.52.74.5 with SMTP id p5mr41163vdv.71.1393438910397; Wed, 26 Feb 2014 10:21:50 -0800 (PST) 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.174.196 with SMTP id u4csp45600vcz; Wed, 26 Feb 2014 10:21:50 -0800 (PST) X-Received: by 10.140.43.3 with SMTP id d3mr1331754qga.70.1393438909967; Wed, 26 Feb 2014 10:21:49 -0800 (PST) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id v4si1005064qap.167.2014.02.26.10.21.49 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 26 Feb 2014 10:21:49 -0800 (PST) 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]:42367 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WIj77-0007Dg-80 for patch@linaro.org; Wed, 26 Feb 2014 13:21:49 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34150) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WIioo-0000v6-05 for qemu-devel@nongnu.org; Wed, 26 Feb 2014 13:02:57 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WIion-0007Ov-8L for qemu-devel@nongnu.org; Wed, 26 Feb 2014 13:02:53 -0500 Received: from mnementh.archaic.org.uk ([2001:8b0:1d0::1]:46191) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WIion-0007Eu-2B for qemu-devel@nongnu.org; Wed, 26 Feb 2014 13:02:53 -0500 Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.80) (envelope-from ) id 1WIioX-0006CK-2Z; Wed, 26 Feb 2014 18:02:37 +0000 From: Peter Maydell To: Anthony Liguori Date: Wed, 26 Feb 2014 18:02:22 +0000 Message-Id: <1393437755-23586-33-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1393437755-23586-1-git-send-email-peter.maydell@linaro.org> References: <1393437755-23586-1-git-send-email-peter.maydell@linaro.org> 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 , qemu-devel@nongnu.org, Aurelien Jarno Subject: [Qemu-devel] [PULL 32/45] target-arm: A64: Implement WFI 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.177 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 Implement the WFI instruction for A64; this just involves wiring up the instruction, and adding a gen_a64_set_pc_im() which was accidentally omitted from the A64 decoder top loop. Signed-off-by: Peter Maydell Reviewed-by: Peter Crosthwaite --- target-arm/translate-a64.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/target-arm/translate-a64.c b/target-arm/translate-a64.c index a6c8fab..2f47ec5 100644 --- a/target-arm/translate-a64.c +++ b/target-arm/translate-a64.c @@ -1080,9 +1080,11 @@ static void handle_hint(DisasContext *s, uint32_t insn, switch (selector) { case 0: /* NOP */ return; + case 3: /* WFI */ + s->is_jmp = DISAS_WFI; + return; case 1: /* YIELD */ case 2: /* WFE */ - case 3: /* WFI */ case 4: /* SEV */ case 5: /* SEVL */ /* we treat all as NOP at least for now */ @@ -9124,6 +9126,7 @@ void gen_intermediate_code_internal_a64(ARMCPU *cpu, /* This is a special case because we don't want to just halt the CPU * if trying to debug across a WFI. */ + gen_a64_set_pc_im(dc->pc); gen_helper_wfi(cpu_env); break; }