From 06fbb2fdf7a7ac468d62c66cfe4537d3c71f7bb9 Mon Sep 17 00:00:00 2001 From: Greg Bellows Date: Wed, 22 Apr 2015 12:09:20 -0500 Subject: [PATCH] target-arm: Add WFx syndrome function Adds a utility function for creating a WFx exception syndrome Signed-off-by: Greg Bellows Reviewed-by: Peter Maydell Acked-by: Edgar E. Iglesias Message-id: 1429722561-12651-9-git-send-email-greg.bellows@linaro.org Signed-off-by: Peter Maydell --- target-arm/internals.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/target-arm/internals.h b/target-arm/internals.h index 2cc301762c..de0a9c177d 100644 --- a/target-arm/internals.h +++ b/target-arm/internals.h @@ -347,6 +347,12 @@ static inline uint32_t syn_breakpoint(int same_el) | ARM_EL_IL | 0x22; } +static inline uint32_t syn_wfx(int cv, int cond, int ti) +{ + return (EC_WFX_TRAP << ARM_EL_EC_SHIFT) | + (cv << 24) | (cond << 20) | ti; +} + /* Update a QEMU watchpoint based on the information the guest has set in the * DBGWCR_EL1 and DBGWVR_EL1 registers. */