You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Am I using the new CpuFeature interface wrong or is this a bug?
Neither of them! Running the code trough a LLVM build with the assertions enabled gives some more hints:
llvm::SDValue llvm::X86TargetLowering::ConvertCmpIfNecessary(llvm::SDValue, llvm::SelectionDAG&) const: Assertion `Subtarget.hasLAHFSAHF() && "Target doesn't support SAHF or FCOMI?"' failed.
You've chosen a target so feature-poor that this particular combination of instructions cannot be lowered (or nobody was bothered enough to implement it).
You can easily solve the problem by picking another base such as i686 (it's just i386 plus cx8 and cmov, the latter helps to sidestep this problem (check out LLVM's ConvertCmpIfNecessary for more info)).
Hello, I'm migrating my project to master to prepare for 0.6.0.
I'd like to build my project with the least possible cpu features enabled, the default
pentium4
hassse2
which my project doesn't support right now.from
lib/std/target.zig
line 478So with the following change to
build.zig
:The compiler crashes:
I've pushed that code to a separate branch here: https://github.com/jzck/kernel-zig/tree/0.6.0 if you want to reproduce.
Am I using the new CpuFeature interface wrong or is this a bug?
The text was updated successfully, but these errors were encountered: