diff mbox

[[PATCH] 6/7] target-arm: Add WFx syndrome function

Message ID 1427483446-31900-7-git-send-email-greg.bellows@linaro.org
State Superseded
Headers show

Commit Message

Greg Bellows March 27, 2015, 7:10 p.m. UTC
Adds a utility function for creating a WFx exception syndrome

Signed-off-by: Greg Bellows <greg.bellows@linaro.org>
---
 target-arm/internals.h | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

Peter Maydell April 16, 2015, 6:05 p.m. UTC | #1
On 27 March 2015 at 19:10, Greg Bellows <greg.bellows@linaro.org> wrote:
> Adds a utility function for creating a WFx exception syndrome
>
> Signed-off-by: Greg Bellows <greg.bellows@linaro.org>
> ---

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>

-- PMM
diff mbox

Patch

diff --git a/target-arm/internals.h b/target-arm/internals.h
index bb171a7..8dc2e2b 100644
--- a/target-arm/internals.h
+++ b/target-arm/internals.h
@@ -344,6 +344,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<n>_EL1 and DBGWVR<n>_EL1 registers.
  */