diff options
author | Jeffrey A Law <law@cygnus.com> | 1997-08-23 06:19:56 +0000 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 1997-08-23 00:19:56 -0600 |
commit | 251ffdee0e7b6aaa030c3797bcd3becfab0f379a (patch) | |
tree | df4af9e9d174e8b85b1d5d06b95da996bed664e1 /gcc | |
parent | 2731427487e1c2945e99db30e4f95baec8f8631f (diff) | |
download | gcc-251ffdee0e7b6aaa030c3797bcd3becfab0f379a.zip gcc-251ffdee0e7b6aaa030c3797bcd3becfab0f379a.tar.gz gcc-251ffdee0e7b6aaa030c3797bcd3becfab0f379a.tar.bz2 |
pa.c (pa_reorg): Always put begin_brtab and end_brtab insns around branch tables.
* pa.c (pa_reorg): Always put begin_brtab and end_brtab insns
around branch tables.
* pa.md (begin_brtab, end_brtab): Only emit the .begin_brtab
and .end_brtab directives if TARGET_GAS.
Should fix bootstrap problem with PA port when not using gas.
From-SVN: r14899
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/config/pa/pa.c | 27 | ||||
-rw-r--r-- | gcc/config/pa/pa.md | 22 |
3 files changed, 40 insertions, 16 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a65ad39..5a839c0 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +Sat Aug 23 00:18:22 1997 Jeffrey A Law (law@cygnus.com) + + * pa.c (pa_reorg): Always put begin_brtab and end_brtab insns + around branch tables. + * pa.md (begin_brtab, end_brtab): Only emit the .begin_brtab + and .end_brtab directives if TARGET_GAS. + Fri Aug 22 14:05:55 1997 Jim Wilson <wilson@cygnus.com> * alias.c (true_dependence): Pass x_addr not x to varies. diff --git a/gcc/config/pa/pa.c b/gcc/config/pa/pa.c index 93f7c1d..774a288 100644 --- a/gcc/config/pa/pa.c +++ b/gcc/config/pa/pa.c @@ -5805,7 +5805,14 @@ following_call (insn) The jump instructions within the table are special; we must be able to identify them during assembly output (if the jumps don't get filled we need to emit a nop rather than nullifying the delay slot)). We - identify jumps in switch tables by marking the SET with DImode. */ + identify jumps in switch tables by marking the SET with DImode. + + We also surround the jump table itself with BEGIN_BRTAB and END_BRTAB + insns. This serves two purposes, first it prevents jump.c from + noticing that the last N entries in the table jump to the instruction + immediately after the table and deleting the jumps. Second, those + insns mark where we should emit .begin_brtab and .end_brtab directives + when using GAS (allows for better link time optimizations). */ pa_reorg (insns) rtx insns; @@ -5832,9 +5839,8 @@ pa_reorg (insns) && GET_CODE (PATTERN (insn)) != ADDR_DIFF_VEC)) continue; - /* If needed, emit marker for the beginning of the branch table. */ - if (TARGET_GAS) - emit_insn_before (gen_begin_brtab (), insn); + /* Emit marker for the beginning of the branch table. */ + emit_insn_before (gen_begin_brtab (), insn); pattern = PATTERN (insn); location = PREV_INSN (insn); @@ -5873,19 +5879,16 @@ pa_reorg (insns) location = NEXT_INSN (location); } - /* If needed, emit marker for the end of the branch table. */ - if (TARGET_GAS) - { - emit_insn_before (gen_end_brtab (), location); - location = NEXT_INSN (location); - emit_barrier_after (location); - } + /* Emit marker for the end of the branch table. */ + emit_insn_before (gen_end_brtab (), location); + location = NEXT_INSN (location); + emit_barrier_after (location); /* Delete the ADDR_VEC or ADDR_DIFF_VEC. */ delete_insn (insn); } } - else if (TARGET_GAS) + else { /* Sill need an end_brtab insn. */ insns = get_insns (); diff --git a/gcc/config/pa/pa.md b/gcc/config/pa/pa.md index df71400..2f13795 100644 --- a/gcc/config/pa/pa.md +++ b/gcc/config/pa/pa.md @@ -4397,15 +4397,29 @@ ;; begin and end. (define_insn "begin_brtab" [(const_int 1)] - "TARGET_GAS" - ".begin_brtab" + "" + "* +{ + /* Only GAS actually supports this pseudo-op. */ + if (TARGET_GAS) + return \".begin_brtab\"; + else + return \"\"; +}" [(set_attr "type" "move") (set_attr "length" "0")]) (define_insn "end_brtab" [(const_int 2)] - "TARGET_GAS" - ".end_brtab" + "" + "* +{ + /* Only GAS actually supports this pseudo-op. */ + if (TARGET_GAS) + return \".end_brtab\"; + else + return \"\"; +}" [(set_attr "type" "move") (set_attr "length" "0")]) |