* [PATCH mips-for-linux-next] MIPS: math-emu: Regression fixes
@ 2014-05-23 12:49 Alex Smith
2014-05-23 12:49 ` Alex Smith
2014-05-23 12:58 ` Ralf Baechle
0 siblings, 2 replies; 4+ messages in thread
From: Alex Smith @ 2014-05-23 12:49 UTC (permalink / raw)
To: Ralf Baechle; +Cc: linux-mips, Alex Smith
Fix some errors introduced by commit e2efc0ab3a ("MIPS: math-emu:
Remove most ifdefery."), which result in incorrect behaviour of the
FPU emulator.
Signed-off-by: Alex Smith <alex.smith@imgtec.com>
---
Ralf, the above commit in mips-for-linux-next causes a regression
which this patch fixes (the regression I was seeing is fixed by the
last change, but I also noticed a couple of incorrect ISA level
checks which I fixed up as well). Could you squash this into that
commit?
---
arch/mips/math-emu/cp1emu.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/arch/mips/math-emu/cp1emu.c b/arch/mips/math-emu/cp1emu.c
index 331334c..08e6a74 100644
--- a/arch/mips/math-emu/cp1emu.c
+++ b/arch/mips/math-emu/cp1emu.c
@@ -1512,7 +1512,7 @@ copcsr:
goto copcsr;
case fcvtl_op:
- if (!cpu_has_mips_3_4_5 && cpu_has_mips64)
+ if (!cpu_has_mips_3_4_5 && !cpu_has_mips64)
return SIGILL;
SPFROMREG(fs, MIPSInst_FS(ir));
@@ -1524,7 +1524,7 @@ copcsr:
case ftruncl_op:
case fceill_op:
case ffloorl_op:
- if (!cpu_has_mips_3_4_5 && cpu_has_mips64)
+ if (!cpu_has_mips_3_4_5 && !cpu_has_mips64)
return SIGILL;
oldrm = ieee754_csr.rm;
@@ -1808,11 +1808,10 @@ dcopuop:
cbit = fpucondbit[MIPSInst_RT(ir) >> 2];
else
cbit = FPU_CSR_COND;
- cond = ctx->fcr31 & cbit;
if (rv.w)
- ctx->fcr31 |= cond;
+ ctx->fcr31 |= cbit;
else
- ctx->fcr31 &= ~cond;
+ ctx->fcr31 &= ~cbit;
break;
case d_fmt:
--
1.9.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH mips-for-linux-next] MIPS: math-emu: Regression fixes
2014-05-23 12:49 [PATCH mips-for-linux-next] MIPS: math-emu: Regression fixes Alex Smith
@ 2014-05-23 12:49 ` Alex Smith
2014-05-23 12:58 ` Ralf Baechle
1 sibling, 0 replies; 4+ messages in thread
From: Alex Smith @ 2014-05-23 12:49 UTC (permalink / raw)
To: Ralf Baechle; +Cc: linux-mips, Alex Smith
Fix some errors introduced by commit e2efc0ab3a ("MIPS: math-emu:
Remove most ifdefery."), which result in incorrect behaviour of the
FPU emulator.
Signed-off-by: Alex Smith <alex.smith@imgtec.com>
---
Ralf, the above commit in mips-for-linux-next causes a regression
which this patch fixes (the regression I was seeing is fixed by the
last change, but I also noticed a couple of incorrect ISA level
checks which I fixed up as well). Could you squash this into that
commit?
---
arch/mips/math-emu/cp1emu.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/arch/mips/math-emu/cp1emu.c b/arch/mips/math-emu/cp1emu.c
index 331334c..08e6a74 100644
--- a/arch/mips/math-emu/cp1emu.c
+++ b/arch/mips/math-emu/cp1emu.c
@@ -1512,7 +1512,7 @@ copcsr:
goto copcsr;
case fcvtl_op:
- if (!cpu_has_mips_3_4_5 && cpu_has_mips64)
+ if (!cpu_has_mips_3_4_5 && !cpu_has_mips64)
return SIGILL;
SPFROMREG(fs, MIPSInst_FS(ir));
@@ -1524,7 +1524,7 @@ copcsr:
case ftruncl_op:
case fceill_op:
case ffloorl_op:
- if (!cpu_has_mips_3_4_5 && cpu_has_mips64)
+ if (!cpu_has_mips_3_4_5 && !cpu_has_mips64)
return SIGILL;
oldrm = ieee754_csr.rm;
@@ -1808,11 +1808,10 @@ dcopuop:
cbit = fpucondbit[MIPSInst_RT(ir) >> 2];
else
cbit = FPU_CSR_COND;
- cond = ctx->fcr31 & cbit;
if (rv.w)
- ctx->fcr31 |= cond;
+ ctx->fcr31 |= cbit;
else
- ctx->fcr31 &= ~cond;
+ ctx->fcr31 &= ~cbit;
break;
case d_fmt:
--
1.9.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH mips-for-linux-next] MIPS: math-emu: Regression fixes
2014-05-23 12:49 [PATCH mips-for-linux-next] MIPS: math-emu: Regression fixes Alex Smith
2014-05-23 12:49 ` Alex Smith
@ 2014-05-23 12:58 ` Ralf Baechle
2014-05-23 13:17 ` Ralf Baechle
1 sibling, 1 reply; 4+ messages in thread
From: Ralf Baechle @ 2014-05-23 12:58 UTC (permalink / raw)
To: Alex Smith; +Cc: linux-mips
On Fri, May 23, 2014 at 01:49:24PM +0100, Alex Smith wrote:
> Fix some errors introduced by commit e2efc0ab3a ("MIPS: math-emu:
> Remove most ifdefery."), which result in incorrect behaviour of the
> FPU emulator.
>
> Signed-off-by: Alex Smith <alex.smith@imgtec.com>
> ---
> Ralf, the above commit in mips-for-linux-next causes a regression
> which this patch fixes (the regression I was seeing is fixed by the
> last change, but I also noticed a couple of incorrect ISA level
> checks which I fixed up as well). Could you squash this into that
> commit?
Will do. Of course that had to pop up in my mail folder just a mere
minutes after me claiming there were no pending issues ...
Ralf
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH mips-for-linux-next] MIPS: math-emu: Regression fixes
2014-05-23 12:58 ` Ralf Baechle
@ 2014-05-23 13:17 ` Ralf Baechle
0 siblings, 0 replies; 4+ messages in thread
From: Ralf Baechle @ 2014-05-23 13:17 UTC (permalink / raw)
To: Alex Smith; +Cc: linux-mips
On Fri, May 23, 2014 at 02:58:42PM +0200, Ralf Baechle wrote:
> > Fix some errors introduced by commit e2efc0ab3a ("MIPS: math-emu:
> > Remove most ifdefery."), which result in incorrect behaviour of the
> > FPU emulator.
> >
> > Signed-off-by: Alex Smith <alex.smith@imgtec.com>
> > ---
> > Ralf, the above commit in mips-for-linux-next causes a regression
> > which this patch fixes (the regression I was seeing is fixed by the
> > last change, but I also noticed a couple of incorrect ISA level
> > checks which I fixed up as well). Could you squash this into that
> > commit?
Seems your patch was not against e2efc0ab3a but top of tree which
resulted in rejects for the first two segments. Just in case you
want to look over them, the new commit id of e2efc0ab3a is now
08a07904e182895e1205f399465a3d622c0115b8 and the other patch which
was affected is 3f7cac416b5e62d37aa693538729c6c23e9b938b [MIPS: math-emu:
Cleanup coding style.]
Thanks!
Ralf
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-05-23 13:17 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-23 12:49 [PATCH mips-for-linux-next] MIPS: math-emu: Regression fixes Alex Smith
2014-05-23 12:49 ` Alex Smith
2014-05-23 12:58 ` Ralf Baechle
2014-05-23 13:17 ` Ralf Baechle
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox