[PATCH] Must not produce Tag_CPU_arch_profile for pre-ARMv7 cores

James Molloy james at jamesmolloy.co.uk
Fri Jan 10 02:34:41 PST 2014


Hi Artyom,

I agree with Saleem that this should be two patches. That said, I've
reviewed the main patch (I ignored thumbv7m.s and thumb2-mclass.s for the
purposes of this review).

+  if (Subtarget->hasV7Ops()) {

I think a comment above here as to why this is conditional on v7+ would be
useful.

+    } else if (Subtarget->isMClass()){
+      ATS.emitAttribute(ARMBuildAttrs::CPU_arch_profile,
+                        ARMBuildAttrs::MicroControllerProfile);
+    }

An } else { llvm_unreachable(); } block seems required to check at least
one of A, R or M was picked.

Cheers,

James



On 10 January 2014 04:41, Saleem Abdulrasool <compnerd at compnerd.org> wrote:

> On Thu, Jan 9, 2014 at 11:12 AM, Artyom Skrobov <Artyom.Skrobov at arm.com>wrote:
>
>> Hello,
>>
>> In the "Addenda to, and Errata in, the ABI for the ARM Architecture"
>> (
>> http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ihi0045d/index.
>> html<http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ihi0045d/index.html>),
>> section 2.3.5.2 "The target-related attributes" specifies that
>> Tag_CPU_arch_profile must have the default value of 0 when "Architecture
>> profile is not applicable (e.g. pre v7, or cross-profile code)". LLVM
>> violates the ABI by emitting this build attribute when targeting ARMv6M.
>>
>> Our proposed patch fixes this, and additionally, it amends
>> test/MC/ARM/thumb2-mclass.s to match its apparent original purpose (to
>> test
>> the ARMv6M/ARMv7M commonality), and creates a new test case for the
>> differences between ARMv6M and ARMv7M (i.e. the availability of basepri,
>> basepri_max and faultmask registers)
>>
>> OK to commit?
>>
>
> Can you split this up into two changes?  One to change/split the
> thumb2-mclass tests, and one for the EABI attribute conformance.
>
>
>> _______________________________________________
>> 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
>
> _______________________________________________
> 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/20140110/211b1e69/attachment.html>


More information about the llvm-commits mailing list