aboutsummaryrefslogtreecommitdiff
path: root/target-arm/translate-a64.c
diff options
context:
space:
mode:
authorRob Herring <rob.herring@linaro.org>2014-05-01 15:24:45 +0100
committerPeter Maydell <peter.maydell@linaro.org>2014-05-01 15:24:45 +0100
commit252ec4057685cd9bf6a13f96528c843754af8fad (patch)
treeb7e0aae19d7bc38b2e316fe02ad2ca4146b4c45d /target-arm/translate-a64.c
parente3da9921ebc554fad3224a9fdda9a7425ffd9ef7 (diff)
target-arm: implement WFE/YIELD as a yield for AArch64
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 <rob.herring@linaro.org> Message-id: 1397588401-20366-1-git-send-email-robherring2@gmail.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'target-arm/translate-a64.c')
-rw-r--r--target-arm/translate-a64.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/target-arm/translate-a64.c b/target-arm/translate-a64.c
index d86b8ffa55..e31e069041 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.