From: Alexander Graf <agraf@suse.de>
To: Richard Henderson <rth@twiddle.net>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v2] s390x: Add laa and laag instructions
Date: Tue, 12 May 2015 22:46:28 +0200 [thread overview]
Message-ID: <555266A4.7050100@suse.de> (raw)
In-Reply-To: <5552622D.6020305@twiddle.net>
On 05/12/2015 10:27 PM, Richard Henderson wrote:
> On 05/12/2015 01:20 PM, Alexander Graf wrote:
>> +static void in2_m2_32s_atomic(DisasContext *s, DisasFields *f, DisasOps *o)
>> +{
>> + /* XXX should reserve the address */
>> + in2_m2_32s(s, f, o);
>> +}
>> +#define SPEC_in2_m2_32s_atomic 0
>> +
>> +static void in2_m2_64_atomic(DisasContext *s, DisasFields *f, DisasOps *o)
>> +{
>> + /* XXX should reserve the address */
>> + in2_m2_64(s, f, o);
>> +}
>> +#define SPEC_in2_m2_64_atomic 0
>> +
> I think these should save the address in o->addr1 so that you don't have to
> recompute it in the wout functions.
But I suppose you basically mean something like this?
Alex
diff --git a/target-s390x/translate.c b/target-s390x/translate.c
index 73f2de3..8a30c8f 100644
--- a/target-s390x/translate.c
+++ b/target-s390x/translate.c
@@ -4074,25 +4074,17 @@ static void wout_m2_32(DisasContext *s,
DisasFields *f, DisasOps *o)
static void wout_m2_32_r1_atomic(DisasContext *s, DisasFields *f,
DisasOps *o)
{
- TCGv_i64 a2 = get_a2(s, f);
-
/* XXX release reservation */
- tcg_gen_qemu_st32(o->out, a2, get_mem_index(s));
+ tcg_gen_qemu_st32(o->out, o->addr1, get_mem_index(s));
store_reg32_i64(get_field(f, r1), o->in2);
-
- tcg_temp_free_i64(a2);
}
#define SPEC_wout_m2_32_r1_atomic 0
static void wout_m2_64_r1_atomic(DisasContext *s, DisasFields *f,
DisasOps *o)
{
- TCGv_i64 a2 = get_a2(s, f);
-
/* XXX release reservation */
- tcg_gen_qemu_st64(o->out, a2, get_mem_index(s));
+ tcg_gen_qemu_st64(o->out, o->addr1, get_mem_index(s));
store_reg(get_field(f, r1), o->in2);
-
- tcg_temp_free_i64(a2);
}
#define SPEC_wout_m2_64_r1_atomic 0
@@ -4519,14 +4511,18 @@ static void in2_mri2_64(DisasContext *s,
DisasFields *f, DisasOps *o)
static void in2_m2_32s_atomic(DisasContext *s, DisasFields *f,
DisasOps *o)
{
/* XXX should reserve the address */
- in2_m2_32s(s, f, o);
+ o->addr1 = get_a2(s, f);
+ o->in2 = tcg_temp_new_i64();
+ tcg_gen_qemu_ld32s(o->in2, o->addr1, get_mem_index(s));
}
#define SPEC_in2_m2_32s_atomic 0
static void in2_m2_64_atomic(DisasContext *s, DisasFields *f, DisasOps *o)
{
/* XXX should reserve the address */
- in2_m2_64(s, f, o);
+ o->addr1 = get_a2(s, f);
+ o->in2 = tcg_temp_new_i64();
+ tcg_gen_qemu_ld64(o->in2, o->addr1, get_mem_index(s));
}
#define SPEC_in2_m2_64_atomic 0
next prev parent reply other threads:[~2015-05-12 20:46 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-12 20:20 [Qemu-devel] [PATCH v2] s390x: Add laa and laag instructions Alexander Graf
2015-05-12 20:27 ` Richard Henderson
2015-05-12 20:42 ` Alexander Graf
2015-05-12 21:15 ` Richard Henderson
2015-05-12 20:46 ` Alexander Graf [this message]
2015-05-12 21:19 ` Richard Henderson
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=555266A4.7050100@suse.de \
--to=agraf@suse.de \
--cc=qemu-devel@nongnu.org \
--cc=rth@twiddle.net \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.