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/questions/retrolixToX86_64/06.retrolix
2023-12-31 15:59:53 +01:00

25 lines
293 B
Text

def fact ()
%rax <- copy 1;
condition:
jumpif lte %rdi, 1 -> fin, boucle;
boucle:
%rax <- mul %rax, %rdi;
%rdi <- sub %rdi, 1;
jump condition;
fin:
ret;
end
globals (x)
x <- copy 5;
%rdi <- copy x;
fact();
x <- copy %rax;
%rdi <- copy x;
observe_int();
end