[pypy-svn] r74789 - pypy/branch/x86-64-jit-backend/pypy/jit/backend/x86
jcreigh at codespeak.net
jcreigh at codespeak.net
Wed May 26 19:34:28 CEST 2010
Author: jcreigh
Date: Wed May 26 19:34:27 2010
New Revision: 74789
Modified:
pypy/branch/x86-64-jit-backend/pypy/jit/backend/x86/regloc.py
Log:
define lowest8bits on ImmedLoc to behave the same as ri386 IMM32
Modified: pypy/branch/x86-64-jit-backend/pypy/jit/backend/x86/regloc.py
==============================================================================
--- pypy/branch/x86-64-jit-backend/pypy/jit/backend/x86/regloc.py (original)
+++ pypy/branch/x86-64-jit-backend/pypy/jit/backend/x86/regloc.py Wed May 26 19:34:27 2010
@@ -82,10 +82,10 @@
return "ImmedLoc(%d)" % (self.value)
def lowest8bits(self):
- # XXX: Maybe we could just truncate? But I'm not sure when that
- # would be the correct behavior.
- assert rx86.single_byte(self.value)
- return self
+ val = self.value & 0xFF
+ if val > 0x7F:
+ val -= 0x100
+ return ImmedLoc(val)
class AddressLoc(AssemblerLocation):
_immutable_ = True
More information about the Pypy-commit
mailing list