From: Richard Henderson <rth@twiddle.net>
To: qemu-devel@nongnu.org
Cc: peter.maydell@linaro.org
Subject: [Qemu-devel] [PULL 4/5] target/hppa: Tidy do_cbranch
Date: Mon, 6 Feb 2017 18:32:28 -0800 [thread overview]
Message-ID: <20170207023229.29431-5-rth@twiddle.net> (raw)
In-Reply-To: <20170207023229.29431-1-rth@twiddle.net>
Removes some dead code detected by Covarity.
Reported-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Richard Henderson <rth@twiddle.net>
---
target/hppa/translate.c | 17 +++++------------
1 file changed, 5 insertions(+), 12 deletions(-)
diff --git a/target/hppa/translate.c b/target/hppa/translate.c
index 4d243f7..5d571f0 100644
--- a/target/hppa/translate.c
+++ b/target/hppa/translate.c
@@ -1433,7 +1433,6 @@ static ExitStatus do_cbranch(DisasContext *ctx, target_long disp, bool is_n,
target_ulong dest = iaoq_dest(ctx, disp);
TCGLabel *taken = NULL;
TCGCond c = cond->c;
- int which = 0;
bool n;
assert(ctx->null_cond.c == TCG_COND_NEVER);
@@ -1455,14 +1454,14 @@ static ExitStatus do_cbranch(DisasContext *ctx, target_long disp, bool is_n,
n = is_n && disp < 0;
if (n && use_nullify_skip(ctx)) {
nullify_set(ctx, 0);
- gen_goto_tb(ctx, which++, ctx->iaoq_n, ctx->iaoq_n + 4);
+ gen_goto_tb(ctx, 0, ctx->iaoq_n, ctx->iaoq_n + 4);
} else {
if (!n && ctx->null_lab) {
gen_set_label(ctx->null_lab);
ctx->null_lab = NULL;
}
nullify_set(ctx, n);
- gen_goto_tb(ctx, which++, ctx->iaoq_b, ctx->iaoq_n);
+ gen_goto_tb(ctx, 0, ctx->iaoq_b, ctx->iaoq_n);
}
gen_set_label(taken);
@@ -1471,23 +1470,17 @@ static ExitStatus do_cbranch(DisasContext *ctx, target_long disp, bool is_n,
n = is_n && disp >= 0;
if (n && use_nullify_skip(ctx)) {
nullify_set(ctx, 0);
- gen_goto_tb(ctx, which++, dest, dest + 4);
+ gen_goto_tb(ctx, 1, dest, dest + 4);
} else {
nullify_set(ctx, n);
- gen_goto_tb(ctx, which++, ctx->iaoq_b, dest);
+ gen_goto_tb(ctx, 1, ctx->iaoq_b, dest);
}
/* Not taken: the branch itself was nullified. */
if (ctx->null_lab) {
gen_set_label(ctx->null_lab);
ctx->null_lab = NULL;
- if (which < 2) {
- nullify_set(ctx, 0);
- gen_goto_tb(ctx, which, ctx->iaoq_b, ctx->iaoq_n);
- return EXIT_GOTO_TB;
- } else {
- return EXIT_IAQ_N_STALE;
- }
+ return EXIT_IAQ_N_STALE;
} else {
return EXIT_GOTO_TB;
}
--
2.9.3
next prev parent reply other threads:[~2017-02-07 2:33 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-07 2:32 [Qemu-devel] [PULL 0/5] target/hppa patch queue Richard Henderson
2017-02-07 2:32 ` [Qemu-devel] [PULL 1/5] linux-user: add hppa magic numbers in qemu-binfmt-conf.sh Richard Henderson
2017-02-07 2:32 ` [Qemu-devel] [PULL 2/5] linux-user: fix "apt-get update" on linux-user hppa Richard Henderson
2017-02-07 2:32 ` [Qemu-devel] [PULL 3/5] linux-user: define correct UTS machine name for hppa Richard Henderson
2017-02-07 2:32 ` Richard Henderson [this message]
2017-02-07 2:32 ` [Qemu-devel] [PULL 5/5] target/hppa: Fix gdb_write_register Richard Henderson
2017-02-07 2:42 ` [Qemu-devel] [PULL 0/5] target/hppa patch queue no-reply
2017-02-07 15:29 ` Peter Maydell
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=20170207023229.29431-5-rth@twiddle.net \
--to=rth@twiddle.net \
--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 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).