llvmpipe: Set "+64bit" for X86_64
Without this, on some "buggy" qemu cpu setup, LLVM could crash
if LLVM detects the wrong CPU type.
Fixes: f92cadccc6 ("llvmpipe: Always using util_get_cpu_caps to get cpu caps for llvm on x86")
Signed-off-by: Lepton Wu <lepton@chromium.org>
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27539>
(cherry picked from commit 04d26ceb0a87ca9e05a00405e2544f256e8e046c)
This commit is contained in:
parent
73b955965b
commit
9b2d95ab13
2 changed files with 8 additions and 1 deletions
|
|
@ -1154,7 +1154,7 @@
|
|||
"description": "llvmpipe: Set \"+64bit\" for X86_64",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "f92cadccc65128fdaa54e59ba40dcf75e90a25dd",
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -416,6 +416,13 @@ lp_build_create_jit_compiler_for_module(LLVMExecutionEngineRef *OutJIT,
|
|||
* so we do not use llvm::sys::getHostCPUFeatures to detect cpu features
|
||||
* but using util_get_cpu_caps() instead.
|
||||
*/
|
||||
#if DETECT_ARCH_X86_64
|
||||
/*
|
||||
* Without this, on some "buggy" qemu cpu setup, LLVM could crash
|
||||
* if LLVM detects the wrong CPU type.
|
||||
*/
|
||||
MAttrs.push_back("+64bit");
|
||||
#endif
|
||||
MAttrs.push_back(util_get_cpu_caps()->has_sse ? "+sse" : "-sse" );
|
||||
MAttrs.push_back(util_get_cpu_caps()->has_sse2 ? "+sse2" : "-sse2" );
|
||||
MAttrs.push_back(util_get_cpu_caps()->has_sse3 ? "+sse3" : "-sse3" );
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue