From 6c51d0bb7827e1c1344cf520131e2327f059d606 Mon Sep 17 00:00:00 2001 From: Alexander Medvednikov Date: Sun, 17 Nov 2019 01:07:21 +0300 Subject: [PATCH] another inline asm test + disable on msvc --- vlib/compiler/tests/asm_test.v | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) 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 + } + } }