All of lore.kernel.org
 help / color / mirror / Atom feed
From: Aleksandar Markovic <aleksandar.m.mail@gmail.com>
To: Aleksandar Markovic <amarkovic@wavecomp.com>
Cc: Aleksandar Rikalo <arikalo@wavecomp.com>,
	aurelien@aurel32.net,
	Mateja Marjanovic <mateja.marjanovic@rt-rk.com>,
	qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 1/2] target/mips: Improve performance for MSA binary operations
Date: Sun, 2 Jun 2019 09:06:54 +0200	[thread overview]
Message-ID: <CAL1e-=gfyTOeYZtgZ=xpgUDje2jG1N05cH9-2-dCcgMcaoJ21A@mail.gmail.com> (raw)
In-Reply-To: <BN6PR2201MB1251E8A4D8209209DAC36D69C61A0@BN6PR2201MB1251.namprd22.prod.outlook.com>

On Jun 1, 2019 4:16 PM, "Aleksandar Markovic" <amarkovic@wavecomp.com>
wrote:
>
> > From: Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
> > Sent: Monday, March 4, 2019 5:51 PM
> > To: qemu-devel@nongnu.org
> > Cc: aurelien@aurel32.net; Aleksandar Markovic; Aleksandar Rikalo
> > Subject: [PATCH 1/2] target/mips: Improve performance for MSA binary
operations
> >
> > From: Mateja Marjanovic <Mateja.Marjanovic@rt-rk.com>
> >
> > Eliminate loops for better performance.
> >
> > Signed-off-by: Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
> > ---
> >  target/mips/msa_helper.c | 43
++++++++++++++++++++++++++++++-------------
> >  1 file changed, 30 insertions(+), 13 deletions(-)
> >
>
> The commit message should be a little bit more informative - for example,
> it could list the affected instructions. Please consider other groups of
> MSA instructions that are implemented via helpers that use similar "for"
> loops. Otherwise:
>
> Reviewed-by: Aleksandar Markovic <amarkovic@wavecomp.com>
>

Mateja, you don't need to do anything regarding this patch, I am going to
fix the issues while appying.

Thanks, Aleksandar

> > diff --git a/target/mips/msa_helper.c b/target/mips/msa_helper.c
> > index 4c7ec05..1152fda 100644
> > --- a/target/mips/msa_helper.c
> > +++ b/target/mips/msa_helper.c
> > @@ -804,28 +804,45 @@ void helper_msa_ ## func ## _df(CPUMIPSState
*env, uint32_t > df,         \
> >      wr_t *pwd = &(env->active_fpu.fpr[wd].wr);
  \
> >      wr_t *pws = &(env->active_fpu.fpr[ws].wr);
  \
> >      wr_t *pwt = &(env->active_fpu.fpr[wt].wr);
  \
> > -    uint32_t i;
 \
> >
  \
> >      switch (df) {
 \
> >      case DF_BYTE:
 \
> > -        for (i = 0; i < DF_ELEMENTS(DF_BYTE); i++) {
  \
> > -            pwd->b[i] = msa_ ## func ## _df(df, pws->b[i],
pwt->b[i]);  \
> > -        }
 \
> > +        pwd->b[0]  = msa_ ## func ## _df(df, pws->b[0], pwt->b[0]);
 \
> > +        pwd->b[1]  = msa_ ## func ## _df(df, pws->b[1], pwt->b[1]);
 \
> > +        pwd->b[2]  = msa_ ## func ## _df(df, pws->b[2], pwt->b[2]);
 \
> > +        pwd->b[3]  = msa_ ## func ## _df(df, pws->b[3], pwt->b[3]);
 \
> > +        pwd->b[4]  = msa_ ## func ## _df(df, pws->b[4], pwt->b[4]);
 \
> > +        pwd->b[5]  = msa_ ## func ## _df(df, pws->b[5], pwt->b[5]);
 \
> > +        pwd->b[6]  = msa_ ## func ## _df(df, pws->b[6], pwt->b[6]);
 \
> > +        pwd->b[7]  = msa_ ## func ## _df(df, pws->b[7], pwt->b[7]);
 \
> > +        pwd->b[8]  = msa_ ## func ## _df(df, pws->b[8], pwt->b[8]);
 \
> > +        pwd->b[9]  = msa_ ## func ## _df(df, pws->b[9], pwt->b[9]);
 \
> > +        pwd->b[10] = msa_ ## func ## _df(df, pws->b[10], pwt->b[10]);
 \
> > +        pwd->b[11] = msa_ ## func ## _df(df, pws->b[11], pwt->b[11]);
 \
