diff options
| author | Amanieu d'Antras <amanieu@gmail.com> | 2021-07-20 20:02:22 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-07-20 20:02:22 +0100 |
| commit | 335bc4960980becdaf29bb7dd70aad81210d1830 (patch) | |
| tree | 47c4aab8ea0648376fc54ed3cbdbf396ad5bf02f /library/stdarch/crates/assert-instr-macro/src | |
| parent | bfb3f78b6b66a306663b727323fd0c29e538b1b7 (diff) | |
| download | rust-335bc4960980becdaf29bb7dd70aad81210d1830.tar.gz rust-335bc4960980becdaf29bb7dd70aad81210d1830.zip | |
Force the use of sysv64 calling convention in x86_64 disassembly tests (#1187)
This ensures that results are consistent across windows/linux tests.
Diffstat (limited to 'library/stdarch/crates/assert-instr-macro/src')
| -rw-r--r-- | library/stdarch/crates/assert-instr-macro/src/lib.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/library/stdarch/crates/assert-instr-macro/src/lib.rs b/library/stdarch/crates/assert-instr-macro/src/lib.rs index ef76c1c0d42..5b25df7035f 100644 --- a/library/stdarch/crates/assert-instr-macro/src/lib.rs +++ b/library/stdarch/crates/assert-instr-macro/src/lib.rs @@ -114,7 +114,12 @@ pub fn assert_instr( // Use an ABI on Windows that passes SIMD values in registers, like what // happens on Unix (I think?) by default. let abi = if cfg!(windows) { - syn::LitStr::new("vectorcall", proc_macro2::Span::call_site()) + let target = std::env::var("TARGET").unwrap(); + if target.contains("x86_64") { + syn::LitStr::new("sysv64", proc_macro2::Span::call_site()) + } else { + syn::LitStr::new("vectorcall", proc_macro2::Span::call_site()) + } } else { syn::LitStr::new("C", proc_macro2::Span::call_site()) }; |
