Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Marcus Hoffmann
nettle
Commits
f9023f23
Commit
f9023f23
authored
May 16, 2002
by
Niels Möller
Browse files
Added comment on how to improve ultra sparc
performance. Rev: src/nettle/sparc/aes.asm:1.124
parent
45a424ea
Changes
1
Hide whitespace changes
Inline
Side-by-side
sparc/aes.asm
View file @
f9023f23
...
...
@@ -18,6 +18,13 @@
!
the
Free
Software
Foundation
,
Inc.
,
59
Temple
Place
-
Suite
330
,
Boston
,
!
MA
02111
-
1307
,
USA.
!
FIXME:
For
improved
ultra
sp
arc
performance
,
we
should
avoid
AL
U
!
instructions
that
use
the
result
of
an
immediately
preceeding
AL
U
!
instruction.
It
is
al
so
a
good
idea
to
have
a
greater
di
stance
than
!
one
instruction
between
a
load
and
use
of
its
value
,
as
that
reduces
!
the
penalty
for
cache
misses.
Such
instruction
sequences
are
marked
!
with
!
U
comments.
!
NOTE:
Some
of
the
%
g
registers
are
reserved
for
operating
system
etc
!
(
see
gcc
/
config
/
sp
arc.h
)
.
The
only
%
g
registers
that
seems
safe
to
!
use
are
%
g1
-%
g3.
...
...
@@ -28,7 +35,7 @@
!
.file
"aes.asm"
!
Arguments
define
(
ctx
,
%
i0
)
define
(
T
,
%
i1
)
...
...
@@ -71,7 +78,7 @@ define(<AES_LOAD>, <
ldub
[
src
+
$
1
+
2
],
t2
sll
t1
,
8
,
t1
or
t0
,
t1
,
t0
or
t0
,
t1
,
t0
!
U
ldub
[
src
+
$
1
+
3
],
t1
sll
t2
,
16
,
t2
or
t0
,
t2
,
t0
...
...
@@ -98,7 +105,7 @@ define(<AES_ROUND>, <
ld
[
T0
+
t0
],
t0
!
0
sll
t1
,
2
,
t1
!
1
ld
[
T1
+
t1
],
t1
!
1
ld
[
T1
+
t1
],
t1
!
1
!
U
ld
[
IDX3
+
$
1
],
t2
!
3
xor
t0
,
t1
,
t0
!
0
,
1
...
...
@@ -107,15 +114,15 @@ define(<AES_ROUND>, <
ldub
[
wtxt
+
t2
],
t2
!
3
sll
t1
,
2
,
t1
!
2
ld
[
T2
+
t1
],
t1
!
2
ld
[
T2
+
t1
],
t1
!
2
!
U
sll
t2
,
2
,
t2
!
3
ld
[
T3
+
t2
],
t2
!
3
ld
[
T3
+
t2
],
t2
!
3
!
U
xor
t0
,
t1
,
t0
!
0
,
1
,
2
!
Fetch
roundkey
ld
[
key
+
$
1
],
t1
xor
t0
,
t2
,
t0
!
0
,
1
,
2
,
3
xor
t0
,
t1
,
t0
xor
t0
,
t1
,
t0
!
U
st
t0
,
[
tmp
+
$
1
]
>
)
dnl
C
AES_FINAL_ROUND
(
i
)
...
...
@@ -133,7 +140,7 @@ define(<AES_FINAL_ROUND>, <
ldub
[
T
+
t1
],
t1
!
1
ld
[
IDX3
+
$
1
],
t2
!
3
sll
t1
,
8
,
t1
!
1
or
t0
,
t1
,
t0
!
0
,
1
or
t0
,
t1
,
t0
!
0
,
1
!
U
!
IDX2
(
j
)
=
j
XOR
2
ldub
[
wtxt
+
eval
(
$
1
^
8
)
+
1
],
t1
!
2
...
...
@@ -142,19 +149,19 @@ define(<AES_FINAL_ROUND>, <
ldub
[
T
+
t2
],
t2
!
3
sll
t1
,
16
,
t1
!
2
or
t0
,
t1
,
t0
!
0
,
1
,
2
or
t0
,
t1
,
t0
!
0
,
1
,
2
!
U
sll
t2
,
24
,
t2
!
3
ld
[
key
+
$
1
],
t1
or
t0
,
t2
,
t0
!
0
,
1
,
2
,
3
xor
t0
,
t1
,
t0
srl
t0
,
24
,
t1
stb
t1
,
[
ds
t
+
$
1
+
3
]
xor
t0
,
t1
,
t0
!
U
srl
t0
,
24
,
t1
!
U
stb
t1
,
[
ds
t
+
$
1
+
3
]
!
U
srl
t0
,
16
,
t1
stb
t1
,
[
ds
t
+
$
1
+
2
]
stb
t1
,
[
ds
t
+
$
1
+
2
]
!
U
srl
t0
,
8
,
t1
stb
t1
,
[
ds
t
+
$
1
+
1
]
stb
t1
,
[
ds
t
+
$
1
+
1
]
!
U
stb
t0
,
[
ds
t
+
$
1
]
>
)
dnl
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment