ir/tests/debug.x86/memop_005.irt
2022-11-08 11:56:22 +03:00

27 lines
424 B
Plaintext

--TEST--
005: Memory update (mul pwr2)
--TARGET--
x86
--ARGS--
-S
--CODE--
{
int32_t c = 16;
l_1 = START(l_5);
int32_t y = PARAM(l_1, "y", 1);
int32_t v = VAR(l_1, "_spill_");
l_2 = VSTORE(l_1, v, y);
int32_t z, l_3 = VLOAD(l_2, v);
int32_t ret = MUL(z, c);
l_4 = VSTORE(l_3, v, ret);
l_5 = RETURN(l_4);
}
--EXPECT--
test:
subl $4, %esp
movl 8(%esp), %eax
movl %eax, (%esp)
shll $4, (%esp)
addl $4, %esp
retl