aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cpu-all.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/cpu-all.h b/cpu-all.h
index 69b1f725c8..fadf89cfc1 100644
--- a/cpu-all.h
+++ b/cpu-all.h
@@ -638,6 +638,10 @@ static inline void stfq_be_p(void *ptr, float64 v)
assert(__ret == (abi_ulong)__ret); \
(abi_ulong)__ret; \
})
+#define h2g_valid(x) ({ \
+ unsigned long __guest = (unsigned long)(x) - GUEST_BASE; \
+ (__guest == (abi_ulong)__guest); \
+})
#define saddr(x) g2h(x)
#define laddr(x) g2h(x)