aboutsummaryrefslogtreecommitdiff
path: root/semestr-4/ask/lista7/eval.s
blob: f7340a0c9221950c51c8ddb0ab40446c8dece41a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
        .global eval

        .text
eval:
        movq %rdi, %rax
        movq 16(%rsp), %rcx
        movq 24(%rsp), %rdx
        movq (%rdx), %rsi
        movq %rcx, %rdx
        imulq %rsi, %rdx
        movq %rdx, (%rdi)
        movq 8(%rsp), %rdx
        movq %rdx, %rdi
        subq %rsi, %rdi
        movq %rdi, 8(%rax)
        subq %rcx, %rdx
        movq %rdx, 16(%rax)
        ret