qemu-arm
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-arm] [PATCH 0/4] softfloat: fix some helper definitions


From: Laurent Vivier
Subject: Re: [Qemu-arm] [PATCH 0/4] softfloat: fix some helper definitions
Date: Sat, 4 Nov 2017 09:55:17 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0

Le 03/11/2017 à 22:51, Philippe Mathieu-Daudé a écrit :
>> On 11/03/2017 05:26 PM, Laurent Vivier wrote:
>>> This series fixes some errors found by
>>> enabling USE_SOFTFLOAT_STRUCT_TYPES.
> [...]
>>
>> I'm getting those errors:
>>
>> $ make subdir-arm-softmmu -j2
>>
>> /source/qemu/migration/vmstate-types.c:430:5: error: conversion to
>> non-scalar type requested
>>      qemu_put_be64(f, float64_val(*v));
>>      ^~~~~~~~~~~~~
>> make: *** [migration/vmstate-types.o] Error 1
>>
>> In file included from /source/qemu/fpu/softfloat.c:87:0:
>> /source/qemu/fpu/softfloat-specialize.h: In function ‘float16_default_nan’:
>> /source/qemu/include/fpu/softfloat.h:117:26: error: expected expression
>> before ‘{’ token
>>  #define const_float16(x) { x }
>>                           ^
>> /source/qemu/fpu/softfloat-specialize.h:95:12: note: in expansion of
>> macro ‘const_float16’
>>      return const_float16(0x7E00);
>>             ^~~~~~~~~~~~~
>> make: *** [fpu/softfloat.o] Error 1
>>
> 
> Also:
> 
> $ make subdir-armeb-linux-user -j2
> 
>   CC      linux-user/signal.o
> In file included from /source/qemu/linux-user/signal.c:24:0:
> /source/qemu/linux-user/signal.c: In function ‘restore_sigframe_v2_vfp’:
> /source/qemu/linux-user/qemu.h:472:8: error: lvalue required as left
> operand of assignment
>    ((x) = (typeof(*hptr))(                                             \
>         ^
> /source/qemu/linux-user/qemu.h:481:31: note: in expansion of macro
> ‘__get_user_e’
>  # define __get_user(x, hptr)  __get_user_e(x, hptr, be)
>                                ^~~~~~~~~~~~
> /source/qemu/linux-user/signal.c:2209:9: note: in expansion of macro
> ‘__get_user’
>          __get_user(float64_val(env->vfp.regs[i]),
> &vfpframe->ufp.fpregs[i]);
>          ^~~~~~~~~~
> /source/qemu/linux-user/qemu.h:477:13: error: left-hand operand of comma
> expression has no effect [-Werror=unused-value]
>       (hptr)), (void)0)
>              ^
> /source/qemu/linux-user/qemu.h:481:31: note: in expansion of macro
> ‘__get_user_e’
>  # define __get_user(x, hptr)  __get_user_e(x, hptr, be)
>                                ^~~~~~~~~~~~
> /source/qemu/linux-user/signal.c:2209:9: note: in expansion of macro
> ‘__get_user’
>          __get_user(float64_val(env->vfp.regs[i]),
> &vfpframe->ufp.fpregs[i]);
>          ^~~~~~~~~~
> cc1: all warnings being treated as errors
> /source/qemu/rules.mak:66: recipe for target 'linux-user/signal.o' failed
> 
>   CC      linux-user/arm/nwfpe/fpa11_cpdt.o
> ...
> /source/qemu/linux-user/arm/nwfpe/fpa11_cpdt.c:37:4: note: in expansion
> of macro ‘get_user_u32’
>     get_user_u32(float32_val(fpa11->fpreg[Fn].fSingle), addr);
>     ^~~~~~~~~~~~
> /source/qemu/linux-user/qemu.h:515:13: error: lvalue required as left
> operand of assignment
>          (x) = 0;       \
>              ^
> /source/qemu/linux-user/qemu.h:536:32: note: in expansion of macro
> ‘get_user’
>  #define get_user_u32(x, gaddr) get_user((x), (gaddr), uint32_t)
>                                 ^~~~~~~~
> /source/qemu/linux-user/arm/nwfpe/fpa11_cpdt.c:37:4: note: in expansion
> of macro ‘get_user_u32’
>     get_user_u32(float32_val(fpa11->fpreg[Fn].fSingle), addr);
>     ^~~~~~~~~~~~
> 

These series doesn't fix all the problems, only the easiest to fix...

for this one, you need:

diff --git a/migration/vmstate-types.c b/migration/vmstate-types.c
index 48184c380d..0c273d616a 100644
--- a/migration/vmstate-types.c
+++ b/migration/vmstate-types.c
@@ -425,7 +425,7 @@ static int get_float64(QEMUFile *f, void *pv, size_t
size,
 static int put_float64(QEMUFile *f, void *pv, size_t size, VMStateField
*field,
                        QJSON *vmdesc)
 {
-    uint64_t *v = pv;
+    float64 *v = pv;

     qemu_put_be64(f, float64_val(*v));
     return 0;

Thanks,
Laurent



reply via email to

[Prev in Thread] Current Thread [Next in Thread]