Now we have the register number we can report it in the syndrome.

Signed-off-by: Alex Bennée <[email protected]>
---
 target/arm/syndrome.h      | 4 +++-
 target/arm/tcg/op_helper.c | 4 ++--
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/target/arm/syndrome.h b/target/arm/syndrome.h
index 86a2d5ea9d0..086ac76d7f1 100644
--- a/target/arm/syndrome.h
+++ b/target/arm/syndrome.h
@@ -359,12 +359,14 @@ FIELD(WFX_ISS, RN, 15, 5)
 FIELD(WFX_ISS, COND, 20, 4)
 FIELD(WFX_ISS, CV, 24, 1)
 
-static inline uint32_t syn_wfx(int cv, int cond, int ti, bool is_16bit)
+static inline uint32_t syn_wfx(int cv, int cond, int rn, int rv, int ti, bool 
is_16bit)
 {
     uint32_t res = (EC_WFX_TRAP << ARM_EL_EC_SHIFT);
 
     res = FIELD_DP32(res, WFX_ISS, CV, cv);
     res = FIELD_DP32(res, WFX_ISS, COND, cond);
+    res = FIELD_DP32(res, WFX_ISS, RN, rn);
+    res = FIELD_DP32(res, WFX_ISS, RV, rv);
     res = FIELD_DP32(res, WFX_ISS, TI, ti);
 
     if (!is_16bit) {
diff --git a/target/arm/tcg/op_helper.c b/target/arm/tcg/op_helper.c
index 28a1c7243ad..a68cdf6de23 100644
--- a/target/arm/tcg/op_helper.c
+++ b/target/arm/tcg/op_helper.c
@@ -399,7 +399,7 @@ void HELPER(wfi)(CPUARMState *env, uint32_t insn_len)
             env->regs[15] -= insn_len;
         }
 
-        raise_exception(env, excp, syn_wfx(1, 0xe, 0, insn_len == 2),
+        raise_exception(env, excp, syn_wfx(1, 0xe, 0, 0, 0, insn_len == 2),
                         target_el);
     }
 
@@ -450,7 +450,7 @@ void HELPER(wfit)(CPUARMState *env, uint32_t rd)
 
     if (target_el) {
         env->pc -= 4;
-        raise_exception(env, excp, syn_wfx(1, 0xe, 2, false), target_el);
+        raise_exception(env, excp, syn_wfx(1, 0xe, rd, 1, 2, false), 
target_el);
     }
 
     if (uadd64_overflow(timeout, offset, &nexttick)) {
-- 
2.47.3


Reply via email to