qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Fredrik Noring <noring@nocrew.org>
To: "Philippe Mathieu-Daudé" <f4bug@amsat.org>
Cc: Aleksandar Markovic <aleksandar.markovic@rt-rk.com>,
	peter.maydell@linaro.org,
	"Maciej W. Rozycki" <macro@linux-mips.org>,
	qemu-devel@nongnu.org, amarkovic@wavecomp.com
Subject: Re: [Qemu-devel] [PULL 8/8] target/mips: Preparing for adding MMI instructions
Date: Sat, 12 Dec 2020 11:04:18 +0100	[thread overview]
Message-ID: <X9SVovtcemt9CClm@sx9> (raw)
In-Reply-To: <8c3ac05a-91d4-6830-4ede-6574aca8af94@amsat.org>

On Fri, Nov 13, 2020 at 10:39:42AM +0100, Philippe Mathieu-Daudé wrote:
> On 2/27/19 3:00 PM, Aleksandar Markovic wrote:
> > From: Mateja Marjanovic <Mateja.Marjanovic@rt-rk.com>
> > 
> > Set up MMI code to be compiled only for TARGET_MIPS64. This is
> > needed so that GPRs are 64 bit, and combined with MMI registers,
> > they will form full 128 bit registers.
> > 
> > Signed-off-by: Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
> > Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com>
> > Reviewed-by: Aleksandar Rikalo <arikalo@wavecomp.com>
> > Message-Id: <1551183797-13570-2-git-send-email-mateja.marjanovic@rt-rk.com>
> > ---
> >  target/mips/translate.c | 43 +++++++++++++++++++++++++++++++++++++++++--
> >  1 file changed, 41 insertions(+), 2 deletions(-)
> ...
> 
> >  static void decode_opc_special3(CPUMIPSState *env, DisasContext *ctx)
> >  {
> >      int rs, rt, rd, sa;
> > @@ -28796,10 +28828,11 @@ static void decode_opc(CPUMIPSState *env, DisasContext *ctx)
> >          decode_opc_special(env, ctx);
> >          break;
> >      case OPC_SPECIAL2:
> > +#if defined(TARGET_MIPS64)
> >          if ((ctx->insn_flags & INSN_R5900) && (ctx->insn_flags & ASE_MMI)) {
> >              decode_mmi(env, ctx);
> 
> This change is incorrect, you removed support for the
> MADD[U] and MULT[U] instructions on TXx9 32-bit targets
> (TX79 still works).

The 128-bit MMIs and R5900 specific registers are always valid on R5900
hardware regardless of 32- and 64-bit operation modes[1]. CP0.Status.UX
isn't implemented[2]. In other MIPS ISA implementations, attempting to
execute 64-bit operations in 32-bit user or supervisor mode may cause a
reserved instruction exception.

It would be wise to limit any R5900 specific psABIs, while permitting
useful features such as the MMIs. GCC emits MULT[U] for R5900 o32.

Fredrik

References:

[1] "EE Core User's Manual", version 6.0, Sony Computer Entertainment Inc.,
    p. 107.

[2] "TX System RISC TX79 Core Architecture" manual, revision 2.0,
    Toshiba Corporation, p. 4-16, https://wiki.qemu.org/File:C790.pdf


  reply	other threads:[~2020-12-12 10:05 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-27 14:00 [Qemu-devel] [PULL 0/8] MIPS queue for February 27th, 2019 Aleksandar Markovic
2019-02-27 14:00 ` [Qemu-devel] [PULL 1/8] tests/tcg: target/mips: Add tests for MSA integer compare instructions Aleksandar Markovic
2019-02-27 14:00 ` [Qemu-devel] [PULL 2/8] disas: nanoMIPS: Fix a function misnomer Aleksandar Markovic
2019-02-27 14:00 ` [Qemu-devel] [PULL 3/8] qemu-doc: Move section on MIPS' mipssim pseudo board Aleksandar Markovic
2019-02-27 14:00 ` [Qemu-devel] [PULL 4/8] qemu-doc: Add section on MIPS' Fulong 2E board Aleksandar Markovic
2019-02-27 14:00 ` [Qemu-devel] [PULL 5/8] qemu-doc: Add section on MIPS' Boston board Aleksandar Markovic
2019-02-27 14:00 ` [Qemu-devel] [PULL 6/8] tests/tcg: target/mips: Add wrappers for MSA integer max/min instructions Aleksandar Markovic
2019-02-27 14:00 ` [Qemu-devel] [PULL 7/8] tests/tcg: target/mips: Add tests " Aleksandar Markovic
2019-02-27 14:00 ` [Qemu-devel] [PULL 8/8] target/mips: Preparing for adding MMI instructions Aleksandar Markovic
2020-11-13  9:39   ` Philippe Mathieu-Daudé
2020-12-12 10:04     ` Fredrik Noring [this message]
2019-02-28 16:11 ` [Qemu-devel] [PULL 0/8] MIPS queue for February 27th, 2019 Peter Maydell

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=X9SVovtcemt9CClm@sx9 \
    --to=noring@nocrew.org \
    --cc=aleksandar.markovic@rt-rk.com \
    --cc=amarkovic@wavecomp.com \
    --cc=f4bug@amsat.org \
    --cc=macro@linux-mips.org \
    --cc=peter.maydell@linaro.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).