summaryrefslogtreecommitdiff
path: root/x86_64
diff options
context:
space:
mode:
authorNiels Möller <nisse@lysator.liu.se>2015-01-17 10:53:28 +0100
committerNiels Möller <nisse@lysator.liu.se>2015-01-17 10:53:28 +0100
commitf003aee64b9f3181770faeb42b8fe9a02a78d5c3 (patch)
tree42cff37da24d3529801748f7f944750b8d7a1c98 /x86_64
parent9dfaebc195b6e96bf4ea81475bff29fa0f75a95e (diff)
downloadnettle-f003aee64b9f3181770faeb42b8fe9a02a78d5c3.tar.gz
Fat setup of memxor, based on patch by Nikos Mavrogiannopoulos.
Diffstat (limited to 'x86_64')
-rw-r--r--x86_64/fat/memxor-2.asm36
-rw-r--r--x86_64/fat/memxor.asm35
-rw-r--r--x86_64/memxor.asm4
3 files changed, 73 insertions, 2 deletions
diff --git a/x86_64/fat/memxor-2.asm b/x86_64/fat/memxor-2.asm
new file mode 100644
index 00000000..ffc84440
--- /dev/null
+++ b/x86_64/fat/memxor-2.asm
@@ -0,0 +1,36 @@
+C x86_64/fat/memxor-2.asm
+
+
+ifelse(<
+ Copyright (C) 2015 Niels Möller
+
+ This file is part of GNU Nettle.
+
+ GNU Nettle is free software: you can redistribute it and/or
+ modify it under the terms of either:
+
+ * the GNU Lesser General Public License as published by the Free
+ Software Foundation; either version 3 of the License, or (at your
+ option) any later version.
+
+ or
+
+ * the GNU General Public License as published by the Free
+ Software Foundation; either version 2 of the License, or (at your
+ option) any later version.
+
+ or both in parallel, as here.
+
+ GNU Nettle is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received copies of the GNU General Public License and
+ the GNU Lesser General Public License along with this program. If
+ not, see http://www.gnu.org/licenses/.
+>)
+
+define(<fat_suffix>, <_sse2>)
+define(<USE_SSE2>, <yes>)
+include_src(<x86_64/memxor.asm>)
diff --git a/x86_64/fat/memxor.asm b/x86_64/fat/memxor.asm
new file mode 100644
index 00000000..a040bb39
--- /dev/null
+++ b/x86_64/fat/memxor.asm
@@ -0,0 +1,35 @@
+C x86_64/fat/memxor.asm
+
+
+ifelse(<
+ Copyright (C) 2015 Niels Möller
+
+ This file is part of GNU Nettle.
+
+ GNU Nettle is free software: you can redistribute it and/or
+ modify it under the terms of either:
+
+ * the GNU Lesser General Public License as published by the Free
+ Software Foundation; either version 3 of the License, or (at your
+ option) any later version.
+
+ or
+
+ * the GNU General Public License as published by the Free
+ Software Foundation; either version 2 of the License, or (at your
+ option) any later version.
+
+ or both in parallel, as here.
+
+ GNU Nettle is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received copies of the GNU General Public License and
+ the GNU Lesser General Public License along with this program. If
+ not, see http://www.gnu.org/licenses/.
+>)
+
+define(<fat_suffix>, <_x86_64>)
+include_src(<x86_64/memxor.asm>)
diff --git a/x86_64/memxor.asm b/x86_64/memxor.asm
index 69d6cfe3..f07f0017 100644
--- a/x86_64/memxor.asm
+++ b/x86_64/memxor.asm
@@ -79,7 +79,7 @@ PROLOGUE(nettle_memxor)
jnz .Lalign_loop
.Laligned:
-ifelse(USE_SSE2, yes, <
+ifdef(<USE_SSE2>, <
cmp $16, N
jnc .Lsse2_case
>)
@@ -135,7 +135,7 @@ ifelse(USE_SSE2, yes, <
W64_EXIT(3, 0)
ret
-ifelse(USE_SSE2, yes, <
+ifdef(<USE_SSE2>, <
.Lsse2_case:
lea (DST, N), TMP