From patchwork Sat Feb 15 16:07:12 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 24688 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yk0-f198.google.com (mail-yk0-f198.google.com [209.85.160.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id B1EB6203BE for ; Sat, 15 Feb 2014 16:07:48 +0000 (UTC) Received: by mail-yk0-f198.google.com with SMTP id 131sf48299701ykp.1 for ; Sat, 15 Feb 2014 08:07:47 -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:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=1WGW+aYyd6v+FuN0D92EMah+KixOhpdHjc8kWRK8mCo=; b=DtKyTB8CsjutrmrJwlHVJEIhF9lmrJu1UFpB3/eQ2IGfZ/UoObJrK8IjVNJClO7GJ5 yvt1zxWY+hyerBHburKIocv3tT5Njec6Oyk/oxYHptQ7V846nm+Drh0GnyCyKme5iuw9 VDT//rYt3axwgCxB31Czg0TGF0RdQXZR2QwEXoAYGAnpHPbDLlkHUxdOHHUkAmA9F2Rm pmKEOQw6WGAth+mrbARkPXO84FSrehOvMoJ/JUxmf8hb6T+lFfoSth9PqJPhQiceNYYw WLVwtbSyP5Dw+hU+7h/5+m+x3+lEOp7BaImDQ7g5uhQDExu92umTC1PT+clfbLznUGiW gCdw== X-Gm-Message-State: ALoCoQm2i+/Vt1CsOMMGMalxRtc9uW7K3jKqu3TkRSjiq0k+E0MZ+HrxfoHtVBtUn0tjP3cWft9E X-Received: by 10.224.47.129 with SMTP id n1mr6026368qaf.4.1392480467891; Sat, 15 Feb 2014 08:07:47 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.100.146 with SMTP id s18ls332272qge.8.gmail; Sat, 15 Feb 2014 08:07:47 -0800 (PST) X-Received: by 10.220.58.202 with SMTP id i10mr5719012vch.23.1392480467613; Sat, 15 Feb 2014 08:07:47 -0800 (PST) Received: from mail-vc0-f171.google.com (mail-vc0-f171.google.com [209.85.220.171]) by mx.google.com with ESMTPS id kl10si3003967vdb.51.2014.02.15.08.07.47 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 15 Feb 2014 08:07:47 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.171 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.171; Received: by mail-vc0-f171.google.com with SMTP id le5so10161710vcb.2 for ; Sat, 15 Feb 2014 08:07:47 -0800 (PST) X-Received: by 10.221.34.211 with SMTP id st19mr9943677vcb.5.1392480467545; Sat, 15 Feb 2014 08:07:47 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp25566vcz; Sat, 15 Feb 2014 08:07:46 -0800 (PST) X-Received: by 10.205.42.129 with SMTP id ty1mr9386088bkb.9.1392480461074; Sat, 15 Feb 2014 08:07:41 -0800 (PST) Received: from mnementh.archaic.org.uk (mnementh.archaic.org.uk. [2001:8b0:1d0::1]) by mx.google.com with ESMTPS id ph2si3904439bkb.300.2014.02.15.08.07.39 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sat, 15 Feb 2014 08:07:41 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 2001:8b0:1d0::1 as permitted sender) client-ip=2001:8b0:1d0::1; Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.80) (envelope-from ) id 1WEhm1-0006g2-Lt; Sat, 15 Feb 2014 16:07:25 +0000 From: Peter Maydell To: qemu-devel@nongnu.org Cc: patches@linaro.org, Alexander Graf , Michael Matz , Claudio Fontana , Dirk Mueller , Laurent Desnogues , kvmarm@lists.cs.columbia.edu, Richard Henderson , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Christoffer Dall , Will Newton , Peter Crosthwaite , Rob Herring Subject: [PATCH v3 19/31] target-arm: A64: Implement WFI Date: Sat, 15 Feb 2014 16:07:12 +0000 Message-Id: <1392480444-25565-20-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1392480444-25565-1-git-send-email-peter.maydell@linaro.org> References: <1392480444-25565-1-git-send-email-peter.maydell@linaro.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.220.171 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 Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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 --- 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 1714df2..948470f 100644 --- a/target-arm/translate-a64.c +++ b/target-arm/translate-a64.c @@ -1065,9 +1065,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 */ @@ -8955,6 +8957,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; }