[pypy-svn] r50913 - in pypy/dist/pypy/jit/codegen/i386: . test

fijal at codespeak.net fijal at codespeak.net
Wed Jan 23 14:15:20 CET 2008


Author: fijal
Date: Wed Jan 23 14:15:20 2008
New Revision: 50913

Modified:
   pypy/dist/pypy/jit/codegen/i386/ri386setup.py
   pypy/dist/pypy/jit/codegen/i386/test/test_ri386.py
Log:
Two opcodes for operations on floats.


Modified: pypy/dist/pypy/jit/codegen/i386/ri386setup.py
==============================================================================
--- pypy/dist/pypy/jit/codegen/i386/ri386setup.py	(original)
+++ pypy/dist/pypy/jit/codegen/i386/ri386setup.py	Wed Jan 23 14:15:20 2008
@@ -433,6 +433,15 @@
 BREAKPOINT.mode0(['\xCC'])
 BREAKPOINT.as_alias = "INT3"
 
+# ------------------------- floating point instructions ------------------
+FLD = Instruction()
+FLD.mode1(MODRM, ['\xDD', modrm(1)])
+
+FADD = Instruction()
+FADD.mode1(MODRM, ['\xDC', modrm(1)])
+
+# ------------------------- end of floating point ------------------------
+
 UD2 = Instruction()      # reserved as an illegal instruction
 UD2.mode0(['\x0F\x0B'])
 

Modified: pypy/dist/pypy/jit/codegen/i386/test/test_ri386.py
==============================================================================
--- pypy/dist/pypy/jit/codegen/i386/test/test_ri386.py	(original)
+++ pypy/dist/pypy/jit/codegen/i386/test/test_ri386.py	Wed Jan 23 14:15:20 2008
@@ -73,7 +73,10 @@
                                              'MOV', memSIB(None,ecx,3,0), eax
     # call +17
     yield check, '\xE8\x11\x00\x00\x00',     'CALL', rel32(22)
-
+    # fld
+    yield check, '\xDD\x44\x24\x04', 'FLD', mem(esp, 4)
+    # fadd
+    yield check, '\xDC\x44\x24\x08', 'FADD', mem(esp, 8)
 
 ##def test_conditional():
 ##    """Compare the encoding for the instructions JE, JAE, JC etc.,



More information about the Pypy-commit mailing list