Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Nettle
nettle
Commits
f51537c4
Commit
f51537c4
authored
Jan 27, 2014
by
Niels Möller
Browse files
Use pshufhw + pshuflw for 16-bit rotate.
parent
7de9a19a
Changes
2
Hide whitespace changes
Inline
Side-by-side
ChangeLog
View file @
f51537c4
2014-01-27 Niels Möller <nisse@lysator.liu.se>
* x86_64/chacha-core-internal.asm: Use pshufhw + pshuflw for the
16-bit rotate.
* configure.ac (asm_replace_list): Added chacha-core-internal.asm.
* x86_64/chacha-core-internal.asm: New file.
...
...
x86_64/chacha-core-internal.asm
View file @
f51537c4
...
...
@@ -26,15 +26,27 @@ define(<X2>, <%xmm2>)
define
(
<
X3
>
,
<%
xmm3
>
)
define
(
<
T0
>
,
<%
xmm4
>
)
define
(
<
T1
>
,
<%
xmm5
>
)
define
(
<
USE_PSHUFW
>
,
<
yes
>
)
C
ROTL_BY_16
(
REG
,
TMP
)
ifelse
(
USE_PSHUFW
,
<
yes
>
,
<
define
(
<
ROTL_BY_16
>
,
<
pshufhw
<
$
>
0xb1
,
$
1
,
$
1
pshuflw
<
$
>
0xb1
,
$
1
,
$
1
>)>,
<
define
(
<
ROTL_BY_16
>
,
<
pslld
<
$
>
16
,
$
1
psrld
<
$
>
16
,
$
2
por
$
2
,
$
1
>)
>)
C
QROUND
define
(
<
QROUND
>
,
<
paddd
X1
,
X0
pxor
X0
,
X3
movaps
X3
,
T0
pslld
<
$
>
16
,
X3
psrld
<
$
>
16
,
T0
por
T0
,
X3
ROTL_BY_16
(
X3
,
T0
)
paddd
X3
,
X2
pxor
X2
,
X1
...
...
Write
Preview
Supports
Markdown
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