diff mbox

[Darwin,PPC] Fix PR71496 by marking pic base loads as non-copyable.

Message ID A70A7D64-6983-4EDA-B8DA-2CD1D4ADF109@codesourcery.com
State New
Headers show

Commit Message

Iain Sandoe Dec. 9, 2016, 8:45 a.m. UTC
Hi Segher,

Working through my backlog of Darwin patches …  this one is needed on trunk and 6.x
(although it’s marked as rtl-optimization, it actually prevents bootstrap on the branch with
Java enabled).  Therefore, if possible, I’d like to get this in before the 6.3 freeze.

----

The Darwin pic base loads (and reloads for non-local-gotos) are not validly
copied (since the pic base label would be duplicated).  Thus, this patch marks
them accordingly.

OK for trunk?
OK for GCC-6 branch?

thanks,
Iain

gcc/

2016-12-09  Iain Sandoe  <iain@codesourcery.com>

	PR rtl-optimization/71496
	* config/rs6000/darwin.md (load_macho_picbase_si): Mark as non-
	copyable.  (load_macho_picbase_di, reload_macho_picbase_si,
	reload_macho_picbase_di): Likewise.


---
 gcc/config/rs6000/darwin.md | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Segher Boessenkool Dec. 9, 2016, 9:53 a.m. UTC | #1
Hi Iain,

On Fri, Dec 09, 2016 at 08:45:11AM +0000, Iain Sandoe wrote:
> The Darwin pic base loads (and reloads for non-local-gotos) are not validly
> copied (since the pic base label would be duplicated).  Thus, this patch marks
> them accordingly.
> 
> OK for trunk?
> OK for GCC-6 branch?

Okay for both.  Thanks,


Segher


> 2016-12-09  Iain Sandoe  <iain@codesourcery.com>
> 
> 	PR rtl-optimization/71496
> 	* config/rs6000/darwin.md (load_macho_picbase_si): Mark as non-
> 	copyable.  (load_macho_picbase_di, reload_macho_picbase_si,
> 	reload_macho_picbase_di): Likewise.
diff mbox

Patch

diff --git a/gcc/config/rs6000/darwin.md b/gcc/config/rs6000/darwin.md
index 57ce30e..bae8b2b 100644
--- a/gcc/config/rs6000/darwin.md
+++ b/gcc/config/rs6000/darwin.md
@@ -265,6 +265,7 @@  You should have received a copy of the GNU General Public License
   return "bcl 20,31,%0\\n%0:";
 }
   [(set_attr "type" "branch")
+   (set_attr "cannot_copy" "yes")
    (set_attr "length" "4")])
 
 (define_insn "load_macho_picbase_di"
@@ -281,6 +282,7 @@  You should have received a copy of the GNU General Public License
   return "bcl 20,31,%0\\n%0:";
 }
   [(set_attr "type" "branch")
+   (set_attr "cannot_copy" "yes")
    (set_attr "length" "4")])
 
 (define_expand "macho_correct_pic"
@@ -416,6 +418,7 @@  You should have received a copy of the GNU General Public License
     return "bcl 20,31,%0\\n%0:";
 }
   [(set_attr "type" "branch")
+   (set_attr "cannot_copy" "yes")
    (set_attr "length" "4")])
 
 (define_insn "reload_macho_picbase_di"
@@ -439,6 +442,7 @@  You should have received a copy of the GNU General Public License
     return "bcl 20,31,%0\\n%0:";
 }
   [(set_attr "type" "branch")
+   (set_attr "cannot_copy" "yes")
    (set_attr "length" "4")])
 
 ;; We need to restore the PIC register, at the site of nonlocal label.