summaryrefslogtreecommitdiff
path: root/cipher/cipher-gcm-armv8-aarch64-ce.S
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2018-03-22 23:32:40 +0200
committerJussi Kivilinna <jussi.kivilinna@iki.fi>2018-03-28 20:37:54 +0300
commit0de2191a07d69ef1fa34ca4c5d5fc4985ff7b4c4 (patch)
tree6bf7cbde10cc048996520a00264f84856b54b3ca /cipher/cipher-gcm-armv8-aarch64-ce.S
parent4e1b628f492643d4e9b830bcdab7b49daaec5854 (diff)
downloadlibgcrypt-0de2191a07d69ef1fa34ca4c5d5fc4985ff7b4c4.tar.gz
aarch64: Enable building the aarch64 cipher assembly for windows
* cipher/asm-common-aarch64.h: New. * cipher/camellia-aarch64.S: Use ELF macro, use x19 instead of x18. * cipher/chacha20-aarch64.S: Use ELF macro, don't use GOT on windows. * cipher/cipher-gcm-armv8-aarch64-ce.S: Use ELF macro. * cipher/rijndael-aarch64.S: Use ELF macro. * cipher/rijndael-armv8-aarch64-ce.S: Use ELF macro. * cipher/sha1-armv8-aarch64-ce.S: Use ELF macro. * cipher/sha256-armv8-aarch64-ce.S: Use ELF macro. * cipher/twofish-aarch64.S: Use ELF macro. * configure.ac: Don't require .size and .type in aarch64 assembly check. -- Don't require .type and .size in configure; we can make them optional via a preprocessor macro. This is mostly a mechanical change, wrapping the .type and .size directives in an ELF() macro, with two actual manual changes: (when targeting windows): - Don't load global symbols via a GOT (in chacha20) - Don't use the x18 register (in camellia); back up and restore x19 in the prologue/epilogue and use that instead. x18 is a platform specific register; on linux, it's free to be used by user code, while it's reserved for platform use on windows and darwin. Always use x19 instead of x18 for consistency. Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'cipher/cipher-gcm-armv8-aarch64-ce.S')
-rw-r--r--cipher/cipher-gcm-armv8-aarch64-ce.S10
1 files changed, 5 insertions, 5 deletions
diff --git a/cipher/cipher-gcm-armv8-aarch64-ce.S b/cipher/cipher-gcm-armv8-aarch64-ce.S
index 0cfaf1cc..b6c4f59d 100644
--- a/cipher/cipher-gcm-armv8-aarch64-ce.S
+++ b/cipher/cipher-gcm-armv8-aarch64-ce.S
@@ -17,7 +17,7 @@
* License along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
-#include <config.h>
+#include "asm-common-aarch64.h"
#if defined(__AARCH64EL__) && \
defined(HAVE_COMPATIBLE_GCC_AARCH64_PLATFORM_AS) && \
@@ -174,7 +174,7 @@ gcry_gcm_reduction_constant:
*/
.align 3
.globl _gcry_ghash_armv8_ce_pmull
-.type _gcry_ghash_armv8_ce_pmull,%function;
+ELF(.type _gcry_ghash_armv8_ce_pmull,%function;)
_gcry_ghash_armv8_ce_pmull:
/* input:
* x0: gcm_key
@@ -360,7 +360,7 @@ _gcry_ghash_armv8_ce_pmull:
.Ldo_nothing:
mov x0, #0
ret
-.size _gcry_ghash_armv8_ce_pmull,.-_gcry_ghash_armv8_ce_pmull;
+ELF(.size _gcry_ghash_armv8_ce_pmull,.-_gcry_ghash_armv8_ce_pmull;)
/*
@@ -368,7 +368,7 @@ _gcry_ghash_armv8_ce_pmull:
*/
.align 3
.globl _gcry_ghash_setup_armv8_ce_pmull
-.type _gcry_ghash_setup_armv8_ce_pmull,%function;
+ELF(.type _gcry_ghash_setup_armv8_ce_pmull,%function;)
_gcry_ghash_setup_armv8_ce_pmull:
/* input:
* x0: gcm_key
@@ -408,6 +408,6 @@ _gcry_ghash_setup_armv8_ce_pmull:
st1 {rh5.16b-rh6.16b}, [x1]
ret
-.size _gcry_ghash_setup_armv8_ce_pmull,.-_gcry_ghash_setup_armv8_ce_pmull;
+ELF(.size _gcry_ghash_setup_armv8_ce_pmull,.-_gcry_ghash_setup_armv8_ce_pmull;)
#endif