qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Aurelien Jarno <aurelien@aurel32.net>
To: Richard Henderson <rth@twiddle.net>
Cc: qemu-devel@nongnu.org, Alexander Graf <agraf@suse.de>
Subject: Re: [Qemu-devel] [PATCH 09/13] target-s390x: implement TRANSLATE EXTENDED instruction
Date: Tue, 2 Jun 2015 21:05:34 +0200	[thread overview]
Message-ID: <20150602190534.GD26129@aurel32.net> (raw)
In-Reply-To: <556DE2D7.5000005@twiddle.net>

On 2015-06-02 10:07, Richard Henderson wrote:
> On 06/01/2015 02:24 PM, Aurelien Jarno wrote:
> > +/* TRANSLATE EXTENDED */
> > +    C(0xb2a5, TRE,     RRE,   Z,   0, 0, 0, 0, tre, 0)
> ...
> > +static ExitStatus op_tre(DisasContext *s, DisasOps *o)
> > +{
> > +    TCGv_i32 r1 = tcg_const_i32(get_field(s->fields, r1));
> > +    TCGv_i32 r2 = tcg_const_i32(get_field(s->fields, r2));
> > +    potential_page_fault(s);
> > +    gen_helper_tre(cpu_env, r1, r2);
> > +    tcg_temp_free_i32(r1);
> > +    tcg_temp_free_i32(r2);
> > +    set_cc_static(s);
> > +    return NO_EXIT;
> > +}
> 
> Missing the specification exception for odd r1.

Good catch.

> Easily fixable by using prep_r1_P.  You don't necessarily have to do anything
> else -- merely prepping out+out2 are sufficient.
> 
> But why don't we just pass and return (most) of the data to the helper?  Like
> 
>   C(0xb2a5, TRE,     RRE,   Z,   0, r2, r1_P, 0, tre, 0)
> 
>   potential_page_fault(s);
>   gen_helper_tre(o->out, cpu_env, o->out, o->out2, o->in2);
>   return_low128(o->out2);
>   set_cc_static(s);

My point was that we need to pass 4 values (reg0, r1, r1+1 and r2) and
return 3 values (r1, r1+1 and cc), so it's probably better to pass all
of them the same way. It's the strategy chosen for other similar
instructions (e.g mvcl), except for cc.

I'll change that in the next version.

-- 
Aurelien Jarno                          GPG: 4096R/1DDD8C9B
aurelien@aurel32.net                 http://www.aurel32.net

  reply	other threads:[~2015-06-02 19:05 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-01 21:24 [Qemu-devel] [PATCH 00/13] target-s390x: fixes improvements Aurelien Jarno
2015-06-01 21:24 ` [Qemu-devel] [PATCH 01/13] target-s390x: fix exception for invalid operation code Aurelien Jarno
2015-06-02 16:41   ` Richard Henderson
2015-06-01 21:24 ` [Qemu-devel] [PATCH 02/13] target-s390x: fix CLGIT instruction Aurelien Jarno
2015-06-02  0:45   ` Richard Henderson
2015-06-01 21:24 ` [Qemu-devel] [PATCH 03/13] target-s390x: rename BRXHLE instruction into BRXLG Aurelien Jarno
2015-06-02  1:33   ` Richard Henderson
2015-06-02  7:34     ` Aurelien Jarno
2015-06-01 21:24 ` [Qemu-devel] [PATCH 04/13] target-s390x: change CHRL and CGHRL format to RIL-b Aurelien Jarno
2015-06-02  1:38   ` Richard Henderson
2015-06-01 21:24 ` [Qemu-devel] [PATCH 05/13] target-s390x: move STORE CLOCK FAST to the correct facility Aurelien Jarno
2015-06-02  2:43   ` Richard Henderson
2015-06-01 21:24 ` [Qemu-devel] [PATCH 06/13] target-s390x: move SET DFP ROUNDING MODE " Aurelien Jarno
2015-06-02  2:54   ` Richard Henderson
2015-06-01 21:24 ` [Qemu-devel] [PATCH 07/13] target-s390x: implement LOAD FP INTEGER instructions Aurelien Jarno
2015-06-02  3:07   ` Richard Henderson
2015-06-02  7:34     ` Aurelien Jarno
2015-06-01 21:24 ` [Qemu-devel] [PATCH 08/13] target-s390x: implement TRANSLATE AND TEST instruction Aurelien Jarno
2015-06-02  4:28   ` Richard Henderson
2015-06-01 21:24 ` [Qemu-devel] [PATCH 09/13] target-s390x: implement TRANSLATE EXTENDED instruction Aurelien Jarno
2015-06-02 17:07   ` Richard Henderson
2015-06-02 19:05     ` Aurelien Jarno [this message]
2015-06-02 20:42       ` Richard Henderson
2015-06-01 21:24 ` [Qemu-devel] [PATCH 10/13] target-s390x: implement LPDFR and LNDFR instructions Aurelien Jarno
2015-06-02 17:12   ` Richard Henderson
2015-06-01 21:24 ` [Qemu-devel] [PATCH 11/13] target-s390x: implement miscellaneous-instruction-extensions facility Aurelien Jarno
2015-06-02 17:15   ` Richard Henderson
2015-06-01 21:24 ` [Qemu-devel] [PATCH 12/13] target-s390x: implement load-and-trap facility Aurelien Jarno
2015-06-02 17:35   ` Richard Henderson
2015-06-01 21:24 ` [Qemu-devel] [PATCH 13/13] target-s390x: implement high-word facility Aurelien Jarno
2015-06-02 18:07   ` 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=20150602190534.GD26129@aurel32.net \
    --to=aurelien@aurel32.net \
    --cc=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 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).