[Qemu-devel] [PULL v2 00/44] MIPS pull request for December 2018 - v2

Aleksandar Markovic posted 44 patches 6 years, 10 months ago
Test asan passed
Test checkpatch passed
Test docker-mingw@fedora passed
Test docker-quick@centos7 passed
Test docker-clang@ubuntu passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/1546268200-26966-1-git-send-email-aleksandar.markovic@rt-rk.com
MAINTAINERS                       |   21 +-
disas/nanomips.cpp                | 2155 ++++++++++++++++++-------------------
disas/nanomips.h                  |  125 +--
include/qemu/atomic.h             |    5 +-
target/mips/translate.c           | 1007 ++++++++++++++---
tests/tcg/mips/mipsr5900/Makefile |    2 +
tests/tcg/mips/mipsr5900/madd.c   |   78 ++
tests/tcg/mips/mipsr5900/maddu.c  |   70 ++
8 files changed, 2178 insertions(+), 1285 deletions(-)
create mode 100644 tests/tcg/mips/mipsr5900/madd.c
create mode 100644 tests/tcg/mips/mipsr5900/maddu.c
[Qemu-devel] [PULL v2 00/44] MIPS pull request for December 2018 - v2
Posted by Aleksandar Markovic 6 years, 10 months ago
From: Aleksandar Markovic <amarkovic@wavecomp.com>

The following changes since commit 9b2e891ec5ccdb4a7d583b77988848282606fdea:

  Merge remote-tracking branch 'remotes/marcel/tags/rdma-pull-request' into staging (2018-12-22 11:25:31 +0000)

are available in the git repository at:

  https://github.com/AMarkovic/qemu tags/mips-queue-dec-2018-v2

for you to fetch changes up to 96446398f47b70cf0998412314730709570e08c5:

  tests/tcg: mips: Test R5900 three-operand MADDU1 (2018-12-31 15:47:28 +0100)

----------------------------------------------------------------

MIPS queue for December 2018 - v2


  - this queue contains various amendments to MIPS code
  - there are three checkpatch warnings that should be ingnored
    in given circumstances
  - most of the patches are not yet visible/noticeable to the end
    user, just a single note related to Paul's patch will be added
    to ChangeLog

v1->v2:

  - added three patches that were meanwhile tested better

----------------------------------------------------------------

Aleksandar Markovic (36):
  MAINTAINERS: target/mips: Add MIPS files under default-configs
    directory
  MAINTAINERS: target/mips: Add filter for mips in email subjects
  MAINTAINERS: target/mips: Reorder items alphabetically
  MAINTAINERS: Add Aleksandar Rikalo as a reviewer for MIPS content
  target/mips: MXU: Add missing opcodes/decoding for LX* instructions
  target/mips: MXU: Add generic naming for optn2 constants
  target/mips: MXU: Improve the comment containing MXU overview
  target/mips: MXU: Add handlers for logic instructions
  target/mips: MXU: Add handlers for max/min instructions
  target/mips: MXU: Add handler for an align instruction
  disas: nanoMIPS: Fix preamble text in nanomips.* files
  disas: nanoMIPS: Remove functions that are not used
  disas: nanoMIPS: Fix a function misnomer
  disas: nanoMIPS: Fix order of some invocations
  disas: nanoMIPS: Name some functions in a more descriptive way
  disas: nanoMIPS: Fix an FP-related misnomer 1
  disas: nanoMIPS: Fix an FP-related misnomer 2
  disas: nanoMIPS: Fix an FP-related misnomer 3
  disas: nanoMIPS: Name more functions in a more descriptive way
  disas: nanoMIPS: Fix order of more invocations
  disas: nanoMIPS: Rename the decoder of 'gpr3' gpr encoding type
  disas: nanoMIPS: Comment the decoder of 'gpr3' gpr encoding type
  disas: nanoMIPS: Rename the decoder of 'gpr3.src.store' gpr encoding
    type
  disas: nanoMIPS: Comment the decoder of 'gpr3.src.store' gpr encoding
    type
  disas: nanoMIPS: Rename the decoder of 'gpr4' gpr encoding type
  disas: nanoMIPS: Comment the decoder of 'gpr4' gpr encoding type
  disas: nanoMIPS: Rename the decoder of 'gpr4.zero' gpr encoding type
  disas: nanoMIPS: Comment the decoder of 'gpr4.zero' gpr encoding type
  disas: nanoMIPS: Rename the decoder of 'gpr2.reg1' gpr encoding type
  disas: nanoMIPS: Comment the decoder of 'gpr2.reg1' gpr encoding type
  disas: nanoMIPS: Rename the decoder of 'gpr2.reg2' gpr encoding type
  disas: nanoMIPS: Comment the decoder of 'gpr2.reg2' gpr encoding type
  disas: nanoMIPS: Rename the decoder of 'gpr1' gpr encoding type
  disas: nanoMIPS: Comment the decoder of 'gpr1' gpr encoding type
  disas: nanoMIPS: Reorder declarations and definitions of gpr decoders
  disas: nanoMIPS: Add a note on documentation

