RE: [PATCH] crypto: x86/twofish-3way - Fix %rbp usage

From: David Laight
Date: Tue Dec 19 2017 - 09:36:57 EST


From: Juergen Gross
> Sent: 19 December 2017 08:05
..
>
> Exchanging 2 registers can be done without memory access via:
>
> xor reg1, reg2
> xor reg2, reg1
> xor reg1, reg2

That'll generate horrid data dependencies.
ISTR that there are some optimisations for the stack,
so even 'push reg1', 'mov reg2,reg1', 'pop reg2' might
be faster than the above.

David