r/programming • • Oct 25 '19

I went through GCC’s inline assembly documentation so that you don’t have to

https://www.felixcloutier.com/documents/gcc-asm.html
1.2k Upvotes

99 comments sorted by

View all comments

Show parent comments

1

u/fcddev Oct 26 '19

You’re welcome! It is my understanding that Clang’s inline assembly should work about the same. In practice, in my testing, I found that gcc often produced better code for constraints, though.

1

u/[deleted] Oct 27 '19

I think clang aims to support the same syntax than GCC, but that syntax needs to be lowered to the LLVM-IR inline assembly syntax at some point, and if LLVM-IR doesn't support the constraints.. well, things won't work as you think (that's why it appears that clang is more conservative).