If it's a pain, I have written an inline assembler for Nim that supports 
advanced patterns:

Codegen: 
<https://github.com/mratsim/constantine/blob/50717d8/constantine/primitives/macro_assembler_x86.nim>

Example usage: 
<https://github.com/mratsim/constantine/blob/50717d8/constantine/arithmetic/assembly/limbs_asm_x86.nim>

More advanced example in: 
<https://github.com/mratsim/constantine/tree/50717d8/constantine/arithmetic/assembly>

At one point I'll try to create a proper package for it and also support ARM 
codegen but I certainly don't look forward to documenting GCC/Clang inline 
assembly syntax.

Reply via email to