[PATCH] Add Clang support for PPC cryptography builtins

Bill Schmidt wschmidt at linux.vnet.ibm.com
Tue Mar 3 08:05:47 PST 2015


LGTM with a few small changes noted inline.


REPOSITORY
  rL LLVM

================
Comment at: lib/CodeGen/CGBuiltin.cpp:6354
@@ -6353,1 +6353,3 @@
   }
+  // P8 Crypto builtins
+  case PPC::BI__builtin_altivec_crypto_vshasigmaw:
----------------
This code should be predicated on the crypto feature being enabled.  It is possible for someone to use llc with -mattr=-crypto and specify these builtins.  We need to fail gracefully when that happens.  Kit just did something similar so you can check with him if you have questions.

================
Comment at: lib/Headers/altivec.h:12665
@@ +12664,3 @@
+/* Power 8 Crypto functions
+FIXME: We diverge from the current GCC implementation with regard
+to cryptography and related functions as follows:
----------------
Change the FIXME here to a NOTE, as this is GCC's problem, not LLVM's.

================
Comment at: lib/Headers/altivec.h:12676
@@ +12675,3 @@
+provided.
+Finally, the naming convention for the builtins will be adjusted due
+to the inconsistency (__builtin_crypto_ prefix on builtins that cannot be
----------------
You can put a FIXME on this specific part.

http://reviews.llvm.org/D7951

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the cfe-commits mailing list