diff options
author | Uros Bizjak <ubizjak@gmail.com> | 2008-03-22 20:34:09 +0100 |
---|---|---|
committer | Uros Bizjak <uros@gcc.gnu.org> | 2008-03-22 20:34:09 +0100 |
commit | 48e55066d5d0cd652b6527f08cb67768c4aaabe7 (patch) | |
tree | 82814b277271d80e7634965c77b5d2a2dd97a857 /gcc | |
parent | a6b2268416c7eb9069998c930cd0c5bff0a5bd79 (diff) | |
download | gcc-48e55066d5d0cd652b6527f08cb67768c4aaabe7.zip gcc-48e55066d5d0cd652b6527f08cb67768c4aaabe7.tar.gz gcc-48e55066d5d0cd652b6527f08cb67768c4aaabe7.tar.bz2 |
i386.c (assign_386_stack_local): Align DImode slots to their natural alignment to avoid store forwarding stalls.
* config/i386/i386.c (assign_386_stack_local): Align DImode slots
to their natural alignment to avoid store forwarding stalls.
From-SVN: r133451
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/config/i386/i386.c | 11 |
2 files changed, 15 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 5927c95..d1d0a18 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2008-03-22 Uros Bizjak <ubizjak@gmail.com> + + * config/i386/i386.c (assign_386_stack_local): Align DImode slots + to their natural alignment to avoid store forwarding stalls. + 2008-03-21 Andrew Pinski <andrew_pinski@playstation.sony.com> PR target/27946 diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 8ddfa9f..60c000c 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -16315,6 +16315,7 @@ rtx assign_386_stack_local (enum machine_mode mode, enum ix86_stack_slot n) { struct stack_local_entry *s; + int align; gcc_assert (n < MAX_386_STACK_LOCALS); @@ -16325,11 +16326,19 @@ assign_386_stack_local (enum machine_mode mode, enum ix86_stack_slot n) if (s->mode == mode && s->n == n) return copy_rtx (s->rtl); + /* Align DImode slots to their natural alignment + to avoid store forwarding stalls. */ + if (mode == DImode + && (GET_MODE_BITSIZE (mode) > GET_MODE_ALIGNMENT (mode))) + align = GET_MODE_BITSIZE (mode); + else + align = 0; + s = (struct stack_local_entry *) ggc_alloc (sizeof (struct stack_local_entry)); s->n = n; s->mode = mode; - s->rtl = assign_stack_local (mode, GET_MODE_SIZE (mode), 0); + s->rtl = assign_stack_local (mode, GET_MODE_SIZE (mode), align); s->next = ix86_stack_locals; ix86_stack_locals = s; |