|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen master] x86emul: drop dead conditional from decode
commit 42c0972e9b47a456e050a8c18845438c1363ef7c
Author: Jan Beulich <jbeulich@xxxxxxxx>
AuthorDate: Tue Jul 21 09:46:01 2026 +0200
Commit: Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Tue Jul 21 09:46:01 2026 +0200
x86emul: drop dead conditional from decode
We know that opcode_table[0x0f] is 0, there's no need to check that. Up
until ab082ffa87d5 ("x86emul: generate and make use of a canonical opcode
representation") or maybe already c4e7a67e3a10 ("x86emul: drop
SrcInvalid") this may have been justified, but it no longer is.
This eliminates a Misra C:2012 rule 2.2 ("There shall be no dead code")
violation.
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
Acked-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
---
xen/arch/x86/x86_emulate/decode.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/xen/arch/x86/x86_emulate/decode.c
b/xen/arch/x86/x86_emulate/decode.c
index 57f6baffb0..d1665e6eb3 100644
--- a/xen/arch/x86/x86_emulate/decode.c
+++ b/xen/arch/x86/x86_emulate/decode.c
@@ -1082,7 +1082,7 @@ int x86emul_decode(struct x86_emulate_state *s,
/* Opcode byte(s). */
d = opcode_table[b];
- if ( d == 0 && b == 0x0f )
+ if ( b == 0x0f )
{
/* Two-byte opcode. */
b = insn_fetch_type(uint8_t);
--
generated by git-patchbot for /home/xen/git/xen.git#master
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |