[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v3 06/15] target-mips: raise RI exceptions when
From: |
Aurelien Jarno |
Subject: |
Re: [Qemu-devel] [PATCH v3 06/15] target-mips: raise RI exceptions when FIR.PS = 0 |
Date: |
Wed, 24 Jun 2015 16:59:52 +0200 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
On 2015-06-24 15:24, Yongbok Kim wrote:
> On 24/06/2015 13:28, Aurelien Jarno wrote:
> > On 2015-06-23 16:38, Yongbok Kim wrote:
> >> 64-bit paired-single (PS) floating point data type is optional in the
> >> pre-Release 6.
> >> It has to raise RI exception when PS type is not implemented. (FIR.PS = 0)
> >> (The PS data type is removed in the Release 6.)
> >>
> >> Signed-off-by: Yongbok Kim <address@hidden>
> >> Reviewed-by: Leon Alrae <address@hidden>
> >> ---
>
> >
> > This change means that the PS instructions are now enabled only when
> > FCR0_PS is set, instead of being enabled when the FPU in 64-bit mode.
> > Have you checked if we need to update a few CPU definitions for it to
> > work? I am thinking for example about all the CPU with FCR0_F64, but
> > without FCR0_PS.
> >
> > Otherwise the patch looks fine to me.
> >
>
> I just checked all the core definitions. All other cores are OK and even
> the patch brought some corrections of behaviour like 24Kf shouldn't support
> PS data type but it was wrongly enabled.
Great.
> However Loongson-2E and Loongson-2F might be broken because of the patch.
> The question is that how to allow ps data type for these Loongson cores as
> in the MIPS III architecture all the those FCR0 field is reserved apart
> from implementation and revision numbers.
> (1) I could add few more line in check_ps() to allow Loongson according to
> the Implementation and Revision numbers. (2) Otherwise updating the
> reserved fields against later architectures - F64/PS/D/S. Perhaps that
> would cause another problem if an application is expecting all zeroes on
> the field.
I think the best would be to add a line in check_ps(). I guess the
easiest is to check if the CPU supports the LOONGSON ISA, that is
testing (ctx->insn_flags & (INSN_LOONGSON2E | INSN_LOONGSON2F)).
Aurelien
--
Aurelien Jarno GPG: 4096R/1DDD8C9B
address@hidden http://www.aurel32.net
- [Qemu-devel] [PATCH v3 13/15] target-mips: microMIPS32 R6 Major instructions, (continued)
[Qemu-devel] [PATCH v3 08/15] target-mips: add microMIPS32 R6 opcode enum, Yongbok Kim, 2015/06/23
[Qemu-devel] [PATCH v3 11/15] target-mips: microMIPS32 R6 POOL32F instructions, Yongbok Kim, 2015/06/23