Created attachment 108118 [details] patch fixing the bug when run by valgrind, my armv7hl executable crashes with the following message of valgrind : disInstr(thumb): unhandled instruction: 0xEBAD 0x1CCA ==10358== Illegal opcode at address 0x5900DA3 ==10358== at 0x5900DA2: bsaes_cbc_encrypt (bsaes-armv7.S:1084) using gdb, this opcode is decoded as : (gdb) x /i $pc => 0x5900da2 <bsaes_cbc_encrypt+34>: sub.w r12, sp, r10, lsl #7 A patch is attached