This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [wwwdocs] Round 1 of cleaning up "old PROBLEMS"
- From: Andreas Schwab <schwab at suse dot de>
- To: Zack Weinberg <zack at codesourcery dot com>
- Cc: Steven Bosscher <stevenb at suse dot de>, gcc-patches at gcc dot gnu dot org
- Date: Sat, 13 Nov 2004 20:51:25 +0100
- Subject: Re: [wwwdocs] Round 1 of cleaning up "old PROBLEMS"
- References: <200411131616.54139.stevenb@suse.de><87fz3dsj27.fsf@codesourcery.com>
Zack Weinberg <zack@codesourcery.com> writes:
>> 10 (see patch)
>>
>> The target for which this was a problem isn't mentioned, so it is
>> not even clear what the problem is. There is no way to check if
>> the problem still exists.
> ...
>> - <li value="10">
>> - <pre>
>> - movl a3@,a0
>> - movl a3@(16),a1
>> - clrb a0@(a1:l)
>> - </pre>
>> - <p>is generated and may be worse than</p>
>> - <pre>
>> - movl a3@,a0
>> - addl a3@(16),a0
>> - clrb a0@
>> - </pre>
>
> That appears to be m68k assembly language. I don't think it's worth
> trying very hard to reconstruct a test case, though.
That's pretty straightforward. Compiling this:
struct X {
char *a;
/* other members */
int b;
};
void f (struct X *x)
{
x->a[x->b] = 0;
}
with current mainline on m68k at -O2 yields the following, which looks
exactly like what this entry is about:
f:
link.w %fp,#0
move.l 8(%fp),%a0
move.l (%a0),%a1
move.l 4(%a0),%a0
clr.b (%a0,%a1.l)
unlk %fp
rts
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."