diff options
author | Richard Henderson <rth@redhat.com> | 2001-12-09 13:54:23 -0800 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2001-12-09 13:54:23 -0800 |
commit | 11cb1475c8145251e113c2274bbc80b17538f5d4 (patch) | |
tree | cf86aabd83055a0762c8f743c7efba3361933eca /gcc | |
parent | 30864e1408a8663cf6f2b4c7cd07fce1fd13128f (diff) | |
download | gcc-11cb1475c8145251e113c2274bbc80b17538f5d4.zip gcc-11cb1475c8145251e113c2274bbc80b17538f5d4.tar.gz gcc-11cb1475c8145251e113c2274bbc80b17538f5d4.tar.bz2 |
alpha.c (alpha_align_insns): Suppress realignment immediately after a call; insert nops before a call.
* config/alpha/alpha.c (alpha_align_insns): Suppress realignment
immediately after a call; insert nops before a call.
From-SVN: r47820
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/config/alpha/alpha.c | 21 |
2 files changed, 18 insertions, 8 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 7381bd0..c3b2dee 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,10 @@ 2001-12-09 Richard Henderson <rth@redhat.com> + * config/alpha/alpha.c (alpha_align_insns): Suppress realignment + immediately after a call; insert nops before a call. + +2001-12-09 Richard Henderson <rth@redhat.com> + * config/alpha/alpha.c (alpha_align_insns): Use align_functions, not FUNCTION_BOUNDARY. * config/alpha/alpha.h (TRAMPOLINE_ALIGNMENT): New. diff --git a/gcc/config/alpha/alpha.c b/gcc/config/alpha/alpha.c index a4ca0df..66ed079 100644 --- a/gcc/config/alpha/alpha.c +++ b/gcc/config/alpha/alpha.c @@ -7622,15 +7622,20 @@ alpha_align_insns (insns, max_align, next_group, next_nop) else if ((int) align < len) { unsigned int new_log_align = len > 8 ? 4 : 3; - rtx where; + rtx prev, where; - where = prev_nonnote_insn (i); + where = prev = prev_nonnote_insn (i); if (!where || GET_CODE (where) != CODE_LABEL) where = i; - emit_insn_before (gen_realign (GEN_INT (new_log_align)), where); - align = 1 << new_log_align; - ofs = 0; + /* Can't realign between a call and its gp reload. */ + if (! (TARGET_EXPLICIT_RELOCS + && prev && GET_CODE (prev) == CALL_INSN)) + { + emit_insn_before (gen_realign (GEN_INT (new_log_align)), where); + align = 1 << new_log_align; + ofs = 0; + } } /* If the group won't fit in the same INT16 as the previous, @@ -7644,8 +7649,8 @@ alpha_align_insns (insns, max_align, next_group, next_nop) int nop_count = (align - ofs) / 4; rtx where; - /* Insert nops before labels and branches to truely merge the - execution of the nops with the previous instruction group. */ + /* Insert nops before labels, branches, and calls to truely merge + the execution of the nops with the previous instruction group. */ where = prev_nonnote_insn (i); if (where) { @@ -7655,7 +7660,7 @@ alpha_align_insns (insns, max_align, next_group, next_nop) if (where2 && GET_CODE (where2) == JUMP_INSN) where = where2; } - else if (GET_CODE (where) != JUMP_INSN) + else if (GET_CODE (where) == INSN) where = i; } else |