From: Mike Frysinger <vapier@gentoo.org>
To: Yoshinori Sato <ysato@users.sourceforge.jp>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH][RX] v2 instructions support
Date: Thu, 24 Dec 2015 07:35:00 -0000 [thread overview]
Message-ID: <20151224073552.GH25803@vapier.lan> (raw)
In-Reply-To: <1450719297-15073-1-git-send-email-ysato@users.sourceforge.jp>
[-- Attachment #1: Type: text/plain, Size: 1673 bytes --]
On 22 Dec 2015 02:34, Yoshinori Sato wrote:
> --- a/sim/rx/fpu.c
> +++ b/sim/rx/fpu.c
>
> +double sqrt(double x);
never declare your own prototype for system funcs. include math.h instead.
> +static FP_ExceptionCases ex_sqrt_tab[5][5] = {
please constify this. you might have to update check_exceptions too.
> + tprintf("sqrt(%g) = %g\n", da, sqrt(da));
space before the (. this comes up a few times in your patch, so please
fix them all.
> + /* Less than 0.49999 */
period at the end and two spaces:
/* Less than 0.49999. */
this comes up a few times in your patch, so please fix them all.
> + if (rx_big_endian)
> + {
> + put_be (buf, 8, acc.lo);
> + }
> + else
> + {
> + put_le (buf, 8, acc.lo);
> + }
no need for braces here
> + for(i = 0; i < 2; i++)
space before the (
> {
> - if (tag) { printf (tag); tag = 0; }
> - printf(" acc %016llx:", oldregs.r_acc);
> - printf("%016llx", regs.r_acc);
> - oldregs.r_acc = regs.r_acc;
> + if (oldregs.r_acc[i].hi != regs.r_acc[i].hi ||
> + oldregs.r_acc[i].lo != regs.r_acc[i].lo)
> + {
> + if (tag) { printf (tag); tag = 0; }
> + printf(" acc%d %08x%016lx:", i, oldregs.r_acc[i].hi,
> + oldregs.r_acc[i].lo);
> + printf("%08x%016lx", regs.r_acc[i].hi,
> + oldregs.r_acc[i].lo);
> + oldregs.r_acc[i] = regs.r_acc[i];
> + }
i know you aren't writing this code, but please fix the style in the process.
> +#define MULADD(val, s) \
the trailing \ style in these macros is inconsistent. if you don't want to
align them to 80 cols, then just put one space before them.
-mike
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2015-12-24 7:35 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-21 17:35 Yoshinori Sato
2015-12-21 17:35 ` [PATCH][RX] Add instraction testcase Yoshinori Sato
2015-12-24 7:41 ` Mike Frysinger
2015-12-24 7:35 ` Mike Frysinger [this message]
2015-12-25 14:20 [PATCH][RX] v2 instructions support Yoshinori Sato
2015-12-25 16:57 ` Mike Frysinger
2015-12-27 8:51 Yoshinori Sato
2015-12-27 21:55 ` Mike Frysinger
2015-12-28 12:34 ` Yoshinori Sato
2016-01-06 2:43 ` DJ Delorie
2016-01-06 8:23 ` Yoshinori Sato
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=20151224073552.GH25803@vapier.lan \
--to=vapier@gentoo.org \
--cc=gdb-patches@sourceware.org \
--cc=ysato@users.sourceforge.jp \
/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