]> git.pld-linux.org Git - packages/mbedtls.git/commitdiff
- merged x32 patch from polarssl; release 2 auto/th/mbedtls-1.3.10-2
authorJakub Bogusz <qboosh@pld-linux.org>
Tue, 19 May 2015 16:19:04 +0000 (18:19 +0200)
committerJakub Bogusz <qboosh@pld-linux.org>
Tue, 19 May 2015 16:19:10 +0000 (18:19 +0200)
mbedtls-x32.patch [new file with mode: 0644]
mbedtls.spec

diff --git a/mbedtls-x32.patch b/mbedtls-x32.patch
new file mode 100644 (file)
index 0000000..6cc51b1
--- /dev/null
@@ -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
index bd4be636faf889e12535a587ddf8a8401ef57662..1d9c45baea05f302d3ed4869b871dc8fad67a060 100644 (file)
@@ -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
This page took 0.227152 seconds and 4 git commands to generate.