This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [patch committed] SH: Define md_optimize_expr
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: Kaz Kojima <kkojima at rr dot iij4u dot or dot jp>
- Cc: binutils at sources dot redhat dot com
- Date: Sun, 15 Apr 2007 14:29:21 +0930
- Subject: Re: [patch committed] SH: Define md_optimize_expr
- References: <20070414.232356.88483286.kkojima@rr.iij4u.or.jp>
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