tasm.nim 283 B

1234567891011121314151617181920
  1. discard """
  2. disabled: "arm64"
  3. """
  4. proc testAsm() =
  5. let src = 41
  6. var dst = 0
  7. asm """
  8. mov %1, %0\n\t
  9. add $1, %0
  10. : "=r" (`dst`)
  11. : "r" (`src`)"""
  12. doAssert dst == 42
  13. when defined(gcc) or defined(clang) and not defined(cpp):
  14. {.passc: "-std=c99".}
  15. testAsm()