diff --git a/tests/compiler/tasm.nim b/tests/compiler/tasm.nim index 31db5643c9222..63c8344f035aa 100644 --- a/tests/compiler/tasm.nim +++ b/tests/compiler/tasm.nim @@ -1,16 +1,25 @@ -discard """ -disabled: "arm64" -""" - proc testAsm() = let src = 41 var dst = 0 - asm """ - mov %1, %0\n\t - add $1, %0 - : "=r" (`dst`) - : "r" (`src`)""" + when defined(i386) or defined(amd64): + asm """ + mov %1, %0\n\t + add $1, %0 + : "=r" (`dst`) + : "r" (`src`)""" + elif defined(arm) or defined(arm64): + asm """ + mov %0, %1\n\t + add %0, %0, #1 + : "=r" (`dst`) + : "r" (`src`)""" + elif defined(riscv32) or defined(riscv64): + asm """ + addi %0, %1, 0\n\t + addi %0, %0, 1 + : "=r" (`dst`) + : "r" (`src)""" doAssert dst == 42