qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] target-ppc: remove #ifdef FLOAT128
@ 2011-04-10 19:12 Aurelien Jarno
  2011-04-10 19:23 ` [Qemu-devel] " Alexander Graf
  0 siblings, 1 reply; 5+ messages in thread
From: Aurelien Jarno @ 2011-04-10 19:12 UTC (permalink / raw)
  To: qemu-devel; +Cc: Peter Maydell, Alexander Graf, Aurelien Jarno

Now that PPC defaults to softfloat which always provides float128
support, there is no need to keep two version of the code, depending if
float128 support is available or not. Suggested by Peter Maydell.

Cc: Alexander Graf <agraf@suse.de>
Cc: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
---
 target-ppc/op_helper.c |   20 --------------------
 1 files changed, 0 insertions(+), 20 deletions(-)

diff --git a/target-ppc/op_helper.c b/target-ppc/op_helper.c
index c2a3212..4dae464 100644
--- a/target-ppc/op_helper.c
+++ b/target-ppc/op_helper.c
@@ -1287,7 +1287,6 @@ uint64_t helper_fmadd (uint64_t arg1, uint64_t arg2, uint64_t arg3)
             /* sNaN operation */
             fload_invalid_op_excp(POWERPC_EXCP_FP_VXSNAN);
         }
-#ifdef FLOAT128
         /* This is the way the PowerPC specification defines it */
         float128 ft0_128, ft1_128;
 
@@ -1303,10 +1302,6 @@ uint64_t helper_fmadd (uint64_t arg1, uint64_t arg2, uint64_t arg3)
             ft0_128 = float128_add(ft0_128, ft1_128, &env->fp_status);
             farg1.d = float128_to_float64(ft0_128, &env->fp_status);
         }
-#else
-        /* This is OK on x86 hosts */
-        farg1.d = (farg1.d * farg2.d) + farg3.d;
-#endif
     }
 
     return farg1.ll;
@@ -1332,7 +1327,6 @@ uint64_t helper_fmsub (uint64_t arg1, uint64_t arg2, uint64_t arg3)
             /* sNaN operation */
             fload_invalid_op_excp(POWERPC_EXCP_FP_VXSNAN);
         }
-#ifdef FLOAT128
         /* This is the way the PowerPC specification defines it */
         float128 ft0_128, ft1_128;
 
@@ -1348,10 +1342,6 @@ uint64_t helper_fmsub (uint64_t arg1, uint64_t arg2, uint64_t arg3)
             ft0_128 = float128_sub(ft0_128, ft1_128, &env->fp_status);
             farg1.d = float128_to_float64(ft0_128, &env->fp_status);
         }
-#else
-        /* This is OK on x86 hosts */
-        farg1.d = (farg1.d * farg2.d) - farg3.d;
-#endif
     }
     return farg1.ll;
 }
@@ -1376,7 +1366,6 @@ uint64_t helper_fnmadd (uint64_t arg1, uint64_t arg2, uint64_t arg3)
             /* sNaN operation */
             fload_invalid_op_excp(POWERPC_EXCP_FP_VXSNAN);
         }
-#ifdef FLOAT128
         /* This is the way the PowerPC specification defines it */
         float128 ft0_128, ft1_128;
 
@@ -1392,10 +1381,6 @@ uint64_t helper_fnmadd (uint64_t arg1, uint64_t arg2, uint64_t arg3)
             ft0_128 = float128_add(ft0_128, ft1_128, &env->fp_status);
             farg1.d = float128_to_float64(ft0_128, &env->fp_status);
         }
-#else
-        /* This is OK on x86 hosts */
-        farg1.d = (farg1.d * farg2.d) + farg3.d;
-#endif
         if (likely(!float64_is_any_nan(farg1.d))) {
             farg1.d = float64_chs(farg1.d);
         }
@@ -1423,7 +1408,6 @@ uint64_t helper_fnmsub (uint64_t arg1, uint64_t arg2, uint64_t arg3)
             /* sNaN operation */
             fload_invalid_op_excp(POWERPC_EXCP_FP_VXSNAN);
         }
-#ifdef FLOAT128
         /* This is the way the PowerPC specification defines it */
         float128 ft0_128, ft1_128;
 
@@ -1439,10 +1423,6 @@ uint64_t helper_fnmsub (uint64_t arg1, uint64_t arg2, uint64_t arg3)
             ft0_128 = float128_sub(ft0_128, ft1_128, &env->fp_status);
             farg1.d = float128_to_float64(ft0_128, &env->fp_status);
         }
-#else
-        /* This is OK on x86 hosts */
-        farg1.d = (farg1.d * farg2.d) - farg3.d;
-#endif
         if (likely(!float64_is_any_nan(farg1.d))) {
             farg1.d = float64_chs(farg1.d);
         }
-- 
1.7.2.3

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [Qemu-devel] Re: [PATCH] target-ppc: remove #ifdef FLOAT128
  2011-04-10 19:12 [Qemu-devel] [PATCH] target-ppc: remove #ifdef FLOAT128 Aurelien Jarno
@ 2011-04-10 19:23 ` Alexander Graf
  2011-04-10 20:08   ` Peter Maydell
  0 siblings, 1 reply; 5+ messages in thread
From: Alexander Graf @ 2011-04-10 19:23 UTC (permalink / raw)
  To: Aurelien Jarno; +Cc: Peter Maydell, qemu-devel


On 10.04.2011, at 21:12, Aurelien Jarno wrote:

> Now that PPC defaults to softfloat which always provides float128
> support, there is no need to keep two version of the code, depending if
> float128 support is available or not. Suggested by Peter Maydell.
> 
> Cc: Alexander Graf <agraf@suse.de>
> Cc: Peter Maydell <peter.maydell@linaro.org>
> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

Looks good to me, but I'd leave this to Peter's ack.


Alex

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Qemu-devel] Re: [PATCH] target-ppc: remove #ifdef FLOAT128
  2011-04-10 19:23 ` [Qemu-devel] " Alexander Graf
