Description: Raise ProcessorAutodetectError for unknown machine names
 Previously this function was only used for the JIT, so it only had to support
 machines that the JIT supports.
 Now, it's used by rpython.rlib.rawstorage, and should raise an appropriate
 exception, rather than KeyError, on unknown machines.
Author: Stefano Rivera <stefanor@debian.org>
Forwarded: https://bitbucket.org/pypy/pypy/commits/eacab51680764ad0ec3834db6915524d3021ebb1 https://bitbucket.org/pypy/pypy/commits/e9af47acbea2465ddc516b14506082f375cb3606

--- a/rpython/jit/backend/detect_cpu.py
+++ b/rpython/jit/backend/detect_cpu.py
@@ -63,7 +63,10 @@
             'AMD64': MODEL_X86,    # win64
             'armv7l': MODEL_ARM,
             'armv6l': MODEL_ARM,
-            }[mach]
+            }.get(mach)
+
+    if result is None:
+        raise ProcessorAutodetectError, "unknown machine name %s" % mach
     #
     if result.startswith('x86'):
         if sys.maxint == 2**63-1:
@@ -78,7 +81,9 @@
     #
     if result.startswith('arm'):
         from rpython.jit.backend.arm.detect import detect_float
-        assert detect_float(), 'the JIT-compiler requires a vfp unit'
+        if not detect_float():
+            raise ProcessorAutodetectError(
+                'the JIT-compiler requires a vfp unit')
     #
     return result
 
