This is an archive of the discontinued LLVM Phabricator instance.

[dfsan] New calling convention for custom functions with variadic arguments.
ClosedPublic

Authored by pcc on Oct 29 2014, 12:56 PM.

Details

Summary

The previous calling convention prevented custom functions from being able
to access argument labels unless it knew how many variadic arguments there
were, and of which type. This restriction made it impossible to correctly
model functions in the printf family, as it is legal to pass more arguments
than required to those functions. We now pass arguments in the following order:

non-vararg arguments
labels for non-vararg arguments
[if vararg function, pointer to array of labels for vararg arguments]
[if non-void function, pointer to label for return value]
vararg arguments

Diff Detail

Repository
rL LLVM

Event Timeline

pcc updated this revision to Diff 15553.Oct 29 2014, 12:56 PM
pcc retitled this revision from to [dfsan] New calling convention for custom functions with variadic arguments..
pcc updated this object.
pcc edited the test plan for this revision. (Show Details)
pcc added a reviewer: martignlo.
pcc added a subscriber: Unknown Object (MLST).
pcc closed this revision.Oct 30 2014, 6:33 AM
pcc updated this revision to Diff 15570.

Closed by commit rL220906 (authored by @pcc).