X-Git-Url: https://git.cryptolib.org/?a=blobdiff_plain;f=sha1%2Fsha1-asm.S;h=4d185f928fc5a488e96ee66919ff36bffe21acdc;hb=cc26d167f796adaa33ca3cbec8016f7915b6033b;hp=3b88ca15ede7efa38ec1dc35777e10c2c2a99db4;hpb=f26c4e0df2415993c0c85229cbab83f393526342;p=avr-crypto-lib.git diff --git a/sha1/sha1-asm.S b/sha1/sha1-asm.S index 3b88ca1..4d185f9 100644 --- a/sha1/sha1-asm.S +++ b/sha1/sha1-asm.S @@ -291,13 +291,13 @@ sha1_lastBlock_prolog: /* allocate space on stack */ in r30, SPL in r31, SPH - in r1, SREG + in r0, SREG subi r30, lo8(64) sbci r31, hi8(64) /* ??? */ cli out SPL, r30 + out SREG, r0 out SPH, r31 - out SREG,r1 adiw r30, 1 /* SP points to next free byte on stack */ mov r18, r20 /* r20 = LSB(length) */ @@ -421,15 +421,14 @@ sha1_lastBlock_insert_length: sha1_lastBlock_epilog: in r30, SPL in r31, SPH - in r1, SREG + in r0, SREG adiw r30, 63 ; lo8(64) adiw r30, 1 ; hi8(64) cli out SPL, r30 + out SREG, r0 out SPH, r31 - out SREG,r1 clr r1 - clr r0 ret /**/ @@ -488,8 +487,8 @@ sha1_nextBlock: in r0, SREG cli ; we want to be uninterrupted while updating SP out SPL, r20 - out SPH, r21 out SREG, r0 + out SPH, r21 push r18 push r19 /* push old SP on new stack */ @@ -776,8 +775,8 @@ sha1_nextBlock_epilog: in r0, SREG cli ; we want to be uninterrupted while updating SP out SPL, r20 - out SPH, r21 out SREG, r0 + out SPH, r21 clr r1 pop r29