Commit 3dc2e725 authored by Niels Möller's avatar Niels Möller
Browse files

Work in progress checkin, replaced the first set of rounds.

Rev: nettle/x86/sha1-compress.asm:1.6
parent f817a67c
...@@ -125,12 +125,13 @@ define(<ROUND_F1>, < ...@@ -125,12 +125,13 @@ define(<ROUND_F1>, <
add T2, $5 add T2, $5
>) >)
C FIXME: Seems to be a slow sequence.
define(<ROUND_F1_NOEXP>, < define(<ROUND_F1_NOEXP>, <
mov $4, T2 mov $4, T2
xor $3, T2 xor $3, T2
and $2, T2 and $2, T2
xor $4, T2 xor $4, T2
add OFFSET(eval($6 % 16)) (DATA), T2 add OFFSET($6) (DATA), T2
rol <$>30, $2 rol <$>30, $2
mov $1, T1 mov $1, T1
rol <$>5, T1 rol <$>5, T1
...@@ -220,30 +221,29 @@ PROLOGUE(_nettle_sha1_compress) ...@@ -220,30 +221,29 @@ PROLOGUE(_nettle_sha1_compress)
movl 12(T1), SD movl 12(T1), SD
movl 16(T1), SE movl 16(T1), SE
movl $ K1VALUE, KVALUE ROUND_F1_NOEXP(SA, SB, SC, SD, SE, 0)
ROUND(SA, SB, SC, SD, SE, <F1>, NOEXPAND( 0)) ROUND_F1_NOEXP(SE, SA, SB, SC, SD, 1)
ROUND(SE, SA, SB, SC, SD, <F1>, NOEXPAND( 1)) ROUND_F1_NOEXP(SD, SE, SA, SB, SC, 2)
ROUND(SD, SE, SA, SB, SC, <F1>, NOEXPAND( 2)) ROUND_F1_NOEXP(SC, SD, SE, SA, SB, 3)
ROUND(SC, SD, SE, SA, SB, <F1>, NOEXPAND( 3)) ROUND_F1_NOEXP(SB, SC, SD, SE, SA, 4)
ROUND(SB, SC, SD, SE, SA, <F1>, NOEXPAND( 4))
ROUND_F1_NOEXP(SA, SB, SC, SD, SE, 5)
ROUND(SA, SB, SC, SD, SE, <F1>, NOEXPAND( 5)) ROUND_F1_NOEXP(SE, SA, SB, SC, SD, 6)
ROUND(SE, SA, SB, SC, SD, <F1>, NOEXPAND( 6)) ROUND_F1_NOEXP(SD, SE, SA, SB, SC, 7)
ROUND(SD, SE, SA, SB, SC, <F1>, NOEXPAND( 7)) ROUND_F1_NOEXP(SC, SD, SE, SA, SB, 8)
ROUND(SC, SD, SE, SA, SB, <F1>, NOEXPAND( 8)) ROUND_F1_NOEXP(SB, SC, SD, SE, SA, 9)
ROUND(SB, SC, SD, SE, SA, <F1>, NOEXPAND( 9))
ROUND_F1_NOEXP(SA, SB, SC, SD, SE, 10)
ROUND(SA, SB, SC, SD, SE, <F1>, NOEXPAND(10)) ROUND_F1_NOEXP(SE, SA, SB, SC, SD, 11)
ROUND(SE, SA, SB, SC, SD, <F1>, NOEXPAND(11)) ROUND_F1_NOEXP(SD, SE, SA, SB, SC, 12)
ROUND(SD, SE, SA, SB, SC, <F1>, NOEXPAND(12)) ROUND_F1_NOEXP(SC, SD, SE, SA, SB, 13)
ROUND(SC, SD, SE, SA, SB, <F1>, NOEXPAND(13)) ROUND_F1_NOEXP(SB, SC, SD, SE, SA, 14)
ROUND(SB, SC, SD, SE, SA, <F1>, NOEXPAND(14))
ROUND_F1_NOEXP(SA, SB, SC, SD, SE, 15)
ROUND(SA, SB, SC, SD, SE, <F1>, NOEXPAND(15)) ROUND_F1(SE, SA, SB, SC, SD, 16)
EXPAND(16) ROUND(SE, SA, SB, SC, SD, <F1>) ROUND_F1(SD, SE, SA, SB, SC, 17)
EXPAND(17) ROUND(SD, SE, SA, SB, SC, <F1>) ROUND_F1(SC, SD, SE, SA, SB, 18)
EXPAND(18) ROUND(SC, SD, SE, SA, SB, <F1>) ROUND_F1(SB, SC, SD, SE, SA, 19)
EXPAND(19) ROUND(SB, SC, SD, SE, SA, <F1>)
ROUND_F2(SA, SB, SC, SD, SE, 20, K2VALUE) ROUND_F2(SA, SB, SC, SD, SE, 20, K2VALUE)
ROUND_F2(SE, SA, SB, SC, SD, 21, K2VALUE) ROUND_F2(SE, SA, SB, SC, SD, 21, K2VALUE)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment