On 5 April 2011 23:15, Laurent Vivier <laur...@vivier.eu> wrote: > Le mardi 05 avril 2011 à 22:54 +0100, Peter Maydell a écrit : >> On 5 April 2011 22:48, Laurent Vivier <laur...@vivier.eu> wrote: >> > Le lundi 04 avril 2011 à 12:09 +0100, Peter Maydell a écrit : >> >> -#if defined(TARGET_SPARC) || defined(TARGET_S390X) >> >> +#if defined(CONFIG_SOFTFLOAT) >> > >> > Why don't you use "#if defined(FLOAT128)" ? >> >> I did consider that, but I felt FLOAT128 was a softfloat-internal >> macro rather than part of the API softfloat provides to the rest >> of qemu. > > But, for instance, "#ifdef FLOATX80" is used in target-i386/cpu.h and > target-i386/op_helper.c.
Those uses seem conceptually wrong to me: either a target needs 80 bit floats, or it doesn't. It shouldn't behave differently depending on what host it was compiled on. However this is really just legacy of the fact that target-i386 is still compiled with softfloat-native rather than proper softfloat. Personally I would also delete the FLOAT128 ifdefs in target-ppc since we always compile with softfloat now. However I don't feel very strongly about any of this; mostly I just wanted to get rid of the target and host specific ifdeffery. -- PMM