ir/tests/Windows-x86_64/if_001.irt
Dmitry Stogov ebdeba9fff Add simple tests for Windows-x86_64
conv_004.irt and conv_010.irt fail with capstone 5 because of changes in movd/movq
2023-03-02 00:55:20 +03:00

32 lines
449 B
Plaintext
Executable File

--TEST--
001: if function
--TARGET--
Windows-x86_64
--ARGS--
-S
--CODE--
{
int32_t c_1 = 0;
int32_t c_2 = 42;
l_1 = START(l_8);
int32_t x = PARAM(l_1, "x", 1);
l_2 = IF(l_1, x);
l_3 = IF_TRUE(l_2);
l_4 = END(l_3);
l_5 = IF_FALSE(l_2);
l_6 = END(l_5);
l_7 = MERGE(l_4, l_6);
int32_t ret = PHI(l_7, c_1, c_2);
l_8 = RETURN(l_7, ret);
}
--EXPECT--
test:
testl %ecx, %ecx
je .L2
xorl %eax, %eax
.L1:
retq
.L2:
movl $0x2a, %eax
jmp .L1