summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2011-10-08 12:43:42 +0200
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2011-10-08 12:44:00 +0200
commit690ba815c6dc733c5b7d25038ba5eab88607c38e (patch)
tree70660b8202a65fc81a0bc6eba8926adb780335ed
parent8c6c8b114cd7a5886aa21304ab0fc2ac8de29f8c (diff)
downloadgnutls-690ba815c6dc733c5b7d25038ba5eab88607c38e.tar.gz
is_padlock_nano moved to padlock-common.s to allow easier upgrade
to Andy's newer code.
-rw-r--r--lib/accelerated/x86/Makefile.am5
-rw-r--r--lib/accelerated/x86/asm/padlock-common.s40
-rw-r--r--lib/accelerated/x86/asm/padlock-x86-64.s18
-rw-r--r--lib/accelerated/x86/asm/padlock-x86.s17
4 files changed, 42 insertions, 38 deletions
diff --git a/lib/accelerated/x86/Makefile.am b/lib/accelerated/x86/Makefile.am
index 591df1de39..ee55d1f27b 100644
--- a/lib/accelerated/x86/Makefile.am
+++ b/lib/accelerated/x86/Makefile.am
@@ -38,9 +38,8 @@ libx86_la_SOURCES = sha-padlock.c hmac-padlock.c aes-x86.c aes-padlock.c aes-gcm
if ASM_X86_64
AM_CFLAGS += -DASM_X86_64 -DASM_X86
-libx86_la_SOURCES += asm/appro-aes-x86-64.s asm/appro-aes-gcm-x86-64.s aes-gcm-x86.c asm/padlock-x86-64.s asm/cpuid-x86-64.s
+libx86_la_SOURCES += asm/appro-aes-x86-64.s asm/appro-aes-gcm-x86-64.s aes-gcm-x86.c asm/padlock-x86-64.s asm/cpuid-x86-64.s asm/padlock-common.s
else
AM_CFLAGS += -DASM_X86_32 -DASM_X86
-libx86_la_SOURCES += asm/appro-aes-x86.s asm/padlock-x86.s asm/cpuid-x86.s
+libx86_la_SOURCES += asm/appro-aes-x86.s asm/padlock-x86.s asm/cpuid-x86.s asm/padlock-common.s
endif
-
diff --git a/lib/accelerated/x86/asm/padlock-common.s b/lib/accelerated/x86/asm/padlock-common.s
new file mode 100644
index 0000000000..0af112f068
--- /dev/null
+++ b/lib/accelerated/x86/asm/padlock-common.s
@@ -0,0 +1,40 @@
+#
+# Copyright (C) 2011 Free Software Foundation, Inc.
+#
+# Author: Nikos Mavrogiannopoulos
+#
+# This file is part of GnuTLS.
+#
+# The GnuTLS is free software; you can redistribute it and/or
+# modify it under the terms of 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.
+#
+# This library 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
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+
+.file "padlock-common.s"
+.text
+.globl is_padlock_nano
+.type is_padlock_nano,@function
+.align 16
+is_padlock_nano:
+ xorl %eax,%eax
+ cpuid
+ movl $1,%eax
+ cpuid
+ or $0x000f,%eax
+ cmp $0x06ff,%eax
+ jne .Lno_nano
+ mov $1,%eax
+ ret
+.Lno_nano:
+ xorl %eax,%eax
+ ret
+.size is_padlock_nano,.-is_padlock_nano
diff --git a/lib/accelerated/x86/asm/padlock-x86-64.s b/lib/accelerated/x86/asm/padlock-x86-64.s
index 31542ac990..e18f7a5a4a 100644
--- a/lib/accelerated/x86/asm/padlock-x86-64.s
+++ b/lib/accelerated/x86/asm/padlock-x86-64.s
@@ -36,24 +36,6 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.text
-.globl is_padlock_nano
-.type is_padlock_nano,@function
-.align 16
-is_padlock_nano:
- xorl %eax,%eax
- cpuid
- movl $1,%eax
- cpuid
- or $0x000f,%eax
- cmp $0x06ff,%eax
- jne .Lno_nano
- mov $1,%eax
- ret
-.Lno_nano:
- xorl %eax,%eax
- ret
-.size is_padlock_nano,.-is_padlock_nano
-
.globl padlock_capability
.type padlock_capability,@function
.align 16
diff --git a/lib/accelerated/x86/asm/padlock-x86.s b/lib/accelerated/x86/asm/padlock-x86.s
index 297f13a7b6..a0aed2ca82 100644
--- a/lib/accelerated/x86/asm/padlock-x86.s
+++ b/lib/accelerated/x86/asm/padlock-x86.s
@@ -37,23 +37,6 @@
.file "padlock-x86.s"
.text
-.globl is_padlock_nano
-.type is_padlock_nano,@function
-.align 16
-is_padlock_nano:
- xorl %eax,%eax
- cpuid
- movl $1,%eax
- cpuid
- or $0x000f,%eax
- cmp $0x06ff,%eax
- jne .Lno_nano
- mov $1,%eax
- ret
-.Lno_nano:
- xorl %eax,%eax
- ret
-.size is_padlock_nano,.-is_padlock_nano
.globl padlock_capability
.type padlock_capability,@function