From: Thiemo Seufer <ths@networkno.de>
To: binutils@sourceware.org, richard@codesourcery.com
Subject: Re: [PATCH] Better checking of ISA/ASE/ABI options for MIPS gas
Date: Tue, 23 May 2006 13:34:00 -0000 [thread overview]
Message-ID: <20060523102018.GC9061@networkno.de> (raw)
In-Reply-To: <87psi5axvs.fsf@talisman.home>
Richard Sandiford wrote:
[snip]
> > - /* ??? GAS treats single-float processors as though they had 64-bit
> > - float registers (although it complains when double-precision
> > - instructions are used). As things stand, saying they have 32-bit
> > - registers would lead to spurious "register must be even" messages.
> > - So here we assume float registers are always the same size as
> > - integer ones, unless the user says otherwise. */
> > - if (file_mips_fp32 < 0)
> > - file_mips_fp32 = file_mips_gp32;
> > + switch (file_mips_fp32)
> > + {
> > + default:
> > + case -1:
> > + /* No user specified float register size. */
> > + if (file_mips_gp32 == 0)
> > + /* 64-bit integer registers implies 64-bit float registers. */
> > + file_mips_fp32 = 0;
> > + else if ((mips_opts.ase_mips3d > 0 || mips_opts.ase_mdmx > 0)
> > + && ISA_HAS_64BIT_FPRS (mips_opts.isa))
> > + /* -mips3d and -mdmx imply 64-bit float registers, if possible. */
> > + file_mips_fp32 = 0;
> > + else
> > + /* 32-bit float registers. */
> > + file_mips_fp32 = 1;
> > + break;
> > +
> > + /* The user specified the size of the float registers. Check if it
> > + agrees with the ABI and ISA. */
> > + case 0:
> > + if (!ISA_HAS_64BIT_FPRS (mips_opts.isa))
> > + as_bad (_("-mfp64 used with a 32-bit fpu"));
> > + else if (ABI_NEEDS_32BIT_REGS (mips_abi)
> > + && !ISA_HAS_MXHC1 (mips_opts.isa))
> > + as_warn (_("-mfp64 used with a 32-bit ABI"));
> > + break;
> > + case 1:
> > + if (ABI_NEEDS_64BIT_REGS (mips_abi))
> > + as_warn (_("-mfp32 used with a 64-bit ABI"));
> > + break;
> > + }
>
> Doesn't the ??? comment still hold? I thought it would be valuable
> to keep it.
The defaulting is now more complicated than the comment suggests.
> > + else if (strcmp (name, "gp64") == 0)
> > + {
> > + if (!ISA_HAS_64BIT_REGS (mips_opts.isa))
> > + as_warn ("%s isa does not support 64-bit registers",
> > + mips_cpu_info_from_isa (mips_opts.isa)->name);
> > + mips_opts.gp32 = 0;
> > + }
> > + else if (strcmp (name, "gp32") == 0)
> > + {
> > + mips_opts.gp32 = 1;
> > + }
> > + else if (strcmp (name, "nogp64") == 0 || strcmp (name, "nogp32") == 0)
> > + {
> > + mips_opts.gp32 = file_mips_gp32;
> > + }
>
> Ugh. I don't like the "nogp32" and "nogp64".
Well, it is what MIPS' SDE toolchain supports.
> All other ".set X"/".set noX"
> pairs are used for turning a particular feature on and off. Having "nogp32"
> restore the prevailing size (even if that prevailing size _is_ gp32)
> seems very counter-intuitive to me. Could we not have ".set gp=" instead,
> with a special value to select the prevailing size? That would be more
> consistent with .set mipsX and .set arch=X, for example.
Hm, .set gp={32,64,default} or .set gp{32,64,0} ?
Thiemo
next prev parent reply other threads:[~2006-05-23 10:22 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-23 0:08 Thiemo Seufer
2006-05-23 4:06 ` Eric Christopher
2006-05-23 4:40 ` Thiemo Seufer
2006-05-23 5:01 ` Eric Christopher
2006-05-23 5:27 ` Thiemo Seufer
2006-05-23 5:51 ` Eric Christopher
2006-05-23 12:10 ` Richard Sandiford
2006-05-23 13:34 ` Thiemo Seufer [this message]
2006-05-23 14:14 ` Richard Sandiford
2006-05-23 15:39 ` Thiemo Seufer
2006-05-23 17:47 ` Thiemo Seufer
2006-05-23 21:01 ` Richard Sandiford
2006-05-23 23:37 ` Thiemo Seufer
2006-05-24 1:46 ` Richard Sandiford
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060523102018.GC9061@networkno.de \
--to=ths@networkno.de \
--cc=binutils@sourceware.org \
--cc=richard@codesourcery.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).