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
Snippets
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
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
Norbert Pócs
nettle
Commits
578b7985
Commit
578b7985
authored
23 years ago
by
Niels Möller
Browse files
Options
Downloads
Patches
Plain Diff
* sparc/aes.asm (_aes_crypt): Unrolled final loop, preparing for
optimizations. Rev: src/nettle/sparc/aes.asm:1.86
parent
51047b57
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
+153
-5
153 additions, 5 deletions
sparc/aes.asm
with
153 additions
and
5 deletions
sparc/aes.asm
+
153
−
5
View file @
578b7985
...
@@ -58,6 +58,7 @@ define(T1, %l7)
...
@@ -58,6 +58,7 @@ define(T1, %l7)
define
(
T2
,
%
g5
)
define
(
T2
,
%
g5
)
define
(
T3
,
%
o7
)
define
(
T3
,
%
o7
)
define
(
IDX1
,
%
i5
)
define
(
IDX1
,
%
i5
)
C
define
(
IDX1
,
<
T
+
AES_SIDX1
>
)
define
(
IDX3
,
%
o5
)
define
(
IDX3
,
%
o5
)
!
Teporaries
!
Teporaries
...
@@ -141,12 +142,14 @@ _aes_crypt:
...
@@ -141,12 +142,14 @@ _aes_crypt:
!
The
code
uses
the
register
%
o
[
j
],
aka
tj
,
as
the
primary
!
The
code
uses
the
register
%
o
[
j
],
aka
tj
,
as
the
primary
!
register
for
that
sub
-
expression.
True
for
j
==
1
,
3
.
!
register
for
that
sub
-
expression.
True
for
j
==
1
,
3
.
C
Unrolled
inner
loop
begins
C
i
=
0
C
i
=
0
ld
[
IDX1
],
t1
!
1
ld
[
IDX1
+
0
],
t1
!
1
add
wtxt
,
t1
,
t1
!
1
add
wtxt
,
t1
,
t1
!
1
ldub
[
t1
+
2
],
t1
!
1
ldub
[
t1
+
2
],
t1
!
1
ld
[
IDX3
],
t3
!
3
ld
[
IDX3
+
0
],
t3
!
3
sll
t1
,
2
,
t1
!
1
sll
t1
,
2
,
t1
!
1
ld
[
wtxt
],
t0
!
0
ld
[
wtxt
],
t0
!
0
...
@@ -273,7 +276,7 @@ _aes_crypt:
...
@@ -273,7 +276,7 @@ _aes_crypt:
xor
t0
,
t1
,
t0
xor
t0
,
t1
,
t0
st
t0
,
[
tmp
+
12
]
st
t0
,
[
tmp
+
12
]
C
End
of
unrolled
loop
C
Unrolled
inner
loop
ends
!
switch
roles
for
tmp
and
wtxt
!
switch
roles
for
tmp
and
wtxt
xor
wtxt
,
di
ff
,
wtxt
xor
wtxt
,
di
ff
,
wtxt
...
@@ -290,9 +293,151 @@ define(i, round)
...
@@ -290,9 +293,151 @@ define(i, round)
!
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
C
Unrolled
final
loop
begins
!
NOTE:
First
instruction
duplicated
in
delay
slot
!
NOTE:
First
instruction
duplicated
in
delay
slot
C
i
=
0
ld
[
IDX1
+
i
],
t1
!
1
C
.Lfinal_loop
:
!
IDX2
(
j
)
=
j
XOR
2
xor
i
,
8
,
t2
add
wtxt
,
t1
,
t1
!
1
ldub
[
t1
+
2
],
t1
!
1
ld
[
wtxt
+
i
],
t0
!
0
lduh
[
wtxt
+
t2
],
t2
!
2
and
t0
,
255
,
t0
!
0
ld
[
IDX3
+
i
],
t3
!
3
and
t2
,
255
,
t2
!
2
ldub
[
T
+
t1
],
t1
!
1
ldub
[
T
+
t0
],
t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wtxt
,
t1
,
t1
!
1
add
wtxt
,
t1
,
t1
!
1
...
@@ -333,8 +478,11 @@ define(i, round)
...
@@ -333,8 +478,11 @@ define(i, round)
stb
t0
,
[
ds
t
]
stb
t0
,
[
ds
t
]
add
ds
t
,
4
,
ds
t
add
ds
t
,
4
,
ds
t
bleu
.Lfinal_loop
C
bl
eu
.Lfinal_loop
ld
[
IDX1
+
i
],
t1
!
1
ld
[
IDX1
+
i
],
t1
!
1
C
Unrolled
final
loop
ends
addcc
length
,
-
16
,
length
addcc
length
,
-
16
,
length
sub
ctx
,
src
,
%
g2
sub
ctx
,
src
,
%
g2
...
...
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