On Fri, May 6, 2022 at 3:36 AM Takayuki 'January June' Suwa via
Gcc-patches <gcc-patches@gcc.gnu.org> wrote:
>
> On Espressif's ESP8266 (based on Tensilica LX106, no hardware divider),
> this patch reduces the size of each:
>
>    __moddi3() @ libgcc.a :  969 -> 301 (saves 668)
>    __divmoddi4()         : 1111 -> 426 (saves 685)
>    __udivmoddi4()        : 1043 -> 319 (saves 724)
>
> in bytes, respectively.
>
> gcc/ChangeLog:
>
>         * config/xtensa/xtensa.h (TARGET_HAS_NO_HW_DIVIDE): New macro
>         definition.
> ---
>   gcc/config/xtensa/xtensa.h | 5 +++++
>   1 file changed, 5 insertions(+)

Regtested for target=xtensa-linux-uclibc, there's new regression in
gcc.c-torture/execute/20101011-1.c
related to division by 0 implemented as an invalid opcode exception
that the kernel should convert to division by 0 signal, but does not.
It should be fixed in the kernel.

Committed to master.

-- 
Thanks.
-- Max

Reply via email to