All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <f4bug@amsat.org>
To: Aleksandar Markovic <aleksandar.qemu.devel@gmail.com>,
	qemu-devel@nongnu.org
Cc: aleksandar.rikalo@syrmia.com
Subject: Re: [PATCH v2 1/2] target/mips: Remove identical if/else branches
Date: Tue, 30 Jun 2020 19:22:55 +0200	[thread overview]
Message-ID: <6310afed-4750-394f-bc89-ddbda0d41447@amsat.org> (raw)
In-Reply-To: <20200630164653.24880-2-aleksandar.qemu.devel@gmail.com>

On 6/30/20 6:46 PM, Aleksandar Markovic wrote:
> Remove the segment:
> 
>       if (other_tc == other->current_tc) {
>           tccause = other->CP0_Cause;
>       } else {
>           tccause = other->CP0_Cause;
>       }
> 
> Original contributor can't remember what was his intention.
> 
> Bug: 1885718

The format documented in the wiki is:

Fixes: 5a25ce9487 ("mips: Hook in more reg accesses via mttr/mftr")
Buglink: https://bugs.launchpad.net/qemu/+bug/1885718

See:
https://wiki.qemu.org/Contribute/SubmitAPatch#Write_a_meaningful_commit_message

> Signed-off-by: Aleksandar Markovic <aleksandar.qemu.devel@gmail.com>
> ---
>  target/mips/cp0_helper.c | 9 +--------
>  1 file changed, 1 insertion(+), 8 deletions(-)
> 
> diff --git a/target/mips/cp0_helper.c b/target/mips/cp0_helper.c
> index bbf12e4a97..de64add038 100644
> --- a/target/mips/cp0_helper.c
> +++ b/target/mips/cp0_helper.c
> @@ -375,16 +375,9 @@ target_ulong helper_mftc0_entryhi(CPUMIPSState *env)
>  target_ulong helper_mftc0_cause(CPUMIPSState *env)
>  {
>      int other_tc = env->CP0_VPEControl & (0xff << CP0VPECo_TargTC);
> -    int32_t tccause;
>      CPUMIPSState *other = mips_cpu_map_tc(env, &other_tc);
>  
> -    if (other_tc == other->current_tc) {
> -        tccause = other->CP0_Cause;
> -    } else {
> -        tccause = other->CP0_Cause;
> -    }
> -
> -    return tccause;
> +    return other->CP0_Cause;
>  }
>  
>  target_ulong helper_mftc0_status(CPUMIPSState *env)
> 



  reply	other threads:[~2020-06-30 17:23 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-30 16:46 [PATCH v2 0/2] target mips: Misc fixes and improvements Aleksandar Markovic
2020-06-30 16:46 ` [PATCH v2 1/2] target/mips: Remove identical if/else branches Aleksandar Markovic
2020-06-30 17:22   ` Philippe Mathieu-Daudé [this message]
2020-06-30 16:46 ` [PATCH v2 2/2] MAINTAINERS: Adjust MIPS maintainership Aleksandar Markovic
2020-06-30 17:19   ` Philippe Mathieu-Daudé
2020-07-01  8:00     ` Philippe Mathieu-Daudé
2020-07-01  8:48       ` Philippe Mathieu-Daudé
2020-07-01 11:05         ` chen huacai
2020-07-01 13:53           ` Aleksandar Markovic
2020-07-01 15:46             ` Paolo Bonzini
2020-07-01 15:38   ` Philippe Mathieu-Daudé
2020-07-01 15:39   ` Philippe Mathieu-Daudé
2020-07-01 20:11   ` Aurelien Jarno
2020-07-01 21:37     ` Aleksandar Markovic

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=6310afed-4750-394f-bc89-ddbda0d41447@amsat.org \
    --to=f4bug@amsat.org \
    --cc=aleksandar.qemu.devel@gmail.com \
    --cc=aleksandar.rikalo@syrmia.com \
    --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.