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 1/6 v7] target-tilegx: Firstly add TILE-Gx with minimized features
Date: Fri, 20 Mar 2015 10:45:05 -0700 [thread overview]
Message-ID: <550C5CA1.1080400@twiddle.net> (raw)
In-Reply-To: <BLU436-SMTP203AB0D74C49183DAB329B6B90E0@phx.gbl>
On 03/20/2015 08:25 AM, Chen Gang wrote:
> +/*
> + * The related functional description for bfextu in isa document:
> + *
> + * uint64_t mask = 0;
> + * mask = (-1ULL) ^ ((-1ULL << ((BFEnd - BFStart) & 63)) << 1);
> + * uint64_t rot_src = (((uint64_t) rf[SrcA]) >> BFStart)
> + * | (rf[SrcA] << (64 - BFStart));
> + * rf[Dest] = rot_src & mask;
> + */
> +static void gen_bfextu(struct DisasContext *dc, uint8_t rdst, uint8_t rsrc,
> + int8_t start, int8_t end)
> +{
> + uint64_t mask = (-1ULL) ^ ((-1ULL << ((end - start) & 63)) << 1);
> + TCGv tmp = dest_gr(dc, rdst);
> +
> + qemu_log_mask(CPU_LOG_TB_IN_ASM, "bfextu r%d, r%d, %d, %d\n",
> + rdst, rsrc, start, end);
> +
> + tcg_gen_rotli_i64(tmp, load_gr(dc, rsrc), start);
Wrong direction rotate: rotri.
> +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 NOP_UNARY_OPCODE_Y0:
> + case FNOP_UNARY_OPCODE_Y0:
> + if (!get_SrcA_Y0(bundle) && !get_Dest_Y0(bundle)) {
> + gen_fnop();
> + return;
> + }
> + break;
> + case CNTLZ_UNARY_OPCODE_Y0:
> + case CNTTZ_UNARY_OPCODE_Y0:
> + case FSINGLE_PACK1_UNARY_OPCODE_Y0:
> + case PCNT_UNARY_OPCODE_Y0:
> + case REVBITS_UNARY_OPCODE_Y0:
> + case REVBYTES_UNARY_OPCODE_Y0:
> + case TBLIDXB0_UNARY_OPCODE_Y0:
> + case TBLIDXB1_UNARY_OPCODE_Y0:
> + case TBLIDXB2_UNARY_OPCODE_Y0:
> + case TBLIDXB3_UNARY_OPCODE_Y0:
> + default:
> + break;
> + }
> + break;
> + case SHL1ADD_RRR_1_OPCODE_Y0:
> + case SHL2ADD_RRR_1_OPCODE_Y0:
> + case SHL3ADD_RRR_1_OPCODE_Y0:
> + case RRR_1_OPCODE_Y0:
RRR_1_OPCODE_Y0 doesn't belong. It's the main opcode that brought us here.
> + default:
> + break;
> + }
> +
> + qemu_log_mask(LOG_UNIMP, "UNIMP rrr_1_opcode_y0, [" TARGET_FMT_lx "]\n",
> + (uint64_t)bundle);
Eh, TARGET_FMT_lx is tied to TARGET_LONG_BITS, and you're not using target_long
but uint64_t. I think it would be better to use "%016" PRIx64 directly, or
create your own macro for this file.
r~
next prev parent reply other threads:[~2015-03-20 17:45 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <550C3B78.3050802@hotmail.com>
2015-03-20 15:25 ` [Qemu-devel] [PATCH 1/6 v7] target-tilegx: Firstly add TILE-Gx with minimized features Chen Gang
2015-03-20 17:45 ` Richard Henderson [this message]
2015-03-20 23:32 ` Chen Gang
2015-03-20 17:48 ` Peter Maydell
2015-03-20 22:52 ` Chen Gang
2015-03-20 23:30 ` Peter Maydell
2015-03-20 23:57 ` Chen Gang
2015-03-21 17:33 ` Peter Maydell
2015-03-21 22:57 ` Chen Gang
2015-03-20 15:26 ` [Qemu-devel] [PATCH 2/6 v7] linux-user: tilegx: Firstly add architecture related features Chen Gang
2015-03-20 15:26 ` [Qemu-devel] [PATCH 3/6 v7] linux-user: tilegx: Add target features support within qemu Chen Gang
2015-03-20 15:27 ` [Qemu-devel] [PATCH 4/6 v7] linux-user: Support tilegx architecture in syscall Chen Gang
2015-03-20 15:28 ` [Qemu-devel] [PATCH 5/6 v7] linux-user: Support tilegx architecture in linux-user Chen Gang
2015-03-20 15:29 ` [Qemu-devel] [PATCH 6/6 v7] linux-user/syscall.c: conditionalize syscalls which are not defined in tilegx 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=550C5CA1.1080400@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 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).