All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
To: Paolo Bonzini <pbonzini@redhat.com>, qemu-devel@nongnu.org
Cc: qemu-trivial@nongnu.org
Subject: Re: [Qemu-trivial] [Qemu-devel] [PATCH] target-tricore: fix depositing bits from PCXI into ICR
Date: Thu, 25 Jun 2015 16:53:04 +0200	[thread overview]
Message-ID: <558C15D0.40302@mail.uni-paderborn.de> (raw)
In-Reply-To: <1435147270-1040-1-git-send-email-pbonzini@redhat.com>

On 06/24/2015 02:01 PM, Paolo Bonzini wrote:
> Spotted by Coverity, because (env->PCXI & MASK_PCXI_PCPN) >> 24
> is always zero.  The immediately preceding assignment is also
> wrong though.
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>   target-tricore/op_helper.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/target-tricore/op_helper.c b/target-tricore/op_helper.c
> index 10ed541..53edbda 100644
> --- a/target-tricore/op_helper.c
> +++ b/target-tricore/op_helper.c
> @@ -2545,10 +2545,10 @@ void helper_rfm(CPUTriCoreState *env)
>       env->PC = (env->gpr_a[11] & ~0x1);
>       /* ICR.IE = PCXI.PIE; */
>       env->ICR = (env->ICR & ~MASK_ICR_IE) |
> -               ((env->PCXI & ~MASK_PCXI_PIE) >> 15);
> +               ((env->PCXI & MASK_PCXI_PIE) >> 15);
>       /* ICR.CCPN = PCXI.PCPN; */
>       env->ICR = (env->ICR & ~MASK_ICR_CCPN) |
> -               ((env->PCXI & ~MASK_PCXI_PCPN) >> 24);
> +               ((env->PCXI & MASK_PCXI_PCPN) >> 24);
>       /* {PCXI, PSW, A[10], A[11]} = M(DCX, 4 * word); */
>       env->PCXI = cpu_ldl_data(env, env->DCX);
>       psw_write(env, cpu_ldl_data(env, env->DCX+4));
Thanks, applied it to my tricore-next branch.

Cheers,
Bastian


WARNING: multiple messages have this Message-ID (diff)
From: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
To: Paolo Bonzini <pbonzini@redhat.com>, qemu-devel@nongnu.org
Cc: qemu-trivial@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] target-tricore: fix depositing bits from PCXI into ICR
Date: Thu, 25 Jun 2015 16:53:04 +0200	[thread overview]
Message-ID: <558C15D0.40302@mail.uni-paderborn.de> (raw)
In-Reply-To: <1435147270-1040-1-git-send-email-pbonzini@redhat.com>

On 06/24/2015 02:01 PM, Paolo Bonzini wrote:
> Spotted by Coverity, because (env->PCXI & MASK_PCXI_PCPN) >> 24
> is always zero.  The immediately preceding assignment is also
> wrong though.
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>   target-tricore/op_helper.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/target-tricore/op_helper.c b/target-tricore/op_helper.c
> index 10ed541..53edbda 100644
> --- a/target-tricore/op_helper.c
> +++ b/target-tricore/op_helper.c
> @@ -2545,10 +2545,10 @@ void helper_rfm(CPUTriCoreState *env)
>       env->PC = (env->gpr_a[11] & ~0x1);
>       /* ICR.IE = PCXI.PIE; */
>       env->ICR = (env->ICR & ~MASK_ICR_IE) |
> -               ((env->PCXI & ~MASK_PCXI_PIE) >> 15);
> +               ((env->PCXI & MASK_PCXI_PIE) >> 15);
>       /* ICR.CCPN = PCXI.PCPN; */
>       env->ICR = (env->ICR & ~MASK_ICR_CCPN) |
> -               ((env->PCXI & ~MASK_PCXI_PCPN) >> 24);
> +               ((env->PCXI & MASK_PCXI_PCPN) >> 24);
>       /* {PCXI, PSW, A[10], A[11]} = M(DCX, 4 * word); */
>       env->PCXI = cpu_ldl_data(env, env->DCX);
>       psw_write(env, cpu_ldl_data(env, env->DCX+4));
Thanks, applied it to my tricore-next branch.

Cheers,
Bastian

  reply	other threads:[~2015-06-25 14:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-24 12:01 [Qemu-trivial] [PATCH] target-tricore: fix depositing bits from PCXI into ICR Paolo Bonzini
2015-06-24 12:01 ` [Qemu-devel] " Paolo Bonzini
2015-06-25 14:53 ` Bastian Koppelmann [this message]
2015-06-25 14:53   ` Bastian Koppelmann

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=558C15D0.40302@mail.uni-paderborn.de \
    --to=kbastian@mail.uni-paderborn.de \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@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.