Received: from eggs.gnu.org ([2001:4830:134:3::10]:46462) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WfscJ-00021R-EB for qemu-devel@nongnu.org; Thu, 01 May 2014 11:09:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WfscI-0000Wk-J3 for qemu-devel@nongnu.org; Thu, 01 May 2014 11:09:43 -0400 Received: from mnementh.archaic.org.uk ([2001:8b0:1d0::1]:47980) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WfscI-0000WG-Bl for qemu-devel@nongnu.org; Thu, 01 May 2014 11:09:42 -0400 From: Peter Maydell Date: Thu, 1 May 2014 15:55:00 +0100 Message-Id: <1398956107-7411-4-git-send-email-peter.maydell@linaro.org> In-Reply-To: <1398956107-7411-1-git-send-email-peter.maydell@linaro.org> References: <1398956107-7411-1-git-send-email-peter.maydell@linaro.org> Subject: [Qemu-devel] [PULL 03/10] target-arm: implement WFE/YIELD as a yield for AArch64 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: qemu-devel@nongnu.org From: Rob Herring Like was done for AArch32 for WFE, implement both WFE and YIELD as a yield operation. This speeds up multi-core system emulation. Signed-off-by: Rob Herring Message-id: 1397588401-20366-1-git-send-email-robherring2@gmail.com Signed-off-by: Peter Maydell --- target-arm/translate-a64.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/target-arm/translate-a64.c b/target-arm/translate-a64.c index d86b8ff..e31e069 100644 --- a/target-arm/translate-a64.c +++ b/target-arm/translate-a64.c @@ -1151,6 +1151,8 @@ static void handle_hint(DisasContext *s, uint32_t insn, return; case 1: /* YIELD */ case 2: /* WFE */ + s->is_jmp = DISAS_WFE; + return; case 4: /* SEV */ case 5: /* SEVL */ /* we treat all as NOP at least for now */ @@ -10765,6 +10767,10 @@ void gen_intermediate_code_internal_a64(ARMCPU *cpu, case DISAS_EXC: case DISAS_SWI: break; + case DISAS_WFE: + gen_a64_set_pc_im(dc->pc); + gen_helper_wfe(cpu_env); + break; case DISAS_WFI: /* This is a special case because we don't want to just halt the CPU * if trying to debug across a WFI. -- 1.9.2