[pypy-svn] r18465 - pypy/dist/pypy/translator/asm

mwh at codespeak.net mwh at codespeak.net
Wed Oct 12 14:39:39 CEST 2005


Author: mwh
Date: Wed Oct 12 14:39:37 2005
New Revision: 18465

Modified:
   pypy/dist/pypy/translator/asm/simulator.py
Log:
tweaks: trace entry and exit, implement int_lt


Modified: pypy/dist/pypy/translator/asm/simulator.py
==============================================================================
--- pypy/dist/pypy/translator/asm/simulator.py	(original)
+++ pypy/dist/pypy/translator/asm/simulator.py	Wed Oct 12 14:39:37 2005
@@ -11,6 +11,8 @@
         machine=Machine(nreg,args)
         machine._tracing = tracing
         ip=0
+        if tracing:
+            print 'args', args
         while not machine.stopped():
             if ip>=len(commands):
                 return None
@@ -27,6 +29,8 @@
             else:
                 machine.op(cmd.name,*cmd.arguments)
             ip+=1
+        if tracing:
+            print 'ret', machine._retval
         return machine._retval
     RunProgram=classmethod(RunProgram)
 
@@ -88,6 +92,9 @@
     def int_gt(self,rega,regb):
         self._creg = self.register(rega) > self.register(regb)
 
+    def int_lt(self,rega,regb):
+        self._creg = self.register(rega) < self.register(regb)
+
     def llop(self, opcode, destination, *sources):
         sourcevalues = []
         for r in sources:



More information about the Pypy-commit mailing list