diff options
author | jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-01-15 16:17:28 +0000 |
---|---|---|
committer | jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-01-15 16:17:28 +0000 |
commit | 1969f96dd8b9678be073c01c2211e1cff201efcb (patch) | |
tree | 6ca9b91464994dadabc30601888a873a0f454f7c /gcc/final.c | |
parent | 38e21839f2d50f0ac61bbb72ee0bf53dc2e3d549 (diff) | |
download | gcc-1969f96dd8b9678be073c01c2211e1cff201efcb.tar.gz |
2013-01-15 Joseph Myers <joseph@codesourcery.com>
Mikael Pettersson <mikpe@it.uu.se>
PR target/43961
* config/arm/arm.h (ADDR_VEC_ALIGN): Align SImode jump tables for
Thumb.
(ASM_OUTPUT_CASE_LABEL): Remove.
(ASM_OUTPUT_BEFORE_CASE_LABEL): Define to empty.
* final.c (shorten_branches): Update alignment of labels before
jump tables if CASE_VECTOR_SHORTEN_MODE.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@195208 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/final.c')
-rw-r--r-- | gcc/final.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/gcc/final.c b/gcc/final.c index 3da07ed9941..d5154db2c42 100644 --- a/gcc/final.c +++ b/gcc/final.c @@ -1182,6 +1182,29 @@ shorten_branches (rtx first) if (LABEL_P (insn)) { int log = LABEL_TO_ALIGNMENT (insn); + +#ifdef CASE_VECTOR_SHORTEN_MODE + /* If the mode of a following jump table was changed, we + may need to update the alignment of this label. */ + rtx next; + bool next_is_jumptable; + + next = next_nonnote_insn (insn); + next_is_jumptable = next && JUMP_TABLE_DATA_P (next); + if ((JUMP_TABLES_IN_TEXT_SECTION + || readonly_data_section == text_section) + && next_is_jumptable) + { + int newlog = ADDR_VEC_ALIGN (next); + if (newlog != log) + { + log = newlog; + LABEL_TO_ALIGNMENT (insn) = log; + something_changed = 1; + } + } +#endif + if (log > insn_current_align) { int align = 1 << log; |