From: Richard Henderson <rth@twiddle.net>
To: "Chen Gang" <xili_gchen_5257@hotmail.com>,
"Andreas Färber" <afaerber@suse.de>,
"Chris Metcalf" <cmetcalf@ezchip.com>,
"Peter Maydell" <peter.maydell@linaro.org>,
"Riku Voipio" <riku.voipio@iki.fi>,
"walt@tilera.com" <walt@tilera.com>
Cc: qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH v3] Execute _start and reach to the first function call successfully
Date: Mon, 16 Mar 2015 08:31:40 -0700 [thread overview]
Message-ID: <5506F75C.6060205@twiddle.net> (raw)
In-Reply-To: <BLU437-SMTP25F3E8ED2ECC012B08FFF5B9040@phx.gbl>
On 03/13/2015 11:03 PM, Chen Gang wrote:
> +static void decode_rrr_1_opcode_y0(struct DisasContext *dc,
> + tilegx_bundle_bits bundle)
> +{
> + switch (get_RRROpcodeExtension_Y0(bundle)) {
> + case UNARY_RRR_1_OPCODE_Y0:
> + switch (get_UnaryOpcodeExtension_Y0(bundle)) {
> + case FNOP_UNARY_OPCODE_Y0:
> + if (!get_SrcA_Y0(bundle) && !get_Dest_Y0(bundle)) {
> + gen_fnop();
> + return;
> + }
> + break;
> + default:
> + break;
> + }
> + break;
> + default:
> + break;
> + }
> +
> + qemu_log_mask(LOG_UNIMP, "UNIMP rrr_1_opcode_y0, %16.16llx\n", bundle);
> + dc->exception = TILEGX_EXCP_OPCODE_UNIMPLEMENT;
> +}
I think it would be helpful if, in the first patch, you put all of the opcode
symbols into the proper place in the switch statements. That way it's easy to
tell at a glance what has yet to be implemented. For instance, for this
function you'd put
$ grep _UNARY opcode_tilegx.h | grep _Y0
CNTLZ_UNARY_OPCODE_Y0 = 1,
CNTTZ_UNARY_OPCODE_Y0 = 2,
FNOP_UNARY_OPCODE_Y0 = 3,
FSINGLE_PACK1_UNARY_OPCODE_Y0 = 4,
NOP_UNARY_OPCODE_Y0 = 5,
PCNT_UNARY_OPCODE_Y0 = 6,
REVBITS_UNARY_OPCODE_Y0 = 7,
REVBYTES_UNARY_OPCODE_Y0 = 8,
TBLIDXB0_UNARY_OPCODE_Y0 = 9,
TBLIDXB1_UNARY_OPCODE_Y0 = 10,
TBLIDXB2_UNARY_OPCODE_Y0 = 11,
TBLIDXB3_UNARY_OPCODE_Y0 = 12,
in the get_UnaryOpcodeExtension_Y0 switch statement and
$ grep _RRR_1 opcode_tilegx.h | grep _Y0
SHL1ADD_RRR_1_OPCODE_Y0 = 0,
SHL2ADD_RRR_1_OPCODE_Y0 = 1,
SHL3ADD_RRR_1_OPCODE_Y0 = 2,
UNARY_RRR_1_OPCODE_Y0 = 3,
in the get_RRROpcodeExtension_Y0 switch statement.
Likewise with all of the other "decode" functions that contain a switch.
> + qemu_log("fnop\n");
> + qemu_log("addi r%d, r%d, %d\n", rdst, rsrc, imm8);
Again, use qemu_log_mask(CPU_LOG_TB_IN_ASM).
r~
next prev parent reply other threads:[~2015-03-16 15:31 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-14 6:03 [Qemu-devel] [PATCH v3] Execute _start and reach to the first function call successfully Chen Gang
2015-03-15 23:45 ` Peter Maydell
2015-03-15 23:57 ` Chen Gang
2015-03-16 15:37 ` Richard Henderson
2015-03-17 23:02 ` Chen Gang
2015-03-16 15:31 ` Richard Henderson [this message]
2015-03-17 22:57 ` Chen Gang
[not found] <5503CF33.9070601@hotmail.com>
2015-03-15 14:19 ` Chen Gang
2015-03-15 16:50 ` Andreas Färber
2015-03-15 23:08 ` Chen Gang
2015-03-15 23:44 ` Peter Maydell
2015-03-15 23:52 ` Chen Gang
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=5506F75C.6060205@twiddle.net \
--to=rth@twiddle.net \
--cc=afaerber@suse.de \
--cc=cmetcalf@ezchip.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=riku.voipio@iki.fi \
--cc=walt@tilera.com \
--cc=xili_gchen_5257@hotmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.