This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch][ARM] Fix 16-bit -> 64-bit multiply and accumulate
On 28/01/11 14:12, Richard Earnshaw wrote:
So what happens to a variation of your testcase:
long long foolong (long long x, short *a, short *b)
{
return x + (long long)*a * (long long)*b;
}
With your patch? This should generate identical code to your original
test-case.
The patch has no effect on that testcase - it's broken in some other
way, I think, and the same with and without my patch:
ldrsh r3, [r3, #0]
ldrsh r2, [r2, #0]
push {r4, r5}
asrs r4, r3, #31
asrs r5, r2, #31
mul r4, r2, r4
mla r4, r3, r5, r4
umull r2, r3, r2, r3
adds r3, r4, r3
adds r0, r0, r2
adc r1, r1, r3
pop {r4, r5}
bx lr
Hmmm, that probably doesn't add anything useful to the discussion. :(
I'll add that one to the todo list ...
Andrew