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]

Re: patch to mips LEGITIMATE_CONSTANT_P


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

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