diff options
author | Iain Sandoe <iain@codesourcery.com> | 2016-12-11 19:24:46 +0000 |
---|---|---|
committer | Iain Sandoe <iains@gcc.gnu.org> | 2016-12-11 19:24:46 +0000 |
commit | 38dce2c34c72c8292775fdd2099517143b86da33 (patch) | |
tree | 08d357ea205605f1212ad6c96b21c1056a66bb43 | |
parent | 84c9e5ff798acd208e4dd94577a76a0775e1fa75 (diff) | |
download | gcc-38dce2c34c72c8292775fdd2099517143b86da33.zip gcc-38dce2c34c72c8292775fdd2099517143b86da33.tar.gz gcc-38dce2c34c72c8292775fdd2099517143b86da33.tar.bz2 |
[Darwin, PPC] Fix PR71496 by marking pic base loads as non-copyable.
The Darwin pic base loads (and reloads for non-local-gotos) are not
validly copied (since the pic base label would be duplicated). Thus,
mark the pic base {re-}loads as non-copyable.
gcc/
2016-12-11 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.
From-SVN: r243532
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/config/rs6000/darwin.md | 4 |
2 files changed, 11 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 54558cd..e2809f0 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2016-12-11 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. + 2012-12-11 John David Anglin <danglin@gcc.gnu.org> * config/pa/pa.c (pa_callee_copies): New function. diff --git a/gcc/config/rs6000/darwin.md b/gcc/config/rs6000/darwin.md index 5870e0a..9fbccd4 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. |