Browse Source

AES ARMASM <ARMV7: fix load order

Loading from memory based on register that is overwritten in ldrd.
When ldrd split out for older processors, register overwritten before
second load.
Switch order of loads in this case.
Sean Parkinson 1 year ago
parent
commit
4eeb792a05
1 changed files with 1 additions and 1 deletions
  1. 1 1
      wolfcrypt/src/port/arm/armv8-32-aes-asm.S

+ 1 - 1
wolfcrypt/src/port/arm/armv8-32-aes-asm.S

@@ -704,8 +704,8 @@ L_AES_set_encrypt_key_start_192:
 	ldrd	r6, r7, [r0, #8]
 #endif
 #if defined(WOLFSSL_SP_ARM_ARCH) && (WOLFSSL_SP_ARM_ARCH < 7)
-	ldr	r0, [r0, #16]
 	ldr	r1, [r0, #20]
+	ldr	r0, [r0, #16]
 #else
 	ldrd	r0, r1, [r0, #16]
 #endif