Skip to content

Commit

Permalink
Add an exception for vzeroall/vzeroupper on Windows
Browse files Browse the repository at this point in the history
These apparently blow the 20 intstruction limit with all the loads/stores.
  • Loading branch information
alexcrichton committed Jan 4, 2018
1 parent a3a825a commit 43039ef
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions stdsimd-test/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,13 @@ pub fn assert(fnptr: usize, fnname: &str, expected: &str) {
// cpuid returns a pretty big aggregate structure so excempt it from the
// slightly more restrictive 20 instructions below
"cpuid" => 30,

// Apparently on Windows LLVM generates a bunch of saves/restores of xmm
// registers around these intstructions which blows the 20 limit
// below. As it seems dictates by Windows's abi (I guess?) we probably
// can't do much about it...
"vzeroall" | "vzeroupper" if cfg!(windows) => 30,

_ => 20,
};
let probably_only_one_instruction =
Expand Down

0 comments on commit 43039ef

Please sign in to comment.