Hello All, I have a few clarification with the PPC floating point compiler options. I am working with v4.4.1 (e500mc) but i think it applies to 4.6 as well.
1. -msingle-float: With this option, i get a compiler warning: "-msingle-float option equivalent to -mhard-float" which means both the single-float and double-float flags should be set. But in the back-end file config/rs6000/rs6000.c, rs6000_double_float is set to 0. case OPT_msingle_float: if (!TARGET_SINGLE_FPU) warning (0, "-msingle-float option equivalent to -mhard-float"); /* -msingle-float implies -mno-double-float and TARGET_HARD_FLOAT. */ rs6000_double_float = 0; target_flags &= ~MASK_SOFT_FLOAT; target_flags_explicit |= MASK_SOFT_FLOAT; break; Still the FP code gets generated for both float and double. Do we have any other target flag/macro which overrides 'rs6000_double_float' flag? 2. -mfpu=none I expected this option to behave like '-msoft-float', but it works like '-mhard-float'. The comments and internal flags in the target source file also mention the same. case OPT_mfpu_: if (fpu_type != FPU_NONE) /* If -mfpu is not none, then turn off SOFT_FLOAT, turn on HARD_FLOAT. */ { ... } else { /* -mfpu=none is equivalent to -msoft-float */ target_flags |= MASK_SOFT_FLOAT; target_flags_explicit |= MASK_SOFT_FLOAT; rs6000_single_float = rs6000_double_float = 0; } 3. powerpc-linux-gcc --help gives the following text for -mfpu: -mfpu= Specify FP (sp, dp, sp-lite, dp-lite) (implies -mxilinx-fpu) There seems to be a typo here as the supported options are: "none", "sp_lite", "dp_lite", "sp_full", "dp_full" static enum fpu_type_t rs6000_parse_fpu_option (const char *option) { if (!strcmp("none", option)) return FPU_NONE; if (!strcmp("sp_lite", option)) return FPU_SF_LITE; if (!strcmp("dp_lite", option)) return FPU_DF_LITE; if (!strcmp("sp_full", option)) return FPU_SF_FULL; if (!strcmp("dp_full", option)) return FPU_DF_FULL; 4. What is the purpose of this option? "-mfloat-gprs=" when passed "yes/single/double", they generate instructions like "efsmul" for a simple float multiplication statement which belong to SPE engine. Since e500mc doesn't support SPE instruction set and if "-mfloat-gprs=" enables them then should this option throw an warning/error? Regards, Rohit