Hi Rainer,

> while the i386/amd64 values are the usual ones.  Unfortunately,
> gcc/fortran/libgfortran.h hardcodes the more common values for
> GFC_FPE_*, and libgfortran/Makefile.am extracts them from there into
> fpu-target.inc.  I'm unsure what's the best way to handle this.

No, we don’t hardcode any values (unless I misunderstand what you are saying). 
Look at libgfortran/config/fpu-sysv.h get_fpu_rounding_mode() and 
set_fpu_rounding_mode(): we have two switches, to translate between the 
GFC_FPE_* values and the FP_R* values. So this should work, really.

The only thing I can see is that libgfortran/config/fpu-sysv.h assumes that 
FP_RM and others are macros, checking them with "#ifdef FP_RM”. Is that the 
reason?
If so, we might just want to use them unconditionally… unless it creates a mess 
on some other SysV target!

FX

Reply via email to