qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [patch] CPU_DoubleU and soft-float
@ 2005-03-26 20:53 Paul Brook
  2005-04-07 19:47 ` Fabrice Bellard
  0 siblings, 1 reply; 3+ messages in thread
From: Paul Brook @ 2005-03-26 20:53 UTC (permalink / raw)
  To: qemu-devel

The definition of CPU_DoubleU is incorrect on arm hosts when using
soft-float. In this case "float64" will have host integer word ordering, not
host hardware float ordering.

Paul

Index: cpu-all.h
===================================================================
RCS file: /cvsroot/qemu/qemu/cpu-all.h,v
retrieving revision 1.42
diff -u -p -r1.42 cpu-all.h
--- cpu-all.h 13 Mar 2005 18:50:23 -0000 1.42
+++ cpu-all.h 26 Mar 2005 20:48:25 -0000
@@ -120,7 +120,8 @@ static inline void tswap64s(uint64_t *s)
    endian ! */
 typedef union {
     float64 d;
-#if defined(WORDS_BIGENDIAN) || (defined(__arm__) && !defined(__VFP_FP__))
+#if defined(WORDS_BIGENDIAN) \
+    || (defined(__arm__) && !defined(__VFP_FP__) && !defined(CONFIG_SOFTFLOAT))
     struct {
         uint32_t upper;
         uint32_t lower;

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

* Re: [Qemu-devel] [patch] CPU_DoubleU and soft-float
  2005-03-26 20:53 [Qemu-devel] [patch] CPU_DoubleU and soft-float Paul Brook
@ 2005-04-07 19:47 ` Fabrice Bellard
  2005-04-08  0:05   ` Paul Brook
  0 siblings, 1 reply; 3+ messages in thread
From: Fabrice Bellard @ 2005-04-07 19:47 UTC (permalink / raw)
  To: paul; +Cc: qemu-devel

OK for the patch.

It would be better to force the use of soft float on ARM if the VFP is 
not present. Supporting weird ordering for doubles is a source of 
problems and soft float may be faster than the kernel based ARM fpu 
emulator anyway.

Fabrice.

Paul Brook wrote:
> The definition of CPU_DoubleU is incorrect on arm hosts when using
> soft-float. In this case "float64" will have host integer word ordering, not
> host hardware float ordering.
> 
> Paul
> 
> Index: cpu-all.h
> ===================================================================
> RCS file: /cvsroot/qemu/qemu/cpu-all.h,v
> retrieving revision 1.42
> diff -u -p -r1.42 cpu-all.h
> --- cpu-all.h 13 Mar 2005 18:50:23 -0000 1.42
> +++ cpu-all.h 26 Mar 2005 20:48:25 -0000
> @@ -120,7 +120,8 @@ static inline void tswap64s(uint64_t *s)
>     endian ! */
>  typedef union {
>      float64 d;
> -#if defined(WORDS_BIGENDIAN) || (defined(__arm__) && !defined(__VFP_FP__))
> +#if defined(WORDS_BIGENDIAN) \
> +    || (defined(__arm__) && !defined(__VFP_FP__) && !defined(CONFIG_SOFTFLOAT))
>      struct {
>          uint32_t upper;
>          uint32_t lower;
> 
> 
> _______________________________________________
> Qemu-devel mailing list
> Qemu-devel@nongnu.org
> http://lists.nongnu.org/mailman/listinfo/qemu-devel
> 
> 

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

* Re: [Qemu-devel] [patch] CPU_DoubleU and soft-float
  2005-04-07 19:47 ` Fabrice Bellard
@ 2005-04-08  0:05   ` Paul Brook
  0 siblings, 0 replies; 3+ messages in thread
From: Paul Brook @ 2005-04-08  0:05 UTC (permalink / raw)
  To: qemu-devel

On Thursday 07 April 2005 20:47, Fabrice Bellard wrote:
> OK for the patch.
>
> It would be better to force the use of soft float on ARM if the VFP is
> not present. Supporting weird ordering for doubles is a source of
> problems and soft float may be faster than the kernel based ARM fpu
> emulator anyway.

Yes, however arm targets are the only ones that will currently build 
soft-float. The other targets still contain native floating point code.

Paul

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

end of thread, other threads:[~2005-04-07 23:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-03-26 20:53 [Qemu-devel] [patch] CPU_DoubleU and soft-float Paul Brook
2005-04-07 19:47 ` Fabrice Bellard
2005-04-08  0:05   ` Paul Brook

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