public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [committed] Fix "error: unable to find a register to spill in class 'R1_REGS'" reloading indirect call operand
@ 2015-08-03 17:44 John David Anglin
  0 siblings, 0 replies; only message in thread
From: John David Anglin @ 2015-08-03 17:44 UTC (permalink / raw)
  To: GCC Patches

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

The 64-bit register indirect call does not use register %r1.  So, %r1 shouldn't be clobbered in
the call pattern.  Normally, this doesn't matter as register %r1 is call clobbered.  However,
reload can fail when the register used for the indirect call needs to be reloaded from a static
location.  In this case, register %r1 is needed for the reload and the clobber blocks the reload.

Tested on hppa64-hp-hpux11.11 and hppa2.0w-hp-hpux11.11.  Committed to trunk, gcc-5
and gcc-4.9.

Dave
--
John David Anglin	dave.anglin@bell.net



[-- Attachment #2: pa.md.d.txt --]
[-- Type: text/plain, Size: 1822 bytes --]

2015-08-03  John David Anglin  <danglin@gcc.gnu.org>

	PR target/67060
	* config/pa/pa.md (call_reg_64bit): Remove reg:DI 1 clobber.
	Adjust splits to match new pattern.

Index: config/pa/pa.md
===================================================================
--- config/pa/pa.md	(revision 226363)
+++ config/pa/pa.md	(working copy)
@@ -7440,7 +7440,6 @@
 (define_insn "call_reg_64bit"
   [(call (mem:SI (match_operand:DI 0 "register_operand" "r"))
 	 (match_operand 1 "" "i"))
-   (clobber (reg:DI 1))
    (clobber (reg:DI 2))
    (clobber (match_operand 2))
    (use (reg:DI 27))
@@ -7461,7 +7460,6 @@
 (define_split
   [(parallel [(call (mem:SI (match_operand 0 "register_operand" ""))
 		    (match_operand 1 "" ""))
-	      (clobber (reg:DI 1))
 	      (clobber (reg:DI 2))
 	      (clobber (match_operand 2))
 	      (use (reg:DI 27))
@@ -7472,7 +7470,6 @@
   [(set (match_dup 2) (reg:DI 27))
    (parallel [(call (mem:SI (match_dup 0))
 		    (match_dup 1))
-	      (clobber (reg:DI 1))
 	      (clobber (reg:DI 2))
 	      (use (reg:DI 27))
 	      (use (reg:DI 29))
@@ -7482,7 +7479,6 @@
 (define_split
   [(parallel [(call (mem:SI (match_operand 0 "register_operand" ""))
 		    (match_operand 1 "" ""))
-	      (clobber (reg:DI 1))
 	      (clobber (reg:DI 2))
 	      (clobber (match_operand 2))
 	      (use (reg:DI 27))
@@ -7492,7 +7488,6 @@
   [(set (match_dup 2) (reg:DI 27))
    (parallel [(call (mem:SI (match_dup 0))
 		    (match_dup 1))
-	      (clobber (reg:DI 1))
 	      (clobber (reg:DI 2))
 	      (use (reg:DI 27))
 	      (use (reg:DI 29))
@@ -7503,7 +7498,6 @@
 (define_insn "*call_reg_64bit_post_reload"
   [(call (mem:SI (match_operand:DI 0 "register_operand" "r"))
 	 (match_operand 1 "" "i"))
-   (clobber (reg:DI 1))
    (clobber (reg:DI 2))
    (use (reg:DI 27))
    (use (reg:DI 29))

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-08-03 17:44 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-03 17:44 [committed] Fix "error: unable to find a register to spill in class 'R1_REGS'" reloading indirect call operand John David Anglin

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