mirror of
https://github.com/rust-lang/rust.git
synced 2025-06-19 02:57:33 +00:00

We move the vectorcall ABI tests into their own file which is now only run on x86-64, while replacing them with rust-cold ABI tests so that aarch64 hosts continue to test an unstable ABI. A better solution might be cross-compiling or something but I really don't have time for that right now.
28 lines
1.2 KiB
Rust
28 lines
1.2 KiB
Rust
#![feature(abi_vectorcall)]
|
|
//@ only-x86_64
|
|
|
|
//@ is "$.index[?(@.name=='AbiVectorcall')].inner.type_alias.type.function_pointer.header.abi.Other" '"\"vectorcall\""'
|
|
pub type AbiVectorcall = extern "vectorcall" fn();
|
|
|
|
//@ is "$.index[?(@.name=='AbiVectorcallUnwind')].inner.type_alias.type.function_pointer.header.abi.Other" '"\"vectorcall-unwind\""'
|
|
pub type AbiVectorcallUnwind = extern "vectorcall-unwind" fn();
|
|
|
|
//@ has "$.index[?(@.name=='Foo')]"
|
|
pub struct Foo;
|
|
|
|
impl Foo {
|
|
//@ is "$.index[?(@.name=='abi_vectorcall')].inner.function.header.abi.Other" '"\"vectorcall\""'
|
|
pub extern "vectorcall" fn abi_vectorcall() {}
|
|
|
|
//@ is "$.index[?(@.name=='abi_vectorcall_unwind')].inner.function.header.abi.Other" '"\"vectorcall-unwind\""'
|
|
pub extern "vectorcall-unwind" fn abi_vectorcall_unwind() {}
|
|
}
|
|
|
|
pub trait Bar {
|
|
//@ is "$.index[?(@.name=='trait_abi_vectorcall')].inner.function.header.abi.Other" '"\"vectorcall\""'
|
|
extern "vectorcall" fn trait_abi_vectorcall() {}
|
|
|
|
//@ is "$.index[?(@.name=='trait_abi_vectorcall_unwind')].inner.function.header.abi.Other" '"\"vectorcall-unwind\""'
|
|
extern "vectorcall-unwind" fn trait_abi_vectorcall_unwind() {}
|
|
}
|