summaryrefslogtreecommitdiff
path: root/gcc/config/bfin
diff options
context:
space:
mode:
authorbernds <bernds@138bc75d-0d04-0410-961f-82ee72b054a4>2006-12-01 15:49:55 +0000
committerbernds <bernds@138bc75d-0d04-0410-961f-82ee72b054a4>2006-12-01 15:49:55 +0000
commit351ae60b82798f1b558434bf7358c62238295608 (patch)
treed2ba8350d24d1d77776de4a5d7a70ed2a77e938b /gcc/config/bfin
parentb31eb493bb0a06f578cdb18d3f98331156b85d9c (diff)
downloadgcc-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.c5
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