diff options
author | Tom de Vries <tom@codesourcery.com> | 2013-10-27 23:36:51 +0000 |
---|---|---|
committer | Tom de Vries <vries@gcc.gnu.org> | 2013-10-27 23:36:51 +0000 |
commit | e40191f1e0d1729b0a942e3ca286bf44e1443c59 (patch) | |
tree | 96774eab55838741023e71ac4d4d3f566efb7e7d /gcc | |
parent | 3c7ac4cbe7335e3690ebaa7b2b8b8c9041f73c44 (diff) | |
download | gcc-e40191f1e0d1729b0a942e3ca286bf44e1443c59.zip gcc-e40191f1e0d1729b0a942e3ca286bf44e1443c59.tar.gz gcc-e40191f1e0d1729b0a942e3ca286bf44e1443c59.tar.bz2 |
Fix line number data for PIC register setup code.
2013-10-27 Tom de Vries <tom@codesourcery.com>
* cfgexpand.c (gimple_expand_cfg): Remove test for parm_birth_insn.
Don't commit insertions after NOTE_INSN_FUNCTION_BEG.
* gcc.target/arm/require-pic-register-loc.c: New test.
From-SVN: r204112
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/cfgexpand.c | 12 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 4 |
3 files changed, 17 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f4ad221..8d6147a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2013-10-27 Tom de Vries <tom@codesourcery.com> + + * cfgexpand.c (gimple_expand_cfg): Remove test for parm_birth_insn. + Don't commit insertions after NOTE_INSN_FUNCTION_BEG. + 2013-10-27 Oleg Endo <olegendo@gcc.gnu.org> * config/sh/sh.c (MSW, LSW): Move and rename macros to... diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c index ba4c0e6..9705036 100644 --- a/gcc/cfgexpand.c +++ b/gcc/cfgexpand.c @@ -4789,14 +4789,18 @@ gimple_expand_cfg (void) if (e->insns.r) { rebuild_jump_labels_chain (e->insns.r); - /* Avoid putting insns before parm_birth_insn. */ + /* Put insns after parm birth, but before + NOTE_INSNS_FUNCTION_BEG. */ if (e->src == ENTRY_BLOCK_PTR - && single_succ_p (ENTRY_BLOCK_PTR) - && parm_birth_insn) + && single_succ_p (ENTRY_BLOCK_PTR)) { rtx insns = e->insns.r; e->insns.r = NULL_RTX; - emit_insn_after_noloc (insns, parm_birth_insn, e->dest); + if (NOTE_P (parm_birth_insn) + && NOTE_KIND (parm_birth_insn) == NOTE_INSN_FUNCTION_BEG) + emit_insn_before_noloc (insns, parm_birth_insn, e->dest); + else + emit_insn_after_noloc (insns, parm_birth_insn, e->dest); } else commit_one_edge_insertion (e); diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index b3e5dc4..12028b4 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2013-10-27 Tom de Vries <tom@codesourcery.com> + + * gcc.target/arm/require-pic-register-loc.c: New test. + 2013-10-27 Uros Bizjak <ubizjak@gmail.com> PR target/58679 |