From: Cornelia Huck <cohuck@redhat.com>
To: David Hildenbrand <david@redhat.com>
Cc: qemu-devel@nongnu.org, qemu-s390x@nongnu.org,
Thomas Huth <thuth@redhat.com>,
Richard Henderson <rth@twiddle.net>
Subject: Re: [Qemu-devel] [PATCH v2 3/7] s390x/tcg: Clarify terminology in vec_reg_offset()
Date: Mon, 25 Feb 2019 23:44:09 +0100 [thread overview]
Message-ID: <20190225234409.200a2bb6.cohuck@redhat.com> (raw)
In-Reply-To: <83bc9314-cf22-7614-d01d-acf5e745eddb@redhat.com>
On Mon, 25 Feb 2019 23:28:27 +0100
David Hildenbrand <david@redhat.com> wrote:
> On 25.02.19 21:03, David Hildenbrand wrote:
> > We will use s390x speak "Element Size" (es) for MO_8 == 0, MO_16 == 1
> > ... Simple rename of variables.
> >
> > Reviewed-by: Thomas Huth <thuth@redhat.com>
> > Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
> > Signed-off-by: David Hildenbrand <david@redhat.com>
> > ---
> > target/s390x/translate.c | 11 ++++++-----
> > 1 file changed, 6 insertions(+), 5 deletions(-)
> >
> > diff --git a/target/s390x/translate.c b/target/s390x/translate.c
> > index c646e50eb3..5e3955e4d7 100644
> > --- a/target/s390x/translate.c
> > +++ b/target/s390x/translate.c
> > @@ -145,10 +145,11 @@ void s390x_translate_init(void)
> > }
> > }
> >
> > -static inline int vec_reg_offset(uint8_t reg, uint8_t enr, TCGMemOp size)
> > +static inline int vec_reg_offset(uint8_t reg, uint8_t enr, TCGMemOp es)
> > {
> > - const uint8_t es = 1 << size;
> > - int offs = enr * es;
> > + /* Convert element size (es) - e.g. MO_U8 - to bytes */
>
> s/MO_U8/MO_8/ :(
>
> Conny, I assume you can fix that up in case there are no other comments.
> Thanks!
Sure, no problem.
>
> > + const uint8_t bytes = 1 << es;
> > + int offs = enr * bytes;
> >
> > g_assert(reg < 32);
> > /*
> > @@ -173,9 +174,9 @@ static inline int vec_reg_offset(uint8_t reg, uint8_t enr, TCGMemOp size)
> > * the two 8 byte elements have to be loaded separately. Let's force all
> > * 16 byte operations to handle it in a special way.
> > */
> > - g_assert(size <= MO_64);
> > + g_assert(es <= MO_64);
> > #ifndef HOST_WORDS_BIGENDIAN
> > - offs ^= (8 - es);
> > + offs ^= (8 - bytes);
> > #endif
> > return offs + offsetof(CPUS390XState, vregs[reg][0].d);
> > }
> >
>
>
next prev parent reply other threads:[~2019-02-25 22:44 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-25 20:03 [Qemu-devel] [PATCH v2 0/7] s390x/tcg: Cleanups and refactorings for vector instructions David Hildenbrand
2019-02-25 20:03 ` [Qemu-devel] [PATCH v2 1/7] s390x/tcg: RXE has an optional M3 field David Hildenbrand
2019-02-25 20:03 ` [Qemu-devel] [PATCH v2 2/7] s390x/tcg: Simplify disassembler operands initialization David Hildenbrand
2019-02-25 20:03 ` [Qemu-devel] [PATCH v2 3/7] s390x/tcg: Clarify terminology in vec_reg_offset() David Hildenbrand
2019-02-25 22:28 ` David Hildenbrand
2019-02-25 22:44 ` Cornelia Huck [this message]
2019-02-25 20:03 ` [Qemu-devel] [PATCH v2 4/7] s390x/tcg: Factor out vec_full_reg_offset() David Hildenbrand
2019-02-25 20:03 ` [Qemu-devel] [PATCH v2 5/7] s390x/tcg: Factor out gen_addi_and_wrap_i64() from get_address() David Hildenbrand
2019-02-25 20:03 ` [Qemu-devel] [PATCH v2 6/7] s390x/tcg: Implement LOAD LENGTHENED short HFP to long HFP David Hildenbrand
2019-02-25 20:03 ` [Qemu-devel] [PATCH v2 7/7] s390x/tcg: Implement LOAD COUNT TO BLOCK BOUNDARY David Hildenbrand
2019-02-25 20:18 ` Richard Henderson
2019-02-25 20:04 ` [Qemu-devel] [PATCH v2 0/7] s390x/tcg: Cleanups and refactorings for vector instructions David Hildenbrand
2019-02-26 9:15 ` Cornelia Huck
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=20190225234409.200a2bb6.cohuck@redhat.com \
--to=cohuck@redhat.com \
--cc=david@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-s390x@nongnu.org \
--cc=rth@twiddle.net \
--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 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.