bfin.c (bfin_valid_add): Fix the logic that ensures multiword accesses are in range.

* config/bfin/bfin.c (bfin_valid_add): Fix the logic that ensures
	multiword accesses are in range.

From-SVN: r119402
This commit is contained in:
Bernd Schmidt 2006-12-01 15:49:55 +00:00 committed by Bernd Schmidt
parent fbb5445b5d
commit 5308e94309
2 changed files with 8 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2006-12-01 Bernd Schmidt <bernd.schmidt@analog.com>
* config/bfin/bfin.c (bfin_valid_add): Fix the logic that ensures
multiword accesses are in range.
2006-12-01 Zdenek Dvorak <dvorakz@suse.cz>
PR tree-optimization/29921

View File

@ -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