This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [arm] Improve longlong.h umul_ppmm, count_trailing_zeros
- From: Richard Earnshaw <rearnsha at arm dot com>
- To: Richard Henderson <rth at redhat dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 20 Mar 2012 14:55:39 +0000
- Subject: Re: [arm] Improve longlong.h umul_ppmm, count_trailing_zeros
- References: <4F2778EA.7060009@redhat.com> <4F293CDE.6020806@arm.com>
On 01/02/12 13:23, Richard Earnshaw wrote:
> On 31/01/12 05:15, Richard Henderson wrote:
>> Despite how trivial this is, I assume this must wait for stage1.
>> Ok?
>>
>>
>> r~
>>
>>
>> * longlong.h [arm] (umul_ppmm): Use umull.
>> [arm] (count_trailing_zeros): Use __builtin_ctz.
>
> armv3m also has the widening multiply operation (it's what the M stands
> for).
>
> Otherwise ok for stage1
>
And it's a good job we did. I've just noticed that it's broken thumb1
builds of libgcc.
00000000 <__ctzsi2>:
0: b508 push {r3, lr}
2: f7ff fffe bl 0 <__ctzsi2>
2: R_ARM_THM_CALL __ctzsi2
6: bc08 pop {r3}
8: bc02 pop {r1}
a: 4708 bx r1
R.