This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: expand_binop misplacing results?


Hi DJ,

On Mon, 21 Mar 2005, DJ Delorie wrote:
> 2005-03-21  DJ Delorie  <dj@redhat.com>
>
> 	* optabs.c (expand_binop): Make sure the first subword's result
> 	gets stored.

This is OK for mainline, provided that you bootstrap and regression
test it somewhere.  Thanks.  You're quite right that callers can't
rely on expand_binop placing the result in target, however most
backends and RTL expansion sequences try hard to honor the request.
There does appear to be a bug in the "i == 0" case, which has probably
never been an issue as most targets are either able to place the
result of the addition/subtraction in the requested destination or
provide their own adddi3/addti3 expanders.

Thanks for finding/fixing this.  This might be a candidate for backporting
to the GCC 4.0 branch if we can find a target/testcase that triggers a
problem.

Roger
--


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]