[patch committed] SH: Define md_optimize_expr

Alan Modra amodra@bigpond.net.au
Sun Apr 15 05:13:00 GMT 2007


On Sat, Apr 14, 2007 at 11:23:56PM +0900, Kaz Kojima wrote:
> In the faulty case, SH uses an rs_align_test frag in the expression
> for bar and the difference . - bar wasn't simplified with the expr
> function.

So if the rs_align_test actually does some alignment, you will
generate an incorrect value for ". - bar".  I think that is a little
risky, since rs_align_test only emits a warning.  Maybe you should
emit an error instead.

The real reason I'm commenting though is that you should be testing
for both rs_align_test and rs_fill frags in your
align_test_frag_offset_fixed_p function.  You might have both frag
types between the expression's symbols.

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre



More information about the Binutils mailing list