summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDavid Cole <david.cole1340@gmail.com>2022-03-13 12:30:06 +1300
committerEmilio Cobos Álvarez <emilio@crisal.io>2022-03-15 03:39:58 +0100
commit1b66dcf87692e455dc5e1603ca05d3f41b3f771b (patch)
treebedb23fcd1ea0b9263995a0a84e3d5506cdf3973 /tests
parent6a169f21344d541ab4790dee894d2cc9e51a0345 (diff)
Added support for `vectorcall` ABI
Diffstat (limited to 'tests')
-rw-r--r--tests/expectations/tests/win32-vectorcall-1_0.rs6
-rw-r--r--tests/expectations/tests/win32-vectorcall-nightly.rs16
-rw-r--r--tests/headers/win32-vectorcall-1_0.h3
-rw-r--r--tests/headers/win32-vectorcall-nightly.h3
4 files changed, 28 insertions, 0 deletions
diff --git a/tests/expectations/tests/win32-vectorcall-1_0.rs b/tests/expectations/tests/win32-vectorcall-1_0.rs
new file mode 100644
index 00000000..131dbdf3
--- /dev/null
+++ b/tests/expectations/tests/win32-vectorcall-1_0.rs
@@ -0,0 +1,6 @@
+#![allow(
+ dead_code,
+ non_snake_case,
+ non_camel_case_types,
+ non_upper_case_globals
+)]
diff --git a/tests/expectations/tests/win32-vectorcall-nightly.rs b/tests/expectations/tests/win32-vectorcall-nightly.rs
new file mode 100644
index 00000000..163741df
--- /dev/null
+++ b/tests/expectations/tests/win32-vectorcall-nightly.rs
@@ -0,0 +1,16 @@
+#![allow(
+ dead_code,
+ non_snake_case,
+ non_camel_case_types,
+ non_upper_case_globals
+)]
+#![cfg(feature = "nightly")]
+#![feature(abi_vectorcall)]
+
+extern "vectorcall" {
+ #[link_name = "\u{1}test_vectorcall@@16"]
+ pub fn test_vectorcall(
+ a: ::std::os::raw::c_int,
+ b: ::std::os::raw::c_int,
+ ) -> ::std::os::raw::c_int;
+}
diff --git a/tests/headers/win32-vectorcall-1_0.h b/tests/headers/win32-vectorcall-1_0.h
new file mode 100644
index 00000000..a1f852b5
--- /dev/null
+++ b/tests/headers/win32-vectorcall-1_0.h
@@ -0,0 +1,3 @@
+// bindgen-flags: --rust-target 1.0 -- --target=x86_64-pc-windows-msvc
+
+int __vectorcall test_vectorcall(int a, int b);
diff --git a/tests/headers/win32-vectorcall-nightly.h b/tests/headers/win32-vectorcall-nightly.h
new file mode 100644
index 00000000..c099bb59
--- /dev/null
+++ b/tests/headers/win32-vectorcall-nightly.h
@@ -0,0 +1,3 @@
+// bindgen-flags: --rust-target nightly --raw-line '#![cfg(feature = "nightly")]' --raw-line '#![feature(abi_vectorcall)]' -- --target=x86_64-pc-windows-msvc
+
+int __vectorcall test_vectorcall(int a, int b);