patch to add aes and pclmulqdq instructions to gcc

John-Mark Gurney jmg at funkthat.com
Thu Jan 17 18:33:05 UTC 2013


Konstantin Belousov wrote this message on Thu, Jan 17, 2013 at 19:53 +0200:
> On Thu, Jan 17, 2013 at 09:31:40AM -0800, John-Mark Gurney wrote:
> > Konstantin Belousov wrote this message on Thu, Jan 17, 2013 at 13:12 +0200:
> > > On Wed, Jan 16, 2013 at 11:05:16PM -0800, John-Mark Gurney wrote:
> > > > Mike Belopuhov pointed me to the patch in OpenBSD:
> > > > http://freshbsd.org/commit/openbsd/0babc91a00b1f1953637bb39c8ec97aef704629e/diff.txt
> > > > 
> > > > While OpenBSD's binutils is quite different than FreeBSD's, I was able
> > > > to use his patch to teach binutils how to assemble and disassemble the
> > > > aes and pclmulqdq instructions.
> > > > 
> > > > I have done basic tests, such as verified that it can assemble the aesni
> > > > module and get the same results, and assemble a sample file for
> > > > pclmulqdq..  For each of these tests, I have verified that it's output
> > > > matches (as close as possible, as gcc/clang compile callq's differently)
> > > > clang on amd64..
> > > Did you removed the manually assembled bytes from aes*.S and replaced them
> > > with the commented-out instructions for the test ?
> > 
> > Yep..
> Thank you, I expect that you will commit the crypto/aes change which
> removes the .bytes, after the gas patch.

Yep...  Though I hope it'll be followed shortly by a much improved
version of the AES-NI code.. :)

Oh, does anyone see any problems w/ MFC'ing the patch(s)?  I haven't
done any testing yet (but I will), but from my understanding our gcc in
9 is very similar to 10?

This is my first real foray into the toolchain like this...

> > > There is also newer VEX encoding for the same AESNI set, but adding the
> > > support for them might be hard because the source base is old.
> > 
> > I don't see a use for them right now.  And considering how anoying it
> > was to add just these instructions.. :)
> 
> I am not asking you to do more work. It just my understanding that
> Intel wants everybody migrate to VEX encoding, where available.

:)

-- 
  John-Mark Gurney				Voice: +1 415 225 5579

     "All that I will do, has been done, All that I have, has not."


More information about the freebsd-toolchain mailing list