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

Saleem Abdulrasool compnerd at compnerd.org
Sun Jan 19 18:18:50 PST 2014


On Fri, Jan 17, 2014 at 9:41 AM, 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?
>

LGTM.  Minor nit, Id place the usage note above the values for Tag_DIV_use.


> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
>


-- 
Saleem Abdulrasool
compnerd (at) compnerd (dot) org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140119/1721909b/attachment.html>


More information about the llvm-commits mailing list