This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC PATCH, go]: Port to ALPHA arch - sysinfo.go fixup


Mike Stump <mikestump@comcast.net> writes:

> On Jun 1, 2011, at 7:37 AM, Ian Lance Taylor wrote:
>>> One problem remains in the libgo testsuite: certain tests have to be
>>> compiled with -mieee, otherwise FPE is generated for unordered values.
>>> Any suggestions, where -mieee should be placed?
>> 
>> That's an interesting question.  I think that ideally we would like
>> -mieee to become the default when using gccgo.
>
> If the language spec requires it, then it should go into gcc/go.  See java_post_options:
>
> static bool
> java_post_options (const char **pfilename)
> {
>   /* Excess precision other than "fast" requires front-end                                          
>      support.  */
>   if (flag_excess_precision_cmdline == EXCESS_PRECISION_STANDARD
>       && TARGET_FLT_EVAL_METHOD_NON_DEFAULT)
>     sorry ("-fexcess-precision=standard for Java");
>   flag_excess_precision_cmdline = EXCESS_PRECISION_FAST;

Sure, the Go frontend does stuff like that too.  But of course the Go
frontend can't directly set -mieee, because -mieee is a machine
dependent option.


> so, you could check the setting and reset any flag that should be off
> or error out on incompatible flags.  I'd like to think we could get
> more milage out of making a flag like -mieee be machine independent
> and then ports could just check the base flag for validating machine
> specific flags.  Certainly alpha isn't the only port that has -mieee.
> There are likely to be very few flags promoted because of this, ieee
> being the most obvious example.

What I think you are suggesting here is another approach: Alpha should
set -mieee based on a machine-independent option, and then the Go
frontend can set that option instead.  I'm fine with that approach too.
I don't think we currently have a machine-independent option which
corresponds to the Alpha -mieee option.  According to the documentation,
-mieee does two things: adds support for NaN and infinity, and adds
support for denormal numbers.  The first is the -fno-finite-math-only
option, which is actually the default for other targets.  The second has
no machine independent option as far as I know.

Ian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]