diff options
author | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-05-18 17:33:33 +0000 |
---|---|---|
committer | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-05-18 17:33:33 +0000 |
commit | 1a16e057703bc01f0852adbbd7ed1e72c7f779d4 (patch) | |
tree | 72f0092c128e950ef8ce8696fac63351fe894d97 | |
parent | 7f2713d0fc626c3ea5c2425f8617666ee05139b1 (diff) | |
download | gcc-1a16e057703bc01f0852adbbd7ed1e72c7f779d4.tar.gz |
PR target/21632
* config/ia64/ia64.c (ia64_extra_constraint) <'T'>: Use
small_addr_symbolic_operand.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@99910 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/config/ia64/ia64.c | 3 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/ia64/small-addr-1.c | 23 |
3 files changed, 30 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index acc2bcb0610..9edcf433eeb 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2005-05-18 Richard Henderson <rth@redhat.com> + + PR target/21632 + * config/ia64/ia64.c (ia64_extra_constraint) <'T'>: Use + small_addr_symbolic_operand. + 2005-05-18 Jeff Law <law@redhat.com> * tree-ssa-forwprop.c (forward_propagate_addr_expr): Do not diff --git a/gcc/config/ia64/ia64.c b/gcc/config/ia64/ia64.c index da9f55cb5ee..d23d3553d8d 100644 --- a/gcc/config/ia64/ia64.c +++ b/gcc/config/ia64/ia64.c @@ -618,8 +618,7 @@ ia64_extra_constraint (rtx value, char c) case 'T': /* Symbol ref to small-address-area. */ - return (GET_CODE (value) == SYMBOL_REF - && SYMBOL_REF_SMALL_ADDR_P (value)); + return small_addr_symbolic_operand (value, VOIDmode); case 'U': /* Vector zero. */ diff --git a/gcc/testsuite/gcc.target/ia64/small-addr-1.c b/gcc/testsuite/gcc.target/ia64/small-addr-1.c new file mode 100644 index 00000000000..8462186235e --- /dev/null +++ b/gcc/testsuite/gcc.target/ia64/small-addr-1.c @@ -0,0 +1,23 @@ +/* PR target/21632 */ +/* { dg-do compile } */ +/* { dg-options "-O2" } */ + +struct S +{ + void *s[256]; +}; + +struct T +{ + long t[23]; + struct S *u; +}; + +extern struct T __attribute__((model (small))) v; + +void * +foo (void) +{ + return v.u->s[0]; +} + |