Oracle released Sun Studio 12.6 recently. We have a SHA-1 and SHA-256 intrinsic based implementation (for ARM and Intel), and we want to enable the extension on Solaris i86 machines.
The 12.6 manual and -xarch options is available at A.2.115.3 -xarch Flags for x86, but it does not discuss SHA.
Which -xarch option do we use for SHA?
If Studio 12.6 doesn't support the SHA instruction set (and I strongly suspect it doesn't since I can't find "SHA" mentioned at all, in any form, in the What's New in the Oracle Developer Studio 12.6 Release documentation), you're out of luck.
Almost.
What you can do is create your own inline assembler functions. See
man inline:An example can be found here (emphasis mine):
It's not hard at all. I had to write a lot of SPARC inline assembler functions for a customer I was consulting for back in the Solaris 8 days, some of them were pretty basic - effectively one-liners to wrap a single instruction. I swear some of them wound up in later versions of the Studio compiler suite (since we were sub-contracted by Sun itself, that's not surprising, nevermind the fact that some of them were blatantly obvious -
floor()andceil(), IIRC, were two of them - and should have been there in the first place...)