public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: Phil Blundell <pb@nexus.co.uk>
To: pb@gcc.gnu.org
Cc: gcc-prs@gcc.gnu.org,
Subject: Re: target/5054: [ARM/Thumb] ICE with -mlong-calls
Date: Tue, 22 Jan 2002 02:56:00 -0000	[thread overview]
Message-ID: <20020122105601.18310.qmail@sources.redhat.com> (raw)

The following reply was made to PR target/5054; it has been noted by GNATS.

From: Phil Blundell <pb@nexus.co.uk>
To: gcc-gnats@gcc.gnu.org
Cc:  
Subject: Re: target/5054: [ARM/Thumb] ICE with -mlong-calls
Date: 22 Jan 2002 10:50:09 +0000

 The problem here seems to be this Thumb pattern:
 
 (define_insn "*call_insn"
   [(call (mem:SI (match_operand:SI 0 "" "X"))
 	 (match_operand:SI 1 "" ""))
    (use (match_operand 2 "" ""))
    (clobber (reg:SI LR_REGNUM))]
   "TARGET_THUMB
    && operands[2] == const0_rtx && (GET_CODE (operands[0]) ==
 SYMBOL_REF)"
   "bl\\t%a0"
   [(set_attr "length" "4")
    (set_attr "type" "call")]
 )
 
 Note that it checks operands[2], which is the "call type" cookie.  This
 gets set to const1_rtx when -mlong-calls is in effect.  The expectation
 seems to be that the define_expand "call" will transform this into a
 register-based call, but this is inhibited within arm_is_longcall_p for
 functions defined elsewhere in the current compilation unit.
 
 I guess that the define_expand ought to force operands[2] to const0_rtx
 when it decides not to do a long call, something like this:
 
     if (GET_CODE (callee) != REG
       && INTVAL (operands[2]) == CALL_LONG)
       {
         if (arm_is_longcall_p (operands[0], INTVAL (operands[2]), 0))
           XEXP (operands[0], 0) = force_reg (Pmode, callee);
         else
           operands[2] = const0_rtx;
       }
 
 


             reply	other threads:[~2002-01-22 10:56 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-01-22  2:56 Phil Blundell [this message]
  -- strict thread matches above, loose matches on Subject: below --
2002-03-15  3:44 pb
2002-02-19 14:26 pb
2002-01-22  4:46 Phil Blundell
2002-01-22  4:46 Richard Earnshaw
2002-01-22  2:35 pb

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=20020122105601.18310.qmail@sources.redhat.com \
    --to=pb@nexus.co.uk \
    --cc=gcc-prs@gcc.gnu.org \
    --cc=pb@gcc.gnu.org \
    /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).