X-Git-Url: https://git.cryptolib.org/?a=blobdiff_plain;f=twister-small-asm.S;h=6cfda293836a90d48f48881f68d04b830c26c079;hb=52ec168ece9d61bd9cb652235dfe8faee6232a11;hp=9a1f0c70fdc50b2600cf1571ba404e0919b3fbb9;hpb=17332291e15183d71d88ed868275e3cb53917180;p=avr-crypto-lib.git diff --git a/twister-small-asm.S b/twister-small-asm.S index 9a1f0c7..6cfda29 100644 --- a/twister-small-asm.S +++ b/twister-small-asm.S @@ -1,6 +1,6 @@ /* twister-small-asm.S */ /* - This file is part of the This file is part of the AVR-Crypto-Lib. + This file is part of the AVR-Crypto-Lib. Copyright (C) 2008 Daniel Otte (daniel.otte@rub.de) This program is free software: you can redistribute it and/or modify @@ -123,15 +123,15 @@ twister_small_lastBlock: movw r30, TMP_SAVE0 ldi r20, 0x80 sub r19, r18 /* r18: bytes to copy, r19: bytes to clear */ - + ld r0, X+ -3: - tst r18 +3: tst r18 breq 4f +31: st Z+, r0 ld r0, X+ dec r18 - + brne 31b 4: mov r18, LEN_SAVE0 andi r18, 0x07 @@ -146,11 +146,14 @@ twister_small_lastBlock: 5: st Z+, r20 + + tst r19 + breq 7f 6: st Z+, r1 dec r19 brne 6b - +7: movw r24, CTX_SAVE0 movw r22, TMP_SAVE0 rcall twister_small_nextBlock