This repository has been archived on 2024-01-18. You can view files and clone it, but cannot push or open issues or pull requests.
compilation/flap/tests/06-Retrolix_to_x86-64/20-logic.retrolix

23 lines
404 B
Text
Raw Permalink Normal View History

external printf
def print_one_int ()
local a1:
a1: a1 <- copy %rdi;
l00: %rdi <- copy "%d\n";
l01: %rsi <- copy a1;
l02: %rax <- copy 0;
l03: printf();
l04: ret;
end
globals (x)
l11: %rdi <- and 1, 0;
l12: print_one_int();
l13: %rdi <- and 1, 1;
l14: print_one_int();
l15: %rdi <- and 0, 1;
l16: print_one_int();
l17: %rdi <- and 0, 0;
l18: print_one_int();
l19: exit;
end