@@ -358,6 +358,12 @@ void cpu_get_tb_cpu_state(CPUS390XState *env, vaddr *pc,
flags |= FLAG_MASK_VECTOR;
}
*pflags = flags;
+
+ if (!(flags & FLAG_MASK_32)) {
+ tcg_debug_assert(*pc <= 0x00ffffff);
+ } else if (!(flags & FLAG_MASK_64)) {
+ tcg_debug_assert(*pc <= 0x7fffffff);
+ }
}
static const TCGCPUOps s390_tcg_ops = {
@@ -6409,11 +6409,7 @@ static void s390x_tr_init_disas_context(DisasContextBase *dcbase, CPUState *cs)
{
DisasContext *dc = container_of(dcbase, DisasContext, base);
- /* 31-bit mode */
- if (!(dc->base.tb->flags & FLAG_MASK_64)) {
- dc->base.pc_first &= 0x7fffffff;
- dc->base.pc_next = dc->base.pc_first;
- }
+ /* Note cpu_get_tb_cpu_state asserts PC is masked for the mode. */
dc->cc_op = CC_OP_DYNAMIC;
dc->ex_value = dc->base.tb->cs_base;