From be3b1622214a9ebb100042b683cf34b9e9720cd5 Mon Sep 17 00:00:00 2001 From: Bertrand BRUN Date: Fri, 15 Oct 2010 20:05:04 +0200 Subject: [PATCH] Mise a jour des instructions VM --- VM/instruction.lisp | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/VM/instruction.lisp b/VM/instruction.lisp index 6a7398a..a9e21ea 100644 --- a/VM/instruction.lisp +++ b/VM/instruction.lisp @@ -56,12 +56,12 @@ (setf register (- register 1))) (defun PUSH (register) - (progn (INCR SP) - (STORE register SP))) + (INCR SP) + (STORE register SP)) (defun POP (register) - (progn (LOAD SP register) - (DECR SP))) + (LOAD SP register) + (DECR SP)) ;; TODO : Remplir la fonction JMP (defun JMP (dst) @@ -77,17 +77,17 @@ (defun CMP (reg1 reg2) (cond ((= (getValueInMemory reg1) (getValueInMemory reg2)) - (progn (setf EQ T) - (setf PP nil) - (setf PG nil))) + (setf EQ T) + (setf PP nil) + (setf PG nil)) ((< (getValueInMemory reg1) (getValueInMemory reg2)) - (progn (setf EQ nil) - (setf PP T) - (setf PG nil))) + (setf EQ nil) + (setf PP T) + (setf PG nil)) (T - (progn (setf EQ nil) - (setf PP nil) - (setf PG T))))) + (setf EQ nil) + (setf PP nil) + (setf PG T)))) (defun JEQ (label) (if EQ