This is an archive of the discontinued LLVM Phabricator instance.

[X86] Better support for the MCU psABI
ClosedPublic

Authored by mkuper on Nov 29 2015, 4:32 AM.

Details

Summary

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.

Diff Detail

Repository
rL LLVM

Event Timeline

mkuper updated this revision to Diff 41348.Nov 29 2015, 4:32 AM
mkuper retitled this revision from to [X86] Better support for the MCU psABI.
mkuper updated this object.
mkuper added reviewers: rnk, rafael, DavidKreitzer.
mkuper added a subscriber: cfe-commits.
rnk accepted this revision.Dec 27 2015, 8:31 PM
rnk edited edge metadata.

lgtm

lib/CodeGen/TargetInfo.cpp
838 ↗(On Diff #41348)

formatting seems off

1256–1257 ↗(On Diff #41348)

formatting

This revision is now accepted and ready to land.Dec 27 2015, 8:31 PM
This revision was automatically updated to reflect the committed changes.