diff options
| author | Soveu <marx.tomasz@gmail.com> | 2023-09-14 23:21:39 +0200 |
|---|---|---|
| committer | Soveu <marx.tomasz@gmail.com> | 2023-09-14 23:21:39 +0200 |
| commit | eea6149e03401c4a94a213112fb0694e3f44991b (patch) | |
| tree | 49ac7b17f3d237867f26a7c3ef579eee34b97697 /compiler/rustc_target/src/spec | |
| parent | ccf817b9bbe449204a227430d0a84a4f1d1798cc (diff) | |
| download | rust-eea6149e03401c4a94a213112fb0694e3f44991b.tar.gz rust-eea6149e03401c4a94a213112fb0694e3f44991b.zip | |
Enable varargs support for AAPCS calling convention
This is the default calling convention for ARM - it is used for extern "C", therefore it supports varargs.
Diffstat (limited to 'compiler/rustc_target/src/spec')
| -rw-r--r-- | compiler/rustc_target/src/spec/abi.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/rustc_target/src/spec/abi.rs b/compiler/rustc_target/src/spec/abi.rs index 956a5cb5c2f..a99cccd42c4 100644 --- a/compiler/rustc_target/src/spec/abi.rs +++ b/compiler/rustc_target/src/spec/abi.rs @@ -68,7 +68,7 @@ pub enum Abi { impl Abi { pub fn supports_varargs(self) -> bool { // * C and Cdecl obviously support varargs. - // * C can be based on SysV64 or Win64, so they must support varargs. + // * C can be based on Aapcs, SysV64 or Win64, so they must support varargs. // * EfiApi is based on Win64 or C, so it also supports it. // // * Stdcall does not, because it would be impossible for the callee to clean @@ -79,6 +79,7 @@ impl Abi { match self { Self::C { .. } | Self::Cdecl { .. } + | Self::Aapcs { .. } | Self::Win64 { .. } | Self::SysV64 { .. } | Self::EfiApi => true, |
