Patchwork [02/11] target-mips/gdbstub: remove old CONFIG_SOFTFLOAT #ifdef

login
register
mail settings
Submitter Aurelien Jarno
Date May 15, 2011, 2:13 p.m.
Message ID <1305468801-6015-3-git-send-email-aurelien@aurel32.net>
Download mbox | patch
Permalink /patch/95623/
State New
Headers show

Comments

Aurelien Jarno - May 15, 2011, 2:13 p.m.
target-mips has been switched to softfloat only long ago, but a
few #ifdef CONFIG_SOFTFLOAT have been forgotten. Remove them.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
---
 gdbstub.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)
Peter Maydell - May 15, 2011, 2:29 p.m.
On 15 May 2011 15:13, Aurelien Jarno <aurelien@aurel32.net> wrote:
> target-mips has been switched to softfloat only long ago, but a
> few #ifdef CONFIG_SOFTFLOAT have been forgotten. Remove them.

> -#ifndef CONFIG_SOFTFLOAT
>             /* no floating point exception for native float */
>             SET_FP_ENABLE(env->active_fpu.fcr31, 0);
> -#endif

Shouldn't the whole of this section be removed? This is
an #ifndef, not a #ifdef...

-- PMM
Aurelien Jarno - May 15, 2011, 3:46 p.m.
On Sun, May 15, 2011 at 03:29:21PM +0100, Peter Maydell wrote:
> On 15 May 2011 15:13, Aurelien Jarno <aurelien@aurel32.net> wrote:
> > target-mips has been switched to softfloat only long ago, but a
> > few #ifdef CONFIG_SOFTFLOAT have been forgotten. Remove them.
> 
> > -#ifndef CONFIG_SOFTFLOAT
> >             /* no floating point exception for native float */
> >             SET_FP_ENABLE(env->active_fpu.fcr31, 0);
> > -#endif
> 
> Shouldn't the whole of this section be removed? This is
> an #ifndef, not a #ifdef...
> 

Yes good catch, it's a mistake from my side. I have fixed it locally,
I'll send it at the same time of the next version of the series.

Patch

diff --git a/gdbstub.c b/gdbstub.c
index 0838948..7cd7bf5 100644
--- a/gdbstub.c
+++ b/gdbstub.c
@@ -1105,10 +1105,8 @@  static int cpu_gdb_write_register(CPUState *env, uint8_t *mem_buf, int n)
             env->active_fpu.fcr31 = tmp & 0xFF83FFFF;
             /* set rounding mode */
             RESTORE_ROUNDING_MODE;
-#ifndef CONFIG_SOFTFLOAT
             /* no floating point exception for native float */
             SET_FP_ENABLE(env->active_fpu.fcr31, 0);
-#endif
             break;
         case 71: env->active_fpu.fcr0 = tmp; break;
         }