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