diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-05-16 07:12:02 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-05-16 07:12:02 +0000 |
commit | 01e60dc2caaf9d2a829cf3ae8bfabe15db85cbe5 (patch) | |
tree | 6e8f264af352b2d4f86c2430ec273c272f874f45 /gcc/final.c | |
parent | 139e6b83e05c3574bef583dab14c53bb2854f215 (diff) | |
download | gcc-01e60dc2caaf9d2a829cf3ae8bfabe15db85cbe5.tar.gz |
PR target/39942
* final.c (label_to_max_skip): New function.
(label_to_alignment): Only use LABEL_TO_ALIGNMENT if
CODE_LABEL_NUMBER <= max_labelno.
* output.h (label_to_max_skip): New prototype.
* config/i386/i386.c (ix86_avoid_jump_misspredicts): Renamed to...
(ix86_avoid_jump_mispredicts): ... this. Don't define if
ASM_OUTPUT_MAX_SKIP_ALIGN isn't defined. Update comment.
Handle CODE_LABELs with >= 16 byte alignment or with
max_skip == (1 << align) - 1.
(ix86_reorg): Don't call ix86_avoid_jump_mispredicts if
ASM_OUTPUT_MAX_SKIP_ALIGN isn't defined.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@147607 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/final.c')
-rw-r--r-- | gcc/final.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/gcc/final.c b/gcc/final.c index 30ccc852991..3c2e364c3b2 100644 --- a/gcc/final.c +++ b/gcc/final.c @@ -553,7 +553,17 @@ static int min_labelno, max_labelno; int label_to_alignment (rtx label) { - return LABEL_TO_ALIGNMENT (label); + if (CODE_LABEL_NUMBER (label) <= max_labelno) + return LABEL_TO_ALIGNMENT (label); + return 0; +} + +int +label_to_max_skip (rtx label) +{ + if (CODE_LABEL_NUMBER (label) <= max_labelno) + return LABEL_TO_MAX_SKIP (label); + return 0; } #ifdef HAVE_ATTR_length |