mirror of
git://gcc.gnu.org/git/gcc.git
synced 2024-12-18 15:29:58 +08:00
final.c (shorten_branches): Make value passed to LABEL_ALIGN conform to documentation.
* final.c (shorten_branches): Make value passed to LABEL_ALIGN conform to documentation. * sh.h (LABEL_ALIGN): If aligning loops, call sh_label_align to check for special cases. * sh-protos.h (sh_label_align): Declare. * sh.c (sh_label_align): Define. From-SVN: r32114
This commit is contained in:
parent
699729979c
commit
2148624a44
@ -1,3 +1,12 @@
|
||||
Wed Feb 23 16:42:21 2000 J"orn Rennecke <amylaar@cygnus.co.uk>
|
||||
|
||||
* final.c (shorten_branches): Make value passed to LABEL_ALIGN
|
||||
conform to documentation.
|
||||
* sh.h (LABEL_ALIGN): If aligning loops, call sh_label_align
|
||||
to check for special cases.
|
||||
* sh-protos.h (sh_label_align): Declare.
|
||||
* sh.c (sh_label_align): Define.
|
||||
|
||||
2000-02-22 Andrew Haley <aph@cygnus.com>
|
||||
|
||||
* config/mips/mips.h (GAS_ASM_SPEC): Pass -mgp32/-mgp64 to gas.
|
||||
|
@ -36,6 +36,7 @@ extern const char *output_far_jump PARAMS ((rtx, rtx));
|
||||
extern void machine_dependent_reorg PARAMS ((rtx));
|
||||
extern struct rtx_def *sfunc_uses_reg PARAMS ((rtx));
|
||||
extern int barrier_align PARAMS ((rtx));
|
||||
extern int sh_loop_align PARAMS ((rtx));
|
||||
extern int fp_zero_operand PARAMS ((rtx));
|
||||
extern int fp_one_operand PARAMS ((rtx));
|
||||
extern int fp_int_operand PARAMS ((rtx));
|
||||
|
@ -2786,6 +2786,30 @@ barrier_align (barrier_or_label)
|
||||
return CACHE_LOG;
|
||||
}
|
||||
|
||||
/* If we are inside a phony loop, almost any kind of label can turn up as the
|
||||
first one in the loop. Aligning a braf label causes incorrect switch
|
||||
destination addresses; we can detect braf labels because they are
|
||||
followed by a BARRIER.
|
||||
Applying loop alignment to small constant or switch tables is a waste
|
||||
of space, so we suppress this too. */
|
||||
int
|
||||
sh_loop_align (label)
|
||||
rtx label;
|
||||
{
|
||||
rtx next = label;
|
||||
|
||||
do
|
||||
next = next_nonnote_insn (next);
|
||||
while (next && GET_CODE (next) == CODE_LABEL);
|
||||
|
||||
if (! next
|
||||
|| GET_RTX_CLASS (GET_CODE (next)) != 'i'
|
||||
|| GET_CODE (PATTERN (next)) == ADDR_DIFF_VEC
|
||||
|| recog_memoized (next) == CODE_FOR_consttable_2)
|
||||
return 0;
|
||||
return 2;
|
||||
}
|
||||
|
||||
/* Exported to toplev.c.
|
||||
|
||||
Do a final pass over the function, just before delayed branch
|
||||
|
@ -351,7 +351,8 @@ do { \
|
||||
barrier_align (LABEL_AFTER_BARRIER)
|
||||
|
||||
#define LOOP_ALIGN(A_LABEL) \
|
||||
((! optimize || TARGET_HARVARD || TARGET_SMALLCODE) ? 0 : 2)
|
||||
((! optimize || TARGET_HARVARD || TARGET_SMALLCODE) \
|
||||
? 0 : sh_loop_align (A_LABEL))
|
||||
|
||||
#define LABEL_ALIGN(A_LABEL) \
|
||||
( \
|
||||
|
@ -1134,7 +1134,7 @@ shorten_branches (first)
|
||||
break;
|
||||
else if (GET_CODE (label) == CODE_LABEL)
|
||||
{
|
||||
log = LOOP_ALIGN (insn);
|
||||
log = LOOP_ALIGN (label);
|
||||
if (max_log < log)
|
||||
{
|
||||
max_log = log;
|
||||
|
Loading…
Reference in New Issue
Block a user