about summary refs log tree commit diff
path: root/library/stdarch/crates/assert-instr-macro/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'library/stdarch/crates/assert-instr-macro/src/lib.rs')
-rw-r--r--library/stdarch/crates/assert-instr-macro/src/lib.rs7
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())
     };