[PATCH] Driver: add target definition for Windows on ARM

Reid Kleckner rnk at google.com
Fri Apr 4 12:03:43 PDT 2014


  LGTM


================
Comment at: lib/Basic/Targets.cpp:4425-4426
@@ +4424,4 @@
+    // TODO base this on the actual triple
+    Builder.defineMacro("_M_ARM", "7");
+    // TODO map the complete set of values
+    // 31: VFPv3 40: VFPv4
----------------
Saleem Abdulrasool wrote:
> Reid Kleckner wrote:
> > Any reason not to just do that?
> I couldnt figure out how to get MSVC to provide the values for _M_ARM_FP that it supports.
Oops, I was referring to the _M_ARM macro.  It seems like just a matter of extracting the version number as a string.

================
Comment at: lib/Basic/Targets.cpp:4437
@@ +4436,3 @@
+    : WindowsARMTargetInfo(Triple) {
+    TheCXXABI.set(TargetCXXABI::GenericItanium);
+  }
----------------
Saleem Abdulrasool wrote:
> Reid Kleckner wrote:
> > Any reason not to use GenericARM?  GenericItanium uses a bit to implement member pointers that conflicts with the thumb bit of the PC.
> Ah, I thought GenericARM was the ARM C++ ABI rather than IA-64 on ARM, fine by me to switch to that.
The ARM C++ ABI is derived from the Itanium C++ ABI.  It's mostly a bunch of bugfixes (virtual inline functions cannot be key functions) and member pointer tweaks for thumb.

================
Comment at: lib/Basic/Targets.cpp:4415
@@ +4414,3 @@
+
+// Windows ARM + IA-64 C++ ABI Target
+class ItaniumWindowsARMleTargetInfo : public WindowsARMTargetInfo {
----------------
Just call it the "Itanium C++ ABI".  That's the title of the actual document:
http://mentorembedded.github.io/cxx-abi/abi.html


http://llvm-reviews.chandlerc.com/D3241



More information about the llvm-commits mailing list