inline asm in inlined function / ECX clobbered / stack frame / naked

kinke noone at nowhere.com
Wed May 8 15:42:55 UTC 2019


I should probably add that the inline asm version can be 
simplified to a much more readable:

return x <= 2 ? x : 2 << __asm!uint("bsrl $1, $0", "=r,r", x - 1);

Check out 
http://llvm.org/docs/LangRef.html#inline-asm-constraint-string if 
interested in LLVM inline assembly.


More information about the digitalmars-d-ldc mailing list