commit e64b4bc85bcbe1eb61a316210933115524572d6e
Author: Jakub Bogusz <[email protected]>
Date:   Tue May 19 18:19:04 2015 +0200

    - merged x32 patch from polarssl; release 2

 mbedtls-x32.patch | 38 ++++++++++++++++++++++++++++++++++++++
 mbedtls.spec      |  4 +++-
 2 files changed, 41 insertions(+), 1 deletion(-)
---
diff --git a/mbedtls.spec b/mbedtls.spec
index bd4be63..1d9c45b 100644
--- a/mbedtls.spec
+++ b/mbedtls.spec
@@ -2,11 +2,12 @@ Summary:      Light-weight cryptographic and SSL/TLS library
 Summary(pl.UTF-8):     Lekka biblioteka kryptograficzna oraz SSL/TLS
 Name:          mbedtls
 Version:       1.3.10
-Release:       1
+Release:       2
 License:       GPL v2+
 Group:         Libraries
 Source0:       https://tls.mbed.org/code/releases/%{name}-%{version}-gpl.tgz
 # Source0-md5: 19ebbc96feceb430ad958dfe89cb633f
+Patch0:                %{name}-x32.patch
 URL:           https://tls.mbed.org/
 BuildRequires: cmake >= 2.6
 BuildRequires: doxygen
@@ -55,6 +56,7 @@ Statyczna biblioteka mbedTLS.
 
 %prep
 %setup -q
+%patch0 -p1
 
 %build
 install -d build
diff --git a/mbedtls-x32.patch b/mbedtls-x32.patch
new file mode 100644
index 0000000..6cc51b1
--- /dev/null
+++ b/mbedtls-x32.patch
@@ -0,0 +1,38 @@
+--- polarssl-1.3.9/library/aesni.c.orig        2015-05-07 19:36:49.789268090 
+0200
++++ polarssl-1.3.9/library/aesni.c     2015-05-07 19:38:05.120256538 +0200
+@@ -99,7 +99,11 @@
+     asm( "movdqu    (%3), %%xmm0    \n\t" // load input
+          "movdqu    (%1), %%xmm1    \n\t" // load round key 0
+          "pxor      %%xmm1, %%xmm0  \n\t" // round 0
++#ifdef __ILP32__
++         "add       $16, %1         \n\t" // point to next round key
++#else
+          "addq      $16, %1         \n\t" // point to next round key
++#endif
+          "subl      $1, %0          \n\t" // normal rounds = nr - 1
+          "test      %2, %2          \n\t" // mode?
+          "jz        2f              \n\t" // 0 = decrypt
+@@ -107,7 +111,11 @@
+          "1:                        \n\t" // encryption loop
+          "movdqu    (%1), %%xmm1    \n\t" // load round key
+          AESENC     xmm1_xmm0      "\n\t" // do round
++#ifdef __ILP32__
++         "add       $16, %1         \n\t" // point to next round key
++#else
+          "addq      $16, %1         \n\t" // point to next round key
++#endif
+          "subl      $1, %0          \n\t" // loop
+          "jnz       1b              \n\t"
+          "movdqu    (%1), %%xmm1    \n\t" // load round key
+@@ -117,7 +125,11 @@
+          "2:                        \n\t" // decryption loop
+          "movdqu    (%1), %%xmm1    \n\t"
+          AESDEC     xmm1_xmm0      "\n\t" // do round
++#ifdef __ILP32__
++         "add       $16, %1         \n\t"
++#else
+          "addq      $16, %1         \n\t"
++#endif
+          "subl      $1, %0          \n\t"
+          "jnz       2b              \n\t"
+          "movdqu    (%1), %%xmm1    \n\t" // load round key
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/mbedtls.git/commitdiff/e64b4bc85bcbe1eb61a316210933115524572d6e

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to