Fredrik Noring (5):
  target/mips: Support R5900 three-operand MADD1 and MADDU1 instructions
  tests/tcg: mips: Test R5900 three-operand MADD
  tests/tcg: mips: Test R5900 three-operand MADD1
  tests/tcg: mips: Test R5900 three-operand MADDU
  tests/tcg: mips: Test R5900 three-operand MADDU1

Paul Burton (1):
  atomics: Set ATOMIC_REG_SIZE=8 for MIPS n32

Philippe Mathieu-Daudé (1):
  target/mips: Support R5900 three-operand MADD and MADDU instructions

Stefan Weil (1):
  disas: nanoMIPS: Fix types and format strings

 MAINTAINERS                       |   21 +-
 disas/nanomips.cpp                | 2155 ++++++++++++++++++-------------------
 disas/nanomips.h                  |  125 +--
 include/qemu/atomic.h             |    5 +-
 target/mips/translate.c           | 1007 ++++++++++++++---
 tests/tcg/mips/mipsr5900/Makefile |    2 +
 tests/tcg/mips/mipsr5900/madd.c   |   78 ++
 tests/tcg/mips/mipsr5900/maddu.c  |   70 ++
 8 files changed, 2178 insertions(+), 1285 deletions(-)
 create mode 100644 tests/tcg/mips/mipsr5900/madd.c
 create mode 100644 tests/tcg/mips/mipsr5900/maddu.c

-- 
2.7.4


Re: [Qemu-devel] [PULL v2 00/44] MIPS pull request for December 2018 - v2
Posted by Peter Maydell 6 years, 10 months ago
On Mon, 31 Dec 2018 at 14:56, Aleksandar Markovic
<aleksandar.markovic@rt-rk.com> wrote:
>
> From: Aleksandar Markovic <amarkovic@wavecomp.com>
>
> The following changes since commit 9b2e891ec5ccdb4a7d583b77988848282606fdea:
>
>   Merge remote-tracking branch 'remotes/marcel/tags/rdma-pull-request' into staging (2018-12-22 11:25:31 +0000)
>
> are available in the git repository at:
>
>   https://github.com/AMarkovic/qemu tags/mips-queue-dec-2018-v2
>
> for you to fetch changes up to 96446398f47b70cf0998412314730709570e08c5:
>
>   tests/tcg: mips: Test R5900 three-operand MADDU1 (2018-12-31 15:47:28 +0100)
>
> ----------------------------------------------------------------
>
> MIPS queue for December 2018 - v2
>
>
>   - this queue contains various amendments to MIPS code
>   - there are three checkpatch warnings that should be ingnored
>     in given circumstances
>   - most of the patches are not yet visible/noticeable to the end
>     user, just a single note related to Paul's patch will be added
>     to ChangeLog
>
> v1->v2:
>
>   - added three patches that were meanwhile tested better
>

Hi; I'm afraid this doesn't build on all my test hosts:

