On Saturday, 21 December 2013 at 10:14:32 UTC, Russel Winder
wrote:
C, C++, Go, D have the advantage of using separate files with
the
assembly code in.
Inline assembly language is a huge disadvantage in many (most?)
case.
Depends, it allows you to add support for locking-mechanisms/SIMD
instructions/etc before getting language support. You want that
inlined and the compiler to do register assignment. I believe
LLVM just pass it on to the assembler almost verbatim. If done
right you wouldn't need to update the compiler in order to add
support for new instructions/trap mechanisms, updating an
external assembler should be sufficient, so it is a future-proof
technology. I think inline asm wrapped up as inline functions is
pretty neat, in the rare case where you need it (some rare CPUs
have built in true random() functionality for instance).