[PATCH] rijndael-ssse3-amd64: fix building on x32

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[PATCH] rijndael-ssse3-amd64: fix building on x32

Jussi Kivilinna-2
* cipher/rijndael-ssse3-amd64.c: Use 64-bit call instructions
with 64-bit registers.
--

Signed-off-by: Jussi Kivilinna <[hidden email]>
---
 0 files changed

diff --git a/cipher/rijndael-ssse3-amd64.c b/cipher/rijndael-ssse3-amd64.c
index 25d1849..78d8234 100644
--- a/cipher/rijndael-ssse3-amd64.c
+++ b/cipher/rijndael-ssse3-amd64.c
@@ -128,14 +128,14 @@ extern void _gcry_aes_ssse3_decrypt_core(void);
 
 #define vpaes_ssse3_prepare_enc() \
     vpaes_ssse3_prepare(); \
-    asm volatile ("call *%[core] \n\t" \
+    asm volatile ("callq *%q[core] \n\t" \
                   : \
                   : [core] "r" (_gcry_aes_ssse3_enc_preload) \
                   : "rax", "cc", "memory" )
 
 #define vpaes_ssse3_prepare_dec() \
     vpaes_ssse3_prepare(); \
-    asm volatile ("call *%[core] \n\t" \
+    asm volatile ("callq *%q[core] \n\t" \
                   : \
                   : [core] "r" (_gcry_aes_ssse3_dec_preload) \
                   : "rax", "cc", "memory" )
@@ -155,7 +155,7 @@ _gcry_aes_ssse3_do_setkey (RIJNDAEL_context *ctx, const byte *key)
                 "leaq %[buf], %%rdx" "\n\t"
                 "movl %[dir], %%ecx" "\n\t"
                 "movl %[rotoffs], %%r8d" "\n\t"
-                "call *%[core]" "\n\t"
+                "callq *%q[core]" "\n\t"
                 :
                 : [core] "r" (&_gcry_aes_ssse3_schedule_core),
                   [key] "m" (*key),
@@ -208,7 +208,7 @@ _gcry_aes_ssse3_prepare_decryption (RIJNDAEL_context *ctx)
                 "leaq %[buf], %%rdx" "\n\t"
                 "movl %[dir], %%ecx" "\n\t"
                 "movl %[rotoffs], %%r8d" "\n\t"
-                "call *%[core]" "\n\t"
+                "callq *%q[core]" "\n\t"
                 :
                 : [core] "r" (_gcry_aes_ssse3_schedule_core),
                   [key] "m" (ctx->keyschdec32[0][0]),
@@ -231,7 +231,7 @@ do_vpaes_ssse3_enc (const RIJNDAEL_context *ctx, unsigned int nrounds)
   unsigned int middle_rounds = nrounds - 1;
   const void *keysched = ctx->keyschenc32;
 
-  asm volatile ("call *%[core]" "\n\t"
+  asm volatile ("callq *%q[core]" "\n\t"
  : "+a" (middle_rounds), "+d" (keysched)
  : [core] "r" (_gcry_aes_ssse3_encrypt_core)
  : "rcx", "rsi", "rdi", "cc", "memory");
@@ -246,7 +246,7 @@ do_vpaes_ssse3_dec (const RIJNDAEL_context *ctx, unsigned int nrounds)
   unsigned int middle_rounds = nrounds - 1;
   const void *keysched = ctx->keyschdec32;
 
-  asm volatile ("call *%[core]" "\n\t"
+  asm volatile ("callq *%q[core]" "\n\t"
                 : "+a" (middle_rounds), "+d" (keysched)
  : [core] "r" (_gcry_aes_ssse3_decrypt_core)
                 : "rcx", "rsi", "cc", "memory");


_______________________________________________
Gcrypt-devel mailing list
[hidden email]
http://lists.gnupg.org/mailman/listinfo/gcrypt-devel
Loading...