build: fix x86_64 asm detection for some compilers #373

pull theuni wants to merge 1 commits into bitcoin-core:master from theuni:x86_64-asm changing 1 files +2 −2
  1. theuni commented at 4:44 pm on January 4, 2016: contributor

    I’m not familiar enough with this asm syntax, there’s probably a much simpler solution here, just switching to a test that doesn’t need escaping.

    I Noticed this on OSX with clang, though it likely happens elsewhere as well. The result is disabled x86_64 asm.

    Due to missing escaping, this $0 was interpreted as the function name SECP_64BIT_ASM_CHECK, causing the compile-check to be broken on some compilers.

    The actual check looked like this:

    0int main()
    1{
    2  uint64_t a = 11, tmp;
    3  __asm__ __volatile__("movq SECP_64BIT_ASM_CHECKx100000000,%1; mulq %%rsi" : "+a"(a) : "S"(tmp) : "cc", "%rdx");
    4  return 0;
    5}
    

    It seems even more odd that it compiled anywhere.

  2. build: fix x86_64 asm detection for some compilers
    I Noticed this on OSX with clang, though it likely happens elsewhere as well.
    The result is disabled x86_64 asm.
    
    Due to missing escaping, this $0 was interpreted as the function name
    SECP_64BIT_ASM_CHECK, causing the compile-check to be broken on some compilers.
    
    The actual check looked like this:
    
    int main()
    {
      uint64_t a = 11, tmp;
      __asm__ __volatile__("movq SECP_64BIT_ASM_CHECKx100000000,%1; mulq %%rsi" : "+a"(a) : "S"(tmp) : "cc", "%rdx");
      return 0;
    }
    
    It seems even more odd that it compiled anywhere.
    3f8fdfbec1
  3. theuni commented at 7:28 pm on January 7, 2016: contributor

    I just double-checked this to see if i needed to push for urgent merge here for Bitcoin 0.12rc1.

    For reference, this does not affect the clang version currently used for Bitcoin OSX release builds. So no rush.

  4. sipa merged this on Feb 16, 2016
  5. sipa closed this on Feb 16, 2016

  6. sipa referenced this in commit 7b549b1abc on Feb 16, 2016


theuni


github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin-core/secp256k1. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-11-22 07:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me