etape 1 terminée

This commit is contained in:
Mylloon 2023-12-31 16:14:05 +01:00
parent a2724c4e41
commit ac93861c63
Signed by: Anri
GPG key ID: A82D63DFF8D1317F
2 changed files with 23 additions and 1 deletions

View file

@ -1,4 +1,3 @@
def fact ()
local x:
jumpif lte %rdi, 1 -> fini, rec;

View file

@ -0,0 +1,23 @@
def my_add_eight_int (i7, i8)
%rax <- add %rdi, %rsi;
%rax <- add %rax, %rdx;
%rax <- add %rax, %rcx;
%rax <- add %rax, %r8;
%rax <- add %rax, %r9;
%rax <- add %rax, i7;
%rax <- add %rax, i8;
ret;
end
globals ()
%rdi <- copy 1;
%rsi <- copy 2;
%rdx <- copy 3;
%rcx <- copy 4;
%r8 <- copy 5;
%r9 <- copy 6;
my_add_eight_int(7, 8);
%rdi <- copy %rax;
observe_int();
end