From: Joel Brobecker <brobecker@adacore.com>
To: Anthony Green <green@moxielogic.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [Patch, moxie, sim] Add new sign-extension instructions
Date: Mon, 07 Apr 2014 16:48:00 -0000 [thread overview]
Message-ID: <20140407164840.GC4250@adacore.com> (raw)
In-Reply-To: <87ppkzjbsd.fsf@moxielogic.com>
> I'm committing the following patch that adds support for two new
> sign-extension instructions to the moxie simulator. Binutils and GCC
> changes have already been committed.
>
> Thanks,
>
> AG
>
> 2014-04-02 Anthony Green <green@moxielogic.com>
>
> * interp.c (sim_resume): Add new sign-extend instructions.
Small comment: Would you mind adding an empty line between the local
variable declarations and the first statement after that? This is
part of the GDB Coding Style and the sim code is part of GDB. Eg:
> - case 0x10: /* bad */
> - case 0x11: /* bad */
> + case 0x10: /* sex.b */
> + {
> + int a = (inst >> 4) & 0xf;
> + int b = inst & 0xf;
> + signed char bv = cpu.asregs.regs[b];
Add an empty line here.
> + TRACE("sex.b");
> + cpu.asregs.regs[a] = (int) bv;
> + }
> + break;
> + case 0x11: /* sex.s */
> + {
> + int a = (inst >> 4) & 0xf;
> + int b = inst & 0xf;
> + signed short bv = cpu.asregs.regs[b];
And here as well.
> + TRACE("sex.s");
> + cpu.asregs.regs[a] = (int) bv;
> + }
> + break;
> case 0x12: /* bad */
> case 0x13: /* bad */
> case 0x14: /* bad */
Thank you!
--
Joel
next prev parent reply other threads:[~2014-04-07 16:48 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-03 4:08 Anthony Green
2014-04-07 16:48 ` Joel Brobecker [this message]
2014-04-08 23:15 ` 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=20140407164840.GC4250@adacore.com \
--to=brobecker@adacore.com \
--cc=gdb-patches@sourceware.org \
--cc=green@moxielogic.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