diff mbox

[3/5] target-i386: fix cpu-exec.o build with softfloat

Message ID 1302462807-8795-3-git-send-email-aurelien@aurel32.net
State New
Headers show

Commit Message

Aurelien Jarno April 10, 2011, 7:13 p.m. UTC
Fixing the definition of CPU86_LDoubleU allow building cpu-exec.o with
softfloat.

Cc: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
---
 target-i386/exec.h |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

Comments

Peter Maydell April 10, 2011, 8:18 p.m. UTC | #1
On 10 April 2011 20:13, Aurelien Jarno <aurelien@aurel32.net> wrote:
> Fixing the definition of CPU86_LDoubleU allow building cpu-exec.o with
> softfloat.
>
> Cc: Peter Maydell <peter.maydell@linaro.org>
> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
> ---
>  target-i386/exec.h |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/target-i386/exec.h b/target-i386/exec.h
> index 6f9f709..d6922f3 100644
> --- a/target-i386/exec.h
> +++ b/target-i386/exec.h
> @@ -145,7 +145,7 @@ static inline void svm_check_intercept(uint32_t type)
>
>  /* only for x86 */
>  typedef union {
> -    long double d;
> +    floatx80 d;
>     struct {
>         unsigned long long lower;
>         unsigned short upper;
> @@ -164,7 +164,7 @@ typedef union {
>
>  /* NOTE: arm is horrible as double 32 bit words are stored in big endian ! */
>  typedef union {
> -    double d;
> +    float64 d;
>  #if !defined(HOST_WORDS_BIGENDIAN) && !defined(__arm__)
>     struct {
>         uint32_t lower;

I note that the !USE_X86LDOUBLE typedef for CPU86_LDoubleU is an
out-of-date version of cpu-all.h's CPU_DoubleU (it doesn't
get the ARM VFP endianness right).

Given patch 1 in this series, is it possible now just to have
#ifdef USE_X86LDOUBLE
typedef CPU_LDoubleU CPU86_LDoubleU;
/* other stuff */
#else
typedef CPU_DoubleU CPU86_LDoubleU;
/* ... */
#endif

?

-- PMM
diff mbox

Patch

diff --git a/target-i386/exec.h b/target-i386/exec.h
index 6f9f709..d6922f3 100644
--- a/target-i386/exec.h
+++ b/target-i386/exec.h
@@ -145,7 +145,7 @@  static inline void svm_check_intercept(uint32_t type)
 
 /* only for x86 */
 typedef union {
-    long double d;
+    floatx80 d;
     struct {
         unsigned long long lower;
         unsigned short upper;
@@ -164,7 +164,7 @@  typedef union {
 
 /* NOTE: arm is horrible as double 32 bit words are stored in big endian ! */
 typedef union {
-    double d;
+    float64 d;
 #if !defined(HOST_WORDS_BIGENDIAN) && !defined(__arm__)
     struct {
         uint32_t lower;