2022-04-22 00:40:10 +02:00
|
|
|
--TEST--
|
2022-05-18 20:49:08 +02:00
|
|
|
006: Memory update (shift)
|
2022-05-25 16:38:22 +02:00
|
|
|
--TARGET--
|
|
|
|
x86_64
|
2022-04-22 00:40:10 +02:00
|
|
|
--ARGS--
|
|
|
|
-S
|
|
|
|
--CODE--
|
|
|
|
{
|
|
|
|
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);
|
2022-05-18 20:49:08 +02:00
|
|
|
int32_t ret = SHL(z, y);
|
2022-04-22 00:40:10 +02:00
|
|
|
l_4 = VSTORE(l_3, v, ret);
|
|
|
|
l_5 = RETURN(l_4);
|
|
|
|
}
|
|
|
|
--EXPECT--
|
|
|
|
test:
|
|
|
|
subq $8, %rsp
|
|
|
|
movl %edi, (%rsp)
|
2022-05-18 20:49:08 +02:00
|
|
|
movl %edi, %ecx
|
|
|
|
shll %cl, (%rsp)
|
2022-04-22 00:40:10 +02:00
|
|
|
addq $8, %rsp
|
|
|
|
retq
|