From: Fredrik Noring <noring@nocrew.org>
To: "Maciej W. Rozycki" <macro@linux-mips.org>
Cc: "Richard Henderson" <richard.henderson@linaro.org>,
"Peter Maydell" <peter.maydell@linaro.org>,
"Aleksandar Markovic" <amarkovic@wavecomp.com>,
"Philippe Mathieu-Daudé" <f4bug@amsat.org>,
"Aurelien Jarno" <aurelien@aurel32.net>,
"Petar Jovanovic" <pjovanovic@wavecomp.com>,
"Jürgen Urban" <JuergenUrban@gmx.de>,
qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v8 00/38] target/mips: Limited support for the R5900
Date: Thu, 25 Oct 2018 20:20:46 +0200 [thread overview]
Message-ID: <20181025182046.GA13326@sx9> (raw)
In-Reply-To: <alpine.LFD.2.21.1810251839110.19280@eddie.linux-mips.org>
Hi Maciej,
> > Is the membership field intended to be used? The opcodes for CLZ and CLO
> > clash with the R5900 opcodes for MADD1 and MADDU1, resulting in incorrect
> > disassembly of MADD1 and MADDU1. For example:
> >
> > 0x70853020 madd1 a2,a0,a1 disassembles into clz a2 or a1,a0
> > 0x70853021 maddu1 a2,a0,a1 disassembles into clo a2 or a1,a0
> >
> > (CLZ and CLO are members of I32|N55, whereas MADD1 and MADDU1 are EE.)
>
> It looks like a disassembler bug somewhere then (maybe in your patched
> version only), because the R5900 is not supposed to match I32 (because it
> does not implement the MIPS32 ISA; it's only MIPS I aka I1 with additions
> or MIPS IV aka I4 with exclusions, or anything between with both additions
> and exclusions, with I believe MIPS III aka I3 being the closest match),
> and it is not supposed to match N55 either (because it is obviously not a
> Vr5500 processor).
I think the "bug" is that the membership field is defined but unused, so
opcode memberships are simply ignored. OPCODE_IS_MEMBER is defined to be
always true, for all opcodes and all ISAs.
> Overall this source file is clearly a modified copy of an ancient version
> of the opcode table included with the opcodes library from binutils and I
> think it would benefit from a refresh. In particular separating an ASE
> field and adding an exclusions field, as it has been done with opcodes,
> would make it much easier to maintain this table. The table in opcodes is
> already messy due to several exceptions to the alphabetical order (and it
> could be improved a bit I believe), but I find its QEMU version even
> messier.
Agreed! QEMU's scripts/checkpatch.pl warns and errors on 80 and 90 column
violations, so trying avoid check breakage leaves the table unaligned too.
Fredrik
next prev parent reply other threads:[~2018-10-25 18:20 UTC|newest]
Thread overview: 57+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-22 12:57 [Qemu-devel] [PULL 00/34] MIPS queue for October 2018 - part 2 Aleksandar Markovic
2018-10-22 12:57 ` [Qemu-devel] [PULL 01/34] target/mips: Define R5900 ISA, MMI ASE, and R5900 CPU preprocessor constants Aleksandar Markovic
2018-10-22 12:57 ` [Qemu-devel] [PULL 02/34] disas/mips: Define R5900 disassembly constants Aleksandar Markovic
2018-10-22 12:57 ` [Qemu-devel] [PULL 03/34] target/mips: R5900 Multimedia Instruction overview note Aleksandar Markovic
2018-10-22 12:57 ` [Qemu-devel] [PULL 04/34] target/mips: Define R5900 MMI class, and LQ and SQ opcode constants Aleksandar Markovic
2018-10-22 12:57 ` [Qemu-devel] [PULL 05/34] target/mips: Define R5900 MMI{0, 1, 2, 3} subclasses and MMI " Aleksandar Markovic
2018-10-22 12:57 ` [Qemu-devel] [PULL 06/34] target/mips: Define R5900 MMI0 " Aleksandar Markovic
2018-10-22 12:57 ` [Qemu-devel] [PULL 07/34] target/mips: Define R5900 MMI1 " Aleksandar Markovic
2018-10-22 12:57 ` [Qemu-devel] [PULL 08/34] target/mips: Define R5900 MMI2 " Aleksandar Markovic
2018-10-22 12:57 ` [Qemu-devel] [PULL 09/34] target/mips: Define R5900 MMI3 " Aleksandar Markovic
2018-10-22 12:57 ` [Qemu-devel] [PULL 10/34] target/mips: Placeholder for R5900 SQ, handle user mode RDHWR Aleksandar Markovic
2018-10-22 12:57 ` [Qemu-devel] [PULL 11/34] target/mips: Placeholder for R5900 LQ Aleksandar Markovic
2018-10-22 12:57 ` [Qemu-devel] [PULL 12/34] target/mips: Placeholder for R5900 MMI instruction class Aleksandar Markovic
2018-10-22 12:57 ` [Qemu-devel] [PULL 13/34] target/mips: Placeholder for R5900 MMI0 instruction subclass Aleksandar Markovic
2018-10-22 12:57 ` [Qemu-devel] [PULL 14/34] target/mips: Placeholder for R5900 MMI1 " Aleksandar Markovic
2018-10-22 12:57 ` [Qemu-devel] [PULL 15/34] target/mips: Placeholder for R5900 MMI2 " Aleksandar Markovic
2018-10-22 12:57 ` [Qemu-devel] [PULL 16/34] target/mips: Placeholder for R5900 MMI3 " Aleksandar Markovic
2018-10-22 12:57 ` [Qemu-devel] [PULL 17/34] target/mips: Support R5900 three-operand MULT and MULTU instructions Aleksandar Markovic
2018-10-22 12:57 ` [Qemu-devel] [PULL 18/34] target/mips: Support R5900 three-operand MULT1 and MULTU1 instructions Aleksandar Markovic
2018-10-22 12:57 ` [Qemu-devel] [PULL 19/34] target/mips: Support R5900 MFLO1, MTLO1, MFHI1 and MTHI1 instructions Aleksandar Markovic
2018-10-22 12:57 ` [Qemu-devel] [PULL 20/34] target/mips: Support R5900 DIV1 and DIVU1 instructions Aleksandar Markovic
2018-10-22 12:57 ` [Qemu-devel] [PULL 21/34] target/mips: Support R5900 MOVN, MOVZ and PREF instructions from MIPS IV Aleksandar Markovic
2018-10-22 12:57 ` [Qemu-devel] [PULL 22/34] target/mips: R5900 DMULT[U], DDIV[U], LL[D] and SC[D] are user only Aleksandar Markovic
2018-10-22 12:57 ` [Qemu-devel] [PULL 23/34] tests/tcg/mips: Test R5900 three-operand MULT Aleksandar Markovic
2018-10-22 12:57 ` [Qemu-devel] [PULL 24/34] tests/tcg/mips: Test R5900 three-operand MULTU Aleksandar Markovic
2018-10-22 12:57 ` [Qemu-devel] [PULL 25/34] tests/tcg/mips: Test R5900 three-operand MULT1 Aleksandar Markovic
2018-10-22 12:57 ` [Qemu-devel] [PULL 26/34] tests/tcg/mips: Test R5900 three-operand MULTU1 Aleksandar Markovic
2018-10-22 12:57 ` [Qemu-devel] [PULL 27/34] tests/tcg/mips: Test R5900 MFLO1 and MFHI1 Aleksandar Markovic
2018-10-22 12:57 ` [Qemu-devel] [PULL 28/34] tests/tcg/mips: Test R5900 MTLO1 and MTHI1 Aleksandar Markovic
2018-10-22 12:57 ` [Qemu-devel] [PULL 29/34] tests/tcg/mips: Test R5900 DIV1 Aleksandar Markovic
2018-10-22 12:57 ` [Qemu-devel] [PULL 30/34] tests/tcg/mips: Test R5900 DIVU1 Aleksandar Markovic
2018-10-22 12:57 ` [Qemu-devel] [PULL 31/34] target/mips: Define the R5900 CPU Aleksandar Markovic
2018-10-22 12:57 ` [Qemu-devel] [PULL 32/34] linux-user/mips: Recognise the R5900 CPU model Aleksandar Markovic
2018-10-22 12:57 ` [Qemu-devel] [PULL 33/34] target/mips: Fix the title of translate.c Aleksandar Markovic
2018-10-22 12:57 ` [Qemu-devel] [PULL 34/34] target/mips: Fix decoding of ALIGN and DALIGN instructions Aleksandar Markovic
2018-10-23 19:49 ` [Qemu-devel] [PULL 00/34] MIPS queue for October 2018 - part 2 Peter Maydell
2018-10-23 20:37 ` [Qemu-devel] [PATCH v8 00/38] target/mips: Limited support for the R5900 Fredrik Noring
2018-10-24 8:04 ` Richard Henderson
2018-10-25 17:01 ` Fredrik Noring
2018-10-25 18:03 ` Maciej W. Rozycki
2018-10-25 18:20 ` Fredrik Noring [this message]
2018-10-26 7:26 ` Richard Henderson
2018-10-26 13:12 ` Maciej W. Rozycki
-- strict thread matches above, loose matches on Subject: below --
2018-10-21 15:30 Fredrik Noring
2018-10-22 13:03 ` Aleksandar Markovic
2018-10-22 17:23 ` Fredrik Noring
2018-10-22 18:10 ` Aleksandar Markovic
2018-10-22 19:00 ` Fredrik Noring
2018-10-22 18:31 ` Maciej W. Rozycki
2018-10-22 18:40 ` Maciej W. Rozycki
2018-10-22 23:16 ` Philippe Mathieu-Daudé
2018-10-23 19:10 ` Fredrik Noring
2018-10-25 17:38 ` Maciej W. Rozycki
2018-10-26 13:42 ` Fredrik Noring
2018-10-22 23:35 ` Philippe Mathieu-Daudé
2018-10-23 19:25 ` Fredrik Noring
2018-10-23 22:04 ` Maciej W. Rozycki
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=20181025182046.GA13326@sx9 \
--to=noring@nocrew.org \
--cc=JuergenUrban@gmx.de \
--cc=amarkovic@wavecomp.com \
--cc=aurelien@aurel32.net \
--cc=f4bug@amsat.org \
--cc=macro@linux-mips.org \
--cc=peter.maydell@linaro.org \
--cc=pjovanovic@wavecomp.com \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.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).