This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [RFC PATCH, go]: Port to ALPHA arch - sysinfo.go fixup
- From: Ian Lance Taylor <iant at google dot com>
- To: Mike Stump <mikestump at comcast dot net>
- Cc: Uros Bizjak <ubizjak at gmail dot com>, Rainer Orth <ro at cebitec dot uni-bielefeld dot de>, gcc-patches at gcc dot gnu dot org, gofrontend-dev at googlegroups dot com
- Date: Wed, 01 Jun 2011 10:49:02 -0700
- Subject: Re: [RFC PATCH, go]: Port to ALPHA arch - sysinfo.go fixup
- References: <AANLkTimxnJT+r0zh_Lyc7hOdXW1OUk4c0X8cM-61k=ix@mail.gmail.com> <yddoc4roghx.fsf@manam.CeBiTec.Uni-Bielefeld.DE> <mcraag9lfya.fsf@google.com> <yddd3kxg9ek.fsf@manam.CeBiTec.Uni-Bielefeld.DE> <mcroc3zyy12.fsf@google.com> <BANLkTikBR_LuPufmMvFxCVubqzAAA=RKaw@mail.gmail.com> <mcraae2pwsr.fsf@coign.corp.google.com> <BANLkTinS3wz9pK7GafDO72B3K4L-U5uu2A@mail.gmail.com> <mcrvcwplis8.fsf@coign.corp.google.com> <BE07C14A-5F78-44A3-B1EC-899D4B973C08@comcast.net>
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