Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
nettle
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
5
Merge Requests
5
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Nettle
nettle
Commits
3d3b7c65
Commit
3d3b7c65
authored
Aug 25, 2009
by
Niels Möller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use lea to free one more register. Rescheduled so we start with 35 cycles.
Rev: nettle/x86/sha1-f2.nlms:1.2
parent
bef626b9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
16 deletions
+21
-16
x86/sha1-f2.nlms
x86/sha1-f2.nlms
+21
-16
No files found.
x86/sha1-f2.nlms
View file @
3d3b7c65
...
...
@@ -13,36 +13,41 @@ define(`SD',`%edx')
define(`SE',`%ebp')
define(`DATA',`%esp')
define(`TMP',`%edi')
d
nl d
efine(`TMP2',`%esi')
define(`KVALUE',`%esi')
define(`TMP2',`%esi')
d
nl d
efine(`KVALUE',`%esi')
define(`TMP3',`%esi')
define(`COUNT', `84(%esp)')
define(<K2VALUE>, <<$>0x6ED9EBA1>)
dnl Expands to 4*i, or to the empty string if i is zero
define(`OFFSET', `ifelse($1,0,,eval(4*$1))')
dnl The F2 round sets
dnl
dnl e += (a <<< 5) + (b ^ c ^ d) + k + w
dnl
dnl Access inputs in order d, c, b, a, to give maximum time to
dnl have values ready.
dnl ROUND(a, b, c, d, e, i)
define(`ROUND', `
mov OFFSET(eval($6 % 16)) (DATA), TMP
xor OFFSET(eval(($6 + 2) % 16)) (DATA), TMP
mov $4, TMP2
xor $3, TMP2
xor OFFSET(eval(($6 + 8) % 16)) (DATA), TMP
xor OFFSET(eval(($6 + 13) % 16)) (DATA), TMP
rol `$'1, TMP
mov TMP, OFFSET(eval($6 % 16)) (DATA)
add KVALUE, $5
add TMP, $5
mov $2, TMP
xor $3, TMP
xor $4, TMP
add TMP, $5
mov $1, TMP
rol `$'5, TMP
add TMP, $5
xor $2, TMP2
lea K2VALUE(TMP, $5), TMP
add TMP2, TMP
rol `$'30, $2
mov $1, TMP3
rol `$'5, TMP3
add TMP3, $5
add TMP, $5
')
.text
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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