@ 2011-04-10 20:08   ` Peter Maydell
  2011-04-10 20:18     ` Alexander Graf
  2011-04-10 21:14     ` Aurelien Jarno
  0 siblings, 2 replies; 5+ messages in thread
From: Peter Maydell @ 2011-04-10 20:08 UTC (permalink / raw)
  To: Alexander Graf; +Cc: qemu-devel, Aurelien Jarno

On 10 April 2011 20:23, Alexander Graf <agraf@suse.de> wrote:
> On 10.04.2011, at 21:12, Aurelien Jarno wrote:
>> Now that PPC defaults to softfloat which always provides float128
>> support, there is no need to keep two version of the code, depending if
>> float128 support is available or not. Suggested by Peter Maydell.

> Looks good to me, but I'd leave this to Peter's ack.

I think it's a sensible (and pretty straightforward) cleanup, yes.
[my bias towards emulation-accuracy means I don't really see
much place for softfloat-native in a tcg qemu target, so I have
no compunction about dropping support for it. :-)]

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>

-- PMM

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Qemu-devel] Re: [PATCH] target-ppc: remove #ifdef FLOAT128
  2011-04-10 20:08   ` Peter Maydell
@ 2011-04-10 20:18     ` Alexander Graf
  2011-04-10 21:14     ` Aurelien Jarno
  1 sibling, 0 replies; 5+ messages in thread
From: Alexander Graf @ 2011-04-10 20:18 UTC (permalink / raw)
  To: Peter Maydell; +Cc: qemu-devel, Aurelien Jarno


On 10.04.2011, at 22:08, Peter Maydell wrote:

> On 10 April 2011 20:23, Alexander Graf <agraf@suse.de> wrote:
>> On 10.04.2011, at 21:12, Aurelien Jarno wrote:
>>> Now that PPC defaults to softfloat which always provides float128
>>> support, there is no need to keep two version of the code, depending if
>>> float128 support is available or not. Suggested by Peter Maydell.
> 
>> Looks good to me, but I'd leave this to Peter's ack.
> 
> I think it's a sensible (and pretty straightforward) cleanup, yes.
> [my bias towards emulation-accuracy means I don't really see
> much place for softfloat-native in a tcg qemu target, so I have
> no compunction about dropping support for it. :-)]

I'm fairly indifferent. The easier we can make the targets, the better IMHO. Of course, if we're dog slow and accurate that doesn't help too much either :).


Alex

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Qemu-devel] Re: [PATCH] target-ppc: remove #ifdef FLOAT128
  2011-04-10 20:08   ` Peter Maydell
  2011-04-10 20:18     ` Alexander Graf
@ 2011-04-10 21:14     ` Aurelien Jarno
  1 sibling, 0 replies; 5+ messages in thread
From: Aurelien Jarno @ 2011-04-10 21:14 UTC (permalink / raw)
  To: Peter Maydell; +Cc: Alexander Graf, qemu-devel

On Sun, Apr 10, 2011 at 09:08:55PM +0100, Peter Maydell wrote:
> On 10 April 2011 20:23, Alexander Graf <agraf@suse.de> wrote:
> > On 10.04.2011, at 21:12, Aurelien Jarno wrote:
> >> Now that PPC defaults to softfloat which always provides float128
> >> support, there is no need to keep two version of the code, depending if
> >> float128 support is available or not. Suggested by Peter Maydell.
> 
> > Looks good to me, but I'd leave this to Peter's ack.
> 
> I think it's a sensible (and pretty straightforward) cleanup, yes.
> [my bias towards emulation-accuracy means I don't really see
> much place for softfloat-native in a tcg qemu target, so I have
> no compunction about dropping support for it. :-)]

It seems that also what people want. We regularly got complain about
FP emulation precision (at least for the x86 target), but I don't
remember someone complaining about the speed of the FP emulation.

> Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
> 

Thanks for the review.

-- 
Aurelien Jarno	                        GPG: 1024D/F1BCDB73
aurelien@aurel32.net                 http://www.aurel32.net

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-04-10 21:14 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-10 19:12 [Qemu-devel] [PATCH] target-ppc: remove #ifdef FLOAT128 Aurelien Jarno
2011-04-10 19:23 ` [Qemu-devel] " Alexander Graf
2011-04-10 20:08   ` Peter Maydell
2011-04-10 20:18     ` Alexander Graf
2011-04-10 21:14     ` Aurelien Jarno

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).