Allow specification of the system V AMD64 ABI constraint.

This can be specified using `extern sysV64 fn` on all platforms
This commit is contained in:
CensoredUsername 2016-06-27 02:34:02 +02:00
parent 71ee82a8aa
commit 516519ee9a
4 changed files with 5 additions and 0 deletions

View file

@ -539,6 +539,7 @@ This is currently hidden behind the `abi_vectorcall` gate and is subject to chan
* `system`
* `C`
* `win64`
* `sysV64`
Most of the abis in this list are self-explanatory, but the `system` abi may
seem a little odd. This constraint selects whatever the appropriate ABI is for

View file

@ -42,6 +42,7 @@ pub enum CallConv {
ColdCallConv = 9,
X86StdcallCallConv = 64,
X86FastcallCallConv = 65,
X86_64_SysV = 78,
X86_64_Win64 = 79,
X86_VectorCall = 80
}

View file

@ -269,6 +269,7 @@ impl FnType {
Vectorcall => llvm::X86_VectorCall,
C => llvm::CCallConv,
Win64 => llvm::X86_64_Win64,
SysV64 => llvm::X86_64_SysV,
// These API constants ought to be more specific...
Cdecl => llvm::CCallConv,

View file

@ -39,6 +39,7 @@ pub enum Abi {
Vectorcall,
Aapcs,
Win64,
SysV64,
// Multiplatform ABIs second
Rust,
@ -86,6 +87,7 @@ const AbiDatas: &'static [AbiData] = &[
AbiData {abi: Abi::Vectorcall, name: "vectorcall"},
AbiData {abi: Abi::Aapcs, name: "aapcs" },
AbiData {abi: Abi::Win64, name: "win64" },
AbiData {abi: Abi::SysV64, name: "sysV64" },
// Cross-platform ABIs
//