From: Marek Vasut <marex@denx.de>
To: Richard Henderson <rth@twiddle.net>, qemu-devel@nongnu.org
Cc: Jeff Da Silva <jdasilva@altera.com>,
Chris Wulff <crwulff@gmail.com>,
Sandra Loosemore <sandra@codesourcery.com>,
Yves Vandervennet <yvanderv@altera.com>,
Ley Foon Tan <lftan@altera.com>
Subject: Re: [Qemu-devel] [PATCH V9 2/7] nios2: Add architecture emulation support
Date: Wed, 18 Jan 2017 22:53:53 +0100 [thread overview]
Message-ID: <fc449570-00f0-55f6-f93f-24264ad6ff4f@denx.de> (raw)
In-Reply-To: <ecaca869-7e29-850b-d3dd-a5dd94d0b670@twiddle.net>
On 01/18/2017 08:33 PM, Richard Henderson wrote:
> On 01/16/2017 04:44 PM, Marek Vasut wrote:
>> + TCGv_i32 tmp = tcg_const_i32(instr.imm5 + 32);
>> + gen_helper_mmu_write(dc->cpu_env, tmp, load_gpr(dc, instr.a));
>> + tcg_temp_free_i32(tmp);
>> +#endif
>> + break;
>> + }
>> +
>> + default:
>> + tcg_gen_mov_tl(dc->cpu_R[instr.imm5 + 32], load_gpr(dc,
>> instr.a));
>> + break;
>> + }
>> +
>> + /* If interrupts were enabled using WRCTL, trigger them. */
>> +#if !defined(CONFIG_USER_ONLY)
>> + if ((instr.imm5 + 32) == CR_STATUS) {
>
> Did you want CR_BASE here instead of hard-coding 32?
Fixed
>> +static const char *regnames[] = {
>
> const char * const
>
>> + "reserved", "reserved", "reserved", "reserved",
>> + "reserved", "reserved", "reserved", "reserved",
>> + "reserved", "reserved", "reserved", "reserved",
>> + "reserved", "reserved", "reserved", "reserved",
>
> You might as well number them, e.g. resXX, to make it obvious in the
> dumps what's happening.
Hm, OK
>> + if (num_insns + 1 == max_insns && (tb->cflags & CF_LAST_IO)) {
>> + gen_io_start();
>> + }
>
> num_insns has already be incremented; don't + 1 here.
OK
>> + && qemu_log_in_addr_range(tb->pc)) {
>> + qemu_log("IN: %s\n", lookup_symbol(tb->pc));
>> + log_target_disas(cs, tb->pc, dc->pc - tb->pc, 0);
>> + qemu_log("\n");
>> + }
>
> qemu_log_lock / qemu_log_unlock around the dump.
OK
--
Best regards,
Marek Vasut
next prev parent reply other threads:[~2017-01-18 22:02 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-17 0:44 [Qemu-devel] [PATCH 0/7] Nios2 architecture support Marek Vasut
2017-01-17 0:44 ` [Qemu-devel] [PATCH V4 1/7] nios2: Add disas entries Marek Vasut
2017-01-17 0:44 ` [Qemu-devel] [PATCH V9 2/7] nios2: Add architecture emulation support Marek Vasut
2017-01-18 19:33 ` Richard Henderson
2017-01-18 21:53 ` Marek Vasut [this message]
2017-01-17 0:44 ` [Qemu-devel] [PATCH V5 3/7] nios2: Add usermode binaries emulation Marek Vasut
2017-01-17 0:44 ` [Qemu-devel] [PATCH V5 4/7] nios2: Add IIC interrupt controller emulation Marek Vasut
2017-01-17 0:44 ` [Qemu-devel] [PATCH V5 5/7] nios2: Add periodic timer emulation Marek Vasut
2017-01-17 0:44 ` [Qemu-devel] [PATCH V6 6/7] nios2: Add Altera 10M50 GHRD emulation Marek Vasut
2017-01-17 0:44 ` [Qemu-devel] [PATCH V5 7/7] nios2: Add support for Nios-II R1 Marek Vasut
2017-01-18 19:35 ` Richard Henderson
2017-01-18 21:46 ` Marek Vasut
2017-01-17 10:10 ` [Qemu-devel] [PATCH 0/7] Nios2 architecture support Alexander Graf
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=fc449570-00f0-55f6-f93f-24264ad6ff4f@denx.de \
--to=marex@denx.de \
--cc=crwulff@gmail.com \
--cc=jdasilva@altera.com \
--cc=lftan@altera.com \
--cc=qemu-devel@nongnu.org \
--cc=rth@twiddle.net \
--cc=sandra@codesourcery.com \
--cc=yvanderv@altera.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 NNTP newsgroup(s).