Browse Source

Merge #373: build: fix x86_64 asm detection for some compilers

3f8fdfb build: fix x86_64 asm detection for some compilers (Cory Fields)
master
Pieter Wuille 7 years ago
parent
commit
7b549b1abc
No known key found for this signature in database
GPG Key ID: DBA1A67379A1A931
  1. 4
      build-aux/m4/bitcoin_secp.m4

4
build-aux/m4/bitcoin_secp.m4

@ -3,13 +3,13 @@ AC_DEFUN([SECP_INT128_CHECK],[ @@ -3,13 +3,13 @@ AC_DEFUN([SECP_INT128_CHECK],[
has_int128=$ac_cv_type___int128
])
dnl
dnl escape "$0x" below using the m4 quadrigaph @S|@, and escape it again with a \ for the shell.
AC_DEFUN([SECP_64BIT_ASM_CHECK],[
AC_MSG_CHECKING(for x86_64 assembly availability)
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include <stdint.h>]],[[
uint64_t a = 11, tmp;
__asm__ __volatile__("movq $0x100000000,%1; mulq %%rsi" : "+a"(a) : "S"(tmp) : "cc", "%rdx");
__asm__ __volatile__("movq \@S|@0x100000000,%1; mulq %%rsi" : "+a"(a) : "S"(tmp) : "cc", "%rdx");
]])],[has_64bit_asm=yes],[has_64bit_asm=no])
AC_MSG_RESULT([$has_64bit_asm])
])

Loading…
Cancel
Save