Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 21 Oct 2012 09:10:11 +0300
From:      Konstantin Belousov <kostikbel@gmail.com>
To:        Peter Wemm <peter@wemm.org>, Konstantin Belousov <kostikbel@gmail.com>, freebsd-arch@freebsd.org
Subject:   Re: using SSE2 in kernel C code (improving AES-NI module)
Message-ID:  <20121021061011.GG35915@deviant.kiev.zoral.com.ua>
In-Reply-To: <20121021024726.GA1563@funkthat.com>
References:  <20121019233833.GS1967@funkthat.com> <20121020054847.GB35915@deviant.kiev.zoral.com.ua> <20121020171124.GU1967@funkthat.com> <CAGE5yCoM92rU7Ca7C7_x=3vXW%2BqO9Zc0uQhPURuMbstPDvq9yg@mail.gmail.com> <20121021024726.GA1563@funkthat.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--m8pCv11XKdWQJ6wE
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Sat, Oct 20, 2012 at 07:47:26PM -0700, John-Mark Gurney wrote:
> Peter Wemm wrote this message on Sat, Oct 20, 2012 at 11:10 -0700:
> > Or, another option.. do something like genassym or the many other
> > kernel build tools.  aicasm builds and runs a userland tool to
> > generate something to build into the kernel.  With sufficient
> > cross-contamination safeguards I wonder if something similar might be
> > able to be done here.
>=20
> Well, looks like I may this working...  Turns out I can't name the file
> .s otherwise config puts it in SFILES which causes all sorts of problems..
> So, I went w/ .nos, does any one else have any suggestions?
>=20
> how does this look to people:
> aesni_wrap2.nos                 optional aesni                           =
  \
>         dependency      "$S/crypto/aesni/aesni_wrap2.c"                  =
  \
>         compile-with    "${CC} -O3 -fPIC -S -o aesni_wrap2.nos $S/crypto/=
aesni/aesni_wrap2.c" \  =20
>         no-obj no-implicit-rule before-depend                            =
  \
>         clean           "aesni_wrap2.nos"
> aesni_wrap2.o                   optional aesni                           =
  \
>         dependency      "aesni_wrap2.nos"                                =
  \
>         compile-with    "${NORMAL_S} aesni_wrap2.nos"                    =
  \
>         no-implicit-rule                                                 =
  \
>         clean           "aesni_wrap2.o"
>=20
> We'll have to do something similar in the module Makefile, but that is
> easier...
>=20
> Also, I thought we had a better way to note that some devices depend
> upon others than just throwing a depend error...  If you include aesni
> w/o crypto, you get error about missing cryptodev_if.h...
>=20
Hm, if such thing is possible, why do you need to compile through the
=2ES at all ? All you need is to specify the special compiling flags,
including -msse and -msse2.

Note, you shall not need -fPIC, at least for amd64. I would suggest to use
-O2, as well as to try to honour the -g settings.

Most likely, you can put the ${CFLAGS} on the command line, followed
by -msse -msse2.

--m8pCv11XKdWQJ6wE
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (FreeBSD)

iEYEARECAAYFAlCDkcMACgkQC3+MBN1Mb4ijFQCgutJynPglzNMBaAWsGeHQlQ9D
o8AAn1bRvECRuO0K4Gvrs1rmpCd4COda
=OA4o
-----END PGP SIGNATURE-----

--m8pCv11XKdWQJ6wE--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20121021061011.GG35915>