Author: Stefano Rivera <stef...@rivera.za.net> Branch: release-pypy3.6-v7.x Changeset: r97720:6042bdab85aa Date: 2019-10-04 10:58 +0300 http://bitbucket.org/pypy/pypy/changeset/6042bdab85aa/
Log: Handle ProcessorAutodetectError in _pypyjson.simd (grafted from f3edc9623b51656f56f4a855327e77103050ef9e) diff --git a/pypy/module/_pypyjson/simd.py b/pypy/module/_pypyjson/simd.py --- a/pypy/module/_pypyjson/simd.py +++ b/pypy/module/_pypyjson/simd.py @@ -1,7 +1,7 @@ from rpython.rtyper.lltypesystem import lltype, rffi from rpython.rlib import objectmodel, unroll from rpython.rlib.rarithmetic import r_uint, intmask, LONG_BIT -from rpython.jit.backend.detect_cpu import autodetect +from rpython.jit.backend.detect_cpu import autodetect, ProcessorAutodetectError # accelerators for string operations using simd on regular word sizes (*not* # SSE instructions). this style is sometimes called SWAR (SIMD Within A @@ -15,8 +15,11 @@ WORD_SIZE = 8 EVERY_BYTE_ONE = 0x0101010101010101 EVERY_BYTE_HIGHEST_BIT = 0x8080808080808080 - if autodetect() == "x86-64": - USE_SIMD = True + try: + if autodetect() == "x86-64": + USE_SIMD = True + except ProcessorAutodetectError: + pass else: WORD_SIZE = 4 EVERY_BYTE_ONE = 0x01010101 _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit