From nobody Fri Oct 24 09:33:45 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1518824689528525.9324616588823; Fri, 16 Feb 2018 15:44:49 -0800 (PST) Received: from localhost ([::1]:45308 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1empgO-0007b3-AD for importer@patchew.org; Fri, 16 Feb 2018 18:44:48 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60168) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1empcn-0005K7-3F for qemu-devel@nongnu.org; Fri, 16 Feb 2018 18:41:13 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1empcd-0000U6-Fv for qemu-devel@nongnu.org; Fri, 16 Feb 2018 18:41:05 -0500 Received: from out5-smtp.messagingengine.com ([66.111.4.29]:53301) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1empcd-0000TS-6c; Fri, 16 Feb 2018 18:40:55 -0500 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id C58F020E15; Fri, 16 Feb 2018 18:40:54 -0500 (EST) Received: from frontend2 ([10.202.2.161]) by compute4.internal (MEProxy); Fri, 16 Feb 2018 18:40:54 -0500 Received: from localhost (flamenco.cs.columbia.edu [128.59.20.216]) by mail.messagingengine.com (Postfix) with ESMTPA id 2A601241E0; Fri, 16 Feb 2018 18:40:54 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=braap.org; h=cc :date:from:in-reply-to:message-id:references:subject:to :x-me-sender:x-me-sender:x-sasl-enc; s=mesmtp; bh=8eMLsZgo9IEOjz wn+kK08gc/IG3EsByn1Y/RHDDZcbo=; b=WMz7XM1eYfCypRzoLDib4J7dF7OIVs k8ntAc0KeTctn3DpNFyqbrSiaEZLpX/jDUi6VYttMqVmIpSysNB1pThe5Qgqqxlq QUofn4QWprlvx8e4WG3RogQEhKNxqGADPJIwnudR9DtV1lRSwXdTEHCb/IhQHs1T poBuvThaeTOEw= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:date:from:in-reply-to:message-id :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; bh=8eMLsZgo9IEOjzwn+kK08gc/IG3EsByn1Y/RHDDZcbo=; b=ea6kWut/ xu4UVK8UxpnZ1HY6JZaO7oblrK7Ijh5SzXAytzIg6C0BE86b/CqD0XJ15rusd6XK ZPqFgMMYtHvV1OrW09gzxKABxA9HRyzsaO5TO1KcgAoqpSvK0qnK0fdlCdUnc+RS bd0jWRb3nk9dmmlw/ZUjI2pXAfLARMbxhuxXOiLogKi9DYa1cvIgesY234LTh2r9 KiIHCmJ/1y5kHE0H19tsSGbobYsd4Jjtf/oEDCxDLVXMsknsTU4CLcnbUlQQpCFO xfHtL/uuP+XlLjtH2f/cKymmP7H+K34MjFv52iMiFyxVBpnpFjMntpQw+sliqsZO EqJZie/ac/A/xQ== X-ME-Sender: From: "Emilio G. Cota" To: qemu-devel@nongnu.org Date: Fri, 16 Feb 2018 18:40:44 -0500 Message-Id: <1518824446-20235-2-git-send-email-cota@braap.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1518824446-20235-1-git-send-email-cota@braap.org> References: <1518824446-20235-1-git-send-email-cota@braap.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 66.111.4.29 Subject: [Qemu-devel] [PATCH 1/3] target/s390x: convert to DisasJumpType X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Cornelia Huck , qemu-s390x@nongnu.org, David Hildenbrand , Alexander Graf , Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" The only non-trivial modification is the use of DISAS_TOO_MANY in the same way is used by the generic translation loop. Signed-off-by: Emilio G. Cota Reviewed-by: David Hildenbrand Reviewed-by: Richard Henderson --- target/s390x/translate.c | 1267 +++++++++++++++++++++++-------------------= ---- 1 file changed, 632 insertions(+), 635 deletions(-) diff --git a/target/s390x/translate.c b/target/s390x/translate.c index b470d69..5346791 100644 --- a/target/s390x/translate.c +++ b/target/s390x/translate.c @@ -42,6 +42,7 @@ #include "exec/helper-gen.h" =20 #include "trace-tcg.h" +#include "exec/translator.h" #include "exec/log.h" =20 =20 @@ -73,9 +74,6 @@ typedef struct { } u; } DisasCompare; =20 -/* is_jmp field values */ -#define DISAS_EXCP DISAS_TARGET_0 - #ifdef DEBUG_INLINE_BRANCHES static uint64_t inline_branch_hit[CC_OP_MAX]; static uint64_t inline_branch_miss[CC_OP_MAX]; @@ -1087,26 +1085,24 @@ typedef struct { #define SPEC_r2_f128 16 =20 /* Return values from translate_one, indicating the state of the TB. */ -typedef enum { - /* Continue the TB. */ - NO_EXIT, - /* We have emitted one or more goto_tb. No fixup required. */ - EXIT_GOTO_TB, - /* We are not using a goto_tb (for whatever reason), but have updated - the PC (for whatever reason), so there's no need to do it again on - exiting the TB. */ - EXIT_PC_UPDATED, - /* We have updated the PC and CC values. */ - EXIT_PC_CC_UPDATED, - /* We are exiting the TB, but have neither emitted a goto_tb, nor - updated the PC for the next instruction to be executed. */ - EXIT_PC_STALE, - /* We are exiting the TB to the main loop. */ - EXIT_PC_STALE_NOCHAIN, - /* We are ending the TB with a noreturn function call, e.g. longjmp. - No following code will be executed. */ - EXIT_NORETURN, -} ExitStatus; + +/* We are not using a goto_tb (for whatever reason), but have updated + the PC (for whatever reason), so there's no need to do it again on + exiting the TB. */ +#define DISAS_PC_UPDATED DISAS_TARGET_0 + +/* We have emitted one or more goto_tb. No fixup required. */ +#define DISAS_GOTO_TB DISAS_TARGET_1 + +/* We have updated the PC and CC values. */ +#define DISAS_PC_CC_UPDATED DISAS_TARGET_2 + +/* We are exiting the TB, but have neither emitted a goto_tb, nor + updated the PC for the next instruction to be executed. */ +#define DISAS_PC_STALE DISAS_TARGET_3 + +/* We are exiting the TB to the main loop. */ +#define DISAS_PC_STALE_NOCHAIN DISAS_TARGET_4 =20 struct DisasInsn { unsigned opc:16; @@ -1121,7 +1117,7 @@ struct DisasInsn { void (*help_prep)(DisasContext *, DisasFields *, DisasOps *); void (*help_wout)(DisasContext *, DisasFields *, DisasOps *); void (*help_cout)(DisasContext *, DisasOps *); - ExitStatus (*help_op)(DisasContext *, DisasOps *); + DisasJumpType (*help_op)(DisasContext *, DisasOps *); =20 uint64_t data; }; @@ -1143,11 +1139,11 @@ static void help_l2_shift(DisasContext *s, DisasFie= lds *f, } } =20 -static ExitStatus help_goto_direct(DisasContext *s, uint64_t dest) +static DisasJumpType help_goto_direct(DisasContext *s, uint64_t dest) { if (dest =3D=3D s->next_pc) { per_branch(s, true); - return NO_EXIT; + return DISAS_NEXT; } if (use_goto_tb(s, dest)) { update_cc_op(s); @@ -1155,31 +1151,31 @@ static ExitStatus help_goto_direct(DisasContext *s,= uint64_t dest) tcg_gen_goto_tb(0); tcg_gen_movi_i64(psw_addr, dest); tcg_gen_exit_tb((uintptr_t)s->tb); - return EXIT_GOTO_TB; + return DISAS_GOTO_TB; } else { tcg_gen_movi_i64(psw_addr, dest); per_branch(s, false); - return EXIT_PC_UPDATED; + return DISAS_PC_UPDATED; } } =20 -static ExitStatus help_branch(DisasContext *s, DisasCompare *c, - bool is_imm, int imm, TCGv_i64 cdest) +static DisasJumpType help_branch(DisasContext *s, DisasCompare *c, + bool is_imm, int imm, TCGv_i64 cdest) { - ExitStatus ret; + DisasJumpType ret; uint64_t dest =3D s->pc + 2 * imm; TCGLabel *lab; =20 /* Take care of the special cases first. */ if (c->cond =3D=3D TCG_COND_NEVER) { - ret =3D NO_EXIT; + ret =3D DISAS_NEXT; goto egress; } if (is_imm) { if (dest =3D=3D s->next_pc) { /* Branch to next. */ per_branch(s, true); - ret =3D NO_EXIT; + ret =3D DISAS_NEXT; goto egress; } if (c->cond =3D=3D TCG_COND_ALWAYS) { @@ -1189,13 +1185,13 @@ static ExitStatus help_branch(DisasContext *s, Disa= sCompare *c, } else { if (!cdest) { /* E.g. bcr %r0 -> no branch. */ - ret =3D NO_EXIT; + ret =3D DISAS_NEXT; goto egress; } if (c->cond =3D=3D TCG_COND_ALWAYS) { tcg_gen_mov_i64(psw_addr, cdest); per_branch(s, false); - ret =3D EXIT_PC_UPDATED; + ret =3D DISAS_PC_UPDATED; goto egress; } } @@ -1224,7 +1220,7 @@ static ExitStatus help_branch(DisasContext *s, DisasC= ompare *c, tcg_gen_movi_i64(psw_addr, dest); tcg_gen_exit_tb((uintptr_t)s->tb + 1); =20 - ret =3D EXIT_GOTO_TB; + ret =3D DISAS_GOTO_TB; } else { /* Fallthru can use goto_tb, but taken branch cannot. */ /* Store taken branch destination before the brcond. This @@ -1252,7 +1248,7 @@ static ExitStatus help_branch(DisasContext *s, DisasC= ompare *c, tcg_gen_movi_i64(psw_addr, dest); } per_breaking_event(s); - ret =3D EXIT_PC_UPDATED; + ret =3D DISAS_PC_UPDATED; } } else { /* Fallthru cannot use goto_tb. This by itself is vanishingly rar= e. @@ -1286,7 +1282,7 @@ static ExitStatus help_branch(DisasContext *s, DisasC= ompare *c, } tcg_temp_free_i64(next); =20 - ret =3D EXIT_PC_UPDATED; + ret =3D DISAS_PC_UPDATED; } =20 egress: @@ -1298,7 +1294,7 @@ static ExitStatus help_branch(DisasContext *s, DisasC= ompare *c, /* The operations. These perform the bulk of the work for any insn, usually after the operands have been loaded and output initialized. */ =20 -static ExitStatus op_abs(DisasContext *s, DisasOps *o) +static DisasJumpType op_abs(DisasContext *s, DisasOps *o) { TCGv_i64 z, n; z =3D tcg_const_i64(0); @@ -1307,35 +1303,35 @@ static ExitStatus op_abs(DisasContext *s, DisasOps = *o) tcg_gen_movcond_i64(TCG_COND_LT, o->out, o->in2, z, n, o->in2); tcg_temp_free_i64(n); tcg_temp_free_i64(z); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_absf32(DisasContext *s, DisasOps *o) +static DisasJumpType op_absf32(DisasContext *s, DisasOps *o) { tcg_gen_andi_i64(o->out, o->in2, 0x7fffffffull); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_absf64(DisasContext *s, DisasOps *o) +static DisasJumpType op_absf64(DisasContext *s, DisasOps *o) { tcg_gen_andi_i64(o->out, o->in2, 0x7fffffffffffffffull); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_absf128(DisasContext *s, DisasOps *o) +static DisasJumpType op_absf128(DisasContext *s, DisasOps *o) { tcg_gen_andi_i64(o->out, o->in1, 0x7fffffffffffffffull); tcg_gen_mov_i64(o->out2, o->in2); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_add(DisasContext *s, DisasOps *o) +static DisasJumpType op_add(DisasContext *s, DisasOps *o) { tcg_gen_add_i64(o->out, o->in1, o->in2); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_addc(DisasContext *s, DisasOps *o) +static DisasJumpType op_addc(DisasContext *s, DisasOps *o) { DisasCompare cmp; TCGv_i64 carry; @@ -1359,10 +1355,10 @@ static ExitStatus op_addc(DisasContext *s, DisasOps= *o) =20 tcg_gen_add_i64(o->out, o->out, carry); tcg_temp_free_i64(carry); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_asi(DisasContext *s, DisasOps *o) +static DisasJumpType op_asi(DisasContext *s, DisasOps *o) { o->in1 =3D tcg_temp_new_i64(); =20 @@ -1380,35 +1376,35 @@ static ExitStatus op_asi(DisasContext *s, DisasOps = *o) if (!s390_has_feat(S390_FEAT_STFLE_45)) { tcg_gen_qemu_st_tl(o->out, o->addr1, get_mem_index(s), s->insn->da= ta); } - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_aeb(DisasContext *s, DisasOps *o) +static DisasJumpType op_aeb(DisasContext *s, DisasOps *o) { gen_helper_aeb(o->out, cpu_env, o->in1, o->in2); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_adb(DisasContext *s, DisasOps *o) +static DisasJumpType op_adb(DisasContext *s, DisasOps *o) { gen_helper_adb(o->out, cpu_env, o->in1, o->in2); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_axb(DisasContext *s, DisasOps *o) +static DisasJumpType op_axb(DisasContext *s, DisasOps *o) { gen_helper_axb(o->out, cpu_env, o->out, o->out2, o->in1, o->in2); return_low128(o->out2); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_and(DisasContext *s, DisasOps *o) +static DisasJumpType op_and(DisasContext *s, DisasOps *o) { tcg_gen_and_i64(o->out, o->in1, o->in2); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_andi(DisasContext *s, DisasOps *o) +static DisasJumpType op_andi(DisasContext *s, DisasOps *o) { int shift =3D s->insn->data & 0xff; int size =3D s->insn->data >> 8; @@ -1422,10 +1418,10 @@ static ExitStatus op_andi(DisasContext *s, DisasOps= *o) /* Produce the CC from only the bits manipulated. */ tcg_gen_andi_i64(cc_dst, o->out, mask); set_cc_nz_u64(s, cc_dst); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_ni(DisasContext *s, DisasOps *o) +static DisasJumpType op_ni(DisasContext *s, DisasOps *o) { o->in1 =3D tcg_temp_new_i64(); =20 @@ -1443,28 +1439,28 @@ static ExitStatus op_ni(DisasContext *s, DisasOps *= o) if (!s390_has_feat(S390_FEAT_INTERLOCKED_ACCESS_2)) { tcg_gen_qemu_st_tl(o->out, o->addr1, get_mem_index(s), s->insn->da= ta); } - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_bas(DisasContext *s, DisasOps *o) +static DisasJumpType op_bas(DisasContext *s, DisasOps *o) { tcg_gen_movi_i64(o->out, pc_to_link_info(s, s->next_pc)); if (o->in2) { tcg_gen_mov_i64(psw_addr, o->in2); per_branch(s, false); - return EXIT_PC_UPDATED; + return DISAS_PC_UPDATED; } else { - return NO_EXIT; + return DISAS_NEXT; } } =20 -static ExitStatus op_basi(DisasContext *s, DisasOps *o) +static DisasJumpType op_basi(DisasContext *s, DisasOps *o) { tcg_gen_movi_i64(o->out, pc_to_link_info(s, s->next_pc)); return help_goto_direct(s, s->pc + 2 * get_field(s->fields, i2)); } =20 -static ExitStatus op_bc(DisasContext *s, DisasOps *o) +static DisasJumpType op_bc(DisasContext *s, DisasOps *o) { int m1 =3D get_field(s->fields, m1); bool is_imm =3D have_field(s->fields, i2); @@ -1483,14 +1479,14 @@ static ExitStatus op_bc(DisasContext *s, DisasOps *= o) /* FIXME: perform checkpoint-synchronisation */ tcg_gen_mb(TCG_MO_ALL | TCG_BAR_SC); } - return NO_EXIT; + return DISAS_NEXT; } =20 disas_jcc(s, &c, m1); return help_branch(s, &c, is_imm, imm, o->in2); } =20 -static ExitStatus op_bct32(DisasContext *s, DisasOps *o) +static DisasJumpType op_bct32(DisasContext *s, DisasOps *o) { int r1 =3D get_field(s->fields, r1); bool is_imm =3D have_field(s->fields, i2); @@ -1514,7 +1510,7 @@ static ExitStatus op_bct32(DisasContext *s, DisasOps = *o) return help_branch(s, &c, is_imm, imm, o->in2); } =20 -static ExitStatus op_bcth(DisasContext *s, DisasOps *o) +static DisasJumpType op_bcth(DisasContext *s, DisasOps *o) { int r1 =3D get_field(s->fields, r1); int imm =3D get_field(s->fields, i2); @@ -1538,7 +1534,7 @@ static ExitStatus op_bcth(DisasContext *s, DisasOps *= o) return help_branch(s, &c, 1, imm, o->in2); } =20 -static ExitStatus op_bct64(DisasContext *s, DisasOps *o) +static DisasJumpType op_bct64(DisasContext *s, DisasOps *o) { int r1 =3D get_field(s->fields, r1); bool is_imm =3D have_field(s->fields, i2); @@ -1557,7 +1553,7 @@ static ExitStatus op_bct64(DisasContext *s, DisasOps = *o) return help_branch(s, &c, is_imm, imm, o->in2); } =20 -static ExitStatus op_bx32(DisasContext *s, DisasOps *o) +static DisasJumpType op_bx32(DisasContext *s, DisasOps *o) { int r1 =3D get_field(s->fields, r1); int r3 =3D get_field(s->fields, r3); @@ -1583,7 +1579,7 @@ static ExitStatus op_bx32(DisasContext *s, DisasOps *= o) return help_branch(s, &c, is_imm, imm, o->in2); } =20 -static ExitStatus op_bx64(DisasContext *s, DisasOps *o) +static DisasJumpType op_bx64(DisasContext *s, DisasOps *o) { int r1 =3D get_field(s->fields, r1); int r3 =3D get_field(s->fields, r3); @@ -1609,7 +1605,7 @@ static ExitStatus op_bx64(DisasContext *s, DisasOps *= o) return help_branch(s, &c, is_imm, imm, o->in2); } =20 -static ExitStatus op_cj(DisasContext *s, DisasOps *o) +static DisasJumpType op_cj(DisasContext *s, DisasOps *o) { int imm, m3 =3D get_field(s->fields, m3); bool is_imm; @@ -1635,186 +1631,186 @@ static ExitStatus op_cj(DisasContext *s, DisasOps= *o) return help_branch(s, &c, is_imm, imm, o->out); } =20 -static ExitStatus op_ceb(DisasContext *s, DisasOps *o) +static DisasJumpType op_ceb(DisasContext *s, DisasOps *o) { gen_helper_ceb(cc_op, cpu_env, o->in1, o->in2); set_cc_static(s); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_cdb(DisasContext *s, DisasOps *o) +static DisasJumpType op_cdb(DisasContext *s, DisasOps *o) { gen_helper_cdb(cc_op, cpu_env, o->in1, o->in2); set_cc_static(s); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_cxb(DisasContext *s, DisasOps *o) +static DisasJumpType op_cxb(DisasContext *s, DisasOps *o) { gen_helper_cxb(cc_op, cpu_env, o->out, o->out2, o->in1, o->in2); set_cc_static(s); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_cfeb(DisasContext *s, DisasOps *o) +static DisasJumpType op_cfeb(DisasContext *s, DisasOps *o) { TCGv_i32 m3 =3D tcg_const_i32(get_field(s->fields, m3)); gen_helper_cfeb(o->out, cpu_env, o->in2, m3); tcg_temp_free_i32(m3); gen_set_cc_nz_f32(s, o->in2); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_cfdb(DisasContext *s, DisasOps *o) +static DisasJumpType op_cfdb(DisasContext *s, DisasOps *o) { TCGv_i32 m3 =3D tcg_const_i32(get_field(s->fields, m3)); gen_helper_cfdb(o->out, cpu_env, o->in2, m3); tcg_temp_free_i32(m3); gen_set_cc_nz_f64(s, o->in2); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_cfxb(DisasContext *s, DisasOps *o) +static DisasJumpType op_cfxb(DisasContext *s, DisasOps *o) { TCGv_i32 m3 =3D tcg_const_i32(get_field(s->fields, m3)); gen_helper_cfxb(o->out, cpu_env, o->in1, o->in2, m3); tcg_temp_free_i32(m3); gen_set_cc_nz_f128(s, o->in1, o->in2); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_cgeb(DisasContext *s, DisasOps *o) +static DisasJumpType op_cgeb(DisasContext *s, DisasOps *o) { TCGv_i32 m3 =3D tcg_const_i32(get_field(s->fields, m3)); gen_helper_cgeb(o->out, cpu_env, o->in2, m3); tcg_temp_free_i32(m3); gen_set_cc_nz_f32(s, o->in2); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_cgdb(DisasContext *s, DisasOps *o) +static DisasJumpType op_cgdb(DisasContext *s, DisasOps *o) { TCGv_i32 m3 =3D tcg_const_i32(get_field(s->fields, m3)); gen_helper_cgdb(o->out, cpu_env, o->in2, m3); tcg_temp_free_i32(m3); gen_set_cc_nz_f64(s, o->in2); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_cgxb(DisasContext *s, DisasOps *o) +static DisasJumpType op_cgxb(DisasContext *s, DisasOps *o) { TCGv_i32 m3 =3D tcg_const_i32(get_field(s->fields, m3)); gen_helper_cgxb(o->out, cpu_env, o->in1, o->in2, m3); tcg_temp_free_i32(m3); gen_set_cc_nz_f128(s, o->in1, o->in2); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_clfeb(DisasContext *s, DisasOps *o) +static DisasJumpType op_clfeb(DisasContext *s, DisasOps *o) { TCGv_i32 m3 =3D tcg_const_i32(get_field(s->fields, m3)); gen_helper_clfeb(o->out, cpu_env, o->in2, m3); tcg_temp_free_i32(m3); gen_set_cc_nz_f32(s, o->in2); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_clfdb(DisasContext *s, DisasOps *o) +static DisasJumpType op_clfdb(DisasContext *s, DisasOps *o) { TCGv_i32 m3 =3D tcg_const_i32(get_field(s->fields, m3)); gen_helper_clfdb(o->out, cpu_env, o->in2, m3); tcg_temp_free_i32(m3); gen_set_cc_nz_f64(s, o->in2); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_clfxb(DisasContext *s, DisasOps *o) +static DisasJumpType op_clfxb(DisasContext *s, DisasOps *o) { TCGv_i32 m3 =3D tcg_const_i32(get_field(s->fields, m3)); gen_helper_clfxb(o->out, cpu_env, o->in1, o->in2, m3); tcg_temp_free_i32(m3); gen_set_cc_nz_f128(s, o->in1, o->in2); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_clgeb(DisasContext *s, DisasOps *o) +static DisasJumpType op_clgeb(DisasContext *s, DisasOps *o) { TCGv_i32 m3 =3D tcg_const_i32(get_field(s->fields, m3)); gen_helper_clgeb(o->out, cpu_env, o->in2, m3); tcg_temp_free_i32(m3); gen_set_cc_nz_f32(s, o->in2); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_clgdb(DisasContext *s, DisasOps *o) +static DisasJumpType op_clgdb(DisasContext *s, DisasOps *o) { TCGv_i32 m3 =3D tcg_const_i32(get_field(s->fields, m3)); gen_helper_clgdb(o->out, cpu_env, o->in2, m3); tcg_temp_free_i32(m3); gen_set_cc_nz_f64(s, o->in2); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_clgxb(DisasContext *s, DisasOps *o) +static DisasJumpType op_clgxb(DisasContext *s, DisasOps *o) { TCGv_i32 m3 =3D tcg_const_i32(get_field(s->fields, m3)); gen_helper_clgxb(o->out, cpu_env, o->in1, o->in2, m3); tcg_temp_free_i32(m3); gen_set_cc_nz_f128(s, o->in1, o->in2); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_cegb(DisasContext *s, DisasOps *o) +static DisasJumpType op_cegb(DisasContext *s, DisasOps *o) { TCGv_i32 m3 =3D tcg_const_i32(get_field(s->fields, m3)); gen_helper_cegb(o->out, cpu_env, o->in2, m3); tcg_temp_free_i32(m3); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_cdgb(DisasContext *s, DisasOps *o) +static DisasJumpType op_cdgb(DisasContext *s, DisasOps *o) { TCGv_i32 m3 =3D tcg_const_i32(get_field(s->fields, m3)); gen_helper_cdgb(o->out, cpu_env, o->in2, m3); tcg_temp_free_i32(m3); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_cxgb(DisasContext *s, DisasOps *o) +static DisasJumpType op_cxgb(DisasContext *s, DisasOps *o) { TCGv_i32 m3 =3D tcg_const_i32(get_field(s->fields, m3)); gen_helper_cxgb(o->out, cpu_env, o->in2, m3); tcg_temp_free_i32(m3); return_low128(o->out2); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_celgb(DisasContext *s, DisasOps *o) +static DisasJumpType op_celgb(DisasContext *s, DisasOps *o) { TCGv_i32 m3 =3D tcg_const_i32(get_field(s->fields, m3)); gen_helper_celgb(o->out, cpu_env, o->in2, m3); tcg_temp_free_i32(m3); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_cdlgb(DisasContext *s, DisasOps *o) +static DisasJumpType op_cdlgb(DisasContext *s, DisasOps *o) { TCGv_i32 m3 =3D tcg_const_i32(get_field(s->fields, m3)); gen_helper_cdlgb(o->out, cpu_env, o->in2, m3); tcg_temp_free_i32(m3); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_cxlgb(DisasContext *s, DisasOps *o) +static DisasJumpType op_cxlgb(DisasContext *s, DisasOps *o) { TCGv_i32 m3 =3D tcg_const_i32(get_field(s->fields, m3)); gen_helper_cxlgb(o->out, cpu_env, o->in2, m3); tcg_temp_free_i32(m3); return_low128(o->out2); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_cksm(DisasContext *s, DisasOps *o) +static DisasJumpType op_cksm(DisasContext *s, DisasOps *o) { int r2 =3D get_field(s->fields, r2); TCGv_i64 len =3D tcg_temp_new_i64(); @@ -1827,10 +1823,10 @@ static ExitStatus op_cksm(DisasContext *s, DisasOps= *o) tcg_gen_sub_i64(regs[r2 + 1], regs[r2 + 1], len); tcg_temp_free_i64(len); =20 - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_clc(DisasContext *s, DisasOps *o) +static DisasJumpType op_clc(DisasContext *s, DisasOps *o) { int l =3D get_field(s->fields, l1); TCGv_i32 vl; @@ -1857,13 +1853,13 @@ static ExitStatus op_clc(DisasContext *s, DisasOps = *o) gen_helper_clc(cc_op, cpu_env, vl, o->addr1, o->in2); tcg_temp_free_i32(vl); set_cc_static(s); - return NO_EXIT; + return DISAS_NEXT; } gen_op_update2_cc_i64(s, CC_OP_LTUGTU_64, cc_src, cc_dst); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_clcl(DisasContext *s, DisasOps *o) +static DisasJumpType op_clcl(DisasContext *s, DisasOps *o) { int r1 =3D get_field(s->fields, r1); int r2 =3D get_field(s->fields, r2); @@ -1872,7 +1868,7 @@ static ExitStatus op_clcl(DisasContext *s, DisasOps *= o) /* r1 and r2 must be even. */ if (r1 & 1 || r2 & 1) { gen_program_exception(s, PGM_SPECIFICATION); - return EXIT_NORETURN; + return DISAS_NORETURN; } =20 t1 =3D tcg_const_i32(r1); @@ -1881,10 +1877,10 @@ static ExitStatus op_clcl(DisasContext *s, DisasOps= *o) tcg_temp_free_i32(t1); tcg_temp_free_i32(t2); set_cc_static(s); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_clcle(DisasContext *s, DisasOps *o) +static DisasJumpType op_clcle(DisasContext *s, DisasOps *o) { int r1 =3D get_field(s->fields, r1); int r3 =3D get_field(s->fields, r3); @@ -1893,7 +1889,7 @@ static ExitStatus op_clcle(DisasContext *s, DisasOps = *o) /* r1 and r3 must be even. */ if (r1 & 1 || r3 & 1) { gen_program_exception(s, PGM_SPECIFICATION); - return EXIT_NORETURN; + return DISAS_NORETURN; } =20 t1 =3D tcg_const_i32(r1); @@ -1902,10 +1898,10 @@ static ExitStatus op_clcle(DisasContext *s, DisasOp= s *o) tcg_temp_free_i32(t1); tcg_temp_free_i32(t3); set_cc_static(s); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_clclu(DisasContext *s, DisasOps *o) +static DisasJumpType op_clclu(DisasContext *s, DisasOps *o) { int r1 =3D get_field(s->fields, r1); int r3 =3D get_field(s->fields, r3); @@ -1914,7 +1910,7 @@ static ExitStatus op_clclu(DisasContext *s, DisasOps = *o) /* r1 and r3 must be even. */ if (r1 & 1 || r3 & 1) { gen_program_exception(s, PGM_SPECIFICATION); - return EXIT_NORETURN; + return DISAS_NORETURN; } =20 t1 =3D tcg_const_i32(r1); @@ -1923,10 +1919,10 @@ static ExitStatus op_clclu(DisasContext *s, DisasOp= s *o) tcg_temp_free_i32(t1); tcg_temp_free_i32(t3); set_cc_static(s); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_clm(DisasContext *s, DisasOps *o) +static DisasJumpType op_clm(DisasContext *s, DisasOps *o) { TCGv_i32 m3 =3D tcg_const_i32(get_field(s->fields, m3)); TCGv_i32 t1 =3D tcg_temp_new_i32(); @@ -1935,28 +1931,28 @@ static ExitStatus op_clm(DisasContext *s, DisasOps = *o) set_cc_static(s); tcg_temp_free_i32(t1); tcg_temp_free_i32(m3); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_clst(DisasContext *s, DisasOps *o) +static DisasJumpType op_clst(DisasContext *s, DisasOps *o) { gen_helper_clst(o->in1, cpu_env, regs[0], o->in1, o->in2); set_cc_static(s); return_low128(o->in2); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_cps(DisasContext *s, DisasOps *o) +static DisasJumpType op_cps(DisasContext *s, DisasOps *o) { TCGv_i64 t =3D tcg_temp_new_i64(); tcg_gen_andi_i64(t, o->in1, 0x8000000000000000ull); tcg_gen_andi_i64(o->out, o->in2, 0x7fffffffffffffffull); tcg_gen_or_i64(o->out, o->out, t); tcg_temp_free_i64(t); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_cs(DisasContext *s, DisasOps *o) +static DisasJumpType op_cs(DisasContext *s, DisasOps *o) { int d2 =3D get_field(s->fields, d2); int b2 =3D get_field(s->fields, b2); @@ -1978,10 +1974,10 @@ static ExitStatus op_cs(DisasContext *s, DisasOps *= o) tcg_temp_free_i64(cc); set_cc_static(s); =20 - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_cdsg(DisasContext *s, DisasOps *o) +static DisasJumpType op_cdsg(DisasContext *s, DisasOps *o) { int r1 =3D get_field(s->fields, r1); int r3 =3D get_field(s->fields, r3); @@ -2004,10 +2000,10 @@ static ExitStatus op_cdsg(DisasContext *s, DisasOps= *o) tcg_temp_free_i32(t_r3); =20 set_cc_static(s); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_csst(DisasContext *s, DisasOps *o) +static DisasJumpType op_csst(DisasContext *s, DisasOps *o) { int r3 =3D get_field(s->fields, r3); TCGv_i32 t_r3 =3D tcg_const_i32(r3); @@ -2020,11 +2016,11 @@ static ExitStatus op_csst(DisasContext *s, DisasOps= *o) tcg_temp_free_i32(t_r3); =20 set_cc_static(s); - return NO_EXIT; + return DISAS_NEXT; } =20 #ifndef CONFIG_USER_ONLY -static ExitStatus op_csp(DisasContext *s, DisasOps *o) +static DisasJumpType op_csp(DisasContext *s, DisasOps *o) { TCGMemOp mop =3D s->insn->data; TCGv_i64 addr, old, cc; @@ -2065,11 +2061,11 @@ static ExitStatus op_csp(DisasContext *s, DisasOps = *o) gen_helper_purge(cpu_env); gen_set_label(lab); =20 - return NO_EXIT; + return DISAS_NEXT; } #endif =20 -static ExitStatus op_cvd(DisasContext *s, DisasOps *o) +static DisasJumpType op_cvd(DisasContext *s, DisasOps *o) { TCGv_i64 t1 =3D tcg_temp_new_i64(); TCGv_i32 t2 =3D tcg_temp_new_i32(); @@ -2078,10 +2074,10 @@ static ExitStatus op_cvd(DisasContext *s, DisasOps = *o) tcg_temp_free_i32(t2); tcg_gen_qemu_st64(t1, o->in2, get_mem_index(s)); tcg_temp_free_i64(t1); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_ct(DisasContext *s, DisasOps *o) +static DisasJumpType op_ct(DisasContext *s, DisasOps *o) { int m3 =3D get_field(s->fields, m3); TCGLabel *lab =3D gen_new_label(); @@ -2097,10 +2093,10 @@ static ExitStatus op_ct(DisasContext *s, DisasOps *= o) gen_trap(s); =20 gen_set_label(lab); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_cuXX(DisasContext *s, DisasOps *o) +static DisasJumpType op_cuXX(DisasContext *s, DisasOps *o) { int m3 =3D get_field(s->fields, m3); int r1 =3D get_field(s->fields, r1); @@ -2110,7 +2106,7 @@ static ExitStatus op_cuXX(DisasContext *s, DisasOps *= o) /* R1 and R2 must both be even. */ if ((r1 | r2) & 1) { gen_program_exception(s, PGM_SPECIFICATION); - return EXIT_NORETURN; + return DISAS_NORETURN; } if (!s390_has_feat(S390_FEAT_ETF3_ENH)) { m3 =3D 0; @@ -2147,11 +2143,11 @@ static ExitStatus op_cuXX(DisasContext *s, DisasOps= *o) tcg_temp_free_i32(tr2); tcg_temp_free_i32(chk); set_cc_static(s); - return NO_EXIT; + return DISAS_NEXT; } =20 #ifndef CONFIG_USER_ONLY -static ExitStatus op_diag(DisasContext *s, DisasOps *o) +static DisasJumpType op_diag(DisasContext *s, DisasOps *o) { TCGv_i32 r1 =3D tcg_const_i32(get_field(s->fields, r1)); TCGv_i32 r3 =3D tcg_const_i32(get_field(s->fields, r3)); @@ -2163,78 +2159,78 @@ static ExitStatus op_diag(DisasContext *s, DisasOps= *o) tcg_temp_free_i32(func_code); tcg_temp_free_i32(r3); tcg_temp_free_i32(r1); - return NO_EXIT; + return DISAS_NEXT; } #endif =20 -static ExitStatus op_divs32(DisasContext *s, DisasOps *o) +static DisasJumpType op_divs32(DisasContext *s, DisasOps *o) { gen_helper_divs32(o->out2, cpu_env, o->in1, o->in2); return_low128(o->out); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_divu32(DisasContext *s, DisasOps *o) +static DisasJumpType op_divu32(DisasContext *s, DisasOps *o) { gen_helper_divu32(o->out2, cpu_env, o->in1, o->in2); return_low128(o->out); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_divs64(DisasContext *s, DisasOps *o) +static DisasJumpType op_divs64(DisasContext *s, DisasOps *o) { gen_helper_divs64(o->out2, cpu_env, o->in1, o->in2); return_low128(o->out); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_divu64(DisasContext *s, DisasOps *o) +static DisasJumpType op_divu64(DisasContext *s, DisasOps *o) { gen_helper_divu64(o->out2, cpu_env, o->out, o->out2, o->in2); return_low128(o->out); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_deb(DisasContext *s, DisasOps *o) +static DisasJumpType op_deb(DisasContext *s, DisasOps *o) { gen_helper_deb(o->out, cpu_env, o->in1, o->in2); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_ddb(DisasContext *s, DisasOps *o) +static DisasJumpType op_ddb(DisasContext *s, DisasOps *o) { gen_helper_ddb(o->out, cpu_env, o->in1, o->in2); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_dxb(DisasContext *s, DisasOps *o) +static DisasJumpType op_dxb(DisasContext *s, DisasOps *o) { gen_helper_dxb(o->out, cpu_env, o->out, o->out2, o->in1, o->in2); return_low128(o->out2); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_ear(DisasContext *s, DisasOps *o) +static DisasJumpType op_ear(DisasContext *s, DisasOps *o) { int r2 =3D get_field(s->fields, r2); tcg_gen_ld32u_i64(o->out, cpu_env, offsetof(CPUS390XState, aregs[r2])); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_ecag(DisasContext *s, DisasOps *o) +static DisasJumpType op_ecag(DisasContext *s, DisasOps *o) { /* No cache information provided. */ tcg_gen_movi_i64(o->out, -1); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_efpc(DisasContext *s, DisasOps *o) +static DisasJumpType op_efpc(DisasContext *s, DisasOps *o) { tcg_gen_ld32u_i64(o->out, cpu_env, offsetof(CPUS390XState, fpc)); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_epsw(DisasContext *s, DisasOps *o) +static DisasJumpType op_epsw(DisasContext *s, DisasOps *o) { int r1 =3D get_field(s->fields, r1); int r2 =3D get_field(s->fields, r2); @@ -2249,10 +2245,10 @@ static ExitStatus op_epsw(DisasContext *s, DisasOps= *o) } =20 tcg_temp_free_i64(t); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_ex(DisasContext *s, DisasOps *o) +static DisasJumpType op_ex(DisasContext *s, DisasOps *o) { int r1 =3D get_field(s->fields, r1); TCGv_i32 ilen; @@ -2261,7 +2257,7 @@ static ExitStatus op_ex(DisasContext *s, DisasOps *o) /* Nested EXECUTE is not allowed. */ if (unlikely(s->ex_value)) { gen_program_exception(s, PGM_EXECUTE); - return EXIT_NORETURN; + return DISAS_NORETURN; } =20 update_psw_addr(s); @@ -2281,35 +2277,35 @@ static ExitStatus op_ex(DisasContext *s, DisasOps *= o) tcg_temp_free_i64(v1); } =20 - return EXIT_PC_CC_UPDATED; + return DISAS_PC_CC_UPDATED; } =20 -static ExitStatus op_fieb(DisasContext *s, DisasOps *o) +static DisasJumpType op_fieb(DisasContext *s, DisasOps *o) { TCGv_i32 m3 =3D tcg_const_i32(get_field(s->fields, m3)); gen_helper_fieb(o->out, cpu_env, o->in2, m3); tcg_temp_free_i32(m3); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_fidb(DisasContext *s, DisasOps *o) +static DisasJumpType op_fidb(DisasContext *s, DisasOps *o) { TCGv_i32 m3 =3D tcg_const_i32(get_field(s->fields, m3)); gen_helper_fidb(o->out, cpu_env, o->in2, m3); tcg_temp_free_i32(m3); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_fixb(DisasContext *s, DisasOps *o) +static DisasJumpType op_fixb(DisasContext *s, DisasOps *o) { TCGv_i32 m3 =3D tcg_const_i32(get_field(s->fields, m3)); gen_helper_fixb(o->out, cpu_env, o->in1, o->in2, m3); return_low128(o->out2); tcg_temp_free_i32(m3); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_flogr(DisasContext *s, DisasOps *o) +static DisasJumpType op_flogr(DisasContext *s, DisasOps *o) { /* We'll use the original input for cc computation, since we get to compare that against 0, which ought to be better than comparing @@ -2326,10 +2322,10 @@ static ExitStatus op_flogr(DisasContext *s, DisasOp= s *o) tcg_gen_movi_i64(o->out2, 0x8000000000000000ull); tcg_gen_shr_i64(o->out2, o->out2, o->out); tcg_gen_andc_i64(o->out2, cc_dst, o->out2); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_icm(DisasContext *s, DisasOps *o) +static DisasJumpType op_icm(DisasContext *s, DisasOps *o) { int m3 =3D get_field(s->fields, m3); int pos, len, base =3D s->insn->data; @@ -2386,18 +2382,18 @@ static ExitStatus op_icm(DisasContext *s, DisasOps = *o) tcg_gen_movi_i64(tmp, ccm); gen_op_update2_cc_i64(s, CC_OP_ICM, tmp, o->out); tcg_temp_free_i64(tmp); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_insi(DisasContext *s, DisasOps *o) +static DisasJumpType op_insi(DisasContext *s, DisasOps *o) { int shift =3D s->insn->data & 0xff; int size =3D s->insn->data >> 8; tcg_gen_deposit_i64(o->out, o->in1, o->in2, shift, size); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_ipm(DisasContext *s, DisasOps *o) +static DisasJumpType op_ipm(DisasContext *s, DisasOps *o) { TCGv_i64 t1; =20 @@ -2413,11 +2409,11 @@ static ExitStatus op_ipm(DisasContext *s, DisasOps = *o) tcg_gen_shli_i64(t1, t1, 28); tcg_gen_or_i64(o->out, o->out, t1); tcg_temp_free_i64(t1); - return NO_EXIT; + return DISAS_NEXT; } =20 #ifndef CONFIG_USER_ONLY -static ExitStatus op_idte(DisasContext *s, DisasOps *o) +static DisasJumpType op_idte(DisasContext *s, DisasOps *o) { TCGv_i32 m4; =20 @@ -2429,10 +2425,10 @@ static ExitStatus op_idte(DisasContext *s, DisasOps= *o) } gen_helper_idte(cpu_env, o->in1, o->in2, m4); tcg_temp_free_i32(m4); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_ipte(DisasContext *s, DisasOps *o) +static DisasJumpType op_ipte(DisasContext *s, DisasOps *o) { TCGv_i32 m4; =20 @@ -2444,18 +2440,18 @@ static ExitStatus op_ipte(DisasContext *s, DisasOps= *o) } gen_helper_ipte(cpu_env, o->in1, o->in2, m4); tcg_temp_free_i32(m4); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_iske(DisasContext *s, DisasOps *o) +static DisasJumpType op_iske(DisasContext *s, DisasOps *o) { check_privileged(s); gen_helper_iske(o->out, cpu_env, o->in2); - return NO_EXIT; + return DISAS_NEXT; } #endif =20 -static ExitStatus op_msa(DisasContext *s, DisasOps *o) +static DisasJumpType op_msa(DisasContext *s, DisasOps *o) { int r1 =3D have_field(s->fields, r1) ? get_field(s->fields, r1) : 0; int r2 =3D have_field(s->fields, r2) ? get_field(s->fields, r2) : 0; @@ -2466,7 +2462,7 @@ static ExitStatus op_msa(DisasContext *s, DisasOps *o) case S390_FEAT_TYPE_KMCTR: if (r3 & 1 || !r3) { gen_program_exception(s, PGM_SPECIFICATION); - return EXIT_NORETURN; + return DISAS_NORETURN; } /* FALL THROUGH */ case S390_FEAT_TYPE_PPNO: @@ -2476,7 +2472,7 @@ static ExitStatus op_msa(DisasContext *s, DisasOps *o) case S390_FEAT_TYPE_KM: if (r1 & 1 || !r1) { gen_program_exception(s, PGM_SPECIFICATION); - return EXIT_NORETURN; + return DISAS_NORETURN; } /* FALL THROUGH */ case S390_FEAT_TYPE_KMAC: @@ -2484,7 +2480,7 @@ static ExitStatus op_msa(DisasContext *s, DisasOps *o) case S390_FEAT_TYPE_KLMD: if (r2 & 1 || !r2) { gen_program_exception(s, PGM_SPECIFICATION); - return EXIT_NORETURN; + return DISAS_NORETURN; } /* FALL THROUGH */ case S390_FEAT_TYPE_PCKMO: @@ -2504,31 +2500,31 @@ static ExitStatus op_msa(DisasContext *s, DisasOps = *o) tcg_temp_free_i32(t_r2); tcg_temp_free_i32(t_r3); tcg_temp_free_i32(type); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_keb(DisasContext *s, DisasOps *o) +static DisasJumpType op_keb(DisasContext *s, DisasOps *o) { gen_helper_keb(cc_op, cpu_env, o->in1, o->in2); set_cc_static(s); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_kdb(DisasContext *s, DisasOps *o) +static DisasJumpType op_kdb(DisasContext *s, DisasOps *o) { gen_helper_kdb(cc_op, cpu_env, o->in1, o->in2); set_cc_static(s); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_kxb(DisasContext *s, DisasOps *o) +static DisasJumpType op_kxb(DisasContext *s, DisasOps *o) { gen_helper_kxb(cc_op, cpu_env, o->out, o->out2, o->in1, o->in2); set_cc_static(s); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_laa(DisasContext *s, DisasOps *o) +static DisasJumpType op_laa(DisasContext *s, DisasOps *o) { /* The real output is indeed the original value in memory; recompute the addition for the computation of CC. */ @@ -2536,10 +2532,10 @@ static ExitStatus op_laa(DisasContext *s, DisasOps = *o) s->insn->data | MO_ALIGN); /* However, we need to recompute the addition for setting CC. */ tcg_gen_add_i64(o->out, o->in1, o->in2); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_lan(DisasContext *s, DisasOps *o) +static DisasJumpType op_lan(DisasContext *s, DisasOps *o) { /* The real output is indeed the original value in memory; recompute the addition for the computation of CC. */ @@ -2547,10 +2543,10 @@ static ExitStatus op_lan(DisasContext *s, DisasOps = *o) s->insn->data | MO_ALIGN); /* However, we need to recompute the operation for setting CC. */ tcg_gen_and_i64(o->out, o->in1, o->in2); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_lao(DisasContext *s, DisasOps *o) +static DisasJumpType op_lao(DisasContext *s, DisasOps *o) { /* The real output is indeed the original value in memory; recompute the addition for the computation of CC. */ @@ -2558,10 +2554,10 @@ static ExitStatus op_lao(DisasContext *s, DisasOps = *o) s->insn->data | MO_ALIGN); /* However, we need to recompute the operation for setting CC. */ tcg_gen_or_i64(o->out, o->in1, o->in2); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_lax(DisasContext *s, DisasOps *o) +static DisasJumpType op_lax(DisasContext *s, DisasOps *o) { /* The real output is indeed the original value in memory; recompute the addition for the computation of CC. */ @@ -2569,96 +2565,96 @@ static ExitStatus op_lax(DisasContext *s, DisasOps = *o) s->insn->data | MO_ALIGN); /* However, we need to recompute the operation for setting CC. */ tcg_gen_xor_i64(o->out, o->in1, o->in2); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_ldeb(DisasContext *s, DisasOps *o) +static DisasJumpType op_ldeb(DisasContext *s, DisasOps *o) { gen_helper_ldeb(o->out, cpu_env, o->in2); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_ledb(DisasContext *s, DisasOps *o) +static DisasJumpType op_ledb(DisasContext *s, DisasOps *o) { gen_helper_ledb(o->out, cpu_env, o->in2); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_ldxb(DisasContext *s, DisasOps *o) +static DisasJumpType op_ldxb(DisasContext *s, DisasOps *o) { gen_helper_ldxb(o->out, cpu_env, o->in1, o->in2); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_lexb(DisasContext *s, DisasOps *o) +static DisasJumpType op_lexb(DisasContext *s, DisasOps *o) { gen_helper_lexb(o->out, cpu_env, o->in1, o->in2); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_lxdb(DisasContext *s, DisasOps *o) +static DisasJumpType op_lxdb(DisasContext *s, DisasOps *o) { gen_helper_lxdb(o->out, cpu_env, o->in2); return_low128(o->out2); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_lxeb(DisasContext *s, DisasOps *o) +static DisasJumpType op_lxeb(DisasContext *s, DisasOps *o) { gen_helper_lxeb(o->out, cpu_env, o->in2); return_low128(o->out2); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_llgt(DisasContext *s, DisasOps *o) +static DisasJumpType op_llgt(DisasContext *s, DisasOps *o) { tcg_gen_andi_i64(o->out, o->in2, 0x7fffffff); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_ld8s(DisasContext *s, DisasOps *o) +static DisasJumpType op_ld8s(DisasContext *s, DisasOps *o) { tcg_gen_qemu_ld8s(o->out, o->in2, get_mem_index(s)); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_ld8u(DisasContext *s, DisasOps *o) +static DisasJumpType op_ld8u(DisasContext *s, DisasOps *o) { tcg_gen_qemu_ld8u(o->out, o->in2, get_mem_index(s)); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_ld16s(DisasContext *s, DisasOps *o) +static DisasJumpType op_ld16s(DisasContext *s, DisasOps *o) { tcg_gen_qemu_ld16s(o->out, o->in2, get_mem_index(s)); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_ld16u(DisasContext *s, DisasOps *o) +static DisasJumpType op_ld16u(DisasContext *s, DisasOps *o) { tcg_gen_qemu_ld16u(o->out, o->in2, get_mem_index(s)); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_ld32s(DisasContext *s, DisasOps *o) +static DisasJumpType op_ld32s(DisasContext *s, DisasOps *o) { tcg_gen_qemu_ld32s(o->out, o->in2, get_mem_index(s)); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_ld32u(DisasContext *s, DisasOps *o) +static DisasJumpType op_ld32u(DisasContext *s, DisasOps *o) { tcg_gen_qemu_ld32u(o->out, o->in2, get_mem_index(s)); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_ld64(DisasContext *s, DisasOps *o) +static DisasJumpType op_ld64(DisasContext *s, DisasOps *o) { tcg_gen_qemu_ld64(o->out, o->in2, get_mem_index(s)); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_lat(DisasContext *s, DisasOps *o) +static DisasJumpType op_lat(DisasContext *s, DisasOps *o) { TCGLabel *lab =3D gen_new_label(); store_reg32_i64(get_field(s->fields, r1), o->in2); @@ -2666,10 +2662,10 @@ static ExitStatus op_lat(DisasContext *s, DisasOps = *o) tcg_gen_brcondi_i64(TCG_COND_NE, o->in2, 0, lab); gen_trap(s); gen_set_label(lab); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_lgat(DisasContext *s, DisasOps *o) +static DisasJumpType op_lgat(DisasContext *s, DisasOps *o) { TCGLabel *lab =3D gen_new_label(); tcg_gen_qemu_ld64(o->out, o->in2, get_mem_index(s)); @@ -2677,10 +2673,10 @@ static ExitStatus op_lgat(DisasContext *s, DisasOps= *o) tcg_gen_brcondi_i64(TCG_COND_NE, o->out, 0, lab); gen_trap(s); gen_set_label(lab); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_lfhat(DisasContext *s, DisasOps *o) +static DisasJumpType op_lfhat(DisasContext *s, DisasOps *o) { TCGLabel *lab =3D gen_new_label(); store_reg32h_i64(get_field(s->fields, r1), o->in2); @@ -2688,10 +2684,10 @@ static ExitStatus op_lfhat(DisasContext *s, DisasOp= s *o) tcg_gen_brcondi_i64(TCG_COND_NE, o->in2, 0, lab); gen_trap(s); gen_set_label(lab); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_llgfat(DisasContext *s, DisasOps *o) +static DisasJumpType op_llgfat(DisasContext *s, DisasOps *o) { TCGLabel *lab =3D gen_new_label(); tcg_gen_qemu_ld32u(o->out, o->in2, get_mem_index(s)); @@ -2699,10 +2695,10 @@ static ExitStatus op_llgfat(DisasContext *s, DisasO= ps *o) tcg_gen_brcondi_i64(TCG_COND_NE, o->out, 0, lab); gen_trap(s); gen_set_label(lab); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_llgtat(DisasContext *s, DisasOps *o) +static DisasJumpType op_llgtat(DisasContext *s, DisasOps *o) { TCGLabel *lab =3D gen_new_label(); tcg_gen_andi_i64(o->out, o->in2, 0x7fffffff); @@ -2710,10 +2706,10 @@ static ExitStatus op_llgtat(DisasContext *s, DisasO= ps *o) tcg_gen_brcondi_i64(TCG_COND_NE, o->out, 0, lab); gen_trap(s); gen_set_label(lab); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_loc(DisasContext *s, DisasOps *o) +static DisasJumpType op_loc(DisasContext *s, DisasOps *o) { DisasCompare c; =20 @@ -2740,11 +2736,11 @@ static ExitStatus op_loc(DisasContext *s, DisasOps = *o) tcg_temp_free_i64(z); } =20 - return NO_EXIT; + return DISAS_NEXT; } =20 #ifndef CONFIG_USER_ONLY -static ExitStatus op_lctl(DisasContext *s, DisasOps *o) +static DisasJumpType op_lctl(DisasContext *s, DisasOps *o) { TCGv_i32 r1 =3D tcg_const_i32(get_field(s->fields, r1)); TCGv_i32 r3 =3D tcg_const_i32(get_field(s->fields, r3)); @@ -2753,10 +2749,10 @@ static ExitStatus op_lctl(DisasContext *s, DisasOps= *o) tcg_temp_free_i32(r1); tcg_temp_free_i32(r3); /* Exit to main loop to reevaluate s390_cpu_exec_interrupt. */ - return EXIT_PC_STALE_NOCHAIN; + return DISAS_PC_STALE_NOCHAIN; } =20 -static ExitStatus op_lctlg(DisasContext *s, DisasOps *o) +static DisasJumpType op_lctlg(DisasContext *s, DisasOps *o) { TCGv_i32 r1 =3D tcg_const_i32(get_field(s->fields, r1)); TCGv_i32 r3 =3D tcg_const_i32(get_field(s->fields, r3)); @@ -2765,26 +2761,26 @@ static ExitStatus op_lctlg(DisasContext *s, DisasOp= s *o) tcg_temp_free_i32(r1); tcg_temp_free_i32(r3); /* Exit to main loop to reevaluate s390_cpu_exec_interrupt. */ - return EXIT_PC_STALE_NOCHAIN; + return DISAS_PC_STALE_NOCHAIN; } =20 -static ExitStatus op_lra(DisasContext *s, DisasOps *o) +static DisasJumpType op_lra(DisasContext *s, DisasOps *o) { check_privileged(s); gen_helper_lra(o->out, cpu_env, o->in2); set_cc_static(s); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_lpp(DisasContext *s, DisasOps *o) +static DisasJumpType op_lpp(DisasContext *s, DisasOps *o) { check_privileged(s); =20 tcg_gen_st_i64(o->in2, cpu_env, offsetof(CPUS390XState, pp)); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_lpsw(DisasContext *s, DisasOps *o) +static DisasJumpType op_lpsw(DisasContext *s, DisasOps *o) { TCGv_i64 t1, t2; =20 @@ -2801,10 +2797,10 @@ static ExitStatus op_lpsw(DisasContext *s, DisasOps= *o) gen_helper_load_psw(cpu_env, t1, t2); tcg_temp_free_i64(t1); tcg_temp_free_i64(t2); - return EXIT_NORETURN; + return DISAS_NORETURN; } =20 -static ExitStatus op_lpswe(DisasContext *s, DisasOps *o) +static DisasJumpType op_lpswe(DisasContext *s, DisasOps *o) { TCGv_i64 t1, t2; =20 @@ -2819,21 +2815,21 @@ static ExitStatus op_lpswe(DisasContext *s, DisasOp= s *o) gen_helper_load_psw(cpu_env, t1, t2); tcg_temp_free_i64(t1); tcg_temp_free_i64(t2); - return EXIT_NORETURN; + return DISAS_NORETURN; } #endif =20 -static ExitStatus op_lam(DisasContext *s, DisasOps *o) +static DisasJumpType op_lam(DisasContext *s, DisasOps *o) { TCGv_i32 r1 =3D tcg_const_i32(get_field(s->fields, r1)); TCGv_i32 r3 =3D tcg_const_i32(get_field(s->fields, r3)); gen_helper_lam(cpu_env, r1, o->in2, r3); tcg_temp_free_i32(r1); tcg_temp_free_i32(r3); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_lm32(DisasContext *s, DisasOps *o) +static DisasJumpType op_lm32(DisasContext *s, DisasOps *o) { int r1 =3D get_field(s->fields, r1); int r3 =3D get_field(s->fields, r3); @@ -2845,7 +2841,7 @@ static ExitStatus op_lm32(DisasContext *s, DisasOps *= o) tcg_gen_qemu_ld32u(t1, o->in2, get_mem_index(s)); store_reg32_i64(r1, t1); tcg_temp_free(t1); - return NO_EXIT; + return DISAS_NEXT; } =20 /* First load the values of the first and last registers to trigger @@ -2861,7 +2857,7 @@ static ExitStatus op_lm32(DisasContext *s, DisasOps *= o) if (((r1 + 1) & 15) =3D=3D r3) { tcg_temp_free(t2); tcg_temp_free(t1); - return NO_EXIT; + return DISAS_NEXT; } =20 /* Then load the remaining registers. Page fault can't occur. */ @@ -2876,10 +2872,10 @@ static ExitStatus op_lm32(DisasContext *s, DisasOps= *o) tcg_temp_free(t2); tcg_temp_free(t1); =20 - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_lmh(DisasContext *s, DisasOps *o) +static DisasJumpType op_lmh(DisasContext *s, DisasOps *o) { int r1 =3D get_field(s->fields, r1); int r3 =3D get_field(s->fields, r3); @@ -2891,7 +2887,7 @@ static ExitStatus op_lmh(DisasContext *s, DisasOps *o) tcg_gen_qemu_ld32u(t1, o->in2, get_mem_index(s)); store_reg32h_i64(r1, t1); tcg_temp_free(t1); - return NO_EXIT; + return DISAS_NEXT; } =20 /* First load the values of the first and last registers to trigger @@ -2907,7 +2903,7 @@ static ExitStatus op_lmh(DisasContext *s, DisasOps *o) if (((r1 + 1) & 15) =3D=3D r3) { tcg_temp_free(t2); tcg_temp_free(t1); - return NO_EXIT; + return DISAS_NEXT; } =20 /* Then load the remaining registers. Page fault can't occur. */ @@ -2922,10 +2918,10 @@ static ExitStatus op_lmh(DisasContext *s, DisasOps = *o) tcg_temp_free(t2); tcg_temp_free(t1); =20 - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_lm64(DisasContext *s, DisasOps *o) +static DisasJumpType op_lm64(DisasContext *s, DisasOps *o) { int r1 =3D get_field(s->fields, r1); int r3 =3D get_field(s->fields, r3); @@ -2934,7 +2930,7 @@ static ExitStatus op_lm64(DisasContext *s, DisasOps *= o) /* Only one register to read. */ if (unlikely(r1 =3D=3D r3)) { tcg_gen_qemu_ld64(regs[r1], o->in2, get_mem_index(s)); - return NO_EXIT; + return DISAS_NEXT; } =20 /* First load the values of the first and last registers to trigger @@ -2950,7 +2946,7 @@ static ExitStatus op_lm64(DisasContext *s, DisasOps *= o) /* Only two registers to read. */ if (((r1 + 1) & 15) =3D=3D r3) { tcg_temp_free(t1); - return NO_EXIT; + return DISAS_NEXT; } =20 /* Then load the remaining registers. Page fault can't occur. */ @@ -2963,10 +2959,10 @@ static ExitStatus op_lm64(DisasContext *s, DisasOps= *o) } tcg_temp_free(t1); =20 - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_lpd(DisasContext *s, DisasOps *o) +static DisasJumpType op_lpd(DisasContext *s, DisasOps *o) { TCGv_i64 a1, a2; TCGMemOp mop =3D s->insn->data; @@ -2976,7 +2972,7 @@ static ExitStatus op_lpd(DisasContext *s, DisasOps *o) update_psw_addr(s); update_cc_op(s); gen_exception(EXCP_ATOMIC); - return EXIT_NORETURN; + return DISAS_NORETURN; } =20 /* In a serial context, perform the two loads ... */ @@ -2989,10 +2985,10 @@ static ExitStatus op_lpd(DisasContext *s, DisasOps = *o) =20 /* ... and indicate that we performed them while interlocked. */ gen_op_movi_cc(s, 0); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_lpq(DisasContext *s, DisasOps *o) +static DisasJumpType op_lpq(DisasContext *s, DisasOps *o) { if (tb_cflags(s->tb) & CF_PARALLEL) { gen_helper_lpq_parallel(o->out, cpu_env, o->in2); @@ -3000,41 +2996,41 @@ static ExitStatus op_lpq(DisasContext *s, DisasOps = *o) gen_helper_lpq(o->out, cpu_env, o->in2); } return_low128(o->out2); - return NO_EXIT; + return DISAS_NEXT; } =20 #ifndef CONFIG_USER_ONLY -static ExitStatus op_lura(DisasContext *s, DisasOps *o) +static DisasJumpType op_lura(DisasContext *s, DisasOps *o) { check_privileged(s); gen_helper_lura(o->out, cpu_env, o->in2); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_lurag(DisasContext *s, DisasOps *o) +static DisasJumpType op_lurag(DisasContext *s, DisasOps *o) { check_privileged(s); gen_helper_lurag(o->out, cpu_env, o->in2); - return NO_EXIT; + return DISAS_NEXT; } #endif =20 -static ExitStatus op_lzrb(DisasContext *s, DisasOps *o) +static DisasJumpType op_lzrb(DisasContext *s, DisasOps *o) { tcg_gen_andi_i64(o->out, o->in2, -256); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_mov2(DisasContext *s, DisasOps *o) +static DisasJumpType op_mov2(DisasContext *s, DisasOps *o) { o->out =3D o->in2; o->g_out =3D o->g_in2; o->in2 =3D NULL; o->g_in2 =3D false; - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_mov2e(DisasContext *s, DisasOps *o) +static DisasJumpType op_mov2e(DisasContext *s, DisasOps *o) { int b2 =3D get_field(s->fields, b2); TCGv ar1 =3D tcg_temp_new_i64(); @@ -3066,10 +3062,10 @@ static ExitStatus op_mov2e(DisasContext *s, DisasOp= s *o) tcg_gen_st32_i64(ar1, cpu_env, offsetof(CPUS390XState, aregs[1])); tcg_temp_free_i64(ar1); =20 - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_movx(DisasContext *s, DisasOps *o) +static DisasJumpType op_movx(DisasContext *s, DisasOps *o) { o->out =3D o->in1; o->out2 =3D o->in2; @@ -3078,26 +3074,26 @@ static ExitStatus op_movx(DisasContext *s, DisasOps= *o) o->in1 =3D NULL; o->in2 =3D NULL; o->g_in1 =3D o->g_in2 =3D false; - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_mvc(DisasContext *s, DisasOps *o) +static DisasJumpType op_mvc(DisasContext *s, DisasOps *o) { TCGv_i32 l =3D tcg_const_i32(get_field(s->fields, l1)); gen_helper_mvc(cpu_env, l, o->addr1, o->in2); tcg_temp_free_i32(l); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_mvcin(DisasContext *s, DisasOps *o) +static DisasJumpType op_mvcin(DisasContext *s, DisasOps *o) { TCGv_i32 l =3D tcg_const_i32(get_field(s->fields, l1)); gen_helper_mvcin(cpu_env, l, o->addr1, o->in2); tcg_temp_free_i32(l); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_mvcl(DisasContext *s, DisasOps *o) +static DisasJumpType op_mvcl(DisasContext *s, DisasOps *o) { int r1 =3D get_field(s->fields, r1); int r2 =3D get_field(s->fields, r2); @@ -3106,7 +3102,7 @@ static ExitStatus op_mvcl(DisasContext *s, DisasOps *= o) /* r1 and r2 must be even. */ if (r1 & 1 || r2 & 1) { gen_program_exception(s, PGM_SPECIFICATION); - return EXIT_NORETURN; + return DISAS_NORETURN; } =20 t1 =3D tcg_const_i32(r1); @@ -3115,10 +3111,10 @@ static ExitStatus op_mvcl(DisasContext *s, DisasOps= *o) tcg_temp_free_i32(t1); tcg_temp_free_i32(t2); set_cc_static(s); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_mvcle(DisasContext *s, DisasOps *o) +static DisasJumpType op_mvcle(DisasContext *s, DisasOps *o) { int r1 =3D get_field(s->fields, r1); int r3 =3D get_field(s->fields, r3); @@ -3127,7 +3123,7 @@ static ExitStatus op_mvcle(DisasContext *s, DisasOps = *o) /* r1 and r3 must be even. */ if (r1 & 1 || r3 & 1) { gen_program_exception(s, PGM_SPECIFICATION); - return EXIT_NORETURN; + return DISAS_NORETURN; } =20 t1 =3D tcg_const_i32(r1); @@ -3136,10 +3132,10 @@ static ExitStatus op_mvcle(DisasContext *s, DisasOp= s *o) tcg_temp_free_i32(t1); tcg_temp_free_i32(t3); set_cc_static(s); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_mvclu(DisasContext *s, DisasOps *o) +static DisasJumpType op_mvclu(DisasContext *s, DisasOps *o) { int r1 =3D get_field(s->fields, r1); int r3 =3D get_field(s->fields, r3); @@ -3148,7 +3144,7 @@ static ExitStatus op_mvclu(DisasContext *s, DisasOps = *o) /* r1 and r3 must be even. */ if (r1 & 1 || r3 & 1) { gen_program_exception(s, PGM_SPECIFICATION); - return EXIT_NORETURN; + return DISAS_NORETURN; } =20 t1 =3D tcg_const_i32(r1); @@ -3157,151 +3153,151 @@ static ExitStatus op_mvclu(DisasContext *s, Disas= Ops *o) tcg_temp_free_i32(t1); tcg_temp_free_i32(t3); set_cc_static(s); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_mvcos(DisasContext *s, DisasOps *o) +static DisasJumpType op_mvcos(DisasContext *s, DisasOps *o) { int r3 =3D get_field(s->fields, r3); gen_helper_mvcos(cc_op, cpu_env, o->addr1, o->in2, regs[r3]); set_cc_static(s); - return NO_EXIT; + return DISAS_NEXT; } =20 #ifndef CONFIG_USER_ONLY -static ExitStatus op_mvcp(DisasContext *s, DisasOps *o) +static DisasJumpType op_mvcp(DisasContext *s, DisasOps *o) { int r1 =3D get_field(s->fields, l1); check_privileged(s); gen_helper_mvcp(cc_op, cpu_env, regs[r1], o->addr1, o->in2); set_cc_static(s); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_mvcs(DisasContext *s, DisasOps *o) +static DisasJumpType op_mvcs(DisasContext *s, DisasOps *o) { int r1 =3D get_field(s->fields, l1); check_privileged(s); gen_helper_mvcs(cc_op, cpu_env, regs[r1], o->addr1, o->in2); set_cc_static(s); - return NO_EXIT; + return DISAS_NEXT; } #endif =20 -static ExitStatus op_mvn(DisasContext *s, DisasOps *o) +static DisasJumpType op_mvn(DisasContext *s, DisasOps *o) { TCGv_i32 l =3D tcg_const_i32(get_field(s->fields, l1)); gen_helper_mvn(cpu_env, l, o->addr1, o->in2); tcg_temp_free_i32(l); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_mvo(DisasContext *s, DisasOps *o) +static DisasJumpType op_mvo(DisasContext *s, DisasOps *o) { TCGv_i32 l =3D tcg_const_i32(get_field(s->fields, l1)); gen_helper_mvo(cpu_env, l, o->addr1, o->in2); tcg_temp_free_i32(l); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_mvpg(DisasContext *s, DisasOps *o) +static DisasJumpType op_mvpg(DisasContext *s, DisasOps *o) { gen_helper_mvpg(cc_op, cpu_env, regs[0], o->in1, o->in2); set_cc_static(s); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_mvst(DisasContext *s, DisasOps *o) +static DisasJumpType op_mvst(DisasContext *s, DisasOps *o) { gen_helper_mvst(o->in1, cpu_env, regs[0], o->in1, o->in2); set_cc_static(s); return_low128(o->in2); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_mvz(DisasContext *s, DisasOps *o) +static DisasJumpType op_mvz(DisasContext *s, DisasOps *o) { TCGv_i32 l =3D tcg_const_i32(get_field(s->fields, l1)); gen_helper_mvz(cpu_env, l, o->addr1, o->in2); tcg_temp_free_i32(l); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_mul(DisasContext *s, DisasOps *o) +static DisasJumpType op_mul(DisasContext *s, DisasOps *o) { tcg_gen_mul_i64(o->out, o->in1, o->in2); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_mul128(DisasContext *s, DisasOps *o) +static DisasJumpType op_mul128(DisasContext *s, DisasOps *o) { tcg_gen_mulu2_i64(o->out2, o->out, o->in1, o->in2); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_meeb(DisasContext *s, DisasOps *o) +static DisasJumpType op_meeb(DisasContext *s, DisasOps *o) { gen_helper_meeb(o->out, cpu_env, o->in1, o->in2); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_mdeb(DisasContext *s, DisasOps *o) +static DisasJumpType op_mdeb(DisasContext *s, DisasOps *o) { gen_helper_mdeb(o->out, cpu_env, o->in1, o->in2); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_mdb(DisasContext *s, DisasOps *o) +static DisasJumpType op_mdb(DisasContext *s, DisasOps *o) { gen_helper_mdb(o->out, cpu_env, o->in1, o->in2); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_mxb(DisasContext *s, DisasOps *o) +static DisasJumpType op_mxb(DisasContext *s, DisasOps *o) { gen_helper_mxb(o->out, cpu_env, o->out, o->out2, o->in1, o->in2); return_low128(o->out2); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_mxdb(DisasContext *s, DisasOps *o) +static DisasJumpType op_mxdb(DisasContext *s, DisasOps *o) { gen_helper_mxdb(o->out, cpu_env, o->out, o->out2, o->in2); return_low128(o->out2); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_maeb(DisasContext *s, DisasOps *o) +static DisasJumpType op_maeb(DisasContext *s, DisasOps *o) { TCGv_i64 r3 =3D load_freg32_i64(get_field(s->fields, r3)); gen_helper_maeb(o->out, cpu_env, o->in1, o->in2, r3); tcg_temp_free_i64(r3); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_madb(DisasContext *s, DisasOps *o) +static DisasJumpType op_madb(DisasContext *s, DisasOps *o) { int r3 =3D get_field(s->fields, r3); gen_helper_madb(o->out, cpu_env, o->in1, o->in2, fregs[r3]); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_mseb(DisasContext *s, DisasOps *o) +static DisasJumpType op_mseb(DisasContext *s, DisasOps *o) { TCGv_i64 r3 =3D load_freg32_i64(get_field(s->fields, r3)); gen_helper_mseb(o->out, cpu_env, o->in1, o->in2, r3); tcg_temp_free_i64(r3); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_msdb(DisasContext *s, DisasOps *o) +static DisasJumpType op_msdb(DisasContext *s, DisasOps *o) { int r3 =3D get_field(s->fields, r3); gen_helper_msdb(o->out, cpu_env, o->in1, o->in2, fregs[r3]); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_nabs(DisasContext *s, DisasOps *o) +static DisasJumpType op_nabs(DisasContext *s, DisasOps *o) { TCGv_i64 z, n; z =3D tcg_const_i64(0); @@ -3310,78 +3306,78 @@ static ExitStatus op_nabs(DisasContext *s, DisasOps= *o) tcg_gen_movcond_i64(TCG_COND_GE, o->out, o->in2, z, n, o->in2); tcg_temp_free_i64(n); tcg_temp_free_i64(z); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_nabsf32(DisasContext *s, DisasOps *o) +static DisasJumpType op_nabsf32(DisasContext *s, DisasOps *o) { tcg_gen_ori_i64(o->out, o->in2, 0x80000000ull); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_nabsf64(DisasContext *s, DisasOps *o) +static DisasJumpType op_nabsf64(DisasContext *s, DisasOps *o) { tcg_gen_ori_i64(o->out, o->in2, 0x8000000000000000ull); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_nabsf128(DisasContext *s, DisasOps *o) +static DisasJumpType op_nabsf128(DisasContext *s, DisasOps *o) { tcg_gen_ori_i64(o->out, o->in1, 0x8000000000000000ull); tcg_gen_mov_i64(o->out2, o->in2); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_nc(DisasContext *s, DisasOps *o) +static DisasJumpType op_nc(DisasContext *s, DisasOps *o) { TCGv_i32 l =3D tcg_const_i32(get_field(s->fields, l1)); gen_helper_nc(cc_op, cpu_env, l, o->addr1, o->in2); tcg_temp_free_i32(l); set_cc_static(s); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_neg(DisasContext *s, DisasOps *o) +static DisasJumpType op_neg(DisasContext *s, DisasOps *o) { tcg_gen_neg_i64(o->out, o->in2); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_negf32(DisasContext *s, DisasOps *o) +static DisasJumpType op_negf32(DisasContext *s, DisasOps *o) { tcg_gen_xori_i64(o->out, o->in2, 0x80000000ull); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_negf64(DisasContext *s, DisasOps *o) +static DisasJumpType op_negf64(DisasContext *s, DisasOps *o) { tcg_gen_xori_i64(o->out, o->in2, 0x8000000000000000ull); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_negf128(DisasContext *s, DisasOps *o) +static DisasJumpType op_negf128(DisasContext *s, DisasOps *o) { tcg_gen_xori_i64(o->out, o->in1, 0x8000000000000000ull); tcg_gen_mov_i64(o->out2, o->in2); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_oc(DisasContext *s, DisasOps *o) +static DisasJumpType op_oc(DisasContext *s, DisasOps *o) { TCGv_i32 l =3D tcg_const_i32(get_field(s->fields, l1)); gen_helper_oc(cc_op, cpu_env, l, o->addr1, o->in2); tcg_temp_free_i32(l); set_cc_static(s); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_or(DisasContext *s, DisasOps *o) +static DisasJumpType op_or(DisasContext *s, DisasOps *o) { tcg_gen_or_i64(o->out, o->in1, o->in2); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_ori(DisasContext *s, DisasOps *o) +static DisasJumpType op_ori(DisasContext *s, DisasOps *o) { int shift =3D s->insn->data & 0xff; int size =3D s->insn->data >> 8; @@ -3394,10 +3390,10 @@ static ExitStatus op_ori(DisasContext *s, DisasOps = *o) /* Produce the CC from only the bits manipulated. */ tcg_gen_andi_i64(cc_dst, o->out, mask); set_cc_nz_u64(s, cc_dst); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_oi(DisasContext *s, DisasOps *o) +static DisasJumpType op_oi(DisasContext *s, DisasOps *o) { o->in1 =3D tcg_temp_new_i64(); =20 @@ -3415,18 +3411,18 @@ static ExitStatus op_oi(DisasContext *s, DisasOps *= o) if (!s390_has_feat(S390_FEAT_INTERLOCKED_ACCESS_2)) { tcg_gen_qemu_st_tl(o->out, o->addr1, get_mem_index(s), s->insn->da= ta); } - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_pack(DisasContext *s, DisasOps *o) +static DisasJumpType op_pack(DisasContext *s, DisasOps *o) { TCGv_i32 l =3D tcg_const_i32(get_field(s->fields, l1)); gen_helper_pack(cpu_env, l, o->addr1, o->in2); tcg_temp_free_i32(l); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_pka(DisasContext *s, DisasOps *o) +static DisasJumpType op_pka(DisasContext *s, DisasOps *o) { int l2 =3D get_field(s->fields, l2) + 1; TCGv_i32 l; @@ -3434,15 +3430,15 @@ static ExitStatus op_pka(DisasContext *s, DisasOps = *o) /* The length must not exceed 32 bytes. */ if (l2 > 32) { gen_program_exception(s, PGM_SPECIFICATION); - return EXIT_NORETURN; + return DISAS_NORETURN; } l =3D tcg_const_i32(l2); gen_helper_pka(cpu_env, o->addr1, o->in2, l); tcg_temp_free_i32(l); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_pku(DisasContext *s, DisasOps *o) +static DisasJumpType op_pku(DisasContext *s, DisasOps *o) { int l2 =3D get_field(s->fields, l2) + 1; TCGv_i32 l; @@ -3450,30 +3446,30 @@ static ExitStatus op_pku(DisasContext *s, DisasOps = *o) /* The length must be even and should not exceed 64 bytes. */ if ((l2 & 1) || (l2 > 64)) { gen_program_exception(s, PGM_SPECIFICATION); - return EXIT_NORETURN; + return DISAS_NORETURN; } l =3D tcg_const_i32(l2); gen_helper_pku(cpu_env, o->addr1, o->in2, l); tcg_temp_free_i32(l); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_popcnt(DisasContext *s, DisasOps *o) +static DisasJumpType op_popcnt(DisasContext *s, DisasOps *o) { gen_helper_popcnt(o->out, o->in2); - return NO_EXIT; + return DISAS_NEXT; } =20 #ifndef CONFIG_USER_ONLY -static ExitStatus op_ptlb(DisasContext *s, DisasOps *o) +static DisasJumpType op_ptlb(DisasContext *s, DisasOps *o) { check_privileged(s); gen_helper_ptlb(cpu_env); - return NO_EXIT; + return DISAS_NEXT; } #endif =20 -static ExitStatus op_risbg(DisasContext *s, DisasOps *o) +static DisasJumpType op_risbg(DisasContext *s, DisasOps *o) { int i3 =3D get_field(s->fields, i3); int i4 =3D get_field(s->fields, i4); @@ -3531,7 +3527,7 @@ static ExitStatus op_risbg(DisasContext *s, DisasOps = *o) /* In some cases we can implement this with extract. */ if (imask =3D=3D 0 && pos =3D=3D 0 && len > 0 && len <=3D rot) { tcg_gen_extract_i64(o->out, o->in2, 64 - rot, len); - return NO_EXIT; + return DISAS_NEXT; } =20 /* In some cases we can implement this with deposit. */ @@ -3560,10 +3556,10 @@ static ExitStatus op_risbg(DisasContext *s, DisasOp= s *o) tcg_gen_andi_i64(o->out, o->out, imask); tcg_gen_or_i64(o->out, o->out, o->in2); } - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_rosbg(DisasContext *s, DisasOps *o) +static DisasJumpType op_rosbg(DisasContext *s, DisasOps *o) { int i3 =3D get_field(s->fields, i3); int i4 =3D get_field(s->fields, i4); @@ -3613,28 +3609,28 @@ static ExitStatus op_rosbg(DisasContext *s, DisasOp= s *o) /* Set the CC. */ tcg_gen_andi_i64(cc_dst, o->out, mask); set_cc_nz_u64(s, cc_dst); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_rev16(DisasContext *s, DisasOps *o) +static DisasJumpType op_rev16(DisasContext *s, DisasOps *o) { tcg_gen_bswap16_i64(o->out, o->in2); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_rev32(DisasContext *s, DisasOps *o) +static DisasJumpType op_rev32(DisasContext *s, DisasOps *o) { tcg_gen_bswap32_i64(o->out, o->in2); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_rev64(DisasContext *s, DisasOps *o) +static DisasJumpType op_rev64(DisasContext *s, DisasOps *o) { tcg_gen_bswap64_i64(o->out, o->in2); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_rll32(DisasContext *s, DisasOps *o) +static DisasJumpType op_rll32(DisasContext *s, DisasOps *o) { TCGv_i32 t1 =3D tcg_temp_new_i32(); TCGv_i32 t2 =3D tcg_temp_new_i32(); @@ -3646,34 +3642,34 @@ static ExitStatus op_rll32(DisasContext *s, DisasOp= s *o) tcg_temp_free_i32(t1); tcg_temp_free_i32(t2); tcg_temp_free_i32(to); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_rll64(DisasContext *s, DisasOps *o) +static DisasJumpType op_rll64(DisasContext *s, DisasOps *o) { tcg_gen_rotl_i64(o->out, o->in1, o->in2); - return NO_EXIT; + return DISAS_NEXT; } =20 #ifndef CONFIG_USER_ONLY -static ExitStatus op_rrbe(DisasContext *s, DisasOps *o) +static DisasJumpType op_rrbe(DisasContext *s, DisasOps *o) { check_privileged(s); gen_helper_rrbe(cc_op, cpu_env, o->in2); set_cc_static(s); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_sacf(DisasContext *s, DisasOps *o) +static DisasJumpType op_sacf(DisasContext *s, DisasOps *o) { check_privileged(s); gen_helper_sacf(cpu_env, o->in2); /* Addressing mode has changed, so end the block. */ - return EXIT_PC_STALE; + return DISAS_PC_STALE; } #endif =20 -static ExitStatus op_sam(DisasContext *s, DisasOps *o) +static DisasJumpType op_sam(DisasContext *s, DisasOps *o) { int sam =3D s->insn->data; TCGv_i64 tsam; @@ -3696,7 +3692,7 @@ static ExitStatus op_sam(DisasContext *s, DisasOps *o) documents that Bad Things Happen two bytes before the end. */ if (s->pc & ~mask) { gen_program_exception(s, PGM_SPECIFICATION); - return EXIT_NORETURN; + return DISAS_NORETURN; } s->next_pc &=3D mask; =20 @@ -3705,64 +3701,64 @@ static ExitStatus op_sam(DisasContext *s, DisasOps = *o) tcg_temp_free_i64(tsam); =20 /* Always exit the TB, since we (may have) changed execution mode. */ - return EXIT_PC_STALE; + return DISAS_PC_STALE; } =20 -static ExitStatus op_sar(DisasContext *s, DisasOps *o) +static DisasJumpType op_sar(DisasContext *s, DisasOps *o) { int r1 =3D get_field(s->fields, r1); tcg_gen_st32_i64(o->in2, cpu_env, offsetof(CPUS390XState, aregs[r1])); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_seb(DisasContext *s, DisasOps *o) +static DisasJumpType op_seb(DisasContext *s, DisasOps *o) { gen_helper_seb(o->out, cpu_env, o->in1, o->in2); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_sdb(DisasContext *s, DisasOps *o) +static DisasJumpType op_sdb(DisasContext *s, DisasOps *o) { gen_helper_sdb(o->out, cpu_env, o->in1, o->in2); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_sxb(DisasContext *s, DisasOps *o) +static DisasJumpType op_sxb(DisasContext *s, DisasOps *o) { gen_helper_sxb(o->out, cpu_env, o->out, o->out2, o->in1, o->in2); return_low128(o->out2); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_sqeb(DisasContext *s, DisasOps *o) +static DisasJumpType op_sqeb(DisasContext *s, DisasOps *o) { gen_helper_sqeb(o->out, cpu_env, o->in2); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_sqdb(DisasContext *s, DisasOps *o) +static DisasJumpType op_sqdb(DisasContext *s, DisasOps *o) { gen_helper_sqdb(o->out, cpu_env, o->in2); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_sqxb(DisasContext *s, DisasOps *o) +static DisasJumpType op_sqxb(DisasContext *s, DisasOps *o) { gen_helper_sqxb(o->out, cpu_env, o->in1, o->in2); return_low128(o->out2); - return NO_EXIT; + return DISAS_NEXT; } =20 #ifndef CONFIG_USER_ONLY -static ExitStatus op_servc(DisasContext *s, DisasOps *o) +static DisasJumpType op_servc(DisasContext *s, DisasOps *o) { check_privileged(s); gen_helper_servc(cc_op, cpu_env, o->in2, o->in1); set_cc_static(s); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_sigp(DisasContext *s, DisasOps *o) +static DisasJumpType op_sigp(DisasContext *s, DisasOps *o) { TCGv_i32 r1 =3D tcg_const_i32(get_field(s->fields, r1)); TCGv_i32 r3 =3D tcg_const_i32(get_field(s->fields, r3)); @@ -3771,11 +3767,11 @@ static ExitStatus op_sigp(DisasContext *s, DisasOps= *o) set_cc_static(s); tcg_temp_free_i32(r1); tcg_temp_free_i32(r3); - return NO_EXIT; + return DISAS_NEXT; } #endif =20 -static ExitStatus op_soc(DisasContext *s, DisasOps *o) +static DisasJumpType op_soc(DisasContext *s, DisasOps *o) { DisasCompare c; TCGv_i64 a, h; @@ -3817,10 +3813,10 @@ static ExitStatus op_soc(DisasContext *s, DisasOps = *o) tcg_temp_free_i64(a); =20 gen_set_label(lab); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_sla(DisasContext *s, DisasOps *o) +static DisasJumpType op_sla(DisasContext *s, DisasOps *o) { uint64_t sign =3D 1ull << s->insn->data; enum cc_op cco =3D s->insn->data =3D=3D 31 ? CC_OP_SLA_32 : CC_OP_SLA_= 64; @@ -3831,40 +3827,40 @@ static ExitStatus op_sla(DisasContext *s, DisasOps = *o) tcg_gen_andi_i64(o->out, o->out, ~sign); tcg_gen_andi_i64(o->in1, o->in1, sign); tcg_gen_or_i64(o->out, o->out, o->in1); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_sll(DisasContext *s, DisasOps *o) +static DisasJumpType op_sll(DisasContext *s, DisasOps *o) { tcg_gen_shl_i64(o->out, o->in1, o->in2); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_sra(DisasContext *s, DisasOps *o) +static DisasJumpType op_sra(DisasContext *s, DisasOps *o) { tcg_gen_sar_i64(o->out, o->in1, o->in2); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_srl(DisasContext *s, DisasOps *o) +static DisasJumpType op_srl(DisasContext *s, DisasOps *o) { tcg_gen_shr_i64(o->out, o->in1, o->in2); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_sfpc(DisasContext *s, DisasOps *o) +static DisasJumpType op_sfpc(DisasContext *s, DisasOps *o) { gen_helper_sfpc(cpu_env, o->in2); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_sfas(DisasContext *s, DisasOps *o) +static DisasJumpType op_sfas(DisasContext *s, DisasOps *o) { gen_helper_sfas(cpu_env, o->in2); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_srnm(DisasContext *s, DisasOps *o) +static DisasJumpType op_srnm(DisasContext *s, DisasOps *o) { int b2 =3D get_field(s->fields, b2); int d2 =3D get_field(s->fields, d2); @@ -3901,10 +3897,10 @@ static ExitStatus op_srnm(DisasContext *s, DisasOps= *o) /* Then install the new FPC to set the rounding mode in fpu_status. */ gen_helper_sfpc(cpu_env, t2); tcg_temp_free_i64(t2); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_spm(DisasContext *s, DisasOps *o) +static DisasJumpType op_spm(DisasContext *s, DisasOps *o) { tcg_gen_extrl_i64_i32(cc_op, o->in1); tcg_gen_extract_i32(cc_op, cc_op, 28, 2); @@ -3912,10 +3908,10 @@ static ExitStatus op_spm(DisasContext *s, DisasOps = *o) =20 tcg_gen_shri_i64(o->in1, o->in1, 24); tcg_gen_deposit_i64(psw_mask, psw_mask, o->in1, PSW_SHIFT_MASK_PM, 4); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_ectg(DisasContext *s, DisasOps *o) +static DisasJumpType op_ectg(DisasContext *s, DisasOps *o) { int b1 =3D get_field(s->fields, b1); int d1 =3D get_field(s->fields, d1); @@ -3942,49 +3938,49 @@ static ExitStatus op_ectg(DisasContext *s, DisasOps= *o) tcg_gen_mov_i64(regs[1], o->in2); =20 tcg_temp_free_i64(tmp); - return NO_EXIT; + return DISAS_NEXT; } =20 #ifndef CONFIG_USER_ONLY -static ExitStatus op_spka(DisasContext *s, DisasOps *o) +static DisasJumpType op_spka(DisasContext *s, DisasOps *o) { check_privileged(s); tcg_gen_shri_i64(o->in2, o->in2, 4); tcg_gen_deposit_i64(psw_mask, psw_mask, o->in2, PSW_SHIFT_KEY, 4); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_sske(DisasContext *s, DisasOps *o) +static DisasJumpType op_sske(DisasContext *s, DisasOps *o) { check_privileged(s); gen_helper_sske(cpu_env, o->in1, o->in2); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_ssm(DisasContext *s, DisasOps *o) +static DisasJumpType op_ssm(DisasContext *s, DisasOps *o) { check_privileged(s); tcg_gen_deposit_i64(psw_mask, psw_mask, o->in2, 56, 8); /* Exit to main loop to reevaluate s390_cpu_exec_interrupt. */ - return EXIT_PC_STALE_NOCHAIN; + return DISAS_PC_STALE_NOCHAIN; } =20 -static ExitStatus op_stap(DisasContext *s, DisasOps *o) +static DisasJumpType op_stap(DisasContext *s, DisasOps *o) { check_privileged(s); tcg_gen_ld32u_i64(o->out, cpu_env, offsetof(CPUS390XState, core_id)); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_stck(DisasContext *s, DisasOps *o) +static DisasJumpType op_stck(DisasContext *s, DisasOps *o) { gen_helper_stck(o->out, cpu_env); /* ??? We don't implement clock states. */ gen_op_movi_cc(s, 0); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_stcke(DisasContext *s, DisasOps *o) +static DisasJumpType op_stcke(DisasContext *s, DisasOps *o) { TCGv_i64 c1 =3D tcg_temp_new_i64(); TCGv_i64 c2 =3D tcg_temp_new_i64(); @@ -4008,31 +4004,31 @@ static ExitStatus op_stcke(DisasContext *s, DisasOp= s *o) tcg_temp_free_i64(todpr); /* ??? We don't implement clock states. */ gen_op_movi_cc(s, 0); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_sckc(DisasContext *s, DisasOps *o) +static DisasJumpType op_sckc(DisasContext *s, DisasOps *o) { check_privileged(s); gen_helper_sckc(cpu_env, o->in2); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_sckpf(DisasContext *s, DisasOps *o) +static DisasJumpType op_sckpf(DisasContext *s, DisasOps *o) { check_privileged(s); gen_helper_sckpf(cpu_env, regs[0]); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_stckc(DisasContext *s, DisasOps *o) +static DisasJumpType op_stckc(DisasContext *s, DisasOps *o) { check_privileged(s); gen_helper_stckc(o->out, cpu_env); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_stctg(DisasContext *s, DisasOps *o) +static DisasJumpType op_stctg(DisasContext *s, DisasOps *o) { TCGv_i32 r1 =3D tcg_const_i32(get_field(s->fields, r1)); TCGv_i32 r3 =3D tcg_const_i32(get_field(s->fields, r3)); @@ -4040,10 +4036,10 @@ static ExitStatus op_stctg(DisasContext *s, DisasOp= s *o) gen_helper_stctg(cpu_env, r1, o->in2, r3); tcg_temp_free_i32(r1); tcg_temp_free_i32(r3); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_stctl(DisasContext *s, DisasOps *o) +static DisasJumpType op_stctl(DisasContext *s, DisasOps *o) { TCGv_i32 r1 =3D tcg_const_i32(get_field(s->fields, r1)); TCGv_i32 r3 =3D tcg_const_i32(get_field(s->fields, r3)); @@ -4051,187 +4047,187 @@ static ExitStatus op_stctl(DisasContext *s, Disas= Ops *o) gen_helper_stctl(cpu_env, r1, o->in2, r3); tcg_temp_free_i32(r1); tcg_temp_free_i32(r3); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_stidp(DisasContext *s, DisasOps *o) +static DisasJumpType op_stidp(DisasContext *s, DisasOps *o) { check_privileged(s); tcg_gen_ld_i64(o->out, cpu_env, offsetof(CPUS390XState, cpuid)); tcg_gen_qemu_st_i64(o->out, o->addr1, get_mem_index(s), MO_TEQ | MO_AL= IGN); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_spt(DisasContext *s, DisasOps *o) +static DisasJumpType op_spt(DisasContext *s, DisasOps *o) { check_privileged(s); gen_helper_spt(cpu_env, o->in2); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_stfl(DisasContext *s, DisasOps *o) +static DisasJumpType op_stfl(DisasContext *s, DisasOps *o) { check_privileged(s); gen_helper_stfl(cpu_env); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_stpt(DisasContext *s, DisasOps *o) +static DisasJumpType op_stpt(DisasContext *s, DisasOps *o) { check_privileged(s); gen_helper_stpt(o->out, cpu_env); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_stsi(DisasContext *s, DisasOps *o) +static DisasJumpType op_stsi(DisasContext *s, DisasOps *o) { check_privileged(s); gen_helper_stsi(cc_op, cpu_env, o->in2, regs[0], regs[1]); set_cc_static(s); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_spx(DisasContext *s, DisasOps *o) +static DisasJumpType op_spx(DisasContext *s, DisasOps *o) { check_privileged(s); gen_helper_spx(cpu_env, o->in2); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_xsch(DisasContext *s, DisasOps *o) +static DisasJumpType op_xsch(DisasContext *s, DisasOps *o) { check_privileged(s); gen_helper_xsch(cpu_env, regs[1]); set_cc_static(s); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_csch(DisasContext *s, DisasOps *o) +static DisasJumpType op_csch(DisasContext *s, DisasOps *o) { check_privileged(s); gen_helper_csch(cpu_env, regs[1]); set_cc_static(s); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_hsch(DisasContext *s, DisasOps *o) +static DisasJumpType op_hsch(DisasContext *s, DisasOps *o) { check_privileged(s); gen_helper_hsch(cpu_env, regs[1]); set_cc_static(s); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_msch(DisasContext *s, DisasOps *o) +static DisasJumpType op_msch(DisasContext *s, DisasOps *o) { check_privileged(s); gen_helper_msch(cpu_env, regs[1], o->in2); set_cc_static(s); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_rchp(DisasContext *s, DisasOps *o) +static DisasJumpType op_rchp(DisasContext *s, DisasOps *o) { check_privileged(s); gen_helper_rchp(cpu_env, regs[1]); set_cc_static(s); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_rsch(DisasContext *s, DisasOps *o) +static DisasJumpType op_rsch(DisasContext *s, DisasOps *o) { check_privileged(s); gen_helper_rsch(cpu_env, regs[1]); set_cc_static(s); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_sal(DisasContext *s, DisasOps *o) +static DisasJumpType op_sal(DisasContext *s, DisasOps *o) { check_privileged(s); gen_helper_sal(cpu_env, regs[1]); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_schm(DisasContext *s, DisasOps *o) +static DisasJumpType op_schm(DisasContext *s, DisasOps *o) { check_privileged(s); gen_helper_schm(cpu_env, regs[1], regs[2], o->in2); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_siga(DisasContext *s, DisasOps *o) +static DisasJumpType op_siga(DisasContext *s, DisasOps *o) { check_privileged(s); /* From KVM code: Not provided, set CC =3D 3 for subchannel not operat= ional */ gen_op_movi_cc(s, 3); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_stcps(DisasContext *s, DisasOps *o) +static DisasJumpType op_stcps(DisasContext *s, DisasOps *o) { check_privileged(s); /* The instruction is suppressed if not provided. */ - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_ssch(DisasContext *s, DisasOps *o) +static DisasJumpType op_ssch(DisasContext *s, DisasOps *o) { check_privileged(s); gen_helper_ssch(cpu_env, regs[1], o->in2); set_cc_static(s); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_stsch(DisasContext *s, DisasOps *o) +static DisasJumpType op_stsch(DisasContext *s, DisasOps *o) { check_privileged(s); gen_helper_stsch(cpu_env, regs[1], o->in2); set_cc_static(s); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_stcrw(DisasContext *s, DisasOps *o) +static DisasJumpType op_stcrw(DisasContext *s, DisasOps *o) { check_privileged(s); gen_helper_stcrw(cpu_env, o->in2); set_cc_static(s); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_tpi(DisasContext *s, DisasOps *o) +static DisasJumpType op_tpi(DisasContext *s, DisasOps *o) { check_privileged(s); gen_helper_tpi(cc_op, cpu_env, o->addr1); set_cc_static(s); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_tsch(DisasContext *s, DisasOps *o) +static DisasJumpType op_tsch(DisasContext *s, DisasOps *o) { check_privileged(s); gen_helper_tsch(cpu_env, regs[1], o->in2); set_cc_static(s); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_chsc(DisasContext *s, DisasOps *o) +static DisasJumpType op_chsc(DisasContext *s, DisasOps *o) { check_privileged(s); gen_helper_chsc(cpu_env, o->in2); set_cc_static(s); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_stpx(DisasContext *s, DisasOps *o) +static DisasJumpType op_stpx(DisasContext *s, DisasOps *o) { check_privileged(s); tcg_gen_ld_i64(o->out, cpu_env, offsetof(CPUS390XState, psa)); tcg_gen_andi_i64(o->out, o->out, 0x7fffe000); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_stnosm(DisasContext *s, DisasOps *o) +static DisasJumpType op_stnosm(DisasContext *s, DisasOps *o) { uint64_t i2 =3D get_field(s->fields, i2); TCGv_i64 t; @@ -4254,66 +4250,66 @@ static ExitStatus op_stnosm(DisasContext *s, DisasO= ps *o) } =20 /* Exit to main loop to reevaluate s390_cpu_exec_interrupt. */ - return EXIT_PC_STALE_NOCHAIN; + return DISAS_PC_STALE_NOCHAIN; } =20 -static ExitStatus op_stura(DisasContext *s, DisasOps *o) +static DisasJumpType op_stura(DisasContext *s, DisasOps *o) { check_privileged(s); gen_helper_stura(cpu_env, o->in2, o->in1); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_sturg(DisasContext *s, DisasOps *o) +static DisasJumpType op_sturg(DisasContext *s, DisasOps *o) { check_privileged(s); gen_helper_sturg(cpu_env, o->in2, o->in1); - return NO_EXIT; + return DISAS_NEXT; } #endif =20 -static ExitStatus op_stfle(DisasContext *s, DisasOps *o) +static DisasJumpType op_stfle(DisasContext *s, DisasOps *o) { gen_helper_stfle(cc_op, cpu_env, o->in2); set_cc_static(s); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_st8(DisasContext *s, DisasOps *o) +static DisasJumpType op_st8(DisasContext *s, DisasOps *o) { tcg_gen_qemu_st8(o->in1, o->in2, get_mem_index(s)); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_st16(DisasContext *s, DisasOps *o) +static DisasJumpType op_st16(DisasContext *s, DisasOps *o) { tcg_gen_qemu_st16(o->in1, o->in2, get_mem_index(s)); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_st32(DisasContext *s, DisasOps *o) +static DisasJumpType op_st32(DisasContext *s, DisasOps *o) { tcg_gen_qemu_st32(o->in1, o->in2, get_mem_index(s)); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_st64(DisasContext *s, DisasOps *o) +static DisasJumpType op_st64(DisasContext *s, DisasOps *o) { tcg_gen_qemu_st64(o->in1, o->in2, get_mem_index(s)); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_stam(DisasContext *s, DisasOps *o) +static DisasJumpType op_stam(DisasContext *s, DisasOps *o) { TCGv_i32 r1 =3D tcg_const_i32(get_field(s->fields, r1)); TCGv_i32 r3 =3D tcg_const_i32(get_field(s->fields, r3)); gen_helper_stam(cpu_env, r1, o->in2, r3); tcg_temp_free_i32(r1); tcg_temp_free_i32(r3); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_stcm(DisasContext *s, DisasOps *o) +static DisasJumpType op_stcm(DisasContext *s, DisasOps *o) { int m3 =3D get_field(s->fields, m3); int pos, base =3D s->insn->data; @@ -4359,10 +4355,10 @@ static ExitStatus op_stcm(DisasContext *s, DisasOps= *o) break; } tcg_temp_free_i64(tmp); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_stm(DisasContext *s, DisasOps *o) +static DisasJumpType op_stm(DisasContext *s, DisasOps *o) { int r1 =3D get_field(s->fields, r1); int r3 =3D get_field(s->fields, r3); @@ -4383,10 +4379,10 @@ static ExitStatus op_stm(DisasContext *s, DisasOps = *o) } =20 tcg_temp_free_i64(tsize); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_stmh(DisasContext *s, DisasOps *o) +static DisasJumpType op_stmh(DisasContext *s, DisasOps *o) { int r1 =3D get_field(s->fields, r1); int r3 =3D get_field(s->fields, r3); @@ -4407,20 +4403,20 @@ static ExitStatus op_stmh(DisasContext *s, DisasOps= *o) tcg_temp_free_i64(t); tcg_temp_free_i64(t4); tcg_temp_free_i64(t32); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_stpq(DisasContext *s, DisasOps *o) +static DisasJumpType op_stpq(DisasContext *s, DisasOps *o) { if (tb_cflags(s->tb) & CF_PARALLEL) { gen_helper_stpq_parallel(cpu_env, o->in2, o->out2, o->out); } else { gen_helper_stpq(cpu_env, o->in2, o->out2, o->out); } - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_srst(DisasContext *s, DisasOps *o) +static DisasJumpType op_srst(DisasContext *s, DisasOps *o) { TCGv_i32 r1 =3D tcg_const_i32(get_field(s->fields, r1)); TCGv_i32 r2 =3D tcg_const_i32(get_field(s->fields, r2)); @@ -4430,10 +4426,10 @@ static ExitStatus op_srst(DisasContext *s, DisasOps= *o) tcg_temp_free_i32(r1); tcg_temp_free_i32(r2); set_cc_static(s); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_srstu(DisasContext *s, DisasOps *o) +static DisasJumpType op_srstu(DisasContext *s, DisasOps *o) { TCGv_i32 r1 =3D tcg_const_i32(get_field(s->fields, r1)); TCGv_i32 r2 =3D tcg_const_i32(get_field(s->fields, r2)); @@ -4443,16 +4439,16 @@ static ExitStatus op_srstu(DisasContext *s, DisasOp= s *o) tcg_temp_free_i32(r1); tcg_temp_free_i32(r2); set_cc_static(s); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_sub(DisasContext *s, DisasOps *o) +static DisasJumpType op_sub(DisasContext *s, DisasOps *o) { tcg_gen_sub_i64(o->out, o->in1, o->in2); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_subb(DisasContext *s, DisasOps *o) +static DisasJumpType op_subb(DisasContext *s, DisasOps *o) { DisasCompare cmp; TCGv_i64 borrow; @@ -4475,10 +4471,10 @@ static ExitStatus op_subb(DisasContext *s, DisasOps= *o) =20 tcg_gen_sub_i64(o->out, o->out, borrow); tcg_temp_free_i64(borrow); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_svc(DisasContext *s, DisasOps *o) +static DisasJumpType op_svc(DisasContext *s, DisasOps *o) { TCGv_i32 t; =20 @@ -4494,104 +4490,104 @@ static ExitStatus op_svc(DisasContext *s, DisasOp= s *o) tcg_temp_free_i32(t); =20 gen_exception(EXCP_SVC); - return EXIT_NORETURN; + return DISAS_NORETURN; } =20 -static ExitStatus op_tam(DisasContext *s, DisasOps *o) +static DisasJumpType op_tam(DisasContext *s, DisasOps *o) { int cc =3D 0; =20 cc |=3D (s->tb->flags & FLAG_MASK_64) ? 2 : 0; cc |=3D (s->tb->flags & FLAG_MASK_32) ? 1 : 0; gen_op_movi_cc(s, cc); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_tceb(DisasContext *s, DisasOps *o) +static DisasJumpType op_tceb(DisasContext *s, DisasOps *o) { gen_helper_tceb(cc_op, cpu_env, o->in1, o->in2); set_cc_static(s); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_tcdb(DisasContext *s, DisasOps *o) +static DisasJumpType op_tcdb(DisasContext *s, DisasOps *o) { gen_helper_tcdb(cc_op, cpu_env, o->in1, o->in2); set_cc_static(s); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_tcxb(DisasContext *s, DisasOps *o) +static DisasJumpType op_tcxb(DisasContext *s, DisasOps *o) { gen_helper_tcxb(cc_op, cpu_env, o->out, o->out2, o->in2); set_cc_static(s); - return NO_EXIT; + return DISAS_NEXT; } =20 #ifndef CONFIG_USER_ONLY =20 -static ExitStatus op_testblock(DisasContext *s, DisasOps *o) +static DisasJumpType op_testblock(DisasContext *s, DisasOps *o) { check_privileged(s); gen_helper_testblock(cc_op, cpu_env, o->in2); set_cc_static(s); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_tprot(DisasContext *s, DisasOps *o) +static DisasJumpType op_tprot(DisasContext *s, DisasOps *o) { gen_helper_tprot(cc_op, cpu_env, o->addr1, o->in2); set_cc_static(s); - return NO_EXIT; + return DISAS_NEXT; } =20 #endif =20 -static ExitStatus op_tp(DisasContext *s, DisasOps *o) +static DisasJumpType op_tp(DisasContext *s, DisasOps *o) { TCGv_i32 l1 =3D tcg_const_i32(get_field(s->fields, l1) + 1); gen_helper_tp(cc_op, cpu_env, o->addr1, l1); tcg_temp_free_i32(l1); set_cc_static(s); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_tr(DisasContext *s, DisasOps *o) +static DisasJumpType op_tr(DisasContext *s, DisasOps *o) { TCGv_i32 l =3D tcg_const_i32(get_field(s->fields, l1)); gen_helper_tr(cpu_env, l, o->addr1, o->in2); tcg_temp_free_i32(l); set_cc_static(s); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_tre(DisasContext *s, DisasOps *o) +static DisasJumpType op_tre(DisasContext *s, DisasOps *o) { gen_helper_tre(o->out, cpu_env, o->out, o->out2, o->in2); return_low128(o->out2); set_cc_static(s); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_trt(DisasContext *s, DisasOps *o) +static DisasJumpType op_trt(DisasContext *s, DisasOps *o) { TCGv_i32 l =3D tcg_const_i32(get_field(s->fields, l1)); gen_helper_trt(cc_op, cpu_env, l, o->addr1, o->in2); tcg_temp_free_i32(l); set_cc_static(s); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_trtr(DisasContext *s, DisasOps *o) +static DisasJumpType op_trtr(DisasContext *s, DisasOps *o) { TCGv_i32 l =3D tcg_const_i32(get_field(s->fields, l1)); gen_helper_trtr(cc_op, cpu_env, l, o->addr1, o->in2); tcg_temp_free_i32(l); set_cc_static(s); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_trXX(DisasContext *s, DisasOps *o) +static DisasJumpType op_trXX(DisasContext *s, DisasOps *o) { TCGv_i32 r1 =3D tcg_const_i32(get_field(s->fields, r1)); TCGv_i32 r2 =3D tcg_const_i32(get_field(s->fields, r2)); @@ -4619,28 +4615,28 @@ static ExitStatus op_trXX(DisasContext *s, DisasOps= *o) tcg_temp_free_i32(sizes); tcg_temp_free_i32(tst); set_cc_static(s); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_ts(DisasContext *s, DisasOps *o) +static DisasJumpType op_ts(DisasContext *s, DisasOps *o) { TCGv_i32 t1 =3D tcg_const_i32(0xff); tcg_gen_atomic_xchg_i32(t1, o->in2, t1, get_mem_index(s), MO_UB); tcg_gen_extract_i32(cc_op, t1, 7, 1); tcg_temp_free_i32(t1); set_cc_static(s); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_unpk(DisasContext *s, DisasOps *o) +static DisasJumpType op_unpk(DisasContext *s, DisasOps *o) { TCGv_i32 l =3D tcg_const_i32(get_field(s->fields, l1)); gen_helper_unpk(cpu_env, l, o->addr1, o->in2); tcg_temp_free_i32(l); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_unpka(DisasContext *s, DisasOps *o) +static DisasJumpType op_unpka(DisasContext *s, DisasOps *o) { int l1 =3D get_field(s->fields, l1) + 1; TCGv_i32 l; @@ -4648,16 +4644,16 @@ static ExitStatus op_unpka(DisasContext *s, DisasOp= s *o) /* The length must not exceed 32 bytes. */ if (l1 > 32) { gen_program_exception(s, PGM_SPECIFICATION); - return EXIT_NORETURN; + return DISAS_NORETURN; } l =3D tcg_const_i32(l1); gen_helper_unpka(cc_op, cpu_env, o->addr1, l, o->in2); tcg_temp_free_i32(l); set_cc_static(s); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_unpku(DisasContext *s, DisasOps *o) +static DisasJumpType op_unpku(DisasContext *s, DisasOps *o) { int l1 =3D get_field(s->fields, l1) + 1; TCGv_i32 l; @@ -4665,17 +4661,17 @@ static ExitStatus op_unpku(DisasContext *s, DisasOp= s *o) /* The length must be even and should not exceed 64 bytes. */ if ((l1 & 1) || (l1 > 64)) { gen_program_exception(s, PGM_SPECIFICATION); - return EXIT_NORETURN; + return DISAS_NORETURN; } l =3D tcg_const_i32(l1); gen_helper_unpku(cc_op, cpu_env, o->addr1, l, o->in2); tcg_temp_free_i32(l); set_cc_static(s); - return NO_EXIT; + return DISAS_NEXT; } =20 =20 -static ExitStatus op_xc(DisasContext *s, DisasOps *o) +static DisasJumpType op_xc(DisasContext *s, DisasOps *o) { int d1 =3D get_field(s->fields, d1); int d2 =3D get_field(s->fields, d2); @@ -4716,7 +4712,7 @@ static ExitStatus op_xc(DisasContext *s, DisasOps *o) tcg_gen_qemu_st8(o->in2, o->addr1, get_mem_index(s)); } gen_op_movi_cc(s, 0); - return NO_EXIT; + return DISAS_NEXT; } =20 /* But in general we'll defer to a helper. */ @@ -4725,16 +4721,16 @@ static ExitStatus op_xc(DisasContext *s, DisasOps *= o) gen_helper_xc(cc_op, cpu_env, t32, o->addr1, o->in2); tcg_temp_free_i32(t32); set_cc_static(s); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_xor(DisasContext *s, DisasOps *o) +static DisasJumpType op_xor(DisasContext *s, DisasOps *o) { tcg_gen_xor_i64(o->out, o->in1, o->in2); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_xori(DisasContext *s, DisasOps *o) +static DisasJumpType op_xori(DisasContext *s, DisasOps *o) { int shift =3D s->insn->data & 0xff; int size =3D s->insn->data >> 8; @@ -4747,10 +4743,10 @@ static ExitStatus op_xori(DisasContext *s, DisasOps= *o) /* Produce the CC from only the bits manipulated. */ tcg_gen_andi_i64(cc_dst, o->out, mask); set_cc_nz_u64(s, cc_dst); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_xi(DisasContext *s, DisasOps *o) +static DisasJumpType op_xi(DisasContext *s, DisasOps *o) { o->in1 =3D tcg_temp_new_i64(); =20 @@ -4768,25 +4764,25 @@ static ExitStatus op_xi(DisasContext *s, DisasOps *= o) if (!s390_has_feat(S390_FEAT_INTERLOCKED_ACCESS_2)) { tcg_gen_qemu_st_tl(o->out, o->addr1, get_mem_index(s), s->insn->da= ta); } - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_zero(DisasContext *s, DisasOps *o) +static DisasJumpType op_zero(DisasContext *s, DisasOps *o) { o->out =3D tcg_const_i64(0); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_zero2(DisasContext *s, DisasOps *o) +static DisasJumpType op_zero2(DisasContext *s, DisasOps *o) { o->out =3D tcg_const_i64(0); o->out2 =3D o->out; o->g_out2 =3D true; - return NO_EXIT; + return DISAS_NEXT; } =20 #ifndef CONFIG_USER_ONLY -static ExitStatus op_clp(DisasContext *s, DisasOps *o) +static DisasJumpType op_clp(DisasContext *s, DisasOps *o) { TCGv_i32 r2 =3D tcg_const_i32(get_field(s->fields, r2)); =20 @@ -4794,10 +4790,10 @@ static ExitStatus op_clp(DisasContext *s, DisasOps = *o) gen_helper_clp(cpu_env, r2); tcg_temp_free_i32(r2); set_cc_static(s); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_pcilg(DisasContext *s, DisasOps *o) +static DisasJumpType op_pcilg(DisasContext *s, DisasOps *o) { TCGv_i32 r1 =3D tcg_const_i32(get_field(s->fields, r1)); TCGv_i32 r2 =3D tcg_const_i32(get_field(s->fields, r2)); @@ -4807,10 +4803,10 @@ static ExitStatus op_pcilg(DisasContext *s, DisasOp= s *o) tcg_temp_free_i32(r1); tcg_temp_free_i32(r2); set_cc_static(s); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_pcistg(DisasContext *s, DisasOps *o) +static DisasJumpType op_pcistg(DisasContext *s, DisasOps *o) { TCGv_i32 r1 =3D tcg_const_i32(get_field(s->fields, r1)); TCGv_i32 r2 =3D tcg_const_i32(get_field(s->fields, r2)); @@ -4820,10 +4816,10 @@ static ExitStatus op_pcistg(DisasContext *s, DisasO= ps *o) tcg_temp_free_i32(r1); tcg_temp_free_i32(r2); set_cc_static(s); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_stpcifc(DisasContext *s, DisasOps *o) +static DisasJumpType op_stpcifc(DisasContext *s, DisasOps *o) { TCGv_i32 r1 =3D tcg_const_i32(get_field(s->fields, r1)); TCGv_i32 ar =3D tcg_const_i32(get_field(s->fields, b2)); @@ -4833,17 +4829,17 @@ static ExitStatus op_stpcifc(DisasContext *s, Disas= Ops *o) tcg_temp_free_i32(ar); tcg_temp_free_i32(r1); set_cc_static(s); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_sic(DisasContext *s, DisasOps *o) +static DisasJumpType op_sic(DisasContext *s, DisasOps *o) { check_privileged(s); gen_helper_sic(cpu_env, o->in1, o->in2); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_rpcit(DisasContext *s, DisasOps *o) +static DisasJumpType op_rpcit(DisasContext *s, DisasOps *o) { TCGv_i32 r1 =3D tcg_const_i32(get_field(s->fields, r1)); TCGv_i32 r2 =3D tcg_const_i32(get_field(s->fields, r2)); @@ -4853,10 +4849,10 @@ static ExitStatus op_rpcit(DisasContext *s, DisasOp= s *o) tcg_temp_free_i32(r1); tcg_temp_free_i32(r2); set_cc_static(s); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_pcistb(DisasContext *s, DisasOps *o) +static DisasJumpType op_pcistb(DisasContext *s, DisasOps *o) { TCGv_i32 r1 =3D tcg_const_i32(get_field(s->fields, r1)); TCGv_i32 r3 =3D tcg_const_i32(get_field(s->fields, r3)); @@ -4868,10 +4864,10 @@ static ExitStatus op_pcistb(DisasContext *s, DisasO= ps *o) tcg_temp_free_i32(r1); tcg_temp_free_i32(r3); set_cc_static(s); - return NO_EXIT; + return DISAS_NEXT; } =20 -static ExitStatus op_mpcifc(DisasContext *s, DisasOps *o) +static DisasJumpType op_mpcifc(DisasContext *s, DisasOps *o) { TCGv_i32 r1 =3D tcg_const_i32(get_field(s->fields, r1)); TCGv_i32 ar =3D tcg_const_i32(get_field(s->fields, b2)); @@ -4881,7 +4877,7 @@ static ExitStatus op_mpcifc(DisasContext *s, DisasOps= *o) tcg_temp_free_i32(ar); tcg_temp_free_i32(r1); set_cc_static(s); - return NO_EXIT; + return DISAS_NEXT; } #endif =20 @@ -5983,10 +5979,10 @@ static const DisasInsn *extract_insn(CPUS390XState = *env, DisasContext *s, return info; } =20 -static ExitStatus translate_one(CPUS390XState *env, DisasContext *s) +static DisasJumpType translate_one(CPUS390XState *env, DisasContext *s) { const DisasInsn *insn; - ExitStatus ret =3D NO_EXIT; + DisasJumpType ret =3D DISAS_NEXT; DisasFields f; DisasOps o; =20 @@ -5998,7 +5994,7 @@ static ExitStatus translate_one(CPUS390XState *env, D= isasContext *s) qemu_log_mask(LOG_UNIMP, "unimplemented opcode 0x%02x%02x\n", f.op, f.op2); gen_illegal_opcode(s); - return EXIT_NORETURN; + return DISAS_NORETURN; } =20 #ifndef CONFIG_USER_ONLY @@ -6045,7 +6041,7 @@ static ExitStatus translate_one(CPUS390XState *env, D= isasContext *s) } if (excp) { gen_program_exception(s, excp); - return EXIT_NORETURN; + return DISAS_NORETURN; } } =20 @@ -6099,7 +6095,7 @@ static ExitStatus translate_one(CPUS390XState *env, D= isasContext *s) #ifndef CONFIG_USER_ONLY if (s->tb->flags & FLAG_MASK_PER) { /* An exception might be triggered, save PSW if not already done. = */ - if (ret =3D=3D NO_EXIT || ret =3D=3D EXIT_PC_STALE) { + if (ret =3D=3D DISAS_NEXT || ret =3D=3D DISAS_PC_STALE) { tcg_gen_movi_i64(psw_addr, s->next_pc); } =20 @@ -6120,7 +6116,7 @@ void gen_intermediate_code(CPUState *cs, struct Trans= lationBlock *tb) target_ulong pc_start; uint64_t next_page_start; int num_insns, max_insns; - ExitStatus status; + DisasJumpType status; bool do_debug; =20 pc_start =3D tb->pc; @@ -6154,7 +6150,7 @@ void gen_intermediate_code(CPUState *cs, struct Trans= lationBlock *tb) num_insns++; =20 if (unlikely(cpu_breakpoint_test(cs, dc.pc, BP_ANY))) { - status =3D EXIT_PC_STALE; + status =3D DISAS_PC_STALE; do_debug =3D true; /* The address covered by the breakpoint must be included in [tb->pc, tb->pc + tb->size) in order to for it to be @@ -6172,39 +6168,40 @@ void gen_intermediate_code(CPUState *cs, struct Tra= nslationBlock *tb) =20 /* If we reach a page boundary, are single stepping, or exhaust instruction count, stop generation. */ - if (status =3D=3D NO_EXIT + if (status =3D=3D DISAS_NEXT && (dc.pc >=3D next_page_start || tcg_op_buf_full() || num_insns >=3D max_insns || singlestep || cs->singlestep_enabled || dc.ex_value)) { - status =3D EXIT_PC_STALE; + status =3D DISAS_TOO_MANY; } - } while (status =3D=3D NO_EXIT); + } while (status =3D=3D DISAS_NEXT); =20 if (tb_cflags(tb) & CF_LAST_IO) { gen_io_end(); } =20 switch (status) { - case EXIT_GOTO_TB: - case EXIT_NORETURN: + case DISAS_GOTO_TB: + case DISAS_NORETURN: break; - case EXIT_PC_STALE: - case EXIT_PC_STALE_NOCHAIN: + case DISAS_TOO_MANY: + case DISAS_PC_STALE: + case DISAS_PC_STALE_NOCHAIN: update_psw_addr(&dc); /* FALLTHRU */ - case EXIT_PC_UPDATED: + case DISAS_PC_UPDATED: /* Next TB starts off with CC_OP_DYNAMIC, so make sure the cc op type is in env */ update_cc_op(&dc); /* FALLTHRU */ - case EXIT_PC_CC_UPDATED: + case DISAS_PC_CC_UPDATED: /* Exit the TB, either by raising a debug exception or by return. = */ if (do_debug) { gen_exception(EXCP_DEBUG); - } else if (use_exit_tb(&dc) || status =3D=3D EXIT_PC_STALE_NOCHAIN= ) { + } else if (use_exit_tb(&dc) || status =3D=3D DISAS_PC_STALE_NOCHAI= N) { tcg_gen_exit_tb(0); } else { tcg_gen_lookup_and_goto_ptr(); --=20 2.7.4 From nobody Fri Oct 24 09:33:45 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1518824557828857.0739156349372; Fri, 16 Feb 2018 15:42:37 -0800 (PST) Received: from localhost ([::1]:45200 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1empeA-0005zq-Fq for importer@patchew.org; Fri, 16 Feb 2018 18:42:30 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60085) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1empcf-0005E4-N5 for qemu-devel@nongnu.org; Fri, 16 Feb 2018 18:41:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1empcd-0000Tv-6G for qemu-devel@nongnu.org; Fri, 16 Feb 2018 18:40:57 -0500 Received: from out5-smtp.messagingengine.com ([66.111.4.29]:34569) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1empcd-0000TO-1P; Fri, 16 Feb 2018 18:40:55 -0500 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id A4CE520E0B; Fri, 16 Feb 2018 18:40:54 -0500 (EST) Received: from frontend1 ([10.202.2.160]) by compute4.internal (MEProxy); Fri, 16 Feb 2018 18:40:54 -0500 Received: from localhost (flamenco.cs.columbia.edu [128.59.20.216]) by mail.messagingengine.com (Postfix) with ESMTPA id 65E9A7E3E0; Fri, 16 Feb 2018 18:40:54 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=braap.org; h=cc :date:from:in-reply-to:message-id:references:subject:to :x-me-sender:x-me-sender:x-sasl-enc; s=mesmtp; bh=XSvImce28sK8yI 1cPQAfCo+IQuCCMa2yqVc4qpr33pE=; b=LUWc6/m05YPvtFGb2crvjXNbmbxpR6 czfdEPUz8CiPYSsJzz1BqyrEFaNMBkJTLEXnRRbBqi6x99QQuoJ/a0RVU/58zob9 m8LJuMJdqKEwRnm5Cjd00sn9UVWE1sjkq4V+YCz+O4kQz/OsPLbf+8S8AyIznpQw Rcow9RUPdIG64= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:date:from:in-reply-to:message-id :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; bh=XSvImce28sK8yI1cPQAfCo+IQuCCMa2yqVc4qpr33pE=; b=npq50i1O Z894F66TVpx9ue1/4aglF2vqLHVgiWSHenaE8W7Sen5MQmaSw+sqs7dXC39JZMkK SEU02lMUi/4VhgQkArCd3aRh4hSWhHqMUBAIeUaXmHmAGD8//HqKZvMXzzkPXt/3 mi2PjYJu7ogdz6QtCQdJArO5odSWYdZkReLTJGx/Bd4lpMu6ad75RNkvSM/LONOr m/dtQzLWs+uaFIYETnuXLTN+FtmQt5tTRNa2U3iSHrmOEEgVsglwZZBPdGdReAhe 7tMYLvd/J6OAIFeJIuJncnJwzQXECebJNDTMQFJD+F9M7tEWSgQFsZ0w1RsGlRW6 Li5H8s6Wo2iyAg== X-ME-Sender: From: "Emilio G. Cota" To: qemu-devel@nongnu.org Date: Fri, 16 Feb 2018 18:40:45 -0500 Message-Id: <1518824446-20235-3-git-send-email-cota@braap.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1518824446-20235-1-git-send-email-cota@braap.org> References: <1518824446-20235-1-git-send-email-cota@braap.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 66.111.4.29 Subject: [Qemu-devel] [PATCH 2/3] target/s390x: convert to DisasContextBase X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Cornelia Huck , qemu-s390x@nongnu.org, David Hildenbrand , Alexander Graf , Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Notes: - Kept ctx.pc and ctx.next_pc; it would be very confusing to have ctx.base.pc_next and ctx.next_pc ! Instead, just updated ctx.base.pc_next where relevant. - Did not convert num_insns and is_jmp, since the corresponding code will go away in the next patch. - Avoided a checkpatch error in use_exit_tb. Signed-off-by: Emilio G. Cota --- target/s390x/translate.c | 85 ++++++++++++++++++++++++--------------------= ---- 1 file changed, 43 insertions(+), 42 deletions(-) diff --git a/target/s390x/translate.c b/target/s390x/translate.c index 5346791..dd504a1 100644 --- a/target/s390x/translate.c +++ b/target/s390x/translate.c @@ -52,14 +52,13 @@ typedef struct DisasInsn DisasInsn; typedef struct DisasFields DisasFields; =20 struct DisasContext { - struct TranslationBlock *tb; + DisasContextBase base; const DisasInsn *insn; DisasFields *fields; uint64_t ex_value; uint64_t pc, next_pc; uint32_t ilen; enum cc_op cc_op; - bool singlestep_enabled; }; =20 /* Information carried about a condition to be evaluated. */ @@ -81,8 +80,8 @@ static uint64_t inline_branch_miss[CC_OP_MAX]; =20 static uint64_t pc_to_link_info(DisasContext *s, uint64_t pc) { - if (!(s->tb->flags & FLAG_MASK_64)) { - if (s->tb->flags & FLAG_MASK_32) { + if (!(s->base.tb->flags & FLAG_MASK_64)) { + if (s->base.tb->flags & FLAG_MASK_32) { return pc | 0x80000000; } } @@ -196,7 +195,7 @@ static void per_branch(DisasContext *s, bool to_next) #ifndef CONFIG_USER_ONLY tcg_gen_movi_i64(gbea, s->pc); =20 - if (s->tb->flags & FLAG_MASK_PER) { + if (s->base.tb->flags & FLAG_MASK_PER) { TCGv_i64 next_pc =3D to_next ? tcg_const_i64(s->next_pc) : psw_add= r; gen_helper_per_branch(cpu_env, gbea, next_pc); if (to_next) { @@ -210,7 +209,7 @@ static void per_branch_cond(DisasContext *s, TCGCond co= nd, TCGv_i64 arg1, TCGv_i64 arg2) { #ifndef CONFIG_USER_ONLY - if (s->tb->flags & FLAG_MASK_PER) { + if (s->base.tb->flags & FLAG_MASK_PER) { TCGLabel *lab =3D gen_new_label(); tcg_gen_brcond_i64(tcg_invert_cond(cond), arg1, arg2, lab); =20 @@ -250,7 +249,7 @@ static inline uint64_t ld_code4(CPUS390XState *env, uin= t64_t pc) =20 static int get_mem_index(DisasContext *s) { - switch (s->tb->flags & FLAG_MASK_ASC) { + switch (s->base.tb->flags & FLAG_MASK_ASC) { case PSW_ASC_PRIMARY >> FLAG_MASK_PSW_SHIFT: return 0; case PSW_ASC_SECONDARY >> FLAG_MASK_PSW_SHIFT: @@ -315,7 +314,7 @@ static inline void gen_trap(DisasContext *s) #ifndef CONFIG_USER_ONLY static void check_privileged(DisasContext *s) { - if (s->tb->flags & FLAG_MASK_PSTATE) { + if (s->base.tb->flags & FLAG_MASK_PSTATE) { gen_program_exception(s, PGM_PRIVILEGED); } } @@ -324,7 +323,7 @@ static void check_privileged(DisasContext *s) static TCGv_i64 get_address(DisasContext *s, int x2, int b2, int d2) { TCGv_i64 tmp =3D tcg_temp_new_i64(); - bool need_31 =3D !(s->tb->flags & FLAG_MASK_64); + bool need_31 =3D !(s->base.tb->flags & FLAG_MASK_64); =20 /* Note that d2 is limited to 20 bits, signed. If we crop negative displacements early we create larger immedate addends. */ @@ -537,9 +536,9 @@ static void gen_op_calc_cc(DisasContext *s) =20 static bool use_exit_tb(DisasContext *s) { - return (s->singlestep_enabled || - (tb_cflags(s->tb) & CF_LAST_IO) || - (s->tb->flags & FLAG_MASK_PER)); + return s->base.singlestep_enabled || + (tb_cflags(s->base.tb) & CF_LAST_IO) || + (s->base.tb->flags & FLAG_MASK_PER); } =20 static bool use_goto_tb(DisasContext *s, uint64_t dest) @@ -548,7 +547,7 @@ static bool use_goto_tb(DisasContext *s, uint64_t dest) return false; } #ifndef CONFIG_USER_ONLY - return (dest & TARGET_PAGE_MASK) =3D=3D (s->tb->pc & TARGET_PAGE_MASK)= || + return (dest & TARGET_PAGE_MASK) =3D=3D (s->base.tb->pc & TARGET_PAGE_= MASK) || (dest & TARGET_PAGE_MASK) =3D=3D (s->pc & TARGET_PAGE_MASK); #else return true; @@ -1150,7 +1149,7 @@ static DisasJumpType help_goto_direct(DisasContext *s= , uint64_t dest) per_breaking_event(s); tcg_gen_goto_tb(0); tcg_gen_movi_i64(psw_addr, dest); - tcg_gen_exit_tb((uintptr_t)s->tb); + tcg_gen_exit_tb((uintptr_t)s->base.tb); return DISAS_GOTO_TB; } else { tcg_gen_movi_i64(psw_addr, dest); @@ -1211,14 +1210,14 @@ static DisasJumpType help_branch(DisasContext *s, D= isasCompare *c, /* Branch not taken. */ tcg_gen_goto_tb(0); tcg_gen_movi_i64(psw_addr, s->next_pc); - tcg_gen_exit_tb((uintptr_t)s->tb + 0); + tcg_gen_exit_tb((uintptr_t)s->base.tb + 0); =20 /* Branch taken. */ gen_set_label(lab); per_breaking_event(s); tcg_gen_goto_tb(1); tcg_gen_movi_i64(psw_addr, dest); - tcg_gen_exit_tb((uintptr_t)s->tb + 1); + tcg_gen_exit_tb((uintptr_t)s->base.tb + 1); =20 ret =3D DISAS_GOTO_TB; } else { @@ -1241,7 +1240,7 @@ static DisasJumpType help_branch(DisasContext *s, Dis= asCompare *c, update_cc_op(s); tcg_gen_goto_tb(0); tcg_gen_movi_i64(psw_addr, s->next_pc); - tcg_gen_exit_tb((uintptr_t)s->tb + 0); + tcg_gen_exit_tb((uintptr_t)s->base.tb + 0); =20 gen_set_label(lab); if (is_imm) { @@ -1990,7 +1989,7 @@ static DisasJumpType op_cdsg(DisasContext *s, DisasOp= s *o) addr =3D get_address(s, 0, b2, d2); t_r1 =3D tcg_const_i32(r1); t_r3 =3D tcg_const_i32(r3); - if (tb_cflags(s->tb) & CF_PARALLEL) { + if (tb_cflags(s->base.tb) & CF_PARALLEL) { gen_helper_cdsg_parallel(cpu_env, addr, t_r1, t_r3); } else { gen_helper_cdsg(cpu_env, addr, t_r1, t_r3); @@ -2008,7 +2007,7 @@ static DisasJumpType op_csst(DisasContext *s, DisasOp= s *o) int r3 =3D get_field(s->fields, r3); TCGv_i32 t_r3 =3D tcg_const_i32(r3); =20 - if (tb_cflags(s->tb) & CF_PARALLEL) { + if (tb_cflags(s->base.tb) & CF_PARALLEL) { gen_helper_csst_parallel(cc_op, cpu_env, t_r3, o->in1, o->in2); } else { gen_helper_csst(cc_op, cpu_env, t_r3, o->in1, o->in2); @@ -2968,7 +2967,7 @@ static DisasJumpType op_lpd(DisasContext *s, DisasOps= *o) TCGMemOp mop =3D s->insn->data; =20 /* In a parallel context, stop the world and single step. */ - if (tb_cflags(s->tb) & CF_PARALLEL) { + if (tb_cflags(s->base.tb) & CF_PARALLEL) { update_psw_addr(s); update_cc_op(s); gen_exception(EXCP_ATOMIC); @@ -2990,7 +2989,7 @@ static DisasJumpType op_lpd(DisasContext *s, DisasOps= *o) =20 static DisasJumpType op_lpq(DisasContext *s, DisasOps *o) { - if (tb_cflags(s->tb) & CF_PARALLEL) { + if (tb_cflags(s->base.tb) & CF_PARALLEL) { gen_helper_lpq_parallel(o->out, cpu_env, o->in2); } else { gen_helper_lpq(o->out, cpu_env, o->in2); @@ -3040,7 +3039,7 @@ static DisasJumpType op_mov2e(DisasContext *s, DisasO= ps *o) o->in2 =3D NULL; o->g_in2 =3D false; =20 - switch (s->tb->flags & FLAG_MASK_ASC) { + switch (s->base.tb->flags & FLAG_MASK_ASC) { case PSW_ASC_PRIMARY >> FLAG_MASK_PSW_SHIFT: tcg_gen_movi_i64(ar1, 0); break; @@ -4408,7 +4407,7 @@ static DisasJumpType op_stmh(DisasContext *s, DisasOp= s *o) =20 static DisasJumpType op_stpq(DisasContext *s, DisasOps *o) { - if (tb_cflags(s->tb) & CF_PARALLEL) { + if (tb_cflags(s->base.tb) & CF_PARALLEL) { gen_helper_stpq_parallel(cpu_env, o->in2, o->out2, o->out); } else { gen_helper_stpq(cpu_env, o->in2, o->out2, o->out); @@ -4497,8 +4496,8 @@ static DisasJumpType op_tam(DisasContext *s, DisasOps= *o) { int cc =3D 0; =20 - cc |=3D (s->tb->flags & FLAG_MASK_64) ? 2 : 0; - cc |=3D (s->tb->flags & FLAG_MASK_32) ? 1 : 0; + cc |=3D (s->base.tb->flags & FLAG_MASK_64) ? 2 : 0; + cc |=3D (s->base.tb->flags & FLAG_MASK_32) ? 1 : 0; gen_op_movi_cc(s, cc); return DISAS_NEXT; } @@ -5998,7 +5997,7 @@ static DisasJumpType translate_one(CPUS390XState *env= , DisasContext *s) } =20 #ifndef CONFIG_USER_ONLY - if (s->tb->flags & FLAG_MASK_PER) { + if (s->base.tb->flags & FLAG_MASK_PER) { TCGv_i64 addr =3D tcg_const_i64(s->pc); gen_helper_per_ifetch(cpu_env, addr); tcg_temp_free_i64(addr); @@ -6093,7 +6092,7 @@ static DisasJumpType translate_one(CPUS390XState *env= , DisasContext *s) } =20 #ifndef CONFIG_USER_ONLY - if (s->tb->flags & FLAG_MASK_PER) { + if (s->base.tb->flags & FLAG_MASK_PER) { /* An exception might be triggered, save PSW if not already done. = */ if (ret =3D=3D DISAS_NEXT || ret =3D=3D DISAS_PC_STALE) { tcg_gen_movi_i64(psw_addr, s->next_pc); @@ -6113,26 +6112,26 @@ void gen_intermediate_code(CPUState *cs, struct Tra= nslationBlock *tb) { CPUS390XState *env =3D cs->env_ptr; DisasContext dc; - target_ulong pc_start; uint64_t next_page_start; int num_insns, max_insns; DisasJumpType status; bool do_debug; =20 - pc_start =3D tb->pc; - + dc.base.pc_first =3D tb->pc; /* 31-bit mode */ if (!(tb->flags & FLAG_MASK_64)) { - pc_start &=3D 0x7fffffff; + dc.base.pc_first &=3D 0x7fffffff; } + dc.base.pc_next =3D dc.base.pc_first; + dc.base.tb =3D tb; + dc.base.singlestep_enabled =3D cs->singlestep_enabled; =20 - dc.tb =3D tb; - dc.pc =3D pc_start; + dc.pc =3D dc.base.pc_first; dc.cc_op =3D CC_OP_DYNAMIC; - dc.ex_value =3D tb->cs_base; - do_debug =3D dc.singlestep_enabled =3D cs->singlestep_enabled; + dc.ex_value =3D dc.base.tb->cs_base; + do_debug =3D cs->singlestep_enabled; =20 - next_page_start =3D (pc_start & TARGET_PAGE_MASK) + TARGET_PAGE_SIZE; + next_page_start =3D (dc.base.pc_first & TARGET_PAGE_MASK) + TARGET_PAG= E_SIZE; =20 num_insns =3D 0; max_insns =3D tb_cflags(tb) & CF_COUNT_MASK; @@ -6149,7 +6148,7 @@ void gen_intermediate_code(CPUState *cs, struct Trans= lationBlock *tb) tcg_gen_insn_start(dc.pc, dc.cc_op); num_insns++; =20 - if (unlikely(cpu_breakpoint_test(cs, dc.pc, BP_ANY))) { + if (unlikely(cpu_breakpoint_test(cs, dc.base.pc_next, BP_ANY))) { status =3D DISAS_PC_STALE; do_debug =3D true; /* The address covered by the breakpoint must be included in @@ -6157,6 +6156,7 @@ void gen_intermediate_code(CPUState *cs, struct Trans= lationBlock *tb) properly cleared -- thus we increment the PC here so that the logic setting tb->size below does the right thing. */ dc.pc +=3D 2; + dc.base.pc_next +=3D 2; break; } =20 @@ -6165,6 +6165,7 @@ void gen_intermediate_code(CPUState *cs, struct Trans= lationBlock *tb) } =20 status =3D translate_one(env, &dc); + dc.base.pc_next =3D dc.pc; =20 /* If we reach a page boundary, are single stepping, or exhaust instruction count, stop generation. */ @@ -6173,7 +6174,7 @@ void gen_intermediate_code(CPUState *cs, struct Trans= lationBlock *tb) || tcg_op_buf_full() || num_insns >=3D max_insns || singlestep - || cs->singlestep_enabled + || dc.base.singlestep_enabled || dc.ex_value)) { status =3D DISAS_TOO_MANY; } @@ -6213,19 +6214,19 @@ void gen_intermediate_code(CPUState *cs, struct Tra= nslationBlock *tb) =20 gen_tb_end(tb, num_insns); =20 - tb->size =3D dc.pc - pc_start; + tb->size =3D dc.pc - dc.base.pc_first; tb->icount =3D num_insns; =20 #if defined(S390X_DEBUG_DISAS) if (qemu_loglevel_mask(CPU_LOG_TB_IN_ASM) - && qemu_log_in_addr_range(pc_start)) { + && qemu_log_in_addr_range(dc.base.pc_first)) { qemu_log_lock(); if (unlikely(dc.ex_value)) { /* ??? Unfortunately log_target_disas can't use host memory. = */ qemu_log("IN: EXECUTE %016" PRIx64 "\n", dc.ex_value); } else { - qemu_log("IN: %s\n", lookup_symbol(pc_start)); - log_target_disas(cs, pc_start, dc.pc - pc_start); + qemu_log("IN: %s\n", lookup_symbol(dc.base.pc_first)); + log_target_disas(cs, dc.base.pc_first, dc.pc - dc.base.pc_firs= t); qemu_log("\n"); } qemu_log_unlock(); --=20 2.7.4 From nobody Fri Oct 24 09:33:45 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1518824669392146.57672528002536; Fri, 16 Feb 2018 15:44:29 -0800 (PST) Received: from localhost ([::1]:45302 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1empg2-0007SH-G0 for importer@patchew.org; Fri, 16 Feb 2018 18:44:26 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60083) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1empcf-0005E2-N3 for qemu-devel@nongnu.org; Fri, 16 Feb 2018 18:40:59 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1empcd-0000UB-H1 for qemu-devel@nongnu.org; Fri, 16 Feb 2018 18:40:57 -0500 Received: from out5-smtp.messagingengine.com ([66.111.4.29]:45805) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1empcd-0000Tn-B9; Fri, 16 Feb 2018 18:40:55 -0500 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id EF91C20E1C; Fri, 16 Feb 2018 18:40:54 -0500 (EST) Received: from frontend2 ([10.202.2.161]) by compute4.internal (MEProxy); Fri, 16 Feb 2018 18:40:54 -0500 Received: from localhost (flamenco.cs.columbia.edu [128.59.20.216]) by mail.messagingengine.com (Postfix) with ESMTPA id 9B5AD240DB; Fri, 16 Feb 2018 18:40:54 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=braap.org; h=cc :date:from:in-reply-to:message-id:references:subject:to :x-me-sender:x-me-sender:x-sasl-enc; s=mesmtp; bh=r5oMgvftlaLnny W+tmL8cXdLMHc/jwZltpPwrnf8VEM=; b=W4HbFHZV8GLUp3CSngXxqbOLOexp1Y tUKrvbePDhBhjwiJQ4QnPN8hXYo7XvNMqMr8C08ErgDRmBGgZHX3iRDRVgdHjwSF 99YDTj13Keg4oMn5gBl99GY1NmmJ2c2JOTy3z8943HchDg5uSjdOk3N2qjQvImd2 C5fRhug3yLI/4= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:date:from:in-reply-to:message-id :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; bh=r5oMgvftlaLnnyW+tmL8cXdLMHc/jwZltpPwrnf8VEM=; b=F5f5uYUs ax5vuGsBYHLzKsxGiEXAvWajh3EjZLif5n6UoPZhUxFX5iSF1vk9/L0nn5h423x2 g3OH2frX1Yog/B+Nr9rte9p/yq0By/LwRkyUx6BVZNrhmCMv45oTrYyq/ftlKs4g E83HTYLkDuk9Uve83EkrmOYO6wRJ/X0KqcSQ1kppKeEplg+SM0CRjnqbnSrsdZLE Gj2tDro+vW/KPvM5KhmmaTwHvvVyhQdWELug+4CPutRUFr3qTj+ELbcIvQ39IbP7 RwFcQ7gLhccSECVHAyJVmXC5OUqz8WKDVehVwTuu+GLkXlHGzqOLxBPQn5p66I6N Ul9wX6cPnpZb9g== X-ME-Sender: From: "Emilio G. Cota" To: qemu-devel@nongnu.org Date: Fri, 16 Feb 2018 18:40:46 -0500 Message-Id: <1518824446-20235-4-git-send-email-cota@braap.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1518824446-20235-1-git-send-email-cota@braap.org> References: <1518824446-20235-1-git-send-email-cota@braap.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 66.111.4.29 Subject: [Qemu-devel] [PATCH 3/3] target/s390x: convert to TranslatorOps X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Cornelia Huck , qemu-s390x@nongnu.org, David Hildenbrand , Alexander Graf , Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Emilio G. Cota --- target/s390x/translate.c | 170 ++++++++++++++++++++++++-------------------= ---- 1 file changed, 86 insertions(+), 84 deletions(-) diff --git a/target/s390x/translate.c b/target/s390x/translate.c index dd504a1..2b27a69 100644 --- a/target/s390x/translate.c +++ b/target/s390x/translate.c @@ -55,10 +55,12 @@ struct DisasContext { DisasContextBase base; const DisasInsn *insn; DisasFields *fields; + uint64_t next_page_start; uint64_t ex_value; uint64_t pc, next_pc; uint32_t ilen; enum cc_op cc_op; + bool do_debug; }; =20 /* Information carried about a condition to be evaluated. */ @@ -6108,101 +6110,92 @@ static DisasJumpType translate_one(CPUS390XState *= env, DisasContext *s) return ret; } =20 -void gen_intermediate_code(CPUState *cs, struct TranslationBlock *tb) +static int s390x_tr_init_disas_context(DisasContextBase *dcbase, + CPUState *cs, int max_insns) { - CPUS390XState *env =3D cs->env_ptr; - DisasContext dc; - uint64_t next_page_start; - int num_insns, max_insns; - DisasJumpType status; - bool do_debug; + DisasContext *s =3D container_of(dcbase, DisasContext, base); =20 - dc.base.pc_first =3D tb->pc; /* 31-bit mode */ - if (!(tb->flags & FLAG_MASK_64)) { - dc.base.pc_first &=3D 0x7fffffff; + if (!(s->base.tb->flags & FLAG_MASK_64)) { + s->base.pc_first &=3D 0x7fffffff; + s->base.pc_next =3D s->base.pc_first; } - dc.base.pc_next =3D dc.base.pc_first; - dc.base.tb =3D tb; - dc.base.singlestep_enabled =3D cs->singlestep_enabled; =20 - dc.pc =3D dc.base.pc_first; - dc.cc_op =3D CC_OP_DYNAMIC; - dc.ex_value =3D dc.base.tb->cs_base; - do_debug =3D cs->singlestep_enabled; + s->pc =3D s->base.pc_first; + s->cc_op =3D CC_OP_DYNAMIC; + s->ex_value =3D s->base.tb->cs_base; + s->do_debug =3D s->base.singlestep_enabled; + s->next_page_start =3D (s->base.pc_first & TARGET_PAGE_MASK) + + TARGET_PAGE_SIZE; =20 - next_page_start =3D (dc.base.pc_first & TARGET_PAGE_MASK) + TARGET_PAG= E_SIZE; + return max_insns; +} =20 - num_insns =3D 0; - max_insns =3D tb_cflags(tb) & CF_COUNT_MASK; - if (max_insns =3D=3D 0) { - max_insns =3D CF_COUNT_MASK; - } - if (max_insns > TCG_MAX_INSNS) { - max_insns =3D TCG_MAX_INSNS; - } +static void s390x_tr_tb_start(DisasContextBase *db, CPUState *cs) +{ +} =20 - gen_tb_start(tb); +static void s390x_tr_insn_start(DisasContextBase *dcbase, CPUState *cs) +{ + DisasContext *s =3D container_of(dcbase, DisasContext, base); =20 - do { - tcg_gen_insn_start(dc.pc, dc.cc_op); - num_insns++; + tcg_gen_insn_start(s->pc, s->cc_op); +} =20 - if (unlikely(cpu_breakpoint_test(cs, dc.base.pc_next, BP_ANY))) { - status =3D DISAS_PC_STALE; - do_debug =3D true; - /* The address covered by the breakpoint must be included in - [tb->pc, tb->pc + tb->size) in order to for it to be - properly cleared -- thus we increment the PC here so that - the logic setting tb->size below does the right thing. */ - dc.pc +=3D 2; - dc.base.pc_next +=3D 2; - break; - } +static bool s390x_tr_breakpoint_check(DisasContextBase *dcbase, CPUState *= cs, + const CPUBreakpoint *bp) +{ + DisasContext *s =3D container_of(dcbase, DisasContext, base); =20 - if (num_insns =3D=3D max_insns && (tb_cflags(tb) & CF_LAST_IO)) { - gen_io_start(); - } + s->base.is_jmp =3D DISAS_PC_STALE; + s->do_debug =3D true; + /* The address covered by the breakpoint must be included in + [tb->pc, tb->pc + tb->size) in order to for it to be + properly cleared -- thus we increment the PC here so that + the logic setting tb->size below does the right thing. */ + s->pc +=3D 2; + s->base.pc_next +=3D 2; + return true; +} =20 - status =3D translate_one(env, &dc); - dc.base.pc_next =3D dc.pc; - - /* If we reach a page boundary, are single stepping, - or exhaust instruction count, stop generation. */ - if (status =3D=3D DISAS_NEXT - && (dc.pc >=3D next_page_start - || tcg_op_buf_full() - || num_insns >=3D max_insns - || singlestep - || dc.base.singlestep_enabled - || dc.ex_value)) { - status =3D DISAS_TOO_MANY; - } - } while (status =3D=3D DISAS_NEXT); +static void s390x_tr_translate_insn(DisasContextBase *dcbase, CPUState *cs) +{ + CPUS390XState *env =3D cs->env_ptr; + DisasContext *s =3D container_of(dcbase, DisasContext, base); + + s->base.is_jmp =3D translate_one(env, s); + s->base.pc_next =3D s->pc; =20 - if (tb_cflags(tb) & CF_LAST_IO) { - gen_io_end(); + if (s->base.is_jmp =3D=3D DISAS_NEXT + && (s->pc >=3D s->next_page_start + || s->ex_value)) { + s->base.is_jmp =3D DISAS_TOO_MANY; } +} =20 - switch (status) { +static void s390x_tr_tb_stop(DisasContextBase *dcbase, CPUState *cs) +{ + DisasContext *s =3D container_of(dcbase, DisasContext, base); + + switch (s->base.is_jmp) { case DISAS_GOTO_TB: case DISAS_NORETURN: break; case DISAS_TOO_MANY: case DISAS_PC_STALE: case DISAS_PC_STALE_NOCHAIN: - update_psw_addr(&dc); + update_psw_addr(s); /* FALLTHRU */ case DISAS_PC_UPDATED: /* Next TB starts off with CC_OP_DYNAMIC, so make sure the cc op type is in env */ - update_cc_op(&dc); + update_cc_op(s); /* FALLTHRU */ case DISAS_PC_CC_UPDATED: /* Exit the TB, either by raising a debug exception or by return. = */ - if (do_debug) { + if (s->do_debug) { gen_exception(EXCP_DEBUG); - } else if (use_exit_tb(&dc) || status =3D=3D DISAS_PC_STALE_NOCHAI= N) { + } else if (use_exit_tb(s) || s->base.is_jmp =3D=3D DISAS_PC_STALE_= NOCHAIN) { tcg_gen_exit_tb(0); } else { tcg_gen_lookup_and_goto_ptr(); @@ -6211,27 +6204,36 @@ void gen_intermediate_code(CPUState *cs, struct Tra= nslationBlock *tb) default: g_assert_not_reached(); } +} =20 - gen_tb_end(tb, num_insns); - - tb->size =3D dc.pc - dc.base.pc_first; - tb->icount =3D num_insns; +static void s390x_tr_disas_log(const DisasContextBase *dcbase, CPUState *c= s) +{ + DisasContext *s =3D container_of(dcbase, DisasContext, base); =20 -#if defined(S390X_DEBUG_DISAS) - if (qemu_loglevel_mask(CPU_LOG_TB_IN_ASM) - && qemu_log_in_addr_range(dc.base.pc_first)) { - qemu_log_lock(); - if (unlikely(dc.ex_value)) { - /* ??? Unfortunately log_target_disas can't use host memory. = */ - qemu_log("IN: EXECUTE %016" PRIx64 "\n", dc.ex_value); - } else { - qemu_log("IN: %s\n", lookup_symbol(dc.base.pc_first)); - log_target_disas(cs, dc.base.pc_first, dc.pc - dc.base.pc_firs= t); - qemu_log("\n"); - } - qemu_log_unlock(); + if (unlikely(s->ex_value)) { + /* ??? Unfortunately log_target_disas can't use host memory. */ + qemu_log("IN: EXECUTE %016" PRIx64, s->ex_value); + } else { + qemu_log("IN: %s\n", lookup_symbol(s->base.pc_first)); + log_target_disas(cs, s->base.pc_first, s->base.tb->size); } -#endif +} + +static const TranslatorOps s390x_tr_ops =3D { + .init_disas_context =3D s390x_tr_init_disas_context, + .tb_start =3D s390x_tr_tb_start, + .insn_start =3D s390x_tr_insn_start, + .breakpoint_check =3D s390x_tr_breakpoint_check, + .translate_insn =3D s390x_tr_translate_insn, + .tb_stop =3D s390x_tr_tb_stop, + .disas_log =3D s390x_tr_disas_log, +}; + +void gen_intermediate_code(CPUState *cs, TranslationBlock *tb) +{ + DisasContext dc; + + translator_loop(&s390x_tr_ops, &dc.base, cs, tb); } =20 void restore_state_to_opc(CPUS390XState *env, TranslationBlock *tb, --=20 2.7.4