[PATCH, m68k] Fix PR target/41302

Maxim Kuvyrkov maxim@codesourcery.com
Tue Nov 3 09:00:00 GMT 2009


Maxim Kuvyrkov wrote:
> Jeff Law wrote:
>> On 10/30/09 04:14, Maxim Kuvyrkov wrote:
>>> The attached patch fixes <gcc.gnu.org/PR41302>.
>>>
>>> As described in the PR, the problem is in m68k_ok_for_sibcall_p() 
>>> allowing sibcalls of functions that return the result in a different 
>>> location (register A0) from what the current function expects 
>>> (register D0).
>>>
>>> This patch ports similar code from the arm backend, and also handles 
>>> a specific to m68k case when the result is returned in both D0 and A0 
>>> registers.
>>>
>>> Tested on coldfire-elf with no regressions on gcc, g++ and libstdc++ 
>>> testsuites.  OK for trunk?
>>>
>>> Thanks,
>>>
>> The way you've written the condition below is somewhat odd and it's 
>> bloody hard to see the empty statement semi-colon in the if-clause.
> 
> Noted.
...
> While making the changes I've spotted a couple of quirks in the patch, 
> and now I'm testing an updated version.  Will follow up once the tests 
> are finished.

Here is an updated version.  Turned out that testing on coldfire-elf was 
of little relevance as ABI of cf-elf is different from cf-linux (cf-elf 
always returns result in D0).  So I've fixed the patch to handle 
different ABIs correctly and updated the testcase.

Tested on coldfire-linux, ok to check in?

-- 
Maxim Kuvyrkov
CodeSourcery
maxim@codesourcery.com
(650) 331-3385 x724
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: fsf-gcc-sibcall-fix.ChangeLog
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20091103/96827f9a/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: fsf-gcc-sibcall-fix.patch
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20091103/96827f9a/attachment-0001.ksh>


More information about the Gcc-patches mailing list