This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: patch to mips LEGITIMATE_CONSTANT_P
- To: Gavin Romig-Koch <gavin at cygnus dot com>
- Subject: Re: patch to mips LEGITIMATE_CONSTANT_P
- From: Jim Wilson <wilson at cygnus dot com>
- Date: Mon, 24 Jan 2000 17:22:26 -0800
- cc: Mark Mitchell <mark at codesourcery dot com>, gcc-patches at gcc dot gnu dot org
Testing for gas isn't quite right, because not all non-gas assemblers are
buggy, only the Irix6 one is buggy. This patch would unnecessarily change
the irix5 support for instance. Perhaps better is to use positive tests
instead of negative tests, e.g.
! (GET_CODE (X) == CONST && (mips_abi == ABI_N32 || mips_abi == ABI_64))
that way the list does not change as we add new ABIs. That also makes the
list shorter. When I first put the code in, it was needed for 2 or the 3
ABI_* flags, so using negative tests was shorter. That isn't true anymore.
If you want, you could also add a !TARGET_GAS check to that.
I ran into the Irix6 assembler bug a long time ago, and I believe I reported
it to SGI, so it is possible that it has been fixed for years and we just
haven't noticed yet. Another alternative would be to check
Jim