Issues compiling crypto++ inline assembly

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Issues compiling crypto++ inline assembly

Dennis Luehring via cfe-dev

I'm having issues compiling crypto++'s inline assembly with recent builds of clang (from my experiments 5.0.0 onwards). The code in question is the 32-bit version of https://github.com/weidai11/cryptopp/blob/master/sha.cpp#L1005 which is failing on line 1005 with the error "error: invalid operand for instruction".

I've bolied this code down to:

void test()
{
    __asm__ __volatile__
    (
    ".intel_syntax;\n"
    "0:\n"
    "jnz 0b;\n"
    );
}

This compiles with GCC and clang 4.0.1 but fails with 5.0.0 and 6.0.0 https://godbolt.org/g/ikFCrk
Changing to AT&T syntax makes it build. Changing the jump to "0f" compiles (but obviously generates a jump to nowhere).

Any ideas how to solve this issue or is it a bug in clang's intel syntax support?


_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev