This is the mail archive of the gcc-prs@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]
Other format: [Raw text]

Re: target/5054: [ARM/Thumb] ICE with -mlong-calls


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 12:44:13 +0000

 On Tue, 2002-01-22 at 12:09, Richard Earnshaw wrote:
 > >  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.
 > 
 > The ARM variant uses arm_is_longcall_p in the predicate rather than 
 > directly testing the type cookie.  I suspect the thumb variants should be 
 > doing the same.
 
 Mmm, right.  A bit like this, then.
 
 p.
 
 Index: arm.md
 ===================================================================
 RCS file: /cvs/gcc/gcc/gcc/config/arm/arm.md,v
 retrieving revision 1.80.2.1
 diff -c -r1.80.2.1 arm.md
 *** arm.md	2001/05/18 12:45:22	1.80.2.1
 --- arm.md	2002/01/22 12:39:01
 ***************
 *** 6656,6662 ****
      (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")]
 --- 6656,6663 ----
      (use (match_operand 2 "" ""))
      (clobber (reg:SI LR_REGNUM))]
     "TARGET_THUMB
 !    && GET_CODE (operands[0]) == SYMBOL_REF
 !    && !arm_is_longcall_p (operands[0], INTVAL (operands[2]), 1)"
     "bl\\t%a0"
     [(set_attr "length" "4")
      (set_attr "type" "call")]
 ***************
 *** 6669,6675 ****
      (use (match_operand 3 "" ""))
      (clobber (reg:SI LR_REGNUM))]
     "TARGET_THUMB
 !    && operands[3] == const0_rtx && (GET_CODE (operands[1]) == SYMBOL_REF)"
     "bl\\t%a1"
     [(set_attr "length" "4")
      (set_attr "type" "call")]
 --- 6670,6677 ----
      (use (match_operand 3 "" ""))
      (clobber (reg:SI LR_REGNUM))]
     "TARGET_THUMB
 !    && GET_CODE (operands[1]) == SYMBOL_REF
 !    && !arm_is_longcall_p (operands[1], INTVAL (operands[3]), 1)"
     "bl\\t%a1"
     [(set_attr "length" "4")
      (set_attr "type" "call")]
 


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