target/mips/translate.c: In function ‘gen_mxu_Q8MAX_Q8MIN’:
target/mips/translate.c:25092:9: error: ‘for’ loop initial
declarations are only allowed in C99 mode
         for (int i = 2; i >= 0; i--) {
         ^
target/mips/translate.c:25092:9: note: use option -std=c99 or
-std=gnu99 to compile your code
target/mips/translate.c:25129:9: error: ‘for’ loop initial
declarations are only allowed in C99 mode
         for (int i = 2; i >= 0; i--) {
         ^

(This probably only shows up on builds with older versions
of gcc which don't default to c99.)

We don't use variable-declaration-in-for-loop.

thanks
-- PMM

Re: [Qemu-devel] [PULL v2 00/44] MIPS pull request for December 2018 - v2
Posted by Aleksandar Markovic 6 years, 10 months ago
> From: Peter Maydell <peter.maydell@linaro.org>
> Sent: Thursday, January 3, 2019 2:23 PM
> Subject: Re: [PULL v2 00/44] MIPS pull request for December 2018 - v2
> 
> On Mon, 31 Dec 2018 at 14:56, Aleksandar Markovic
> <aleksandar.markovic@rt-rk.com> wrote:
> >
> > From: Aleksandar Markovic <amarkovic@wavecomp.com>
> >
> > The following changes since commit 9b2e891ec5ccdb4a7d583b77988848282606fdea:
> >
> >   Merge remote-tracking branch 'remotes/marcel/tags/rdma-pull-request' into staging > (2018-12-22 11:25:31 +0000)
> >
> > are available in the git repository at:
> >
> >   https://github.com/AMarkovic/qemu tags/mips-queue-dec-2018-v2
> >
> > for you to fetch changes up to 96446398f47b70cf0998412314730709570e08c5:
> >
> >   tests/tcg: mips: Test R5900 three-operand MADDU1 (2018-12-31 15:47:28 +0100)
> >
> > ----------------------------------------------------------------
> >
> > MIPS queue for December 2018 - v2
> >
> >
> >   - this queue contains various amendments to MIPS code
> >   - there are three checkpatch warnings that should be ingnored
> >     in given circumstances
> >   - most of the patches are not yet visible/noticeable to the end
> >     user, just a single note related to Paul's patch will be added
> >     to ChangeLog
> >
> > v1->v2:
> >
> >   - added three patches that were meanwhile tested better
> >
> 
> Hi; I'm afraid this doesn't build on all my test hosts:
> 
> target/mips/translate.c: In function ‘gen_mxu_Q8MAX_Q8MIN’:
> target/mips/translate.c:25092:9: error: ‘for’ loop initial
> declarations are only allowed in C99 mode
>          for (int i = 2; i >= 0; i--) {
>          ^
> target/mips/translate.c:25092:9: note: use option -std=c99 or
> -std=gnu99 to compile your code
> target/mips/translate.c:25129:9: error: ‘for’ loop initial
> declarations are only allowed in C99 mode
>          for (int i = 2; i >= 0; i--) {
>          ^
> 
> (This probably only shows up on builds with older versions
> of gcc which don't default to c99.)
> 
> We don't use variable-declaration-in-for-loop.
> 
> thanks
> -- PMM

OK. Sorry. I am going to send v3 of the pull request updated
only with corrections for these two build errors today.

Happy holidays!

Aleksandar

Re: [Qemu-devel] [PULL v2 00/44] MIPS pull request for December 2018 - v2
Posted by Philippe Mathieu-Daudé 6 years, 10 months ago
On 1/3/19 2:23 PM, Peter Maydell wrote:
> On Mon, 31 Dec 2018 at 14:56, Aleksandar Markovic
> <aleksandar.markovic@rt-rk.com> wrote:
>> MIPS queue for December 2018 - v2
[...]
> Hi; I'm afraid this doesn't build on all my test hosts:
> 
> target/mips/translate.c: In function ‘gen_mxu_Q8MAX_Q8MIN’:
> target/mips/translate.c:25092:9: error: ‘for’ loop initial
> declarations are only allowed in C99 mode
>          for (int i = 2; i >= 0; i--) {
>          ^
> target/mips/translate.c:25092:9: note: use option -std=c99 or
> -std=gnu99 to compile your code
> target/mips/translate.c:25129:9: error: ‘for’ loop initial
> declarations are only allowed in C99 mode
>          for (int i = 2; i >= 0; i--) {
>          ^
> 
> (This probably only shows up on builds with older versions
> of gcc which don't default to c99.)
> 
> We don't use variable-declaration-in-for-loop.

Hmmm I wonder if we shouldn't relax that now than all supported
compilers do support C99.
Rational is having cleaner function declarations lead to easier reviews.

Re: [Qemu-devel] [PULL v2 00/44] MIPS pull request for December 2018 - v2
Posted by Thomas Huth 6 years, 10 months ago
On 2019-01-03 14:32, Philippe Mathieu-Daudé wrote:
> On 1/3/19 2:23 PM, Peter Maydell wrote:
>> On Mon, 31 Dec 2018 at 14:56, Aleksandar Markovic
>> <aleksandar.markovic@rt-rk.com> wrote:
>>> MIPS queue for December 2018 - v2
> [...]
>> Hi; I'm afraid this doesn't build on all my test hosts:
>>
>> target/mips/translate.c: In function ‘gen_mxu_Q8MAX_Q8MIN’:
>> target/mips/translate.c:25092:9: error: ‘for’ loop initial
>> declarations are only allowed in C99 mode
>>          for (int i = 2; i >= 0; i--) {
>>          ^
>> target/mips/translate.c:25092:9: note: use option -std=c99 or
>> -std=gnu99 to compile your code
>> target/mips/translate.c:25129:9: error: ‘for’ loop initial
>> declarations are only allowed in C99 mode
>>          for (int i = 2; i >= 0; i--) {
>>          ^
>>
>> (This probably only shows up on builds with older versions
>> of gcc which don't default to c99.)
>>
>> We don't use variable-declaration-in-for-loop.
> 
> Hmmm I wonder if we shouldn't relax that now than all supported
> compilers do support C99.

Maybe we could / should enforce compiling with -std=gnu11 now? That
would also fix the problem with the duplicated typedefs on older
compilers, see e.g.:

https://lists.gnu.org/archive/html/qemu-devel/2018-11/msg05829.html

 Thomas

Re: [Qemu-devel] [PULL v2 00/44] MIPS pull request for December 2018 - v2
Posted by Richard Henderson 6 years, 10 months ago
On 1/4/19 12:06 AM, Thomas Huth wrote:
> Maybe we could / should enforce compiling with -std=gnu11 now? That
> would also fix the problem with the duplicated typedefs on older
> compilers, see e.g.:
> 
> https://lists.gnu.org/archive/html/qemu-devel/2018-11/msg05829.html

I'm all for it.


r~

Re: [Qemu-devel] [PULL v2 00/44] MIPS pull request for December 2018 - v2
Posted by Daniel P. Berrangé 6 years, 10 months ago
On Thu, Jan 03, 2019 at 03:06:23PM +0100, Thomas Huth wrote:
> On 2019-01-03 14:32, Philippe Mathieu-Daudé wrote:
> > On 1/3/19 2:23 PM, Peter Maydell wrote:
> >> On Mon, 31 Dec 2018 at 14:56, Aleksandar Markovic
> >> <aleksandar.markovic@rt-rk.com> wrote:
> >>> MIPS queue for December 2018 - v2
> > [...]
> >> Hi; I'm afraid this doesn't build on all my test hosts:
> >>
> >> target/mips/translate.c: In function ‘gen_mxu_Q8MAX_Q8MIN’:
> >> target/mips/translate.c:25092:9: error: ‘for’ loop initial
> >> declarations are only allowed in C99 mode
> >>          for (int i = 2; i >= 0; i--) {
> >>          ^
> >> target/mips/translate.c:25092:9: note: use option -std=c99 or
> >> -std=gnu99 to compile your code
> >> target/mips/translate.c:25129:9: error: ‘for’ loop initial
> >> declarations are only allowed in C99 mode
> >>          for (int i = 2; i >= 0; i--) {
> >>          ^
> >>
> >> (This probably only shows up on builds with older versions
> >> of gcc which don't default to c99.)
> >>
> >> We don't use variable-declaration-in-for-loop.
> > 
> > Hmmm I wonder if we shouldn't relax that now than all supported
> > compilers do support C99.
> 
> Maybe we could / should enforce compiling with -std=gnu11 now? That
> would also fix the problem with the duplicated typedefs on older
> compilers, see e.g.:
> 
> https://lists.gnu.org/archive/html/qemu-devel/2018-11/msg05829.html

Your previous patch set min GCC to 4.8

  commit efc6c070acabd92283f8786cc835684d09def12f
  Author: Thomas Huth <thuth@redhat.com>
  Date:   Mon Dec 3 10:12:32 2018 +0100

    configure: Add a test for the minimum compiler version

The problem is that I found the 4.x series explicitly said gnu11 was
"incomplete and experimental" (ie don't use it)

  https://lists.gnu.org/archive/html/qemu-devel/2018-08/msg02055.html

Even if QEMU built without warnings with std11 on 4.x, i'd still be
concerned that it was silently doing something wrong due to std11
being considered experimental.

We could definitely ask for std99, as while that was also incomplete
in 4.x, it was at least /not/ marked experiemental.

Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|