File: CheckX86_64Assembly.cmake

package info (click to toggle)
libsecp256k1 0.7.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 6,408 kB
  • sloc: ansic: 45,273; python: 772; asm: 736; makefile: 285; sh: 208
file content (15 lines) | stat: -rw-r--r-- 395 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
include(CheckCSourceCompiles)

function(check_x86_64_assembly)
  check_c_source_compiles("
    #include <stdint.h>

    int main(void)
    {
      uint64_t a = 11, tmp = 0;
      __asm__ __volatile__(\"movq $0x100000000,%1; mulq %%rsi\" : \"+a\"(a) : \"S\"(tmp) : \"cc\", \"%rdx\");
      return 0;
    }
  " HAVE_X86_64_ASM)
  set(HAVE_X86_64_ASM ${HAVE_X86_64_ASM} PARENT_SCOPE)
endfunction()