[pypy-svn] r76298 - pypy/branch/x86-64-jit-backend/pypy/jit/backend/x86
jcreigh at codespeak.net
jcreigh at codespeak.net
Wed Jul 21 15:41:45 CEST 2010
Author: jcreigh
Date: Wed Jul 21 15:41:43 2010
New Revision: 76298
Modified:
pypy/branch/x86-64-jit-backend/pypy/jit/backend/x86/rx86.py
Log:
rx86: clean up creation of all_instructions list
Modified: pypy/branch/x86-64-jit-backend/pypy/jit/backend/x86/rx86.py
==============================================================================
--- pypy/branch/x86-64-jit-backend/pypy/jit/backend/x86/rx86.py (original)
+++ pypy/branch/x86-64-jit-backend/pypy/jit/backend/x86/rx86.py Wed Jul 21 15:41:43 2010
@@ -635,13 +635,8 @@
# ____________________________________________________________
-# FIXME: What about 32-bit only or 64-bit only instructions?
-# This is used to build the MachineCodeBlockWrapper. Missing
-# some instructions could possibly lead to subtle bugs.
+_classes = (AbstractX86CodeBuilder, X86_64_CodeBuilder, X86_32_CodeBuilder)
-# FIXME: hack hack hack
-all_instructions = ([name for name in AbstractX86CodeBuilder.__dict__
- if name.split('_')[0].isupper()] +
- [name for name in X86_64_CodeBuilder.__dict__
- if name.split('_')[0].isupper()])
-all_instructions.sort()
+# Used to build the MachineCodeBlockWrapper
+all_instructions = sorted(name for cls in _classes for name in cls.__dict__
+ if name.split('_')[0].isupper())
More information about the Pypy-commit
mailing list