Skip to content

Commit

Permalink
Use pointer size check to disable sysimg -cx16 detection on 32-bit
Browse files Browse the repository at this point in the history
  • Loading branch information
staticfloat committed Oct 19, 2018
1 parent 0789f91 commit cf544e6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/processor_x86.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -715,7 +715,10 @@ 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;
// We also track to see if the sysimg allows -cx16, however if the user does
// something silly like add +cx16 on a 32bit target, we want to disable this
// check, hence the pointer size check.
bool sysimg_allows_no_cx16 = sizeof(void *) == 4;;
for (auto &t: sysimg) {
if (auto nname = normalize_cpu_name(t.name)) {
t.name = nname;
Expand Down

0 comments on commit cf544e6

Please sign in to comment.