public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jim Wilson <wilson@specifixinc.com>
To: Andreas Schwab <schwab@suse.de>
Cc: gcc@gcc.gnu.org
Subject: Re: Mainline bootstrap failure on ia64
Date: Tue, 20 Apr 2004 04:07:00 -0000	[thread overview]
Message-ID: <40849403.5010001@specifixinc.com> (raw)
In-Reply-To: <jeu0zhnzls.fsf@sykes.suse.de>

[-- Attachment #1: Type: text/plain, Size: 1482 bytes --]

Andreas Schwab wrote:
> Mainline does not bootstrap on ia64 because -frename-registers is now the
> default.

The problem is that the IA-64 port uses the common idiom of leaving off 
the constraints for op0 of a call_value pattern, so that we can accept 
any return rtx.  In particular, we need to accept PARALLEL here which is 
not an ordinary operand.  However, the lack of constraints means we have 
an output operand with no "=".

regrename handles conditional execution by identifying output operands 
(i.e. operands with = constraints), and then changing them to in-out 
operands if they occured inside a COND_EXEC.  This fails when we have a 
call_value pattern inside a COND_EXEC because the = constraint is 
missing, so this operand does not get changed to an in-out operand.

This can be fixed by changing the call_value op0 constraints to "=X,X". 
  It looks a bit odd to use using X outside a match_scratch, but it 
seems to do what I want, i.e. accept all operands, even things that 
don't look like operands like PARALLEL.

Any other target that uses COND_EXEC and drops the constraints for op0 
of a call_value pattern will run into the same problem.  Perhaps we 
should go through and fix all md files to use =X constraints here.

This patch works for the libstdc++-v3/src/wlocal-inst.cc testcase which 
is the first failure I saw when doing an IA-64 bootstrap.  I haven't 
done any further testing yet.
-- 
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com

[-- Attachment #2: patch.ia64.regrename --]
[-- Type: text/plain, Size: 1502 bytes --]

2004-04-19  James E Wilson  <wilson@specifixinc.com>

	* config/ia64/ia64.md (call_value_nogp): Add constraints for op0.
	(vall_value_gp): Likewise.

Index: ia64.md
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/ia64/ia64.md,v
retrieving revision 1.127
diff -p -r1.127 ia64.md
*** ia64.md	10 Mar 2004 12:34:43 -0000	1.127
--- ia64.md	20 Apr 2004 02:51:16 -0000
***************
*** 5137,5143 ****
    [(set_attr "itanium_class" "br,scall")])
  
  (define_insn "call_value_nogp"
!   [(set (match_operand 0 "" "")
  	(call (mem:DI (match_operand:DI 1 "call_operand" "?b,i"))
  	      (const_int 0)))
     (clobber (match_operand:DI 2 "register_operand" "=b,b"))]
--- 5137,5143 ----
    [(set_attr "itanium_class" "br,scall")])
  
  (define_insn "call_value_nogp"
!   [(set (match_operand 0 "" "=X,X")
  	(call (mem:DI (match_operand:DI 1 "call_operand" "?b,i"))
  	      (const_int 0)))
     (clobber (match_operand:DI 2 "register_operand" "=b,b"))]
***************
*** 5193,5199 ****
  })
  
  (define_insn "call_value_gp"
!   [(set (match_operand 0 "" "")
  	(call (mem:DI (match_operand:DI 1 "call_operand" "?r,i"))
  	      (const_int 1)))
     (clobber (match_operand:DI 2 "register_operand" "=b,b"))
--- 5193,5199 ----
  })
  
  (define_insn "call_value_gp"
!   [(set (match_operand 0 "" "=X,X")
  	(call (mem:DI (match_operand:DI 1 "call_operand" "?r,i"))
  	      (const_int 1)))
     (clobber (match_operand:DI 2 "register_operand" "=b,b"))

  reply	other threads:[~2004-04-20  3:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-18 14:15 Andreas Schwab
2004-04-20  4:07 ` Jim Wilson [this message]
  -- strict thread matches above, loose matches on Subject: below --
2002-06-11  3:19 Andreas Schwab
2002-06-03  3:09 Andreas Schwab
2002-06-03  3:15 ` Jan Hubicka

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=40849403.5010001@specifixinc.com \
    --to=wilson@specifixinc.com \
    --cc=gcc@gcc.gnu.org \
    --cc=schwab@suse.de \
    /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).