1

Getting this error when trying to compile this source file using GCC: https://github.com/wolf9466/cpuminer-multi/blob/master/cryptonight_aesni.c

"cryptonight_aesni.c:162:4: error: inconsistent operand constraints"

Specifically:

      uint64_t hi, lo;
 // hi,lo = 64bit x 64bit multiply of c[0] and b[0]

  __asm__("mulq %3\n\t"
      : "=d" (hi),
        "=a" (lo)
      : "%a" (c[0]),
        "rm" (b[0])
      : "cc" );

Very difficult to find out what this error even means, yet alone how to fix it

4
  • What processor are you targeting? Commented Dec 28, 2016 at 9:14
  • Intel 32 bit, filler Commented Dec 28, 2016 at 9:21
  • 5
    The instruction mulq in this code is an x86 64-bit instruction. All the parameters are 64-bit values and can't fit in 32-bit registers (when compiling for a 32-bit x86 platform) Commented Dec 28, 2016 at 9:22
  • 1
    Ah yes makes sense, installing mingw64 thank you! Commented Dec 28, 2016 at 9:40

1 Answer 1

0

The instruction mulq in this code is an x86 64-bit instruction. All the parameters are 64-bit values and can't fit in 32-bit registers (when compiling for a 32-bit x86 platform) – Michael Petch

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.