Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions wolfcrypt/src/cpuid.c
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@
cpuid_flags |= CPUID_SM4;
#endif

(void)hwcaps;
cpuid_check = 1;
}
}
Expand Down
174 changes: 87 additions & 87 deletions wolfcrypt/src/port/arm/thumb2-aes-asm_c.c

Large diffs are not rendered by default.

28 changes: 14 additions & 14 deletions wolfcrypt/src/port/arm/thumb2-chacha-asm_c.c
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ void wc_chacha_setkey(word32* x, const byte* key, word32 keySz)
"SUBS %[keySz], %[keySz], #0x10\n\t"
"ADD r7, r7, %[keySz]\n\t"
/* Start state with constants */
"ldm r7, {r3, r4, r5, r6}\n\t"
"LDM r7, {r3, r4, r5, r6}\n\t"
"STM %[x]!, {r3, r4, r5, r6}\n\t"
/* Next is first 16 bytes of key. */
"LDR r3, [%[key]]\n\t"
Expand Down Expand Up @@ -176,7 +176,7 @@ void wc_chacha_crypt_bytes(ChaCha* ctx, byte* c, const byte* m, word32 len)
"STRD r4, r5, [sp, #16]\n\t"
"STRD r6, r7, [sp, #24]\n\t"
/* Load x[0]..x[12] into registers. */
"ldm lr, {r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, r11, r12}\n\t"
"LDM lr, {r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, r11, r12}\n\t"
/* 10x 2 full rounds to perform. */
"MOV lr, #0xa\n\t"
"STR lr, [sp, #48]\n\t"
Expand Down Expand Up @@ -315,35 +315,35 @@ void wc_chacha_crypt_bytes(ChaCha* ctx, byte* c, const byte* m, word32 len)
"LDR lr, [sp, #32]\n\t"
"MOV r12, sp\n\t"
/* Add in original state */
"ldm lr!, {r8, r9, r10, r11}\n\t"
"LDM lr!, {r8, r9, r10, r11}\n\t"
"ADD %[ctx], %[ctx], r8\n\t"
"ADD %[c], %[c], r9\n\t"
"ADD %[m], %[m], r10\n\t"
"ADD %[len], %[len], r11\n\t"
"ldm lr!, {r8, r9, r10, r11}\n\t"
"LDM lr!, {r8, r9, r10, r11}\n\t"
"ADD r4, r4, r8\n\t"
"ADD r5, r5, r9\n\t"
"ADD r6, r6, r10\n\t"
"ADD r7, r7, r11\n\t"
"ldm r12, {r8, r9}\n\t"
"ldm lr!, {r10, r11}\n\t"
"LDM r12, {r8, r9}\n\t"
"LDM lr!, {r10, r11}\n\t"
"ADD r8, r8, r10\n\t"
"ADD r9, r9, r11\n\t"
"STM r12!, {r8, r9}\n\t"
"ldm r12, {r8, r9}\n\t"
"ldm lr!, {r10, r11}\n\t"
"LDM r12, {r8, r9}\n\t"
"LDM lr!, {r10, r11}\n\t"
"ADD r8, r8, r10\n\t"
"ADD r9, r9, r11\n\t"
"STM r12!, {r8, r9}\n\t"
"ldm r12, {r8, r9}\n\t"
"ldm lr!, {r10, r11}\n\t"
"LDM r12, {r8, r9}\n\t"
"LDM lr!, {r10, r11}\n\t"
"ADD r8, r8, r10\n\t"
"ADD r9, r9, r11\n\t"
"ADD r10, r10, #0x1\n\t"
"STM r12!, {r8, r9}\n\t"
"STR r10, [lr, #-8]\n\t"
"ldm r12, {r8, r9}\n\t"
"ldm lr, {r10, r11}\n\t"
"LDM r12, {r8, r9}\n\t"
"LDM lr, {r10, r11}\n\t"
"ADD r8, r8, r10\n\t"
"ADD r9, r9, r11\n\t"
"STM r12, {r8, r9}\n\t"
Expand Down Expand Up @@ -447,7 +447,7 @@ void wc_chacha_crypt_bytes(ChaCha* ctx, byte* c, const byte* m, word32 len)
"LDR lr, [sp, #32]\n\t"
"ADD r12, lr, #0x44\n\t"
"STM r12!, {%[ctx], %[c], %[m], %[len], r4, r5, r6, r7}\n\t"
"ldm sp, {r0, r1, r2, r3, r4, r5, r6, r7}\n\t"
"LDM sp, {r0, r1, r2, r3, r4, r5, r6, r7}\n\t"
"STM r12, {%[ctx], %[c], %[m], %[len], r4, r5, r6, r7}\n\t"
"LDRD %[m], %[len], [sp, #40]\n\t"
"LDR %[c], [sp, #36]\n\t"
Expand All @@ -469,7 +469,7 @@ void wc_chacha_crypt_bytes(ChaCha* ctx, byte* c, const byte* m, word32 len)
"BLT.N L_chacha_thumb2_crypt_word_loop_%=\n\t"
#endif
/* 16 bytes of state XORed into message. */
"ldm lr!, {r4, r5, r6, r7}\n\t"
"LDM lr!, {r4, r5, r6, r7}\n\t"
"LDR r8, [%[m]]\n\t"
"LDR r9, [%[m], #4]\n\t"
"LDR r10, [%[m], #8]\n\t"
Expand Down
Loading