mirror of
https://github.com/danog/ir.git
synced 2024-12-11 08:50:22 +01:00
28 lines
448 B
Plaintext
28 lines
448 B
Plaintext
|
--TEST--
|
||
|
001: Memory update (binary op with const)
|
||
|
--TARGET--
|
||
|
aarch64
|
||
|
--ARGS--
|
||
|
-S
|
||
|
--CODE--
|
||
|
{
|
||
|
int32_t c = 0x80;
|
||
|
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 = AND(z, c);
|
||
|
l_4 = VSTORE(l_3, v, ret);
|
||
|
l_5 = RETURN(l_4);
|
||
|
}
|
||
|
--EXPECT--
|
||
|
test:
|
||
|
sub sp, sp, #8
|
||
|
str w0, [sp]
|
||
|
ldr w0, [sp]
|
||
|
and w0, w0, #0x80
|
||
|
str w0, [sp]
|
||
|
add sp, sp, #8
|
||
|
ret
|