Move AMD64 MS to SysV calling convention conversion to assembly side
authorJussi Kivilinna <jussi.kivilinna@iki.fi>
Sat, 6 Jan 2018 20:19:56 +0000 (22:19 +0200)
committerJussi Kivilinna <jussi.kivilinna@iki.fi>
Tue, 9 Jan 2018 17:18:15 +0000 (19:18 +0200)
commita518b6680ea80a4325731028545a701c1d71fc02
tree8175316a4c8b4f08b9c78a2ff636bc7c7ce34c71
parent135250e3060e79be698d4f36a819aa8a880789f8
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>
14 files changed:
cipher/Makefile.am
cipher/arcfour-amd64.S
cipher/arcfour.c
cipher/asm-common-amd64.h [new file with mode: 0644]
cipher/blowfish-amd64.S
cipher/blowfish.c
cipher/cast5-amd64.S
cipher/cast5.c
cipher/des-amd64.S
cipher/des.c
cipher/rijndael-amd64.S
cipher/rijndael.c
cipher/twofish-amd64.S
cipher/twofish.c