提交 f4f80398 编写于 作者: J Julien Thierry 提交者: Josh Poimboeuf

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: NJulien Thierry <jthierry@redhat.com>
Signed-off-by: NJosh Poimboeuf <jpoimboe@redhat.com>
上级 edea9e6b
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册