[X86] Better support for the MCU psABI (LLVM part)
authorMichael Kuperstein <michael.m.kuperstein@intel.com>
Mon, 28 Dec 2015 14:39:21 +0000 (14:39 +0000)
committerMichael Kuperstein <michael.m.kuperstein@intel.com>
Mon, 28 Dec 2015 14:39:21 +0000 (14:39 +0000)
commit651ff526af3b1a2eaaef8ab1bbbd38abfb17bc78
tree985ed4dd31b850e539ba5da6a3b69ef5018b9aa6
parent058ac9c6df46b203df85b976e09f32d3e14a5a81
[X86] Better support for the MCU psABI (LLVM part)

This adds support for the MCU psABI in a way different from r251223 and r251224,
basically reverting most of these two patches. The problem with the approach
taken in r251223/4 is that it only handled libcalls that originated from the backend.
However, the mid-end also inserts quite a few libcalls and assumes these use the
platform's default calling convention.

The previous patch tried to insert inregs when necessary both in the FE and,
somewhat hackily, in the CG. Instead, we now define a new default calling convention
for the MCU, which doesn't use inreg marking at all, similarly to what x86-64 does.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256494 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Target/TargetCallingConv.h
include/llvm/Target/TargetLowering.h
lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
lib/CodeGen/SelectionDAG/TargetLowering.cpp
lib/Target/X86/X86CallingConv.h
lib/Target/X86/X86CallingConv.td
lib/Target/X86/X86FastISel.cpp
lib/Target/X86/X86ISelLowering.cpp
lib/Target/X86/X86ISelLowering.h
test/CodeGen/X86/mcu-abi.ll