[pypy-svn] r32121 - in pypy/dist/pypy/jit/codegen/i386: . test
arigo at codespeak.net
arigo at codespeak.net
Sun Sep 10 15:37:12 CEST 2006
Author: arigo
Date: Sun Sep 10 15:37:10 2006
New Revision: 32121
Modified:
pypy/dist/pypy/jit/codegen/i386/ri386.py
pypy/dist/pypy/jit/codegen/i386/ri386genop.py
pypy/dist/pypy/jit/codegen/i386/test/test_auto_encoding.py
Log:
(pedronis, arigo)
Fix test_auto_encoding failures. Skip tests relying on Boehm when they
don't run in the main thread (as with distributed testing).
Modified: pypy/dist/pypy/jit/codegen/i386/ri386.py
==============================================================================
--- pypy/dist/pypy/jit/codegen/i386/ri386.py (original)
+++ pypy/dist/pypy/jit/codegen/i386/ri386.py Sun Sep 10 15:37:10 2006
@@ -33,21 +33,27 @@
class BH(REG8): op=7
class IMM32(OPERAND):
+ width = 4
+
def __init__(self, value):
self.value = value
def assembler(self):
return '$%d' % (self.value,)
class IMM8(IMM32):
- pass
+ width = 1
class IMM16(OPERAND): # only for RET
+ width = 2
+
def __init__(self, value):
self.value = value
def assembler(self):
return '$%d' % (self.value,)
class MODRM(OPERAND):
+ width = 4
+
def __init__(self, byte, extradata):
self.byte = byte
self.extradata = extradata
@@ -97,9 +103,10 @@
class MODRM8(MODRM):
- pass
+ width = 1
class REL32(OPERAND):
+ width = 4
def __init__(self, absolute_target):
self.absolute_target = absolute_target
def assembler(self):
Modified: pypy/dist/pypy/jit/codegen/i386/ri386genop.py
==============================================================================
--- pypy/dist/pypy/jit/codegen/i386/ri386genop.py (original)
+++ pypy/dist/pypy/jit/codegen/i386/ri386genop.py Sun Sep 10 15:37:10 2006
@@ -558,6 +558,10 @@
return lltype.cast_ptr_to_int(gc_malloc_ptr)
else:
# <pedronis> don't do this at home
+ import threading
+ if not isinstance(threading.currentThread(), threading._MainThread):
+ import py
+ py.test.skip("must run in the main thread")
try:
from ctypes import cast, c_void_p
from pypy.rpython.rctypes.tool import util
Modified: pypy/dist/pypy/jit/codegen/i386/test/test_auto_encoding.py
==============================================================================
--- pypy/dist/pypy/jit/codegen/i386/test/test_auto_encoding.py (original)
+++ pypy/dist/pypy/jit/codegen/i386/test/test_auto_encoding.py Sun Sep 10 15:37:10 2006
@@ -205,6 +205,11 @@
if instrname in ('SHL', 'SHR', 'SAR'):
if args[1][1].assembler() == '$1':
return []
+ if instrname in ('MOVZX', 'MOVSX'):
+ if args[1][1].width == 4:
+ return []
+ if instrname == 'o16':
+ return []
return [args]
def hexdump(s):
More information about the Pypy-commit
mailing list