[PATCH, i386]: FIx PR target/12329, x86: local function declared with attribute((regparm(3))) gets corrupted parent frame pointer
Uros Bizjak
ubizjak@gmail.com
Sat Mar 22 19:46:00 GMT 2008
H.J. Lu wrote:
>> +
>> +int test_nested (int i)
>> +{
>> + int __attribute__ ((__noinline__, __regparm__(3))) foo (int j, int k, int l)
>> + {
>> + return i + j + k + l;
>> + }
>>
>
> The problem is nested function with regparm, not stack realign.
> Nested function and regparm use ecx for different purposes. We
> should limit regparm here.
>
OK, I'll just reject regparm(3) in nested functions and leave
__force_align_arg_pointer__ to be fixed by stack branch merge. I'll
leave both functions in the testcase (XFAILed until merge), just in case.
Thanks,
Uros.
More information about the Gcc-patches
mailing list