]> git.ipfire.org Git - thirdparty/nettle.git/commitdiff
(_aes_crypt): Deleted idx register. Further cleanup.
authorNiels Möller <nisse@lysator.liu.se>
Mon, 25 Feb 2002 15:45:59 +0000 (16:45 +0100)
committerNiels Möller <nisse@lysator.liu.se>
Mon, 25 Feb 2002 15:45:59 +0000 (16:45 +0100)
Rev: src/nettle/sparc/aes.asm:1.65

sparc/aes.asm

index 0df565ca8d46cbebbf55f3739efb14f0b3295496..e49a195d33e45d158e0543067bfc995e504b17c1 100644 (file)
@@ -106,7 +106,6 @@ _aes_crypt:
 .Lround_loop:
        ! 4*i
        mov     0, i
-       ! add   T, AES_SIDX3, idx
 .Linner_loop:
        ! The comments mark which j in T->table[j][ Bj(wtxt[IDXi(i)]) ]
        ! the instruction is a part of. 
@@ -114,68 +113,60 @@ _aes_crypt:
        ! The code uses the register %o[j], aka tj, as the primary 
        ! register for that sub-expression. True for j==1,3.
        
-       ! AES_SIDX1
        ld      [IDX1+i], t1            ! 1
-       ! AES_SIDX2
+       
        ! IDX2(j) = j XOR 2
        xor     i, 8, t2
-       ! wtxt[IDX1...]
        add     wtxt, t1, t1            ! 1
        ldub    [t1+2], t1              ! 1
-
-       ! AES_SIDX3
        ld      [IDX3+i], t3            ! 3
+       
        sll     t1, 2, t1               ! 1
-       ! wtxt[i]
        ld      [wtxt+i], t0            ! 0
-       ! wtxt[IDX2...]
        lduh    [wtxt+t2], t2           ! 2
-       
        and     t0, 255, t0             ! 0
-       ! wtxt[IDX3...]
+       
        ldub    [wtxt+t3], t3           ! 3
        sll     t0, 2, t0               ! 0
        ld      [T0+t0], t0             ! 0
-
        and     t2, 255, t2             ! 2
+       
        ld      [T1+t1], t1             ! 1
        sll     t2, 2, t2               ! 2
        ld      [T2+t2], t2             ! 2
-
        sll     t3, 2, t3               ! 3
+       
        ld      [T3+t3], t3             ! 3
        xor     t0, t1, t0              ! 0, 1
        xor     t0, t2, t0              ! 0, 1, 2
-
-       ! add   idx, 4, idx             
        ! Fetch roundkey
        ld      [key+i], t1
+       
        xor     t0, t3, t0              ! 0, 1, 2, 3
        xor     t0, t1, t0
-
        st      t0, [tmp+i]
        cmp     i, 8
+       
        bleu    .Linner_loop
        add     i, 4, i
-       
        ! switch roles for tmp and wtxt
        xor     wtxt, diff, wtxt
        subcc   round, 1, round
+       
        add     key, 16, key
        nop
-       
        bne     .Lround_loop
        xor     tmp, diff, tmp
 
        ! final round
        ! 4*i
        mov     0, i
-       ! SIDX3
-       ! add   T, AES_SIDX3, idx
+
 .Lfinal_loop:
        ! Comments mark which j in T->sbox[Bj(wtxt[IDXj(i)])]
        ! the instruction is part of
        ld      [IDX1+i], t1    ! 1
+       ! IDX2(j) = j XOR 2
        xor     i, 8, t2
        ! ld    [idx-16], t2    ! 2
        add     wtxt, t1, t1    ! 1