Mostly abolish inline assembler code in favour of dedicated files.
authorMark Wooding <mdw@distorted.org.uk>
Thu, 26 Sep 2019 11:11:50 +0000 (12:11 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Fri, 27 Sep 2019 00:28:15 +0000 (01:28 +0100)
commita3ad4421ce9e122bc9079ffc6e60f45b1b06c1d7
tree693cdc5fe43e5caaf1d763688dd5828aca7e6e30
parent82d064a1d4fc1486200d94dae7234dbdbe8fc76c
Mostly abolish inline assembler code in favour of dedicated files.

Move the fancy feature probing from `dispatch.c'.  This makes it easier to
understand because it's not covered in `%' sigils and backwards, and
also simplifies things because we have better machinery for papering
over the differences between 32- and 64-bit instruction sets.

Also move the `rdrand' code from `rand.c'.  This makes things
significantly more complicated because it calls back into C, but it does
improve availability of a security feature, so that's good.

That leaves only a use of `rdtsc' in `perftest.c', which is hardly
critical, and the `rbit' in the ARM64 `gcm.c' code, which has a slightly
slower portable alternative.
base/Makefile.am
base/dispatch-x86ish.S [new file with mode: 0644]
base/dispatch.c
rand/Makefile.am
rand/rand-x86ish.S [new file with mode: 0644]
rand/rand.c