[cfe-commits] [LLVMdev] [PATCH/RFC, PowerPC] Extend 32-bit function arguments / return values
Eli Friedman
eli.friedman at gmail.com
Mon Nov 5 10:52:06 PST 2012
On Mon, Nov 5, 2012 at 10:24 AM, Ulrich Weigand
<Ulrich.Weigand at de.ibm.com> wrote:
> Eli Friedman <eli.friedman at gmail.com> wrote on 01.11.2012 01:22:06:
>> On Wed, Oct 31, 2012 at 7:44 AM, Ulrich Weigand
>> <Ulrich.Weigand at de.ibm.com> wrote:
>> > I'm wondering how to proceed on this issue for now. Current status is
>> > that I've checked in the testsuite patch, since there was agreement
>> > that fixing the tests by adding target triples was the way to go.
>> > However, the actual fix to enable the sign-extensions required by
>> > the PowerPC64 ABI is not in, so we still generate code that violates
>> > the ABI.
>> >
>> > I understand that there is a long-term goal of having those extensions
>> > done in the front end instead of in LLVM. However, as far as I can
>> > see the necessary infrastructure is not yet fully present (or in any
>> > event, I don't see how to do it in the front end right now) ...
>> >
>> > Therefore, since my patch doesn't make moving to the new scheme
>> > any more difficult (it just does the same thing for "int" that is
>> > already being done for "short" and "char"), and it does fix the
>> > ABI bug we have right now, I'd propose to check it in now (and
>> > then move to new scheme with everyone else once it is ready).
>> >
>> > Would this be OK? Any other suggestions?
>> >
>> > For reference, the patch in question is appended again.
>>
>> Please factor out the check for whether an integer type needs to be
>> extended into a separate method.
>
> I've attached an updated patch. Is this what you intended?
Yes. LGTM.
>> Please make sure there's a testcase on the LLVM side to make sure we
>> actually handle the attributes correctly.
>
> Good point. In fact, as it happens, attributes on i32 *return values*
> were not handled correctly, but ignored completely. (The attributes
> are handled for arguments, which is why the clang patch actually fixed
> the failure I was seeing ...)
>
> I've just posted a patch to llvm-commmits to provide a testcase,
> and a fix for the attributes on return values:
> http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20121105/155181.html
Good.
-Eli
More information about the cfe-commits
mailing list