target-arm: Add WFx syndrome function
authorGreg Bellows <greg.bellows@linaro.org>
Wed, 22 Apr 2015 17:09:20 +0000 (12:09 -0500)
committerPeter Maydell <peter.maydell@linaro.org>
Mon, 18 May 2015 19:04:04 +0000 (20:04 +0100)
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>
Acked-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Message-id: 1429722561-12651-9-git-send-email-greg.bellows@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
target-arm/internals.h

index 2cc301762caf2c742557862f256ffe197592a8e6..de0a9c177d4f13174578f93114a3168d680969bc 100644 (file)
@@ -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<n>_EL1 and DBGWVR<n>_EL1 registers.
  */