Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
N
nettle
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Brian Smith
nettle
Commits
373e2a97
Commit
373e2a97
authored
23 years ago
by
Niels Möller
Browse files
Options
Downloads
Patches
Plain Diff
(_aes_crypt): Decrement round when looping, saving yet some
instructions. Rev: src/nettle/sparc/aes.asm:1.61
parent
bef4b962
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
sparc/aes.asm
+10
-13
10 additions, 13 deletions
sparc/aes.asm
with
10 additions
and
13 deletions
sparc/aes.asm
+
10
−
13
View file @
373e2a97
...
@@ -27,7 +27,7 @@ define(diff, %l2)
...
@@ -27,7 +27,7 @@ define(diff, %l2)
define
(
nrounds
,
%
l3
)
define
(
nrounds
,
%
l3
)
!
Loop
variables
!
Loop
variables
define
(
round
,
%
l4
)
!
Really
16
*
round
define
(
round
,
%
l4
)
define
(
i
,
%
l5
)
define
(
i
,
%
l5
)
!
Further
loop
invariants
!
Further
loop
invariants
...
@@ -57,24 +57,22 @@ _aes_crypt:
...
@@ -57,24 +57,22 @@ _aes_crypt:
!
Compute
xor
,
so
that
we
can
swap
efficiently.
!
Compute
xor
,
so
that
we
can
swap
efficiently.
xor
wtxt
,
tmp
,
di
ff
xor
wtxt
,
tmp
,
di
ff
!
The
loop
variable
will
be
multiplied
by
16
.
!
The
loop
variable
will
be
multiplied
by
16
.
sll
nrounds
,
4
,
nrounds
!
More
loop
invariants
!
More
loop
invariants
add
T
,
AES_TABLE0
,
T0
add
T
,
AES_TABLE0
,
T0
add
T
,
AES_TABLE1
,
T1
add
T
,
AES_TABLE1
,
T1
add
T
,
AES_TABLE2
,
T2
add
T
,
AES_TABLE2
,
T2
add
T
,
AES_TABLE3
,
T3
add
T
,
AES_TABLE3
,
T3
.Lblock_loop:
!
Read
src
,
and
add
initial
subkey
!
Read
src
,
and
add
initial
subkey
!
Difference
between
ctx
and
src
!
Difference
between
ctx
and
src.
!
NOTE:
This
isntruction
is
duplicated
in
the
delay
slot
sub
ctx
,
src
,
%
g2
sub
ctx
,
src
,
%
g2
.Lblock_loop:
!
Difference
between
wtxt
and
src
!
Difference
between
wtxt
and
src
sub
wtxt
,
src
,
%
g3
sub
wtxt
,
src
,
%
g3
!
For
stop
condition.
Note
that
src
is
incremented
in
the
!
For
stop
condition.
Note
that
src
is
incremented
in
the
!
delay
slot
!
delay
slot
add
src
,
8
,
%
g4
add
src
,
8
,
%
g4
nop
.Lsource_loop:
.Lsource_loop:
ldub
[
src
+
3
],
t3
ldub
[
src
+
3
],
t3
...
@@ -98,7 +96,7 @@ _aes_crypt:
...
@@ -98,7 +96,7 @@ _aes_crypt:
bleu
.Lsource_loop
bleu
.Lsource_loop
add
src
,
4
,
src
add
src
,
4
,
src
mov
16
,
round
sub
nrounds
,
1
,
round
add
ctx
,
16
,
key
add
ctx
,
16
,
key
.Lround_loop:
.Lround_loop:
...
@@ -158,11 +156,10 @@ _aes_crypt:
...
@@ -158,11 +156,10 @@ _aes_crypt:
!
switch
roles
for
tmp
and
wtxt
!
switch
roles
for
tmp
and
wtxt
xor
wtxt
,
di
ff
,
wtxt
xor
wtxt
,
di
ff
,
wtxt
add
round
,
1
6
,
round
subcc
round
,
1
,
round
add
key
,
16
,
key
add
key
,
16
,
key
cmp
round
,
nrounds
b
lu
.Lround_loop
b
ne
.Lround_loop
xor
tmp
,
di
ff
,
tmp
xor
tmp
,
di
ff
,
tmp
!
final
round
!
final
round
...
@@ -218,8 +215,8 @@ _aes_crypt:
...
@@ -218,8 +215,8 @@ _aes_crypt:
addcc
length
,
-
16
,
length
addcc
length
,
-
16
,
length
bne
.Lblock_loop
bne
.Lblock_loop
nop
sub
ctx
,
src
,
%
g2
!
add
ds
t
,
16
,
ds
t
.Lend:
.Lend:
ret
ret
rest
ore
rest
ore
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment