Author: Maciej Fijalkowski <[email protected]>
Branch:
Changeset: r62732:eb947a354a22
Date: 2013-03-25 01:00 -0700
http://bitbucket.org/pypy/pypy/changeset/eb947a354a22/
Log: start working on raspberry pi support
diff --git a/rpython/jit/backend/arm/assembler.py
b/rpython/jit/backend/arm/assembler.py
--- a/rpython/jit/backend/arm/assembler.py
+++ b/rpython/jit/backend/arm/assembler.py
@@ -65,6 +65,8 @@
allblocks = self.get_asmmemmgr_blocks(looptoken)
self.datablockwrapper = MachineDataBlockWrapper(self.cpu.asmmemmgr,
allblocks)
+ self.mc.datablockwrapper = self.datablockwrapper
+ self.mc.is_armv6 = self.cpu.backend_name == 'armv6'
self.target_tokens_currently_compiling = {}
def teardown(self):
diff --git a/rpython/jit/backend/arm/codebuilder.py
b/rpython/jit/backend/arm/codebuilder.py
--- a/rpython/jit/backend/arm/codebuilder.py
+++ b/rpython/jit/backend/arm/codebuilder.py
@@ -248,6 +248,10 @@
def gen_load_int(self, r, value, cond=cond.AL):
"""r is the register number, value is the value to be loaded to the
register"""
+ if value > 0xFF and self.is_armv6:
+ val = self.datablockwrapper.malloc_aligned(WORD)
+ import pdb
+ pdb.set_trace()
bottom = value & 0xFFFF
top = value >> 16
self.MOVW_ri(r, bottom, cond)
diff --git a/rpython/jit/backend/arm/runner.py
b/rpython/jit/backend/arm/runner.py
--- a/rpython/jit/backend/arm/runner.py
+++ b/rpython/jit/backend/arm/runner.py
@@ -122,3 +122,11 @@
backend_name = "armhf"
supports_floats = False
supports_singlefloats = False
+
+class CPU_ARMv6(AbstractARMCPU):
+ """ ARM v6, uses hardfp ABI, requires vfp"""
+ use_hf_abi = True
+ backend_name = "armv6"
+ supports_floats = False
+ supports_singlefloats = False
+
diff --git a/rpython/jit/backend/detect_cpu.py
b/rpython/jit/backend/detect_cpu.py
--- a/rpython/jit/backend/detect_cpu.py
+++ b/rpython/jit/backend/detect_cpu.py
@@ -34,6 +34,7 @@
'amd64': 'x86', # freebsd
'AMD64': 'x86', # win64
'armv7l': 'arm',
+ 'armv6l': 'armv6',
}[mach]
except KeyError:
return mach
@@ -59,12 +60,13 @@
if not detect_sse2():
model = 'x86-without-sse2'
if model == 'arm':
- from rpython.jit.backend.arm.detect import detect_hardfloat,
detect_float
- if detect_hardfloat():
- model = 'armhf'
- assert detect_float(), 'the JIT-compiler requires a vfp unit'
+ from rpython.jit.backend.arm.detect import detect_hardfloat,
detect_float
+ if detect_hardfloat():
+ model = 'armhf'
+ if model.startswith('arm'):
+ assert detect_float(), 'the JIT-compiler requires a vfp unit'
return model
-
+
def getcpuclassname(backend_name="auto"):
if backend_name == "auto":
backend_name = autodetect()
@@ -76,6 +78,8 @@
return "rpython.jit.backend.x86.runner", "CPU_X86_64"
elif backend_name == 'cli':
return "rpython.jit.backend.cli.runner", "CliCPU"
+ elif backend_name == 'armv6':
+ return "rpython.jit.backend.arm.runner", "CPU_ARMv6"
elif backend_name == 'arm':
return "rpython.jit.backend.arm.runner", "CPU_ARM"
elif backend_name == 'armhf':
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit