diff --git a/vlib/compiler/tests/asm_test.v b/vlib/compiler/tests/asm_test.v index 3597aa0a0e..149bb30632 100644 --- a/vlib/compiler/tests/asm_test.v +++ b/vlib/compiler/tests/asm_test.v @@ -1,14 +1,28 @@ fn test_inline_asm() { + $if !windows { + $if !tinyc { a := 10 b := 0 unsafe { - asm ("movl %1, %%eax;" - "movl %%eax, %0;" - :"=r"(b) - :"r"(a) - :"%eax" - ) + asm ( + "movl %1, %%eax;" + "movl %%eax, %0;" + :"=r"(b) + :"r"(a) + :"%eax" + ) } assert a == 10 assert b == 10 + // + e := 0 + unsafe { + asm( + "movl $5, %0" + :"=a"(e) + ) + } + assert e == 5 + } + } }