qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Aleksandar Rikalo <arikalo@wavecomp.com>
To: Aleksandar Markovic <aleksandar.markovic@rt-rk.com>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Cc: Aleksandar Markovic <amarkovic@wavecomp.com>
Subject: Re: [Qemu-devel] [PATCH v6 8/8] target/mips: Fix big endian host behavior for interleave MSA instructions
Date: Wed, 26 Jun 2019 10:13:09 +0000	[thread overview]
Message-ID: <DM5PR22MB16581E0A25343FB6F5464D53D2E20@DM5PR22MB1658.namprd22.prod.outlook.com> (raw)
In-Reply-To: <1561543629-20327-9-git-send-email-aleksandar.markovic@rt-rk.com>

> From: Aleksandar Markovic <aleksandar.markovic@rt-rk.com>
> Sent: Wednesday, June 26, 2019 12:07 PM
> To: qemu-devel@nongnu.org
> Cc: Aleksandar Markovic; Aleksandar Rikalo
> Subject: [PATCH v6 8/8] target/mips: Fix big endian host behavior for interleave MSA instructions
>
> From: Aleksandar Markovic <amarkovic@wavecomp.com>
>
> Fix big endian host behavior for interleave MSA instructions. Previous
> fix used TARGET_WORDS_BIGENDIAN instead of HOST_WORDS_BIGENDIAN, which
> was a mistake.
>
> Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com>
> ---
>  target/mips/msa_helper.c | 24 ++++++++++++------------
>  1 file changed, 12 insertions(+), 12 deletions(-)
>
> diff --git a/target/mips/msa_helper.c b/target/mips/msa_helper.c
> index 7a9bfb3..8bad636 100644
> --- a/target/mips/msa_helper.c
> +++ b/target/mips/msa_helper.c
> @@ -1737,7 +1737,7 @@ void helper_msa_ilvev_df(CPUMIPSState *env, uint32_t df, uint32_t wd,
>
>      switch (df) {
>      case DF_BYTE:
> -#if defined(TARGET_WORDS_BIGENDIAN)
> +#if defined(HOST_WORDS_BIGENDIAN)
>          pwd->b[8]  = pws->b[9];
>          pwd->b[9]  = pwt->b[9];
>          pwd->b[10] = pws->b[11];
> @@ -1774,7 +1774,7 @@ void helper_msa_ilvev_df(CPUMIPSState *env, uint32_t df, uint32_t wd,
>  #endif
>          break;
>      case DF_HALF:
> -#if defined(TARGET_WORDS_BIGENDIAN)
> +#if defined(HOST_WORDS_BIGENDIAN)
>          pwd->h[4] = pws->h[5];
>          pwd->h[5] = pwt->h[5];
>          pwd->h[6] = pws->h[7];
> @@ -1795,7 +1795,7 @@ void helper_msa_ilvev_df(CPUMIPSState *env, uint32_t df, uint32_t wd,
>  #endif
>          break;
>      case DF_WORD:
> -#if defined(TARGET_WORDS_BIGENDIAN)
> +#if defined(HOST_WORDS_BIGENDIAN)
>          pwd->w[2] = pws->w[3];
>          pwd->w[3] = pwt->w[3];
>          pwd->w[0] = pws->w[1];
> @@ -1825,7 +1825,7 @@ void helper_msa_ilvod_df(CPUMIPSState *env, uint32_t df, uint32_t wd,
>
>      switch (df) {
>      case DF_BYTE:
> -#if defined(TARGET_WORDS_BIGENDIAN)
> +#if defined(HOST_WORDS_BIGENDIAN)
>          pwd->b[7]  = pwt->b[6];
>          pwd->b[6]  = pws->b[6];
>          pwd->b[5]  = pwt->b[4];
> @@ -1862,7 +1862,7 @@ void helper_msa_ilvod_df(CPUMIPSState *env, uint32_t df, uint32_t wd,
>  #endif
>          break;
>      case DF_HALF:
> -#if defined(TARGET_WORDS_BIGENDIAN)
> +#if defined(HOST_WORDS_BIGENDIAN)
>          pwd->h[3] = pwt->h[2];
>          pwd->h[2] = pws->h[2];
>          pwd->h[1] = pwt->h[0];
> @@ -1883,7 +1883,7 @@ void helper_msa_ilvod_df(CPUMIPSState *env, uint32_t df, uint32_t wd,
>  #endif
>          break;
>      case DF_WORD:
> -#if defined(TARGET_WORDS_BIGENDIAN)
> +#if defined(HOST_WORDS_BIGENDIAN)
>          pwd->w[1] = pwt->w[0];
>          pwd->w[0] = pws->w[0];
>          pwd->w[3] = pwt->w[2];
> @@ -1913,7 +1913,7 @@ void helper_msa_ilvl_df(CPUMIPSState *env, uint32_t df, uint32_t wd,
>
>      switch (df) {
>      case DF_BYTE:
> -#if defined(TARGET_WORDS_BIGENDIAN)
> +#if defined(HOST_WORDS_BIGENDIAN)
>          pwd->b[7]  = pwt->b[15];
>          pwd->b[6]  = pws->b[15];
>          pwd->b[5]  = pwt->b[14];
> @@ -1950,7 +1950,7 @@ void helper_msa_ilvl_df(CPUMIPSState *env, uint32_t df, uint32_t wd,
>  #endif
>          break;
>      case DF_HALF:
> -#if defined(TARGET_WORDS_BIGENDIAN)
> +#if defined(HOST_WORDS_BIGENDIAN)
>          pwd->h[3] = pwt->h[7];
>          pwd->h[2] = pws->h[7];
>          pwd->h[1] = pwt->h[6];
> @@ -1971,7 +1971,7 @@ void helper_msa_ilvl_df(CPUMIPSState *env, uint32_t df, uint32_t wd,
>  #endif
>          break;
>      case DF_WORD:
> -#if defined(TARGET_WORDS_BIGENDIAN)
> +#if defined(HOST_WORDS_BIGENDIAN)
>          pwd->w[1] = pwt->w[3];
>          pwd->w[0] = pws->w[3];
>          pwd->w[3] = pwt->w[2];
> @@ -2001,7 +2001,7 @@ void helper_msa_ilvr_df(CPUMIPSState *env, uint32_t df, uint32_t wd,
>
>      switch (df) {
>      case DF_BYTE:
> -#if defined(TARGET_WORDS_BIGENDIAN)
> +#if defined(HOST_WORDS_BIGENDIAN)
>          pwd->b[8]  = pws->b[0];
>          pwd->b[9]  = pwt->b[0];
>          pwd->b[10] = pws->b[1];
> @@ -2038,7 +2038,7 @@ void helper_msa_ilvr_df(CPUMIPSState *env, uint32_t df, uint32_t wd,
>  #endif
>          break;
>      case DF_HALF:
> -#if defined(TARGET_WORDS_BIGENDIAN)
> +#if defined(HOST_WORDS_BIGENDIAN)
>          pwd->h[4] = pws->h[0];
>          pwd->h[5] = pwt->h[0];
>          pwd->h[6] = pws->h[1];
> @@ -2059,7 +2059,7 @@ void helper_msa_ilvr_df(CPUMIPSState *env, uint32_t df, uint32_t wd,
>  #endif
>          break;
>      case DF_WORD:
> -#if defined(TARGET_WORDS_BIGENDIAN)
> +#if defined(HOST_WORDS_BIGENDIAN)
>          pwd->w[2] = pws->w[0];
>          pwd->w[3] = pwt->w[0];
>          pwd->w[0] = pws->w[1];
> --
> 2.7.4

Reviewed-by: Aleksandar Rikalo <arikalo@wavecomp.com>


      reply	other threads:[~2019-06-26 10:18 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-26 10:07 [Qemu-devel] [PATCH v6 0/8] target/mips: Improve MSA TCG tests Aleksandar Markovic
2019-06-26 10:07 ` [Qemu-devel] [PATCH v6 1/8] tests/tcg: target/mips: Add tests for MSA bit move instructions Aleksandar Markovic
2019-06-26 10:07 ` [Qemu-devel] [PATCH v6 2/8] tests/tcg: target/mips: Add tests for MSA " Aleksandar Markovic
2019-06-26 10:07 ` [Qemu-devel] [PATCH v6 3/8] tests/tcg: target/mips: Amend tests for MSA int dot product instructions Aleksandar Markovic
2019-06-26 10:07 ` [Qemu-devel] [PATCH v6 4/8] tests/tcg: target/mips: Amend tests for MSA int multiply instructions Aleksandar Markovic
2019-06-26 10:07 ` [Qemu-devel] [PATCH v6 5/8] tests/tcg: target/mips: Add support for MSA big-endian target testings Aleksandar Markovic
2019-06-26 10:07 ` [Qemu-devel] [PATCH v6 6/8] tests/tcg: target/mips: Add support for MSA MIPS32R6 testings Aleksandar Markovic
2019-06-26 10:07 ` [Qemu-devel] [PATCH v6 7/8] tests/tcg: target/mips: Fix some test cases for pack MSA instructions Aleksandar Markovic
2019-06-26 10:12   ` Aleksandar Rikalo
2019-06-26 10:07 ` [Qemu-devel] [PATCH v6 8/8] target/mips: Fix big endian host behavior for interleave " Aleksandar Markovic
2019-06-26 10:13   ` Aleksandar Rikalo [this message]

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=DM5PR22MB16581E0A25343FB6F5464D53D2E20@DM5PR22MB1658.namprd22.prod.outlook.com \
    --to=arikalo@wavecomp.com \
    --cc=aleksandar.markovic@rt-rk.com \
    --cc=amarkovic@wavecomp.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 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).