All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Henderson <rth@twiddle.net>
To: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>,
	qemu-devel@nongnu.org
Cc: peter.maydell@linaro.org
Subject: Re: [Qemu-devel] [PATCH 2/5] target-tricore: Add instructions of ABS, ABSB opcode format
Date: Sat, 27 Sep 2014 18:30:27 -0700	[thread overview]
Message-ID: <542764B3.2040000@twiddle.net> (raw)
In-Reply-To: <1411829891-24866-3-git-send-email-kbastian@mail.uni-paderborn.de>

On 09/27/2014 07:58 AM, Bastian Koppelmann wrote:
 +    env->gpr_a[2] = cpu_ldl_data(env, ea+8);
> +    env->gpr_a[3] = cpu_ldl_data(env, ea+12);
> +    env->gpr_d[0]  = cpu_ldl_data(env, ea+16);
> +    env->gpr_d[1]  = cpu_ldl_data(env, ea+20);
> +    env->gpr_d[2] = cpu_ldl_data(env, ea+24);

Watch the extra spaces.

> +static void gen_ld_2regs_64(TCGv rh, TCGv rl, TCGv address, DisasContext *ctx)
> +{
> +    TCGv_i64 temp = tcg_temp_new_i64();
> +
> +    tcg_gen_qemu_ld_i64(temp, address, ctx->mem_idx, MO_LEQ);
> +    /* write back to two 32 bit regs */
> +    tcg_gen_trunc_i64_i32(rl, temp);
> +    tcg_gen_shri_i64(temp, temp, 32);
> +    tcg_gen_trunc_i64_i32(rh, temp);

tcg_gen_extr_i64_i32(rl, rh, temp)

> +/* ABSB-format */
> +    case OPC1_32_ABSB_ST_T:
> +        address = MASK_OP_ABS_OFF18(ctx->opcode);
> +        int8_t b = MASK_OP_ABSB_B(ctx->opcode);
> +        int32_t bpos = MASK_OP_ABSB_BPOS(ctx->opcode);

You're not supposed to be relying on c99 mixed code and declarations.


r~

  reply	other threads:[~2014-09-28  1:30 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-27 14:58 [Qemu-devel] [PATCH 0/5] Add TriCore ABS, ABSB, B, BIT, BO instructions Bastian Koppelmann
2014-09-27 14:58 ` [Qemu-devel] [PATCH 1/5] target-tricore: Cleanup and Bugfixes Bastian Koppelmann
2014-09-28  6:18   ` Richard Henderson
2014-09-27 14:58 ` [Qemu-devel] [PATCH 2/5] target-tricore: Add instructions of ABS, ABSB opcode format Bastian Koppelmann
2014-09-28  1:30   ` Richard Henderson [this message]
2014-09-27 14:58 ` [Qemu-devel] [PATCH 3/5] target-tricore: Add instructions of B " Bastian Koppelmann
2014-09-28  1:35   ` Richard Henderson
2014-09-27 14:58 ` [Qemu-devel] [PATCH 4/5] target-tricore: Add instructions of BIT " Bastian Koppelmann
2014-09-28  5:22   ` Richard Henderson
2014-09-28 12:05     ` Bastian Koppelmann
2014-09-28 13:27       ` Peter Maydell
2014-09-27 14:58 ` [Qemu-devel] [PATCH 5/5] target-tricore: Add instructions of BO " Bastian Koppelmann
2014-09-28  6:17   ` Richard Henderson

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=542764B3.2040000@twiddle.net \
    --to=rth@twiddle.net \
    --cc=kbastian@mail.uni-paderborn.de \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /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.