You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Specify the target limits for target-specific ABIs
This specifies the restrictions on which target-specific ABIs are
available. These are defined in `rustc` in [`is_abi_supported`] and
the associated `AbiMap`.
Some of these are currently only implemented as future incompatibly
warnings via `unsupported_calling_conventions`. I'm fine with just not
acknowledging that and saying what the intent is.
This is split off from rust-lang#1948
with the intent of separating out the changes.
[`is_abi_supported`]: https://github.com/rust-lang/rust/blob/eec6bd9d69832f57341c6de6a93fa7b9f47e2111/compiler/rustc_target/src/spec/mod.rs#L2610-L2613
Edited-by: TC
There are also some platform-specific ABI strings:
131
131
132
132
r[items.extern.abi.cdecl]
133
-
*`unsafe extern "cdecl"` -- The default for x86\_32 C code.
133
+
*`unsafe extern "cdecl"` -- The default for x86_32 C code.
134
+
* Only available on x86_32 targets.
134
135
135
136
r[items.extern.abi.stdcall]
136
-
*`unsafe extern "stdcall"` -- The default for the Win32 API on x86\_32.
137
+
*`unsafe extern "stdcall"` -- The default for the Win32 API on x86_32.
138
+
* Only available on x86_32 targets.
137
139
138
140
r[items.extern.abi.win64]
139
-
*`unsafe extern "win64"` -- The default for C code on x86\_64 Windows.
141
+
*`unsafe extern "win64"` -- The default for C code on x86_64 Windows.
142
+
* Only available on x86_64 targets.
140
143
141
144
r[items.extern.abi.sysv64]
142
-
*`unsafe extern "sysv64"` -- The default for C code on non-Windows x86\_64.
145
+
*`unsafe extern "sysv64"` -- The default for C code on non-Windows x86_64.
146
+
* Only available on x86_64 targets.
143
147
144
148
r[items.extern.abi.aapcs]
145
149
*`unsafe extern "aapcs"` -- The default for ARM.
150
+
* Only available on ARM32 targets.
146
151
147
152
r[items.extern.abi.fastcall]
148
153
*`unsafe extern "fastcall"` -- The `fastcall` ABI -- corresponds to MSVC's
149
-
`__fastcall` and GCC and clang's `__attribute__((fastcall))`
154
+
`__fastcall` and GCC and clang's `__attribute__((fastcall))`.
155
+
* Only available on x86_32 targets.
150
156
151
157
r[items.extern.abi.thiscall]
152
-
*`unsafe extern "thiscall"` -- The default for C++ member functions on x86\_32 MSVC -- corresponds to MSVC's
153
-
`__thiscall` and GCC and clang's `__attribute__((thiscall))`
158
+
*`unsafe extern "thiscall"` -- The default for C++ member functions on x86_32 MSVC -- corresponds to MSVC's`__thiscall` and GCC and clang's `__attribute__((thiscall))`.
159
+
* Only available on x86_32 targets.
154
160
155
161
r[items.extern.abi.efiapi]
156
162
*`unsafe extern "efiapi"` -- The ABI used for [UEFI] functions.
163
+
* Only available on x86 and ARM targets (32bit and 64bit).
157
164
158
165
r[items.extern.abi.platform-unwind-variants]
159
166
Like `"C"` and `"system"`, most platform-specific ABI strings also have a [corresponding `-unwind` variant][unwind-behavior]; specifically, these are:
0 commit comments