[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 13/15] target/s390x: Remove DisasFields argument from extract_insn
From: |
Cornelia Huck |
Subject: |
[PULL 13/15] target/s390x: Remove DisasFields argument from extract_insn |
Date: |
Mon, 27 Jan 2020 13:20:14 +0100 |
From: Richard Henderson <address@hidden>
The separate pointer is now redundant.
Signed-off-by: Richard Henderson <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Thomas Huth <address@hidden>
Signed-off-by: Cornelia Huck <address@hidden>
---
target/s390x/translate.c | 19 ++++++++-----------
1 file changed, 8 insertions(+), 11 deletions(-)
diff --git a/target/s390x/translate.c b/target/s390x/translate.c
index 3674fee10c83..0bd2073718ed 100644
--- a/target/s390x/translate.c
+++ b/target/s390x/translate.c
@@ -6183,8 +6183,7 @@ static void extract_field(DisasFields *o, const
DisasField *f, uint64_t insn)
/* Lookup the insn at the current PC, extracting the operands into O and
returning the info struct for the insn. Returns NULL for invalid insn. */
-static const DisasInsn *extract_insn(CPUS390XState *env, DisasContext *s,
- DisasFields *f)
+static const DisasInsn *extract_insn(CPUS390XState *env, DisasContext *s)
{
uint64_t insn, pc = s->base.pc_next;
int op, op2, ilen;
@@ -6264,13 +6263,14 @@ static const DisasInsn *extract_insn(CPUS390XState
*env, DisasContext *s,
break;
}
- memset(f, 0, sizeof(*f));
- f->raw_insn = insn;
- f->op = op;
- f->op2 = op2;
+ memset(&s->fields, 0, sizeof(s->fields));
+ s->fields.raw_insn = insn;
+ s->fields.op = op;
+ s->fields.op2 = op2;
/* Lookup the instruction. */
info = lookup_opc(op << 8 | op2);
+ s->insn = info;
/* If we found it, extract the operands. */
if (info != NULL) {
@@ -6278,7 +6278,7 @@ static const DisasInsn *extract_insn(CPUS390XState *env,
DisasContext *s,
int i;
for (i = 0; i < NUM_C_FIELD; ++i) {
- extract_field(f, &format_info[fmt].op[i], insn);
+ extract_field(&s->fields, &format_info[fmt].op[i], insn);
}
}
return info;
@@ -6302,10 +6302,7 @@ static DisasJumpType translate_one(CPUS390XState *env,
DisasContext *s)
DisasOps o = {};
/* Search for the insn in the table. */
- insn = extract_insn(env, s, &s->fields);
-
- /* Set up the strutures we use to communicate with the helpers. */
- s->insn = insn;
+ insn = extract_insn(env, s);
/* Emit insn_start now that we know the ILEN. */
tcg_gen_insn_start(s->base.pc_next, s->cc_op, s->ilen);
--
2.21.1
- [PULL 03/15] s390x/event-facility.c: remove unneeded labels, (continued)
- [PULL 03/15] s390x/event-facility.c: remove unneeded labels, Cornelia Huck, 2020/01/27
- [PULL 04/15] s390x: adapter routes error handling, Cornelia Huck, 2020/01/27
- [PULL 05/15] s390x/event-facility: fix error propagation, Cornelia Huck, 2020/01/27
- [PULL 06/15] target/s390x: Remove duplicated ifdef macro, Cornelia Huck, 2020/01/27
- [PULL 07/15] docs/devel: fix stable process doc formatting, Cornelia Huck, 2020/01/27
- [PULL 09/15] target/s390x: Move struct DisasFields definition earlier, Cornelia Huck, 2020/01/27
- [PULL 08/15] target/s390x/kvm: Enable adapter interruption suppression again, Cornelia Huck, 2020/01/27
- [PULL 10/15] target/s390x: Remove DisasFields argument from callbacks, Cornelia Huck, 2020/01/27
- [PULL 12/15] target/s390x: Move DisasFields into DisasContext, Cornelia Huck, 2020/01/27
- [PULL 14/15] hw/s390x: Add a more verbose comment about get_machine_class() and the wrappers, Cornelia Huck, 2020/01/27
- [PULL 13/15] target/s390x: Remove DisasFields argument from extract_insn,
Cornelia Huck <=
- [PULL 15/15] s390x: sigp: Fix sense running reporting, Cornelia Huck, 2020/01/27
- [PULL 11/15] target/s390x: Pass DisasContext to get_field and have_field, Cornelia Huck, 2020/01/27
- Re: [PULL 00/15] s390x update, Peter Maydell, 2020/01/27