diff options
author | bernds <bernds@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-12-01 15:49:55 +0000 |
---|---|---|
committer | bernds <bernds@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-12-01 15:49:55 +0000 |
commit | 351ae60b82798f1b558434bf7358c62238295608 (patch) | |
tree | d2ba8350d24d1d77776de4a5d7a70ed2a77e938b /gcc/config/bfin | |
parent | b31eb493bb0a06f578cdb18d3f98331156b85d9c (diff) | |
download | gcc-351ae60b82798f1b558434bf7358c62238295608.tar.gz |
* config/bfin/bfin.c (bfin_valid_add): Fix the logic that ensures
multiword accesses are in range.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@119402 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/bfin')
-rw-r--r-- | gcc/config/bfin/bfin.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/config/bfin/bfin.c b/gcc/config/bfin/bfin.c index 8a002685717..f305d6bf9cf 100644 --- a/gcc/config/bfin/bfin.c +++ b/gcc/config/bfin/bfin.c @@ -2339,8 +2339,9 @@ bfin_valid_add (enum machine_mode mode, HOST_WIDE_INT value) int shift = sz == 1 ? 0 : sz == 2 ? 1 : 2; /* The usual offsettable_memref machinery doesn't work so well for this port, so we deal with the problem here. */ - unsigned HOST_WIDE_INT mask = sz == 8 ? 0x7ffe : 0x7fff; - return (v & ~(mask << shift)) == 0; + if (value > 0 && sz == 8) + v += 4; + return (v & ~(0x7fff << shift)) == 0; } static bool |