[RFC][LIBGCC][1 of 2] 64 bit divide implementation for processor without hw divide instruction

Ian Lance Taylor ian@airs.com
Sat Nov 23 19:21:00 GMT 2013


Kugan <kugan.vivekanandarajah@linaro.org> writes:

> This RFC patch series implements a simple align divisor shift dividend
> method.
>
> Regression tested on arm-none-linux-gnueabi with no issues.
>
> OK?
>
> Thanks,
> Kugan
>
> +2013-11-22  Kugan Vivekanandarajah  <kuganv@linaro.org>
> +
> +	* libgcc/libgcc2.c (__udivmoddi4): Define new implementation when
> +	HAVE_NO_HW_DIVIDE is defined, for processors without any divide
> +     instructions.


The code looks fine to me.

You should document HAVE_NO_HW_DIVIDE in gcc/doc/tm.texi in the Library
Calls section.  The macro should probably be something like
TARGET_HAS_NO_HW_DIVIDE.

Ian



More information about the Gcc-patches mailing list