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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Brian Smith
nettle
Commits
b1fcc2a9
Commit
b1fcc2a9
authored
23 years ago
by
Niels Möller
Browse files
Options
Downloads
Patches
Plain Diff
(_aes_crypt): Reformatted code as blocks of four instructions
each. Rev: src/nettle/sparc/aes.asm:1.62
parent
373e2a97
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
sparc/aes.asm
+34
-11
34 additions, 11 deletions
sparc/aes.asm
with
34 additions
and
11 deletions
sparc/aes.asm
+
34
−
11
View file @
b1fcc2a9
...
@@ -65,14 +65,17 @@ _aes_crypt:
...
@@ -65,14 +65,17 @@ _aes_crypt:
add
T
,
AES_TABLE3
,
T3
add
T
,
AES_TABLE3
,
T3
!
Read
src
,
and
add
initial
subkey
!
Read
src
,
and
add
initial
subkey
!
Difference
between
ctx
and
src.
!
Difference
between
ctx
and
src.
!
NOTE:
This
i
s
ntruction
is
duplicated
in
the
delay
slot
!
NOTE:
This
in
s
truction
is
duplicated
in
the
delay
slot
sub
ctx
,
src
,
%
g2
sub
ctx
,
src
,
%
g2
.Lblock_loop:
.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
nop
.Lsource_loop:
.Lsource_loop:
ldub
[
src
+
3
],
t3
ldub
[
src
+
3
],
t3
...
@@ -95,10 +98,9 @@ _aes_crypt:
...
@@ -95,10 +98,9 @@ _aes_crypt:
st
t3
,
[
src
+%
g3
]
st
t3
,
[
src
+%
g3
]
bleu
.Lsource_loop
bleu
.Lsource_loop
add
src
,
4
,
src
add
src
,
4
,
src
sub
nrounds
,
1
,
round
sub
nrounds
,
1
,
round
add
ctx
,
16
,
key
add
ctx
,
16
,
key
.Lround_loop:
.Lround_loop:
!
4
*
i
!
4
*
i
mov
0
,
i
mov
0
,
i
...
@@ -158,7 +160,8 @@ _aes_crypt:
...
@@ -158,7 +160,8 @@ _aes_crypt:
xor
wtxt
,
di
ff
,
wtxt
xor
wtxt
,
di
ff
,
wtxt
subcc
round
,
1
,
round
subcc
round
,
1
,
round
add
key
,
16
,
key
add
key
,
16
,
key
nop
bne
.Lround_loop
bne
.Lround_loop
xor
tmp
,
di
ff
,
tmp
xor
tmp
,
di
ff
,
tmp
...
@@ -171,33 +174,33 @@ _aes_crypt:
...
@@ -171,33 +174,33 @@ _aes_crypt:
!
Comments
mark
which
j
in
T
->
sbox
[
Bj
(
wtxt
[
IDXj
(
i
)])]
!
Comments
mark
which
j
in
T
->
sbox
[
Bj
(
wtxt
[
IDXj
(
i
)])]
!
the
instruction
is
part
of
!
the
instruction
is
part
of
ld
[
idx
-
32
],
t1
!
1
ld
[
idx
-
32
],
t1
!
1
ld
[
idx
-
16
],
t2
!
2
xor
i
,
8
,
t
2
!
ld
[
idx
-
16
],
t2
!
2
add
wtxt
,
t1
,
t1
!
1
add
wtxt
,
t1
,
t1
!
1
ldub
[
t1
+
2
],
t1
!
1
ldub
[
t1
+
2
],
t1
!
1
ld
[
wtxt
+
i
],
t0
!
0
ld
[
wtxt
+
i
],
t0
!
0
lduh
[
wtxt
+
t2
],
t2
!
2
lduh
[
wtxt
+
t2
],
t2
!
2
and
t0
,
255
,
t0
!
0
and
t0
,
255
,
t0
!
0
ld
[
idx
],
t3
!
3
ld
[
idx
],
t3
!
3
and
t2
,
255
,
t2
!
2
and
t2
,
255
,
t2
!
2
ldub
[
T
+
t1
],
t1
!
1
ldub
[
T
+
t1
],
t1
!
1
ldub
[
T
+
t0
],
t0
!
0
ldub
[
T
+
t0
],
t0
!
0
sll
t1
,
8
,
t1
!
1
sll
t1
,
8
,
t1
!
1
ldub
[
wtxt
+
t3
],
t3
!
3
ldub
[
wtxt
+
t3
],
t3
!
3
or
t0
,
t1
,
t0
!
0
,
1
or
t0
,
t1
,
t0
!
0
,
1
ldub
[
T
+
t2
],
t2
!
2
ldub
[
T
+
t2
],
t2
!
2
ldub
[
T
+
t3
],
t3
!
3
ldub
[
T
+
t3
],
t3
!
3
sll
t2
,
16
,
t2
!
2
sll
t2
,
16
,
t2
!
2
or
t0
,
t2
,
t0
!
0
,
1
,
2
or
t0
,
t2
,
t0
!
0
,
1
,
2
ld
[
key
+
i
],
t2
ld
[
key
+
i
],
t2
sll
t3
,
24
,
t3
!
3
sll
t3
,
24
,
t3
!
3
or
t0
,
t3
,
t0
!
0
,
1
,
2
,
3
or
t0
,
t3
,
t0
!
0
,
1
,
2
,
3
xor
t0
,
t2
,
t0
xor
t0
,
t2
,
t0
add
i
,
4
,
i
add
i
,
4
,
i
cmp
i
,
12
cmp
i
,
12
...
@@ -205,6 +208,7 @@ _aes_crypt:
...
@@ -205,6 +208,7 @@ _aes_crypt:
srl
t0
,
16
,
t2
srl
t0
,
16
,
t2
srl
t0
,
8
,
t1
srl
t0
,
8
,
t1
stb
t1
,
[
ds
t
+
1
]
stb
t1
,
[
ds
t
+
1
]
stb
t3
,
[
ds
t
+
3
]
stb
t3
,
[
ds
t
+
3
]
stb
t2
,
[
ds
t
+
2
]
stb
t2
,
[
ds
t
+
2
]
stb
t0
,
[
ds
t
]
stb
t0
,
[
ds
t
]
...
@@ -212,8 +216,9 @@ _aes_crypt:
...
@@ -212,8 +216,9 @@ _aes_crypt:
bleu
.Lfinal_loop
bleu
.Lfinal_loop
add
idx
,
4
,
idx
add
idx
,
4
,
idx
addcc
length
,
-
16
,
length
addcc
length
,
-
16
,
length
nop
bne
.Lblock_loop
bne
.Lblock_loop
sub
ctx
,
src
,
%
g2
sub
ctx
,
src
,
%
g2
...
@@ -310,3 +315,21 @@ _aes_crypt:
...
@@ -310,3 +315,21 @@ _aes_crypt:
!
aes256
(
ECB
decrypt
):
15.38
s
,
0.650
MB
/
s
!
aes256
(
ECB
decrypt
):
15.38
s
,
0.650
MB
/
s
!
aes256
(
CBC
encrypt
):
17.49
s
,
0.572
MB
/
s
!
aes256
(
CBC
encrypt
):
17.49
s
,
0.572
MB
/
s
!
aes256
(
CBC
decrypt
):
17.87
s
,
0.560
MB
/
s
!
aes256
(
CBC
decrypt
):
17.87
s
,
0.560
MB
/
s
!
After
further
optimizations
of
the
initial
and
final
loops
,
!
source_loop
and
final_loop.
!
aes128
(
ECB
encrypt
):
8.07
s
,
1.239
MB
/
s
!
aes128
(
ECB
decrypt
):
9.48
s
,
1.055
MB
/
s
!
aes128
(
CBC
encrypt
):
12.76
s
,
0.784
MB
/
s
!
aes128
(
CBC
decrypt
):
12.15
s
,
0.823
MB
/
s
!
!
aes192
(
ECB
encrypt
):
9.43
s
,
1.060
MB
/
s
!
aes192
(
ECB
decrypt
):
11.20
s
,
0.893
MB
/
s
!
aes192
(
CBC
encrypt
):
14.19
s
,
0.705
MB
/
s
!
aes192
(
CBC
decrypt
):
13.97
s
,
0.716
MB
/
s
!
!
aes256
(
ECB
encrypt
):
10.81
s
,
0.925
MB
/
s
!
aes256
(
ECB
decrypt
):
12.92
s
,
0.774
MB
/
s
!
aes256
(
CBC
encrypt
):
15.59
s
,
0.641
MB
/
s
!
aes256
(
CBC
decrypt
):
15.76
s
,
0.635
MB
/
s
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