| Fix openssl clang compilation error. |
| |
| "openssl-1.0.2" is not buildable using clang, the clang-assembler does |
| not recognize some arm assembly. |
| |
| One of them is "ldrplb", this must be re-written to "ldrbpl" for |
| clang-assmebler. (Similarly for ldrneb). Openssl upstream bug entry here - |
| "http://rt.openssl.org/Ticket/Display.html?id=3989" |
| |
| Another issue is that 'adrl', which is an arm defined pseudo insn, is not |
| supported by clang either, replace it using an upstream version that is guarded |
| by "__APPLE__". LLVM upstream bug here - |
| https://llvm.org/bugs/show_bug.cgi?id=24350 |
| |
| --- a/crypto/bn/asm/armv4-gf2m.pl |
| +++ b/crypto/bn/asm/armv4-gf2m.pl |
| @@ -211,12 +211,12 @@ |
| .fpu neon |
| |
| .align 5 |
| .LNEON: |
| ldr r12, [sp] @ 5th argument |
| - vmov.32 $a, r2, r1 |
| - vmov.32 $b, r12, r3 |
| + vmov $a, r2, r1 |
| + vmov $b, r12, r3 |
| vmov.i64 $k48, #0x0000ffffffffffff |
| vmov.i64 $k32, #0x00000000ffffffff |
| vmov.i64 $k16, #0x000000000000ffff |
| |
| vext.8 $t0#lo, $a, $a, #1 @ A1 |
| --- a/crypto/sha/asm/sha256-armv4.pl |
| +++ b/crypto/sha/asm/sha256-armv4.pl |
| @@ -593,11 +593,11 @@ |
| vld1.32 {$ABCD,$EFGH},[$ctx] |
| # ifdef __thumb2__ |
| adr $Ktbl,.LARMv8 |
| sub $Ktbl,$Ktbl,#.LARMv8-K256 |
| # else |
| - adrl $Ktbl,K256 |
| + sub $Ktbl,$Ktbl,#256+32 |
| # endif |
| add $len,$inp,$len,lsl#6 @ len to point at the end of inp |
| |
| .Loop_v8: |
| vld1.8 {@MSG[0]-@MSG[1]},[$inp]! |