This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch,AVR]: Fix PR45099


Denis Chertykov schrieb:
> 2011/5/6 Georg-Johann Lay <avr@gjlay.de>:
>> Nathan Froyd schrieb:
>>> On Mon, May 02, 2011 at 05:23:48PM +0200, Georg-Johann Lay wrote:
>>>> PR45099 is an extension that gives an error when a fixed register is
>>>> needed to pass a parameter to a function.
>>>>
>>>> Because the program will show malfunction when such code is generated,
>>>> anyway, I think an error is more appropriate than a warning (as
>>>> proposed in the PR).
>>> This seems like something that should be handled by common code.
>>>
>>> -Nathan
>> Yes, I agree. However, common code it too complicated for me to run
>> tests for, so I restrict myself to avr backend.
>>
>> Until such a test will find its way into common code, it might still
>> be useful in avr backend. I think this has quite low priority for
>> other targets because global registers are not very common in, e.g. i386.
>>
> 
> I think that better to have this patch.
> So, I approve it.

Ok, applied it as it was:
http://gcc.gnu.org/viewcvs?view=revision&revision=173791

> George, please make a working testcase against the trunk and post a
> GCC core bug.

How should such a testcase look like, and for what target? This is
highly target and ABI dependent. Moreover, the patch above just tests
for argument registers, not return registers.

Basically, I think of someone is hacking with global registers, he
must know what he is doing. There will always be cases where global
regs might violate some things if one is not careful.

Johann

> 
> Denis.
> 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]