From: "'Rask Ingemann Lambertsen'" <rask@sygehus.dk>
To: Pompapathi V Gadad <Pompapathi.V.Gadad@nsc.com>
Cc: Pompapathi V Gadad <pompapathi@gmail.com>, gcc-patches@gcc.gnu.org
Subject: Re: [Patch] New: CR16 port
Date: Sat, 21 Jul 2007 14:33:00 -0000 [thread overview]
Message-ID: <20070721120910.GC5690@sygehus.dk> (raw)
In-Reply-To: <469B62DD.305@nsc.com>
On Mon, Jul 16, 2007 at 05:51:49PM +0530, Pompapathi V Gadad wrote:
> Please review the patch and comment.
This time around, I have only comments on the formatting. See also
<URL:http://www.gnu.org/prep/standards/standards.html.gz#Formatting> and
<URL:http://gcc.gnu.org/codingconventions.html>. I have not commented on
every place where the formatting doesn't follow the coding conventions, so
you should make a pass over the whole file, looking for the sort of things I
have commented on.
> Index: config/cr16/cr16.h
> ===================================================================
> --- config/cr16/cr16.h (revision 0)
> +++ config/cr16/cr16.h (revision 0)
...
> +#define FUNCTION_BOUNDARY (!optimize_size? BIGGEST_ALIGNMENT : BITS_PER_WORD)
> +
> +/* Biggest alignment on CR16C+ is 32-bit as internal bus is AMBA based
> + * where as CR16C is proprietary internal bus architecture. */
> +#define BIGGEST_ALIGNMENT ((TARGET_CR16CP)?32:16)
We want a space on both sides of ? and :.
> +/* Check if sizes are same and then check if it is possible to rename */
> +#define HARD_REGNO_RENAME_OK(SRC, DEST) \
> + ( ( ((SRC >= CR16_FIRST_DWORD_REGISTER) \
> + && (DEST >= CR16_FIRST_DWORD_REGISTER)) \
> + || ((SRC < CR16_FIRST_DWORD_REGISTER) \
> + && (DEST < CR16_FIRST_DWORD_REGISTER)) \
> + ) \
> + ?!cr16_interrupt_function_p() || (df_regs_ever_live_p(DEST)) \
> + : 0 \
> + )
We also want a space after the function name in function calls.
> +#define REGNO_OK_FOR_BASE_P(REGNO) \
> + ((REGNO) < FIRST_PSEUDO_REGISTER \
> + || (reg_renumber && (unsigned)reg_renumber[REGNO] < FIRST_PSEUDO_REGISTER))
> +
> +/* TODO: For now lets not support index addressing mode. */
> +#define REGNO_OK_FOR_INDEX_P(REGNO) \
> + ( ((REGNO >= CR16_FIRST_DWORD_REGISTER) \
> + && ((REGNO) < FIRST_PSEUDO_REGISTER)) \
> + || (reg_renumber \
> + && ( ((unsigned)reg_renumber[REGNO] >= CR16_FIRST_DWORD_REGISTER) \
> + && ((unsigned)reg_renumber[REGNO] < FIRST_PSEUDO_REGISTER)))\
> + )
Spaces after type casts.
> +#define SIGNED_INT_FITS_N_BITS(imm, N) \
> + ((((imm) < ((long long)1<<((N)-1))) && ((imm) >= -((long long)1<<((N)-1)))) ? 1 : 0)
> +
> +#define UNSIGNED_INT_FITS_N_BITS(imm, N) \
> + (((imm) < ((long long)1<<(N)) && (imm) >= (long long)0) ? 1 : 0)
Spaces around << and - also (except in e.g. foo = -bar;) and preferably
no more than 80 characters per line.
> Index: config/cr16/cr16.c
> ===================================================================
> --- config/cr16/cr16.c (revision 0)
> +++ config/cr16/cr16.c (revision 0)
...
> + /* Now prepare the instruction operands */
> + if ( word_cnt > 0)
...
> + if (push_or_pop == 1)
and
> + strcat(temp_str, one_inst_str);
> +
> + /* Add the pop instruction list */
> + strcat (return_str, temp_str);
Inconsistent formatting.
> + /* If there is no need in push and adjustment to sp, return. */
Comments should be formatted with two spaces after each period.
--
Rask Ingemann Lambertsen
next prev parent reply other threads:[~2007-07-21 12:09 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-10 7:11 Gadad, Pompapathi V
2007-07-11 23:41 ` Rask Ingemann Lambertsen
2007-07-13 9:22 ` Pompapathi V Gadad
2007-07-13 15:23 ` Rask Ingemann Lambertsen
2007-07-14 4:00 ` Pompapathi V Gadad
2007-07-16 9:14 ` Pompapathi V Gadad
2007-07-16 12:25 ` 'Rask Ingemann Lambertsen'
2007-07-16 13:01 ` Pompapathi V Gadad
2007-07-16 13:08 ` Pompapathi V Gadad
2007-07-20 9:48 ` Pompapathi V Gadad
2007-07-21 14:33 ` 'Rask Ingemann Lambertsen' [this message]
2007-07-25 9:40 ` Pompapathi V Gadad
2007-07-30 8:33 ` 'Rask Ingemann Lambertsen'
2007-07-30 9:14 ` Pompapathi V Gadad
2007-08-03 13:03 ` 'Rask Ingemann Lambertsen'
2007-08-06 4:44 ` Pompapathi V Gadad
2007-08-06 10:43 ` 'Rask Ingemann Lambertsen'
2007-08-06 10:49 ` Pompapathi V Gadad
2007-07-21 12:20 ` 'Rask Ingemann Lambertsen'
2007-07-13 15:56 ` Rask Ingemann Lambertsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070721120910.GC5690@sygehus.dk \
--to=rask@sygehus.dk \
--cc=Pompapathi.V.Gadad@nsc.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=pompapathi@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).