mirror of
https://github.com/danog/ir.git
synced 2024-12-12 09:19:47 +01:00
23 lines
378 B
Plaintext
23 lines
378 B
Plaintext
|
--TEST--
|
||
|
010: Memory update (shift with mem)
|
||
|
--TARGET--
|
||
|
x86_64
|
||
|
--ARGS--
|
||
|
-S
|
||
|
--CODE--
|
||
|
{
|
||
|
l_1 = START(l_5);
|
||
|
uintptr_t y = PARAM(l_1, "x", 1);
|
||
|
uintptr_t x = PARAM(l_1, "y", 2);
|
||
|
int32_t y2, l_2 = LOAD(l_1, y);
|
||
|
int32_t x2, l_3 = LOAD(l_2, x);
|
||
|
int32_t ret = SHL(x2, y2);
|
||
|
l_4 = STORE(l_3, x, ret);
|
||
|
l_5 = RETURN(l_4);
|
||
|
}
|
||
|
--EXPECT--
|
||
|
test:
|
||
|
movl (%rdi), %ecx
|
||
|
shll %cl, (%rsi)
|
||
|
retq
|