From beea5963a3b492ae95d13483b3f6e54ce309a618 Mon Sep 17 00:00:00 2001 From: uros Date: Wed, 30 Sep 2009 07:13:20 +0000 Subject: [PATCH] PR target/22093 * config/alpha/alpha.md (unaligned_storehi_be): Force operand of plus RTX into register. testsuite/ChangeLog: PR target/22093 * gcc.target/alpha/pr22093.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@152322 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 6 ++++++ gcc/config/alpha/alpha.md | 4 ++-- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gcc.target/alpha/pr22093.c | 14 ++++++++++++++ 4 files changed, 27 insertions(+), 2 deletions(-) create mode 100644 gcc/testsuite/gcc.target/alpha/pr22093.c diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 70a3efcb9da..a14b81cd6ed 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2009-09-30 Uros Bizjak + + PR target/22093 + * config/alpha/alpha.md (unaligned_storehi_be): Force operand + of plus RTX into register. + 2009-09-30 Ralf Wildenhues * doc/install.texi: Linguistic and markup fixes. diff --git a/gcc/config/alpha/alpha.md b/gcc/config/alpha/alpha.md index 277300828c9..232787974a0 100644 --- a/gcc/config/alpha/alpha.md +++ b/gcc/config/alpha/alpha.md @@ -5861,7 +5861,7 @@ (mem:DI (and:DI (match_operand:DI 0 "address_operand" "") (const_int -8)))) (set (match_operand:DI 2 "register_operand" "") - (plus:DI (match_dup 0) (const_int 1))) + (plus:DI (match_dup 5) (const_int 1))) (set (match_dup 3) (and:DI (not:DI (ashift:DI (const_int 65535) @@ -5876,7 +5876,7 @@ (set (mem:DI (and:DI (match_dup 0) (const_int -8))) (match_dup 4))] "WORDS_BIG_ENDIAN" - "") + "operands[5] = force_reg (DImode, operands[0]);") ;; Here are the define_expand's for QI and HI moves that use the above ;; patterns. We have the normal sets, plus the ones that need scratch diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 4a7961c807b..9c3ca43268f 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2009-09-30 Uros Bizjak + + PR target/22093 + * gcc.target/alpha/pr22093.c: New test. + 2009-09-29 John Freeman Jason Merrill diff --git a/gcc/testsuite/gcc.target/alpha/pr22093.c b/gcc/testsuite/gcc.target/alpha/pr22093.c new file mode 100644 index 00000000000..aa00e15506a --- /dev/null +++ b/gcc/testsuite/gcc.target/alpha/pr22093.c @@ -0,0 +1,14 @@ +/* { dg-do compile } */ +/* { dg-options "-O2" } */ + +struct shared_ptr_struct +{ + unsigned long phase : 48; + unsigned thread : 16; + void *addr; +} x; + +void foo (void) +{ + x.thread = 2; +} -- 2.11.0