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: Fri, 25 Dec 2015 16:57:00 -0000 [thread overview]
Message-ID: <20151225165708.GS25803@vapier.lan> (raw)
In-Reply-To: <1451053193-27204-1-git-send-email-ysato@users.sourceforge.jp>
[-- Attachment #1: Type: text/plain, Size: 3359 bytes --]
On 25 Dec 2015 23:19, Yoshinori Sato wrote:
> +rxfp_fsqrt (fp_t fa)
> ...
> + tprintf("sqrt(%g) = %g\n", da, sqrt(da));
> +
> + double_to_fp (sqrt(da), &c);
needs space before the ( -- comes up three times here
> +void
> +get_acc (int id, acc_t *acc)
> {
> + if (id >= 2)
> + abort ();
> + *acc = regs.r_acc[id];
> + if (trace > 0)
> + printf ("get_reg (%s) = %08x%016lx\n", reg_names[acc0 + id], acc->hi, acc->lo);
don't you want to use tprintf ?
> +put_acc (int id, acc_t *acc)
> {
> + if (id >= 2)
> + abort ();
> + if (trace > 0)
> + printf ("put_reg (%s) = %08x%016lx\n", reg_names[acc0 + id], acc->hi, acc->lo);
same here
> + {
> + if (tag) { printf (tag); tag = 0; }
need to unwrap this:
if (tag)
{
printf (tag);
tag = NULL;
}
> +#define MULADD(val, s) \
> +{ \
> + get_acc (opcode->op[0].reg - 32, &acc); \
these macro bodies are indented by one space when they should start at two
> +#define MULSUB(val, s) \
> +{ \
> + get_acc (opcode->op[0].reg - 32, &acc); \
same here
> +#define MULACC(val, s) \
> +{ \
> + sll = val; \
same here
> +#define RAC(add, pl, ml) \
> +{ \
> + get_acc (opcode->op[0].reg - 32, &acc); \
and here
> + case RXO_emaca:
> + MULADD((long long)GS2 () * (long long)GS (), 0)
> +
> + case RXO_emsba:
> + MULSUB((long long)GS2 () * (long long)GS (), 0)
space before the (
> + tprintf ("(int) %g = %d\n", int2float(ma), mb);
space before the ( -- see int2float
> + tprintf ("(int) %g = %d\n", int2float(ma), mb);
same here
> case RXO_machi:
> + MULADD((long long)(signed short)(GS() >> 16) *
> + (long long)(signed short)(GS2 () >> 16), 16)
> +
> + case RXO_maclh:
> + MULADD((long long)(signed short)(GS()) *
> + (long long)(signed short)(GS2 () >> 16), 16)
>
> case RXO_maclo:
> + MULADD((long long)(signed short)(GS()) *
> + (long long)(signed short)(GS2 ()), 16)
comes up a few times here w/ MULADD & GS
> + case RXO_msbhi:
> + MULSUB((long long)(signed short)(GS() >> 16) *
> + (long long)(signed short)(GS2 () >> 16), 16)
> +
> + case RXO_msblh:
> + MULSUB((long long)(signed short)(GS()) *
> + (long long)(signed short)(GS2 () >> 16), 16)
> +
> + case RXO_msblo:
> + MULSUB((long long)(signed short)(GS()) *
> + (long long)(signed short)(GS2 ()), 16)
>
> case RXO_mulhi:
> + MULACC((long long)(signed short)(GS() >> 16) *
> + (long long)(signed short)(GS2 () >> 16), 16)
> + case RXO_mullh:
> + MULACC((long long)(signed short)(GS()) *
> + (long long)(signed short)(GS2 () >> 16), 16)
>
> case RXO_mullo:
> + MULACC((long long)(signed short)(GS()) *
> + (long long)(signed short)(GS2 ()), 16)
and here w/ MULSUB & GS & MULACC
> case RXO_racw:
> + RAC(0x80000000ULL, 0x00007fff00000000ULL, 0xffff800000000000ULL)
> +
> + case RXO_rdacw:
> + RAC(0, 0x00007fff00000000ULL, 0xffffffff80000000ULL)
> +
> + case RXO_racl:
> + RAC(0x80000000ULL, 0x7fffffff00000000ULL, 0xffffffff80000000ULL)
> +
> + case RXO_rdacl:
> + RAC(0, 0x7fffffff00000000ULL, 0xffff800000000000ULL)
and here w/ RAC
-mike
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2015-12-25 16:57 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-25 14:20 Yoshinori Sato
2015-12-25 14:20 ` [PATCH][RX] instructions test set Yoshinori Sato
2015-12-25 17:04 ` Mike Frysinger
2015-12-25 16:57 ` Mike Frysinger [this message]
-- strict thread matches above, loose matches on Subject: below --
2015-12-27 8:51 [PATCH][RX] v2 instructions support 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
2015-12-21 17:35 Yoshinori Sato
2015-12-24 7:35 ` Mike Frysinger
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=20151225165708.GS25803@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