On 1/9/23 14:42, Fabiano Rosas wrote:
+inline void assert_hflags_rebuild_correctly(CPUARMState *env)
+{
+#ifdef CONFIG_DEBUG_TCG
+ CPUARMTBFlags c = env->hflags;
+ CPUARMTBFlags r = rebuild_hflags_internal(env);
+
+ if (unlikely(c.flags != r.flags || c.flags2 != r.flags2)) {
+ fprintf(stderr, "TCG hflags mismatch "
+ "(current:(0x%08x,0x" TARGET_FMT_lx ")"
+ " rebuilt:(0x%08x,0x" TARGET_FMT_lx ")\n",
+ c.flags, c.flags2, r.flags, r.flags2);
+ abort();
+ }
+#endif
+}
Inline marker non-functional.
Anyway, this should not be separated from cpu_get_tb_cpu_state, where it folds to no-op
when --disable-debug-tcg. Indeed, I once had it textually inlined in
cpu_get_tb_cpu_state, before Philippe thought it looked nicer as a separate helper function.
Otherwise,
Reviewed-by: Richard Henderson <richard.hender...@linaro.org>
r~