summaryrefslogtreecommitdiff
path: root/cipher/arcfour.c
diff options
context:
space:
mode:
authorJussi Kivilinna <jussi.kivilinna@iki.fi>2018-01-06 22:19:56 +0200
committerJussi Kivilinna <jussi.kivilinna@iki.fi>2018-01-09 19:18:15 +0200
commita518b6680ea80a4325731028545a701c1d71fc02 (patch)
tree8175316a4c8b4f08b9c78a2ff636bc7c7ce34c71 /cipher/arcfour.c
parent135250e3060e79be698d4f36a819aa8a880789f8 (diff)
downloadlibgcrypt-a518b6680ea80a4325731028545a701c1d71fc02.tar.gz
Move AMD64 MS to SysV calling convention conversion to assembly side
* cipher/Makefile.am: Add 'asm-common-amd64.h'. * cipher/asm-common-amd64.h: New. * cipher/blowfish-amd64.S: Add ENTER_SYSV_FUNC_* and EXIT_SYSV_FUNC for each global function from 'asm-common-amd64.h'. * cipher/cast5-amd64.S: Ditto. * cipher/des-amd64.S: Ditto. * cipher/rijndael-amd64.S: Ditto. * cipher/twofish-amd64.S: Ditto. * cipher/arcfour-amd64.S: Ditto. * cipher/blowfish.c [HAVE_COMPATIBLE_GCC_WIN64_PLATFORM_AS] (call_sysv_fn): Remove. * cipher/cast5.c [HAVE_COMPATIBLE_GCC_WIN64_PLATFORM_AS] (call_sysv_fn): Remove. * cipher/twofish.c [HAVE_COMPATIBLE_GCC_WIN64_PLATFORM_AS] (call_sysv_fn, call_sysv_fn5, call_sysv_fn6): Remove. * cipher/rijndael.c (do_encrypt, do_decrypt) [HAVE_COMPATIBLE_GCC_WIN64_PLATFORM_AS]: Remove assembly block for calling SysV ABI function. * cipher/arcfour.c [USE_AMD64_ASM] (encrypt_stream): Ditto. -- Old approach was to convert MS ABI to SysV ABI calling convention for AMD64 assembly functions at caller side. This patch moves calling convention conversion to assembly/callee side. Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>
Diffstat (limited to 'cipher/arcfour.c')
-rw-r--r--cipher/arcfour.c14
1 files changed, 0 insertions, 14 deletions
diff --git a/cipher/arcfour.c b/cipher/arcfour.c
index 44e8ef46..085df9bb 100644
--- a/cipher/arcfour.c
+++ b/cipher/arcfour.c
@@ -54,21 +54,7 @@ static void
encrypt_stream (void *context,
byte *outbuf, const byte *inbuf, size_t length)
{
-#ifdef HAVE_COMPATIBLE_GCC_WIN64_PLATFORM_AS
- const void *fn = _gcry_arcfour_amd64;
- /* Call SystemV ABI function without storing non-volatile XMM registers,
- * as target function does not use vector instruction sets. */
- asm volatile ("callq *%0\n\t"
- : "+a" (fn),
- "+D" (context),
- "+S" (length),
- "+d" (inbuf),
- "+c" (outbuf)
- :
- : "cc", "memory", "r8", "r9", "r10", "r11");
-#else
_gcry_arcfour_amd64 (context, length, inbuf, outbuf );
-#endif
}
#else /*!USE_AMD64_ASM*/