[Qemu-devel] [PATCH v3 0/5] Add support for MSA instructions on a big endian host

Mateja Marjanovic posted 5 patches 5 years ago
Test docker-mingw@fedora passed
Test docker-clang@ubuntu failed
Test checkpatch passed
Test asan passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/1553845000-6537-1-git-send-email-mateja.marjanovic@rt-rk.com
Maintainers: Aleksandar Rikalo <arikalo@wavecomp.com>, Aurelien Jarno <aurelien@aurel32.net>, Aleksandar Markovic <amarkovic@wavecomp.com>
target/mips/helper.h     |  16 +-
target/mips/msa_helper.c | 182 ++++++++++++++++-------
target/mips/op_helper.c  | 376 ++++++++++++++++++++++++++++++++++++++++++-----
target/mips/translate.c  |  59 +++++++-
4 files changed, 533 insertions(+), 100 deletions(-)
[Qemu-devel] [PATCH v3 0/5] Add support for MSA instructions on a big endian host
Posted by Mateja Marjanovic 5 years ago
From: Mateja Marjanovic <Mateja.Marjanovic@rt-rk.com>

Add support for MSA instructions while executing QEMU on a
machine that uses big endian MIPS CPU. Also change the
implementation of helpers for MSA instructions
ST.<B|H|W|D>, LD.<B|H|W|D>, INSERT.<B|H|W> (and D on MIPS64),
COPY_S.<B|H|W> (and D on MIPS64) and COPY_U.<B|H> (and W
on MIPS64). Instead of using a switch in a helper, which is
called many times, put a switch in translate.c file, which
is called only a few times.

v3:
 - Unroll loops in ST.<B|H|W|D> and LD.<B|H|W|D>
   instructions.
 - Eliminate macro that generates the helpers for
   the ST.<B|H|W|D> and LD.<B|H|W|D> instructions,
   and add four helpers for each (for byte,
   halfword, word and doubleword).
 - Eliminate the helpers for INSERT.<B|H|W|D>,
   COPY_S.<B|H|W|D> and COPY_U.<B|H|W> and add
   four (three in case of COPY_U) helpers for
   each one.

Mateja Marjanovic (5):
  target/mips: MSA instructions ld, big endian host fix
  target/mips: MSA instructions st, big endian host fix
  target/mips: Different approach toward COPY_S MSA instr. and big
    endian fix
  target/mips: Different approach toward COPY_U MSA instr. and big
    endian fix
  target/mips: Different approach toward INSERT MSA instr. and big
    endian fix

 target/mips/helper.h     |  16 +-
 target/mips/msa_helper.c | 182 ++++++++++++++++-------
 target/mips/op_helper.c  | 376 ++++++++++++++++++++++++++++++++++++++++++-----
 target/mips/translate.c  |  59 +++++++-
 4 files changed, 533 insertions(+), 100 deletions(-)

-- 
2.7.4


Re: [Qemu-devel] [PATCH v3 0/5] Add support for MSA instructions on a big endian host
Posted by Aleksandar Markovic 5 years ago
> From: Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
> Subject: [PATCH v3 0/5] Add support for MSA instructions on a big endian host

"Add" -> "Fix"

Big endian host support should have worked from the moment MSA
support is added to QEMU.

>
> From: Mateja Marjanovic <Mateja.Marjanovic@rt-rk.com>
> 
> Add support for MSA instructions while executing QEMU on a
> machine that uses big endian MIPS CPU. Also change the
> implementation of helpers for MSA instructions
> ST.<B|H|W|D>, LD.<B|H|W|D>, INSERT.<B|H|W> (and D on MIPS64),
> COPY_S.<B|H|W> (and D on MIPS64) and COPY_U.<B|H> (and W
> on MIPS64). Instead of using a switch in a helper, which is
> called many times, put a switch in translate.c file, which
> is called only a few times.
> 

This paragraph suggests that there are essentially two independent
changes in this series (one for big endian host, another for refactoring
helpers), while in reality they are closely related. You should have
started the second sentence with "This is achieved by changing the
implementation of helpers for...".

> v3:
>  - Unroll loops in ST.<B|H|W|D> and LD.<B|H|W|D>
>    instructions.
>  - Eliminate macro that generates the helpers for
>    the ST.<B|H|W|D> and LD.<B|H|W|D> instructions,
>    and add four helpers for each (for byte,
>    halfword, word and doubleword).
>  - Eliminate the helpers for INSERT.<B|H|W|D>,
>    COPY_S.<B|H|W|D> and COPY_U.<B|H|W> and add
>    four (three in case of COPY_U) helpers for
>    each one.
> 

The cover letter should contain the complete series history.

Thanks,
Aleksandar

> Mateja Marjanovic (5):
>   target/mips: MSA instructions ld, big endian host fix
>   target/mips: MSA instructions st, big endian host fix
>   target/mips: Different approach toward COPY_S MSA instr. and big
>     endian fix
>   target/mips: Different approach toward COPY_U MSA instr. and big
>     endian fix
>   target/mips: Different approach toward INSERT MSA instr. and big
>     endian fix


Re: [Qemu-devel] [PATCH v3 0/5] Add support for MSA instructions on a big endian host
Posted by Mateja Marjanovic 5 years ago
On 1.4.19. 19:53, Aleksandar Markovic wrote:
>> From: Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
>> Subject: [PATCH v3 0/5] Add support for MSA instructions on a big endian host
> "Add" -> "Fix"
>
> Big endian host support should have worked from the moment MSA
> support is added to QEMU.
I will change it in v4.
>
>> From: Mateja Marjanovic <Mateja.Marjanovic@rt-rk.com>
>>
>> Add support for MSA instructions while executing QEMU on a
>> machine that uses big endian MIPS CPU. Also change the
>> implementation of helpers for MSA instructions
>> ST.<B|H|W|D>, LD.<B|H|W|D>, INSERT.<B|H|W> (and D on MIPS64),
>> COPY_S.<B|H|W> (and D on MIPS64) and COPY_U.<B|H> (and W
>> on MIPS64). Instead of using a switch in a helper, which is
>> called many times, put a switch in translate.c file, which
>> is called only a few times.
>>
> This paragraph suggests that there are essentially two independent
> changes in this series (one for big endian host, another for refactoring
> helpers), while in reality they are closely related. You should have
> started the second sentence with "This is achieved by changing the
> implementation of helpers for...".
I will make it more clear in v4.
>
>> v3:
>>   - Unroll loops in ST.<B|H|W|D> and LD.<B|H|W|D>
>>     instructions.
>>   - Eliminate macro that generates the helpers for
>>     the ST.<B|H|W|D> and LD.<B|H|W|D> instructions,
>>     and add four helpers for each (for byte,
>>     halfword, word and doubleword).
>>   - Eliminate the helpers for INSERT.<B|H|W|D>,
>>     COPY_S.<B|H|W|D> and COPY_U.<B|H|W> and add
>>     four (three in case of COPY_U) helpers for
>>     each one.
>>
> The cover letter should contain the complete series history.
I thought only the last version was necessary, but from now
on I will write the complete series history.
>
> Thanks,
> Aleksandar
>
>> Mateja Marjanovic (5):
>>    target/mips: MSA instructions ld, big endian host fix
>>    target/mips: MSA instructions st, big endian host fix
>>    target/mips: Different approach toward COPY_S MSA instr. and big
>>      endian fix
>>    target/mips: Different approach toward COPY_U MSA instr. and big
>>      endian fix
>>    target/mips: Different approach toward INSERT MSA instr. and big
>>      endian fix
Thanks,
Mateja