base/asm-common.h, symm/*.S: New macros for register name decoration.
authorMark Wooding <mdw@distorted.org.uk>
Sat, 5 Nov 2016 21:28:22 +0000 (21:28 +0000)
committerMark Wooding <mdw@distorted.org.uk>
Mon, 3 Apr 2017 08:59:54 +0000 (09:59 +0100)
commit43ea7558955ca453d4687c62d12efcb585124e8a
treef4d743b24b4fe10de87f7fa391ab19401f32f940
parent898f32b33bea7f1e26c8ba906facdd5038edcd57
base/asm-common.h, symm/*.S: New macros for register name decoration.

Enhance `base/asm-common.h' with new macros for translating between
various ways of describing pieces of machine registers.

The x86/AMD64 general-purpose registers are a complicated mess of
overlapping pieces, and trying to write code which works on both just
makes everything even more interesting.

The ARM NEON registers are somewhat complicated, and GNU as isn't as
good as it should be at coping with alternative ways of denoting pieces
of them.  (For example, it ought to allow {q0-q7} instead of {d0-d15},
but doesn't; and it ought to allow q2[2] instead of d5[0], but doesn't.)

Use these macros tastefully in the various pieces of assembler code.
base/asm-common.h
symm/chacha-arm-neon.S
symm/rijndael-arm-crypto.S
symm/rijndael-x86ish-aesni.S
symm/salsa20-arm-neon.S