[pypy-commit] pypy arm-backend-2: move get_fp_offset function to locations module
bivab
noreply at buildbot.pypy.org
Fri Feb 3 12:33:46 CET 2012
Author: David Schneider <david.schneider at picle.org>
Branch: arm-backend-2
Changeset: r52065:c20da47745b5
Date: 2012-02-03 10:17 +0100
http://bitbucket.org/pypy/pypy/changeset/c20da47745b5/
Log: move get_fp_offset function to locations module
diff --git a/pypy/jit/backend/arm/assembler.py b/pypy/jit/backend/arm/assembler.py
--- a/pypy/jit/backend/arm/assembler.py
+++ b/pypy/jit/backend/arm/assembler.py
@@ -6,10 +6,10 @@
from pypy.jit.backend.arm.arch import WORD, DOUBLE_WORD, FUNC_ALIGN, \
N_REGISTERS_SAVED_BY_MALLOC
from pypy.jit.backend.arm.codebuilder import ARMv7Builder, OverwritingBuilder
+from pypy.jit.backend.arm.locations import get_fp_offset
from pypy.jit.backend.arm.regalloc import (Regalloc, ARMFrameManager,
ARMv7RegisterManager, check_imm_arg,
operations as regalloc_operations,
- get_fp_offset,
operations_with_guard as regalloc_operations_with_guard)
from pypy.jit.backend.llsupport.asmmemmgr import MachineDataBlockWrapper
from pypy.jit.backend.model import CompiledLoopToken
diff --git a/pypy/jit/backend/arm/locations.py b/pypy/jit/backend/arm/locations.py
--- a/pypy/jit/backend/arm/locations.py
+++ b/pypy/jit/backend/arm/locations.py
@@ -134,3 +134,11 @@
def imm(i):
return ImmLocation(i)
+
+
+def get_fp_offset(i):
+ if i >= 0:
+ # Take the FORCE_TOKEN into account
+ return (1 + i) * WORD
+ else:
+ return i * WORD
diff --git a/pypy/jit/backend/arm/regalloc.py b/pypy/jit/backend/arm/regalloc.py
--- a/pypy/jit/backend/arm/regalloc.py
+++ b/pypy/jit/backend/arm/regalloc.py
@@ -2,7 +2,7 @@
RegisterManager, TempBox, compute_vars_longevity
from pypy.jit.backend.arm import registers as r
from pypy.jit.backend.arm import locations
-from pypy.jit.backend.arm.locations import imm
+from pypy.jit.backend.arm.locations import imm, get_fp_offset
from pypy.jit.backend.arm.helper.regalloc import (prepare_op_by_helper_call,
prepare_op_unary_cmp,
prepare_op_ri,
@@ -55,13 +55,6 @@
return "<TempFloat at %s>" % (id(self),)
-def get_fp_offset(i):
- if i >= 0:
- # Take the FORCE_TOKEN into account
- return (1 + i) * WORD
- else:
- return i * WORD
-
class ARMFrameManager(FrameManager):
More information about the pypy-commit
mailing list