aes/asm/bsaes-armv7.pl: relax stack alignment requirement.
authorAndy Polyakov <appro@openssl.org>
Sat, 25 Mar 2017 09:58:57 +0000 (10:58 +0100)
committerAndy Polyakov <appro@openssl.org>
Sun, 26 Mar 2017 16:30:58 +0000 (18:30 +0200)
Even though Apple refers to Procedure Call Standard for ARM Architecture
(AAPCS), they apparently adhere to custom version that doesn't follow
stack alignment constraints in the said standard. [Why or why? If it's
vendor lock-in thing, then it would be like worst spot ever.] And since
bsaes-armv7 relied on standard alignment, it became problematic to
execute the code on iOS.

Reviewed-by: Rich Salz <rsalz@openssl.org>
(cherry picked from commit 0822d41b6d54132df96c02cc6f6fa9b179378351)

crypto/aes/asm/bsaes-armv7.pl

index 83343e2de1af7bd19b574aaa69e626428b273e51..70b3f9656f4fa734196896b942a1fbf0a02a6a66 100644 (file)
@@ -1333,7 +1333,7 @@ bsaes_cbc_encrypt:
        vmov    @XMM[4],@XMM[15]                @ just in case ensure that IV
        vmov    @XMM[5],@XMM[0]                 @ and input are preserved
        bl      AES_decrypt
-       vld1.8  {@XMM[0]}, [$fp,:64]            @ load result
+       vld1.8  {@XMM[0]}, [$fp]                @ load result
        veor    @XMM[0], @XMM[0], @XMM[4]       @ ^= IV
        vmov    @XMM[15], @XMM[5]               @ @XMM[5] holds input
        vst1.8  {@XMM[0]}, [$rounds]            @ write output