Skip to content

Commit

Permalink
Throw extremely specific error if CX16 is unsupported when it shoul…
Browse files Browse the repository at this point in the history
…d be.
  • Loading branch information
staticfloat committed Oct 19, 2018
1 parent d5d01ef commit 0789f91
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/processor_x86.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -715,10 +715,20 @@ static uint32_t sysimg_init_cb(const void *id)
// We translate `generic` to `pentium4` or `x86-64` before sending it to LLVM
// (see `get_llvm_target_noext`) which will be serialized into the sysimg target data.
// Translate them back so we can actually match them.
bool sysimg_allows_no_cx16 = false;
for (auto &t: sysimg) {
if (auto nname = normalize_cpu_name(t.name)) {
t.name = nname;
}

// Take note to see if the sysimg explicitly allows an architecture without cx16
sysimg_allows_no_cx16 |= !test_nbit(t.en.features, Feature::cx16);
}
if (!sysimg_allows_no_cx16 && !test_nbit(target.en.features, Feature::cx16)) {
jl_error("Your CPU does not support the CX16 instruction, which is required "
"by this version of Julia! This is often due to running inside of a "
"virtualized environment. Please read "
"https://docs.julialang.org/en/stable/devdocs/sysimg/ for more.");
}
auto match = match_sysimg_targets(sysimg, target, max_vector_size);
// Now we've decided on which sysimg version to use.
Expand Down

0 comments on commit 0789f91

Please sign in to comment.