This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH][1/3] Re-submission of Altera Nios II port, gcc parts
- From: Chung-Lin Tang <cltang at codesourcery dot com>
- To: Bernd Schmidt <bernds at codesourcery dot com>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>, Sandra Loosemore <sandra at codesourcery dot com>, "Sidwell, Nathan" <Nathan_Sidwell at mentor dot com>, "Joseph S. Myers" <joseph at codesourcery dot com>, Richard Henderson <rth at redhat dot com>
- Date: Fri, 22 Nov 2013 23:53:24 +0800
- Subject: Re: [PATCH][1/3] Re-submission of Altera Nios II port, gcc parts
- Authentication-results: sourceware.org; auth=none
- References: <51E25932 dot 2060909 at codesourcery dot com> <525FF095 dot 5050207 at codesourcery dot com> <5287425C dot 6040207 at codesourcery dot com> <528F6AD7 dot 9010200 at codesourcery dot com>
On 13/11/22 10:31 PM, Bernd Schmidt wrote:
>> If you don't object, I'll keep the clobbers there for now.
>
> If they serve no purpose (and I think they don't), they should go.
I'll check again, but I remember df_regs_ever_live_p doesn't include the
RA reg if the call pattern doesn't have the clobber.
I see c6x doesn't have that clobber either, but checks crtl->is_leaf
instead in the frame layout. Looking across the backends, adding a
clobber appears to be the more usual style.
>>>>>> + if (!strncasecmp (cfg, "60-1", 4))
>>>>
>>>> strcmp, several times. At least judging by the docs allowing "60-1fish"
>>>> is unintentional?
>> I changed them to use strncmp instead. This routine has to work on a
>> possibly longer target attribute string, hence the 'n' variants.
>
> I don't understand this. Using strncmp matches "60-1" and any other
> string beginning with that prefix, but doesn't distinguish between them.
> If that really is the desired behaviour, it needs a comment, but it
> still looks to me as if this is just lacking proper error checking.
This has to work on target attribute strings, which it may be in the
middle of the string. But your right that the single option form may
allow the extended suffix, I'll fix this next.
>>>>>> +#define SC_REGNO (12)
>>>>>> +#define STATIC_CHAIN_REGNUM SC_REGNO
>>>>
>>>> There are a lot of these pairs, and it looks like unnecessary double
>>>> indirection. Lose the former in all cases. No parens around constants.
>> I've reorganized a lot of this in nios2.h.
>
> I'd prefer the new #if 0 blocks there to go away.
Argh, forgot to delete that. Thanks for catching.
I'll address the rest in the next revision.
Thanks,
Chung-Lin