Skip to content

Don't use SSE on freestanding #3536

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 26, 2019
Merged

Don't use SSE on freestanding #3536

merged 1 commit into from
Oct 26, 2019

Conversation

pixelherodev
Copy link
Contributor

A better solution might be to have an option to disable/enable SSE/SIMD within the current scope, but this at least results in functional code.

@LemonBoy
Copy link
Contributor

Ideally -mllvm -mattr=-sse should work too.

@andrewrk
Copy link
Member

I think it's time to prioritize #2883

@andrewrk andrewrk merged commit d91fc0f into ziglang:master Oct 26, 2019
@pixelherodev pixelherodev deleted the freestanding_no_sse branch October 27, 2019 01:59
@andrewrk
Copy link
Member

andrewrk commented Oct 27, 2019

@pixelherodev can you do the equivalent changes here?

zig/src/codegen.cpp

Lines 8766 to 8783 in 8af6c7e

if (g->zig_target->is_native) {
if (target_supports_clang_march_native(g->zig_target)) {
args.append("-march=native");
}
} else {
args.append("-target");
args.append(buf_ptr(&g->llvm_triple_str));
if (target_is_musl(g->zig_target) && target_is_riscv(g->zig_target)) {
// Musl depends on atomic instructions, which are disabled by default in Clang/LLVM's
// cross compilation CPU info for RISCV.
// TODO: https://github.com/ziglang/zig/issues/2883
args.append("-Xclang");
args.append("-target-feature");
args.append("-Xclang");
args.append(riscv_default_features);
}
}

These are for flags passed to C.

@andrewrk
Copy link
Member

done in f2d0d98

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants