public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH, MIPS] Call SYMBOL_REF_LONG_CALL_P on SYMBOL_REFs only
@ 2007-08-10  5:45 Adam Nemet
  2007-08-10 20:21 ` Richard Sandiford
  0 siblings, 1 reply; 2+ messages in thread
From: Adam Nemet @ 2007-08-10  5:45 UTC (permalink / raw)
  To: gcc-patches

While chasing a different bug I enabled rtl-checking and found this.
We use SYMBOL_REF_FLAGS on a CONST node.  One testcase where
rtl-checking asserts is gcc.c-torture/compile/20010107-1.c -O1 on
mipsisa64-elf.

Now we get identical regression testresults for --enable-checking and
--enable-checking=assert,misc,gc,rtlflag,runtime,tree,rtl on
mipsisa64-elf.

OK for trunk?  I haven't checked but by looking at the code the same
problem seems to exist on 4.2 and 4.1 as well.  OK there too?

Adam

	* config/mips/predicates.md (const_call_insn_operand): Invoke
	SYMBOL_REF_LONG_CALL_P only on SYMBOL_REFs.

Index: predicates.md
===================================================================
--- predicates.md	(revision 127318)
+++ predicates.md	(working copy)
@@ -115,7 +115,7 @@ (define_predicate "const_call_insn_opera
       /* If -mlong-calls or if this function has an explicit long_call
 	 attribute, we must use register addressing.  The
 	 SYMBOL_FLAG_LONG_CALL bit is set by mips_encode_section_info.  */
-      return !SYMBOL_REF_LONG_CALL_P (op);
+      return !(GET_CODE (op) == SYMBOL_REF && SYMBOL_REF_LONG_CALL_P (op));
 
     case SYMBOL_GOT_DISP:
       /* Without explicit relocs, there is no special syntax for

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH, MIPS] Call SYMBOL_REF_LONG_CALL_P on SYMBOL_REFs only
  2007-08-10  5:45 [PATCH, MIPS] Call SYMBOL_REF_LONG_CALL_P on SYMBOL_REFs only Adam Nemet
@ 2007-08-10 20:21 ` Richard Sandiford
  0 siblings, 0 replies; 2+ messages in thread
From: Richard Sandiford @ 2007-08-10 20:21 UTC (permalink / raw)
  To: Adam Nemet; +Cc: gcc-patches

Adam Nemet <anemet@caviumnetworks.com> writes:
> OK for trunk?  I haven't checked but by looking at the code the same
> problem seems to exist on 4.2 and 4.1 as well.  OK there too?

OK everywhere, thanks.  Let's assume that long_call attributes don't
apply to cases where an offset is applied to a "long_call" symbol.

Richard

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-08-10 20:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-08-10  5:45 [PATCH, MIPS] Call SYMBOL_REF_LONG_CALL_P on SYMBOL_REFs only Adam Nemet
2007-08-10 20:21 ` Richard Sandiford

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).