From: "tip-bot2 for Julien Thierry" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: Julien Thierry <jthierry@redhat.com>,
Josh Poimboeuf <jpoimboe@redhat.com>, x86 <x86@kernel.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: [tip: objtool/core] objtool: Remove useless tests before save_reg()
Date: Mon, 21 Sep 2020 16:51:13 -0000 [thread overview]
Message-ID: <160070707332.15536.770642380870729185.tip-bot2@tip-bot2> (raw)
The following commit has been merged into the objtool/core branch of tip:
Commit-ID: f4f803984c3685f416a74e9e2fa7d39bdafbe02b
Gitweb: https://git.kernel.org/tip/f4f803984c3685f416a74e9e2fa7d39bdafbe02b
Author: Julien Thierry <jthierry@redhat.com>
AuthorDate: Tue, 15 Sep 2020 08:53:16 +01:00
Committer: Josh Poimboeuf <jpoimboe@redhat.com>
CommitterDate: Fri, 18 Sep 2020 12:02:27 -05:00
objtool: Remove useless tests before save_reg()
save_reg already checks that the register being saved does not already
have a saved state.
Remove redundant checks before processing a register storing operation.
Signed-off-by: Julien Thierry <jthierry@redhat.com>
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
---
tools/objtool/check.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/tools/objtool/check.c b/tools/objtool/check.c
index 4e2f703..fd2edab 100644
--- a/tools/objtool/check.c
+++ b/tools/objtool/check.c
@@ -2030,7 +2030,7 @@ static int update_cfi_state(struct instruction *insn, struct cfi_state *cfi,
/* drap: push %rbp */
cfi->stack_size = 0;
- } else if (regs[op->src.reg].base == CFI_UNDEFINED) {
+ } else {
/* drap: push %reg */
save_reg(cfi, op->src.reg, CFI_BP, -cfi->stack_size);
@@ -2059,9 +2059,7 @@ static int update_cfi_state(struct instruction *insn, struct cfi_state *cfi,
/* save drap offset so we know when to restore it */
cfi->drap_offset = op->dest.offset;
- }
-
- else if (regs[op->src.reg].base == CFI_UNDEFINED) {
+ } else {
/* drap: mov reg, disp(%rbp) */
save_reg(cfi, op->src.reg, CFI_BP, op->dest.offset);
reply other threads:[~2020-09-21 16:51 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=160070707332.15536.770642380870729185.tip-bot2@tip-bot2 \
--to=tip-bot2@linutronix.de \
--cc=jpoimboe@redhat.com \
--cc=jthierry@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=x86@kernel.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
all inboxes | Powered by JetHome®