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
Container Registry
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
Dmitry Baryshkov
nettle
Commits
d9c526b2
Commit
d9c526b2
authored
22 years ago
by
Niels Möller
Browse files
Options
Downloads
Patches
Plain Diff
* sparc/aes.asm: The frame setup was broken. Tried to fix it.
Rev: src/nettle/sparc/aes.asm:1.75
parent
eda940bf
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
+17
-8
17 additions, 8 deletions
sparc/aes.asm
with
17 additions
and
8 deletions
sparc/aes.asm
+
17
−
8
View file @
d9c526b2
...
@@ -42,7 +42,9 @@ define(dst, %i3)
...
@@ -42,7 +42,9 @@ define(dst, %i3)
define
(
src
,
%
i4
)
define
(
src
,
%
i4
)
!
Loop
invariants
!
Loop
invariants
define
(
wtxt
,
%
sp
)
!
NOTE:
We
overwrite
%
fp
with
the
wtxt
pointer
,
!
so
it
must
be
restored
at
the
end
of
the
function.
define
(
wtxt
,
%
fp
)
define
(
tmp
,
%
l1
)
define
(
tmp
,
%
l1
)
define
(
di
ff
,
%
l2
)
define
(
di
ff
,
%
l2
)
define
(
nrounds
,
%
l3
)
define
(
nrounds
,
%
l3
)
...
@@ -66,29 +68,36 @@ define(t1, %o1)
...
@@ -66,29 +68,36 @@ define(t1, %o1)
define
(
t2
,
%
o2
)
define
(
t2
,
%
o2
)
define
(
t3
,
%
o3
)
define
(
t3
,
%
o3
)
define
(
<
FRAME_SIZE
>
,
32
)
C
The
stack
frame
looks
like
define
(
<
FRAME_WTXT
>
,
0
)
C
define
(
<
FRAME_TMP
>
,
16
)
C
%
fp
-
4
:
OS
-
dependent
link
field
C
%
fp
-
8
:
OS
-
dependent
link
field
C
%
fp
-
24
:
tmp
,
uint32_t
[
4
]
C
%
fp
-
40
:
wtxt
,
uint32_t
[
4
]
C
%
fp
-
136
:
OS
register
save
area.
define
(
<
FRAME_SIZE
>
,
136
)
_aes_crypt:
_aes_crypt:
save
%
sp
,
-
FRAME_SIZE
,
%
sp
save
%
sp
,
-
FRAME_SIZE
,
%
sp
cmp
length
,
0
cmp
length
,
0
be
.Lend
be
.Lend
add
%
s
p
,
FRAME_TMP
,
tmp
add
%
f
p
,
-
24
,
tmp
C
NOTE
:
Over
writes
%
fp
add
%
fp
,
-
40
,
wtxt
ld
[
ctx
+
AES_NROUNDS
],
nrounds
ld
[
ctx
+
AES_NROUNDS
],
nrounds
!
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
.
!
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
add
T
,
AES_SIDX1
,
IDX1
add
T
,
AES_SIDX1
,
IDX1
add
T
,
AES_SIDX3
,
IDX3
add
T
,
AES_SIDX3
,
IDX3
!
Read
src
,
and
add
initial
subkey
!
Read
src
,
and
add
initial
subkey
!
Difference
between
ctx
and
src.
!
Difference
between
ctx
and
src.
!
NOTE:
These
instructions
are
duplicated
in
the
delay
slot
,
!
NOTE:
These
instructions
are
duplicated
in
the
delay
slot
,
...
@@ -100,7 +109,6 @@ _aes_crypt:
...
@@ -100,7 +109,6 @@ _aes_crypt:
!
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
,
%
g1
add
src
,
8
,
%
g1
nop
.Lsource_loop:
.Lsource_loop:
ldub
[
src
+
3
],
t3
ldub
[
src
+
3
],
t3
...
@@ -238,6 +246,7 @@ define(i, round)
...
@@ -238,6 +246,7 @@ define(i, round)
bne
.Lblock_loop
bne
.Lblock_loop
sub
wtxt
,
src
,
%
g3
sub
wtxt
,
src
,
%
g3
add
%
sp
,
FRAME_SIZE
,
%
fp
.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