qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Fredrik Noring <noring@nocrew.org>
To: Aleksandar Markovic <amarkovic@wavecomp.com>
Cc: "Aurelien Jarno" <aurelien@aurel32.net>,
	"Philippe Mathieu-Daudé" <f4bug@amsat.org>,
	"Jürgen Urban" <JuergenUrban@gmx.de>,
	"Maciej W. Rozycki" <macro@linux-mips.org>,
	qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v2 4/6] target/mips: Fix decoding mechanism of special R5900 opcodes
Date: Fri, 9 Nov 2018 14:24:11 +0100	[thread overview]
Message-ID: <20181109132411.GA2303@sx9> (raw)
In-Reply-To: <BN6PR2201MB1251F9977B0D4B901801275CC6C60@BN6PR2201MB1251.namprd22.prod.outlook.com>

Hi Aleksandar,

> > The R5900 reports itself as MIPS III ...
> 
> This is very unclear. What do you mean by this? How does R5900 do that? I
> can't find any trace of such intentions in R5900 docs.

In QEMU, we have previously defined the R5900 as MIPS III by

#define CPU_R5900 (CPU_MIPS3 | INSN_R5900)

by referring to the "Toshiba TX System RISC TX79 Core Architecture" manual

https://wiki.qemu.org/File:C790.pdf

It says in the introduction, for example, that

	3.1 Introduction

	The C790 supports all MIPS III instructions with the exception of
	64-bit multiply, 64-bit divide, Load Linked and Store Conditional
	instructions. It also supports a limited number of MIPS IV
	instructions and additional C790-specific instructions, such as
	Multiply/Add instructions and multimedia instructions.

The manual mentions MIPS III in several other places, and appendix A-1
"CPU Instruction Set Details" describes the implemented MIPS III subset.

> > ... and DMULT, DMULTU, DDIV and DDIVU
> > are part of the MIPS III ISA. They are emulated in user mode to support
> > generic MIPS III programs.
> 
> Pure MIPS III executables should not be a concern of the R5900 emulation,
> but R5900 executables.

Many Linux distributions rely on precompiled packages, and they are often
made to work with a broad range of hardware. This is done in part by
choosing a common denominator, such as MIPS III. Compatibility with other
implementations means that the R5900 more easily can be part of the MIPS
Linux ecosystem.

In contrast, Gentoo Linux mainly builds its packages locally from source,
often optimised for the hardware, such as the R5900. Even so, Gentoo does
rely on a small set of precompiled "stage 3" packages for the installation,
and so the argument above still applies.

> Could you please provide a document that would justify inclusion of these
> non-R5900 instruction in an R5900 emulation?

Would you accept the TX79 manual mentioned above as such a document?

Fredrik

  reply	other threads:[~2018-11-09 13:24 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-07 19:17 [Qemu-devel] [PATCH v2 0/6] Fix decoding mechanisms of the R5900 Fredrik Noring
2018-11-07 19:18 ` [Qemu-devel] [PATCH v2 1/6] target/mips: Fix decoding mechanism of R5900 MFLO1, MFHI1, MTLO1 and MTHI1 Fredrik Noring
2018-11-17 15:28   ` Aleksandar Markovic
2018-11-07 19:18 ` [Qemu-devel] [PATCH v2 2/6] target/mips: Fix decoding mechanism of R5900 DIV1 and DIVU1 Fredrik Noring
2018-11-07 19:18 ` [Qemu-devel] [PATCH v2 3/6] target/mips: Fix HI[ac] and LO[ac] 32-bit truncation with MIPS64 DSP ASE Fredrik Noring
2018-11-08 10:17   ` Aleksandar Markovic
2018-11-07 19:19 ` [Qemu-devel] [PATCH v2 4/6] target/mips: Fix decoding mechanism of special R5900 opcodes Fredrik Noring
2018-11-08 10:27   ` Aleksandar Markovic
2018-11-08 18:50     ` Fredrik Noring
2018-11-08 22:00       ` Maciej W. Rozycki
2018-11-09  9:50     ` Aleksandar Markovic
2018-11-09 13:24       ` Fredrik Noring [this message]
2018-11-09 14:23         ` Aleksandar Markovic
2018-11-09 14:35           ` Fredrik Noring
2018-11-09 14:37             ` Aleksandar Markovic
2018-11-09 15:23               ` Aleksandar Markovic
2018-11-09 16:49                 ` Maciej W. Rozycki
2018-11-09 13:53       ` Maciej W. Rozycki
2018-11-17 15:25   ` Aleksandar Markovic
2018-11-07 19:19 ` [Qemu-devel] [PATCH v2 5/6] target/mips: Guard check_insn_opc_user_only with INSN_R5900 check Fredrik Noring
2018-11-17 15:27   ` Aleksandar Markovic
2018-11-07 19:19 ` [Qemu-devel] [PATCH v2 6/6] target/mips: Guard check_insn " Fredrik Noring
2018-11-17 15:26   ` 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=20181109132411.GA2303@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=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).