Commit 5308e943 by Bernd Schmidt Committed by Bernd Schmidt

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
parent fbb5445b
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
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment