[pypy-svn] r53171 - pypy/branch/jit-hotpath/pypy/jit/codegen/i386
fijal at codespeak.net
fijal at codespeak.net
Mon Mar 31 00:29:38 CEST 2008
Author: fijal
Date: Mon Mar 31 00:29:38 2008
New Revision: 53171
Modified:
pypy/branch/jit-hotpath/pypy/jit/codegen/i386/ri386.py
pypy/branch/jit-hotpath/pypy/jit/codegen/i386/ri386setup.py
Log:
fix the opcodes for x87 instructions (few of them)
Modified: pypy/branch/jit-hotpath/pypy/jit/codegen/i386/ri386.py
==============================================================================
--- pypy/branch/jit-hotpath/pypy/jit/codegen/i386/ri386.py (original)
+++ pypy/branch/jit-hotpath/pypy/jit/codegen/i386/ri386.py Mon Mar 31 00:29:38 2008
@@ -19,7 +19,7 @@
raise ValueError
class FLOATREG(OPERAND):
- width = 4
+ width = 8
def __repr__(self):
return '<ST(%d)>' % self.num
@@ -222,6 +222,15 @@
dh = DH()
bh = BH()
+st0 = ST0()
+st1 = ST1()
+st2 = ST2()
+st3 = ST3()
+st4 = ST4()
+st5 = ST5()
+st6 = ST6()
+st7 = ST7()
+
registers = [eax, ecx, edx, ebx, esp, ebp, esi, edi]
registers8 = [al, cl, dl, bl, ah, ch, dh, bh]
@@ -247,6 +256,9 @@
def mem(basereg, offset=0):
return memSIB(basereg, None, 0, offset)
+def mem64(basereg, offset=0):
+ return memSIB64(basereg, None, 0, offset)
+
def memSIB(base, index, scaleshift, offset):
return _SIBencode(MODRM, base, index, scaleshift, offset)
Modified: pypy/branch/jit-hotpath/pypy/jit/codegen/i386/ri386setup.py
==============================================================================
--- pypy/branch/jit-hotpath/pypy/jit/codegen/i386/ri386setup.py (original)
+++ pypy/branch/jit-hotpath/pypy/jit/codegen/i386/ri386setup.py Mon Mar 31 00:29:38 2008
@@ -436,15 +436,15 @@
# ------------------------- floating point instructions ------------------
-FLD = Instruction()
-FLD.mode1(MODRM64, ['\xD9', modrm(1)])
+FLDL = Instruction()
+FLDL.mode1(MODRM64, ['\xDD', modrm(1)])
FADD = Instruction()
#FADD.mode1(MODRM64, ['\xDC', modrm(1)])
FADD.mode0(['\xDE\xC1'])
-#FISTP = Instruction()
-#FISTP.mode1(MODRM64, ['\xDF', modrm(1)])
+FSTPL = Instruction()
+FSTPL.mode1(MODRM64, ['\xDD', orbyte(3<<3), modrm(1)])
# ------------------------- end of floating point ------------------------
More information about the Pypy-commit
mailing list