From: Thiemo Seufer <ths@networkno.de>
To: gdb-patches@sourceware.org, rsandifo@nildram.co.uk
Subject: Re: MIPS32R2 simulator fixes
Date: Mon, 22 Oct 2007 13:42:00 -0000 [thread overview]
Message-ID: <20071022120918.GB25397@networkno.de> (raw)
In-Reply-To: <87sl43v2ls.fsf@firetop.home>
Richard Sandiford wrote:
> When extending GCC's -mpaired-single support to MIPS32R2, I noticed
> that many of the instructions weren't simulated correctly for
> mipsisa32r2-elfoabi:
>
> - Most of the instructions that are implemented by MIPS32R2 targets
> with a 64-bit FPU have the requisite "*mips32r2" marker, but their
> filter is "64,f" rather than "32,f". ("32" and "64" are the word
> size, not the FPU size.)
>
> - 64-bit loads and stores need to use do_load_double and
> do_store_double for 32-bit targets.
>
> - SDXC1 and SUXC1 weren't implemented for MIPS32R2.
>
> - The MIPS32R2 version of check_fmt_p checks UX and PX, but those
> flags are always read as 0 on MIPS32R2 targets. There isn't
> AFAIK any way of turning off paired-single instructions when
> using a MIPS32R2 target that has a 64-bit FPU.
It is correct that there's no separate switch to disable paired single
when the MIPS-3D ASE is implemented. There is, however, the 3D bit in
FCR0 which announces the availablity of paired single instructions,
it should be set for the MIPS32R2/MIPS64* emulations.
> (check_fmt_p
> doesn't need to check that the 64-bit FPU is in 64-bit mode;
> that's done elsewhere.)
>
> - LUXC1 and SUXC1 are unpredictable when the FPU is not in 64-bit mode.
> (True for MIPS64 as well as MIPS32, and unpredictability is ignored
> for MIPS V.)
>
> Note that mips*-sde-elf* uses mips64r2, so users of that configuration
> wouldn't have come across the first four problems.
>
> Tested with GCC on mipsisa32r2-elfoabi and mipsisa64r2-elfoabi.
> OK to install?
>
> Richard
>
>
> sim/mips/
> * mips.igen (check_fmt_p): Provide a separate mips32r2 definition
> that unconditionally allows fmt_ps.
> (ALNV.PS, CEIL.L.fmt, CVT.L.fmt, CVT.PS.S, CVT.S.PL, CVT.S.PU)
> (FLOOR.L.fmt, LWXC1, MADD.fmt, MSUB.fmt, NMADD.fmt, NMSUB.fmt)
> (PLL.PS, PLU.PS, PUL.PS, PUU.PS, ROUND.L.fmt, TRUNC.L.fmt): Change
> filter from 64,f to 32,f.
> (PREFX): Change filter from 64 to 32.
> (LDXC1, LUXC1): Provide separate mips32r2 implementations
> that use do_load_double instead of do_load. Make both LUXC1
> versions unpredictable if SizeFGR () != 64.
> (SDXC1, SUXC1): Extend to mips32r2, using do_store_double
> instead of do_store. Remove unused variable. Make both SUXC1
> versions unpredictable if SizeFGR () != 64.
Looks good.
Thiemo
next prev parent reply other threads:[~2007-10-22 12:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-22 11:43 Richard Sandiford
2007-10-22 13:42 ` Thiemo Seufer [this message]
2007-10-22 20:22 ` Richard Sandiford
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=20071022120918.GB25397@networkno.de \
--to=ths@networkno.de \
--cc=gdb-patches@sourceware.org \
--cc=rsandifo@nildram.co.uk \
/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