]> git.ipfire.org Git - thirdparty/nettle.git/commitdiff
(_aes_crypt): Eliminated updates of i from the loop.
authorNiels Möller <nisse@lysator.liu.se>
Wed, 15 May 2002 20:41:45 +0000 (22:41 +0200)
committerNiels Möller <nisse@lysator.liu.se>
Wed, 15 May 2002 20:41:45 +0000 (22:41 +0200)
Rev: src/nettle/sparc/aes.asm:1.91

sparc/aes.asm

index 2a72eaa92389a3859776626683d6ffa2fa4e034c..2b69c2175a28d0a18fc8bbc9529ab1e612fbac92 100644 (file)
@@ -292,7 +292,7 @@ undefine(<i>)
 define(i, round)
 
        ! Comments mark which j in T->sbox[Bj(wtxt[IDXj(i)])]
-       ! the instruction is part of
+       ! the instruction is part of.
 
        C Unrolled final loop begins
        ! NOTE: First instruction duplicated in delay slot
@@ -325,7 +325,7 @@ define(i, round)
        
        or      t0, t3, t0      ! 0, 1, 2, 3
        xor     t0, t2, t0
-       add     i, 4, i
+       C add   i, 4, i
        
        srl     t0, 24, t3
        srl     t0, 16, t2
@@ -343,7 +343,7 @@ define(i, round)
        add     wtxt, t1, t1    ! 1
        ldub    [t1+2], t1      ! 1
 
-       ld      [wtxt+i], t0    ! 0
+       ld      [wtxt+4], t0    ! 0
        ! IDX2(j) = j XOR 2
        lduh    [wtxt+12], t2   ! 2
        and     t0, 255, t0     ! 0
@@ -366,7 +366,7 @@ define(i, round)
        
        or      t0, t3, t0      ! 0, 1, 2, 3
        xor     t0, t2, t0
-       add     i, 4, i
+       C add   i, 4, i
        
        srl     t0, 24, t3
        srl     t0, 16, t2
@@ -407,7 +407,7 @@ define(i, round)
        
        or      t0, t3, t0      ! 0, 1, 2, 3
        xor     t0, t2, t0
-       add     i, 4, i
+       C add   i, 4, i
        
        srl     t0, 24, t3
        srl     t0, 16, t2
@@ -422,11 +422,10 @@ define(i, round)
        C i = 3
        ld      [IDX1+12], t1   ! 1
 
-       xor     i, 8, t2
        add     wtxt, t1, t1    ! 1
        ldub    [t1+2], t1      ! 1
 
-       ld      [wtxt+i], t0    ! 0
+       ld      [wtxt+12], t0   ! 0
        ! IDX2(j) = j XOR 2
        lduh    [wtxt+4], t2    ! 2
        and     t0, 255, t0     ! 0
@@ -449,7 +448,7 @@ define(i, round)
        
        or      t0, t3, t0      ! 0, 1, 2, 3
        xor     t0, t2, t0
-       add     i, 4, i
+       C add   i, 4, i
        
        srl     t0, 24, t3
        srl     t0, 16, t2
@@ -461,8 +460,6 @@ define(i, round)
        stb     t0, [dst]
        add     dst, 4, dst
        
-       C ld    [IDX1+i], t1    ! 1
-                       
        C Unrolled final loop ends
        
        addcc   length, -16, length