[openssl-dev] [openssl.org #4162] [PATCH] Removing vrsave load and store

Andy Polyakov via RT rt at openssl.org
Tue Dec 1 09:03:56 UTC 2015


Hi,

> Access to VRSAVE have a high cost in performance.
> Since ABI was update we don't need to save what
> vector register we are using. Removing VRSAVE access
> can improve a bit more our performance.

Well, OpenSSL doesn't target exclusively post-ABI-update systems and the
rationale for unconditional removal is questionable. I mean you say
yourself "since update" and "our performance", but what about "prior
update" and other OSes? Do *all*, i.e. even big-endian, Linux systems
implement new ABI? AIX? MacOS X/PPC? Well, one can say the last one is
dead, and even if it's not, modules in question [POWER8-specific] won't
ever execute under it, but one before is not... IBM also pushes for
POWER8 to be more open, so wouldn't it be more appropriate to keep
options open? And why just POWER8-specific modules? I finally managed to
find a copy of new specification and it classifies vrsave as reserved
for system use. So that correct course of action is to make instructions
reading/writing vrsave conditional, formulate the condition, and express
it in code. I'd suggest to implement this in ppc-xlate. I.e. recognize
'mtspr 256,rA' and conditionally replace it with some kind of nop, e.g.
or rA,rA,rA. 'mfspr rD,256' can be replaced with li rD,-1. This way one
can affect all modules at once without having to examine each one of
them. I can make suggestion a little bit later...





More information about the openssl-dev mailing list