> > +        pwd->b[12] = msa_ ## func ## _df(df, pws->b[12], pwt->b[12]);
 \
> > +        pwd->b[13] = msa_ ## func ## _df(df, pws->b[13], pwt->b[13]);
 \
> > +        pwd->b[14] = msa_ ## func ## _df(df, pws->b[14], pwt->b[14]);
 \
> > +        pwd->b[15] = msa_ ## func ## _df(df, pws->b[15], pwt->b[15]);
 \
> >          break;
  \
> >      case DF_HALF:
 \
> > -        for (i = 0; i < DF_ELEMENTS(DF_HALF); i++) {
  \
> > -            pwd->h[i] = msa_ ## func ## _df(df, pws->h[i],
pwt->h[i]);  \
> > -        }
 \
> > +        pwd->h[0] = msa_ ## func ## _df(df, pws->h[0], pwt->h[0]);
  \
> > +        pwd->h[1] = msa_ ## func ## _df(df, pws->h[1], pwt->h[1]);
  \
> > +        pwd->h[2] = msa_ ## func ## _df(df, pws->h[2], pwt->h[2]);
  \
> > +        pwd->h[3] = msa_ ## func ## _df(df, pws->h[3], pwt->h[3]);
  \
> > +        pwd->h[4] = msa_ ## func ## _df(df, pws->h[4], pwt->h[4]);
  \
> > +        pwd->h[5] = msa_ ## func ## _df(df, pws->h[5], pwt->h[5]);
  \
> > +        pwd->h[6] = msa_ ## func ## _df(df, pws->h[6], pwt->h[6]);
  \
> > +        pwd->h[7] = msa_ ## func ## _df(df, pws->h[7], pwt->h[7]);
  \
> >          break;
  \
> >      case DF_WORD:
 \
> > -        for (i = 0; i < DF_ELEMENTS(DF_WORD); i++) {
  \
> > -            pwd->w[i] = msa_ ## func ## _df(df, pws->w[i],
pwt->w[i]);  \
> > -        }
 \
> > +        pwd->w[0] = msa_ ## func ## _df(df, pws->w[0], pwt->w[0]);
  \
> > +        pwd->w[1] = msa_ ## func ## _df(df, pws->w[1], pwt->w[1]);
  \
> > +        pwd->w[2] = msa_ ## func ## _df(df, pws->w[2], pwt->w[2]);
  \
> > +        pwd->w[3] = msa_ ## func ## _df(df, pws->w[3], pwt->w[3]);
  \
> >          break;
  \
> >      case DF_DOUBLE:
 \
> > -        for (i = 0; i < DF_ELEMENTS(DF_DOUBLE); i++) {
  \
> > -            pwd->d[i] = msa_ ## func ## _df(df, pws->d[i],
pwt->d[i]);  \
> > -        }
 \
> > +        pwd->d[0] = msa_ ## func ## _df(df, pws->d[0], pwt->d[0]);
  \
> > +        pwd->d[1] = msa_ ## func ## _df(df, pws->d[1], pwt->d[1]);
  \
> >          break;
  \
> >      default:
  \
> >          assert(0);
  \
> > --
> > 2.7.4
> >
> >

  reply	other threads:[~2019-06-02  7:08 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-04 16:51 [Qemu-devel] [PATCH 0/2] target/mips: Improve performance for MSA binary operations Mateja Marjanovic
2019-03-04 16:51 ` [Qemu-devel] [PATCH 1/2] " Mateja Marjanovic
2019-06-01 14:16   ` Aleksandar Markovic
2019-06-02  7:06     ` Aleksandar Markovic [this message]
2019-06-03  9:46       ` Mateja Marjanovic
2019-06-02 13:22   ` Alex Bennée
2019-06-03 13:10     ` Aleksandar Markovic
2019-06-03 13:29       ` Mateja Marjanovic
2019-03-04 16:51 ` [Qemu-devel] [PATCH 2/2] target/mips: Tests for binary integer MSA instruction (add, adds, hadd...) Mateja Marjanovic
2019-03-04 18:43   ` Aleksandar Markovic

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='CAL1e-=gfyTOeYZtgZ=xpgUDje2jG1N05cH9-2-dCcgMcaoJ21A@mail.gmail.com' \
    --to=aleksandar.m.mail@gmail.com \
    --cc=amarkovic@wavecomp.com \
    --cc=arikalo@wavecomp.com \
    --cc=aurelien@aurel32.net \
    --cc=mateja.marjanovic@rt-rk.com \
    --cc=qemu-devel@nongnu.org \
    /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.