[PATCH] D15055: [X86] Better support for the MCU psABI

Michael Kuperstein via cfe-commits cfe-commits at lists.llvm.org
Sun Nov 29 04:32:55 PST 2015


mkuper created this revision.
mkuper added reviewers: rnk, rafael, DavidKreitzer.
mkuper added a subscriber: cfe-commits.

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 is that it only handled libcalls that originated from the backend. However, the midend also inserts quite a few libcalls and - with good reason - 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. This patch (and its clang companion patch) goes in a different direction. It defines a new default calling convention for the MCU, which doesn't use inreg marking at all, similarly to what, say, x86-64 does.

The LLVM part of this patch is D15054.

http://reviews.llvm.org/D15055

Files:
  lib/CodeGen/TargetInfo.cpp
  test/CodeGen/x86_32-arguments-iamcu.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D15055.41348.patch
Type: text/x-patch
Size: 10873 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20151129/19272de2/attachment-0001.bin>


More information about the cfe-commits mailing list