From: Richard Henderson <richard.henderson@linaro.org>
To: qemu-devel@nongnu.org
Cc: David Hildenbrand <david@redhat.com>,
Ilya Leoshkevich <iii@linux.ibm.com>,
Thomas Huth <thuth@redhat.com>,
qemu-s390x@nongnu.org
Subject: [PATCH v3 16/20] target/s390x: Remove assert vs g_in2
Date: Sat, 4 Mar 2023 10:18:56 -0800 [thread overview]
Message-ID: <20230304181900.1097116-17-richard.henderson@linaro.org> (raw)
In-Reply-To: <20230304181900.1097116-1-richard.henderson@linaro.org>
These were trying to determine if o->in2 was available for
use as a temporary. It's better to just allocate a new one.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
Cc: David Hildenbrand <david@redhat.com>
Cc: Ilya Leoshkevich <iii@linux.ibm.com>
Cc: Thomas Huth <thuth@redhat.com>
Cc: qemu-s390x@nongnu.org
---
target/s390x/tcg/translate.c | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/target/s390x/tcg/translate.c b/target/s390x/tcg/translate.c
index beccd3429e..c431903c67 100644
--- a/target/s390x/tcg/translate.c
+++ b/target/s390x/tcg/translate.c
@@ -1428,11 +1428,11 @@ static DisasJumpType op_andi(DisasContext *s, DisasOps *o)
int shift = s->insn->data & 0xff;
int size = s->insn->data >> 8;
uint64_t mask = ((1ull << size) - 1) << shift;
+ TCGv_i64 t = tcg_temp_new_i64();
- assert(!o->g_in2);
- tcg_gen_shli_i64(o->in2, o->in2, shift);
- tcg_gen_ori_i64(o->in2, o->in2, ~mask);
- tcg_gen_and_i64(o->out, o->in1, o->in2);
+ tcg_gen_shli_i64(t, o->in2, shift);
+ tcg_gen_ori_i64(t, t, ~mask);
+ tcg_gen_and_i64(o->out, o->in1, t);
/* Produce the CC from only the bits manipulated. */
tcg_gen_andi_i64(cc_dst, o->out, mask);
@@ -3520,10 +3520,10 @@ static DisasJumpType op_ori(DisasContext *s, DisasOps *o)
int shift = s->insn->data & 0xff;
int size = s->insn->data >> 8;
uint64_t mask = ((1ull << size) - 1) << shift;
+ TCGv_i64 t = tcg_temp_new_i64();
- assert(!o->g_in2);
- tcg_gen_shli_i64(o->in2, o->in2, shift);
- tcg_gen_or_i64(o->out, o->in1, o->in2);
+ tcg_gen_shli_i64(t, o->in2, shift);
+ tcg_gen_or_i64(o->out, o->in1, t);
/* Produce the CC from only the bits manipulated. */
tcg_gen_andi_i64(cc_dst, o->out, mask);
@@ -4832,10 +4832,10 @@ static DisasJumpType op_xori(DisasContext *s, DisasOps *o)
int shift = s->insn->data & 0xff;
int size = s->insn->data >> 8;
uint64_t mask = ((1ull << size) - 1) << shift;
+ TCGv_i64 t = tcg_temp_new_i64();
- assert(!o->g_in2);
- tcg_gen_shli_i64(o->in2, o->in2, shift);
- tcg_gen_xor_i64(o->out, o->in1, o->in2);
+ tcg_gen_shli_i64(t, o->in2, shift);
+ tcg_gen_xor_i64(o->out, o->in1, t);
/* Produce the CC from only the bits manipulated. */
tcg_gen_andi_i64(cc_dst, o->out, mask);
--
2.34.1
next prev parent reply other threads:[~2023-03-04 18:22 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-04 18:18 [PATCH v3 00/20] tcg: drop tcg_temp_free from translators Richard Henderson
2023-03-04 18:18 ` [PATCH v3 01/20] target/i386: Drop tcg_temp_free Richard Henderson
2023-03-05 17:43 ` Peter Maydell
2023-03-04 18:18 ` [PATCH v3 02/20] target/mips: Drop tcg_temp_free from micromips_translate.c.inc Richard Henderson
2023-03-04 18:18 ` [PATCH v3 03/20] target/mips: Drop tcg_temp_free from mips16e_translate.c.inc Richard Henderson
2023-03-04 22:23 ` Jiaxun Yang
2023-03-04 18:18 ` [PATCH v3 04/20] target/mips: Drop tcg_temp_free from msa_translate.c Richard Henderson
2023-03-04 18:18 ` [PATCH v3 05/20] target/mips: Drop tcg_temp_free from mxu_translate.c Richard Henderson
2023-03-04 18:18 ` [PATCH v3 06/20] target/mips: Drop tcg_temp_free from nanomips_translate.c.inc Richard Henderson
2023-03-04 18:18 ` [PATCH v3 07/20] target/mips: Drop tcg_temp_free from octeon_translate.c Richard Henderson
2023-03-04 18:18 ` [PATCH v3 08/20] target/mips: Drop tcg_temp_free from translate_addr_const.c Richard Henderson
2023-03-04 18:18 ` [PATCH v3 09/20] target/mips: Drop tcg_temp_free from tx79_translate.c Richard Henderson
2023-03-04 18:18 ` [PATCH v3 10/20] target/mips: Fix trans_mult_acc return Richard Henderson
2023-03-04 18:18 ` [PATCH v3 11/20] target/mips: Drop tcg_temp_free from vr54xx_translate.c Richard Henderson
2023-03-04 18:18 ` [PATCH v3 12/20] target/mips: Drop tcg_temp_free from translate.c Richard Henderson
2023-03-04 18:18 ` [PATCH v3 13/20] target/s390x: Drop free_compare Richard Henderson
2023-03-06 10:50 ` Ilya Leoshkevich
2023-03-06 11:00 ` David Hildenbrand
2023-03-04 18:18 ` [PATCH v3 14/20] target/s390x: Drop tcg_temp_free from translate_vx.c.inc Richard Henderson
2023-03-06 10:51 ` Ilya Leoshkevich
2023-03-06 11:01 ` David Hildenbrand
2023-03-04 18:18 ` [PATCH v3 15/20] target/s390x: Drop tcg_temp_free from translate.c Richard Henderson
2023-03-06 10:52 ` Ilya Leoshkevich
2023-03-06 11:01 ` David Hildenbrand
2023-03-04 18:18 ` Richard Henderson [this message]
2023-03-06 10:53 ` [PATCH v3 16/20] target/s390x: Remove assert vs g_in2 Ilya Leoshkevich
2023-03-06 11:01 ` David Hildenbrand
2023-03-04 18:18 ` [PATCH v3 17/20] target/s390x: Remove g_out, g_out2, g_in1, g_in2 from DisasContext Richard Henderson
2023-03-06 11:02 ` David Hildenbrand
2023-03-06 11:06 ` Ilya Leoshkevich
2023-03-04 18:18 ` [PATCH v3 18/20] target/tricore: Drop tcg_temp_free Richard Henderson
2023-03-05 17:42 ` Peter Maydell
2023-03-04 18:18 ` [PATCH v3 19/20] tracing: remove transform.py Richard Henderson
2023-03-05 17:19 ` Alex Bennée
2023-03-06 17:41 ` Stefan Hajnoczi
2023-03-04 18:19 ` [PATCH v3 20/20] tcg: Create tcg/tcg-temp-internal.h Richard Henderson
2023-03-05 17:20 ` Alex Bennée
2023-03-06 8:06 ` [PATCH v3 00/20] tcg: drop tcg_temp_free from translators Philippe Mathieu-Daudé
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230304181900.1097116-17-richard.henderson@linaro.org \
--to=richard.henderson@linaro.org \
--cc=david@redhat.com \
--cc=iii@linux.ibm.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-s390x@nongnu.org \
--cc=thuth@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).