[pypy-issue] [issue1068] PyPy crashes without SSE2, an error message would be better.
tracker at bugs.pypy.org
Wed Feb 22 11:56:03 CET 2012
New submission from Daid <daid303 at gmail.com>:
Currently, PyPy crashes without a proper error if you try to use it on an older
machine without SSE2 instructions. You can translate PyPy without SSE2, but I'm
providing a pre-packaged PyPy package which crashed for one of my users.
A simple check for SSE2 at startup would have saved a lot of headache on both
For GCC you can detect SSE2 support with the following code:
#if defined(__GNUC__) and defined(__i486__)
//Read the CPU features.
asm("mov $1, %%eax\n"
"mov %%edx, %0"
: "=r"(features) : : "%eax", "%ebx", "%edx", "%ecx");
//Check bit 26, this indicates SSE2 support
if ((features & (1 << 26) == 0)
fprintf(strerr, "No SSE2 support, cannot continue\n");
For MSVC it should be similar, but I'm not familiar with MSVC inline ASM.
nosy: Daid, pypy-issue
title: PyPy crashes without SSE2, an error message would be better.
PyPy bug tracker <tracker at bugs.pypy.org>
More information about the pypy-issue