X86: Implement the vectorcall calling convention
authorReid Kleckner <reid@kleckner.net>
Tue, 28 Oct 2014 01:29:26 +0000 (01:29 +0000)
committerReid Kleckner <reid@kleckner.net>
Tue, 28 Oct 2014 01:29:26 +0000 (01:29 +0000)
commit9ccce99e1d02975afe3c4d4cf2c154c6f154f3ff
treee817bf79e4eec6eaaead78448151a5717f143ee4
parent00917897b246cef0d5fa5fda28a03679788e224b
X86: Implement the vectorcall calling convention

This is a Microsoft calling convention that supports both x86 and x86_64
subtargets. It passes vector and floating point arguments in XMM0-XMM5,
and passes them indirectly once they are consumed.

Homogenous vector aggregates of up to four elements can be passed in
sequential vector registers, but this part is not implemented in LLVM
and will be handled in Clang.

On 32-bit x86, it is similar to fastcall in that it uses ecx:edx as
integer register parameters and is callee cleanup. On x86_64, it
delegates to the normal win64 calling convention.

Reviewers: majnemer

Differential Revision: http://reviews.llvm.org/D5943

llvm-svn: 220745
llvm/include/llvm/IR/CallingConv.h
llvm/lib/AsmParser/LLLexer.cpp
llvm/lib/AsmParser/LLParser.cpp
llvm/lib/AsmParser/LLToken.h
llvm/lib/IR/AsmWriter.cpp
llvm/lib/IR/Mangler.cpp
llvm/lib/Target/X86/X86CallingConv.h
llvm/lib/Target/X86/X86CallingConv.td
llvm/test/CodeGen/X86/vectorcall.ll [new file with mode: 0644]