[PATCH] Do not generate Tag_DIV_use=AllowDIVExt when hardware div is non-optional

Renato Golin renato.golin at linaro.org
Mon Jan 20 01:37:49 PST 2014


Hi Atyom,

LGTM, too.

--renato


On 17 January 2014 17:41, Artyom Skrobov <Artyom.Skrobov at arm.com> wrote:

> Hello,
>
> ARMAsmPrinter::emitAttributes emits AllowDIVExt (2) for Tag_DIV_use
> whenever
> the compilation target has hardware divide in both ARM and Thumb
> instruction
> sets.
> According to the ABI, this is incorrect:
>
> 2: This code was permitted to use SDIV and UDIV in the ARM and Thumb ISAs;
> the instructions are present as an optional architectural extension above
> the base architecture implied by Tag_CPU_arch and Tag_CPU_arch_profile.
> Note: Producers must emit value 2 if and only if the permission to use SDIV
> and UDIV cannot be conveyed using values 0 and 1.
>
> In ARMv8, hardware divide is mandatory in both ARM and Thumb instruction
> sets, and therefore, Tag_DIV_use should not be emitted, as the default
> value
> AllowDIVIfExists (0) is sufficient to express the permission to use
> hardware
> divide.
>
> OK to commit?
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140120/27d97986/attachment.html>


More information about the llvm-commits mailing list