[pypy-svn] r64878 - pypy/branch/pyjitpl5/pypy/jit/backend/x86
arigo at codespeak.net
arigo at codespeak.net
Thu Apr 30 19:54:46 CEST 2009
Author: arigo
Date: Thu Apr 30 19:54:38 2009
New Revision: 64878
Modified:
pypy/branch/pyjitpl5/pypy/jit/backend/x86/assembler.py
pypy/branch/pyjitpl5/pypy/jit/backend/x86/ri386setup.py
Log:
Try to revert and apply another method. That's safer and simpler,
although I cannot test it.
Modified: pypy/branch/pyjitpl5/pypy/jit/backend/x86/assembler.py
==============================================================================
--- pypy/branch/pyjitpl5/pypy/jit/backend/x86/assembler.py (original)
+++ pypy/branch/pyjitpl5/pypy/jit/backend/x86/assembler.py Thu Apr 30 19:54:38 2009
@@ -627,8 +627,7 @@
if itemsize == 4:
self.mc.MOV(addr_add(base_loc, ofs_loc, basesize, 2), val_loc)
elif itemsize == 2:
- self.mc.O16()
- self.mc.MOV(addr_add(base_loc, ofs_loc, basesize, 1), val_loc)
+ self.mc.MOV16(addr_add(base_loc, ofs_loc, basesize, 1), val_loc)
else:
assert 0, itemsize
Modified: pypy/branch/pyjitpl5/pypy/jit/backend/x86/ri386setup.py
==============================================================================
--- pypy/branch/pyjitpl5/pypy/jit/backend/x86/ri386setup.py (original)
+++ pypy/branch/pyjitpl5/pypy/jit/backend/x86/ri386setup.py Thu Apr 30 19:54:38 2009
@@ -274,9 +274,11 @@
MOV.mode2(MODRM8,REG8, ['\x88', register(2,8,'b'), modrm(1,'b')])
MOV.mode2(REG8, MODRM8,['\x8A', register(1,8,'b'), modrm(2,'b')])
-# special modes for writing explicit 16-bit immediates (must also use o16!)
-MOV.mode2(REG, IMM16, [register(1), '\xB8', immediate(2,'h')])
-MOV.mode2(MODRM, IMM16, ['\xC7', orbyte(0<<3), modrm(1), immediate(2,'h')])
+# special modes for writing 16-bit operands into memory
+MOV16 = Instruction()
+MOV16.mode2(MODRM, IMM32, ['\x66', '\xC7', orbyte(0<<3), modrm(1),
+ immediate(2,'h')])
+MOV16.mode2(MODRM, REG, ['\x66', '\x89', register(2,8), modrm(1)])
ADD = Instruction()
ADD.common_modes(0)
@@ -494,9 +496,6 @@
UD2 = Instruction() # reserved as an illegal instruction
UD2.mode0(['\x0F\x0B'])
-O16 = Instruction() # 16-bits instruction prefix (name from 'nasm')
-O16.mode0(['\x66'])
-
Conditions = {
'O': 0,
More information about the Pypy-commit
mailing list