@@ -11,6 +11,15 @@ pub enum Abi {
1111 // N.B., this ordering MUST match the AbiDatas array below.
1212 // (This is ensured by the test indices_are_correct().)
1313
14+ // Multiplatform / generic ABIs
15+ //
16+ // These ABIs come first because every time we add a new ABI, we
17+ // have to re-bless all the hashing tests. These are used in many
18+ // places, so giving them stable values reduces test churn. The
19+ // specific values are meaningless.
20+ Rust = 0 ,
21+ C = 1 ,
22+
1423 // Single platform ABIs
1524 Cdecl ,
1625 Stdcall ,
@@ -27,8 +36,6 @@ pub enum Abi {
2736 EfiApi ,
2837
2938 // Multiplatform / generic ABIs
30- Rust ,
31- C ,
3239 System ,
3340 RustIntrinsic ,
3441 RustCall ,
@@ -49,6 +56,9 @@ pub struct AbiData {
4956
5057#[ allow( non_upper_case_globals) ]
5158const AbiDatas : & [ AbiData ] = & [
59+ // Cross-platform ABIs
60+ AbiData { abi : Abi :: Rust , name : "Rust" , generic : true } ,
61+ AbiData { abi : Abi :: C , name : "C" , generic : true } ,
5262 // Platform-specific ABIs
5363 AbiData { abi : Abi :: Cdecl , name : "cdecl" , generic : false } ,
5464 AbiData { abi : Abi :: Stdcall , name : "stdcall" , generic : false } ,
@@ -64,8 +74,6 @@ const AbiDatas: &[AbiData] = &[
6474 AbiData { abi : Abi :: AmdGpuKernel , name : "amdgpu-kernel" , generic : false } ,
6575 AbiData { abi : Abi :: EfiApi , name : "efiapi" , generic : false } ,
6676 // Cross-platform ABIs
67- AbiData { abi : Abi :: Rust , name : "Rust" , generic : true } ,
68- AbiData { abi : Abi :: C , name : "C" , generic : true } ,
6977 AbiData { abi : Abi :: System , name : "system" , generic : true } ,
7078 AbiData { abi : Abi :: RustIntrinsic , name : "rust-intrinsic" , generic : true } ,
7179 AbiData { abi : Abi :: RustCall , name : "rust-call" , generic : true } ,
0 commit comments