Sistemi di Calcolo

Corso di Laurea in Ingegneria Informatica e Automatica - A.A. 2017-2018

HomePage | Avvisi | Diario lezioni | Programma | Materiale didattico | Esami | Forum | Login

Revision [1223]

Last edited on 2015-11-17 16:19:35 by CamilDemetrescu
Additions:
popl %ebx


Revision [1219]

Edited on 2015-11-17 10:17:35 by CamilDemetrescu
Additions:
# int prod(int x, int y, int z);
# int f(int x, int y, int z, int w) {
# return prod(x,y,z)+w;
.globl f
f:
subl $12, %esp # prologo
movl 16(%esp), %eax # x
movl 20(%esp), %ecx # y
movl 24(%esp), %edx # z
movl %eax, (%esp) # passa x
movl %ecx, 4(%esp) # passa y
movl %edx, 8(%esp) # passa z
call prod
addl 28(%esp), %eax # somma w
addl $12, %esp # epilogo


Revision [1218]

Edited on 2015-11-17 10:16:38 by CamilDemetrescu
Additions:
# int uno();
# int somma_uno_a(int x) {
# return x+uno();
.globl somma_uno_a
somma_uno_a:
call uno
addl 4(%esp), %eax


Revision [1217]

Edited on 2015-11-17 10:15:52 by CamilDemetrescu
Additions:
# int myabs(int x) {
# return x<0 ? -x : x;
.globl myabs
myabs:
movl 4(%esp), %eax
negl %eax
cmovll 4(%esp), %eax


Revision [1216]

Edited on 2015-11-17 10:15:02 by CamilDemetrescu
Additions:
# int testcc(short x, short y) {
# return 0<=x && x .globl testcc
testcc:
movw 4(%esp), %cx # x
movw 8(%esp), %dx # y
testw %cx, %cx
setge %al
cmpw %dx, %cx
setl %cl
andb %cl, %al
movzbl %al, %eax


Revision [1215]

Edited on 2015-11-17 10:13:44 by CamilDemetrescu
Additions:
==Esercizio 1 (istruzione SETcc)==
%%(asm;es1.s)
==Esercizio 2 (istruzione CMOVcc)==
%%(asm;es2.s)
==Esercizio 3 (chiamata a funzione senza parametri)==
%%(asm;es3.s)
==Esercizio 4 (chiamata a funzione con parametri)==
%%(asm;es4.s)


Revision [1214]

Edited on 2015-11-17 10:12:17 by CamilDemetrescu
Additions:
%%(asm;es5.s)
Deletions:
%%(asm,es5.s)


Revision [1213]

Edited on 2015-11-17 10:12:04 by CamilDemetrescu
Additions:
==Esercizio 5 (chiamata a funzione con parametri in un ciclo)==
Deletions:
==Esercizio 5==


Revision [1212]

Edited on 2015-11-17 10:11:41 by CamilDemetrescu
Additions:
===Soluzioni esercitazione 3 (17 novembre 2015)===


Revision [1211]

The oldest known version of this page was created on 2015-11-17 10:11:16 by CamilDemetrescu
Valid XHTML 1.0 Transitional :: Valid CSS :: Powered by WikkaWiki
Page was generated in 0.0258 seconds