[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen staging] x86/emul: use pseudo keyword fallthrough
commit 3d1db2942f16ab1af4f9210100cf77899208a4dd Author: Federico Serafini <federico.serafini@xxxxxxxxxxx> AuthorDate: Thu Nov 14 13:02:18 2024 +0100 Commit: Jan Beulich <jbeulich@xxxxxxxx> CommitDate: Thu Nov 14 13:02:18 2024 +0100 x86/emul: use pseudo keyword fallthrough Make explicit the fallthrough intention by adding the pseudo keyword where missing and replace fallthrough comments not following the agreed syntax. This satisfies the requirements to deviate violations of MISRA C:2012 Rule 16.3 "An unconditional break statement shall terminate every switch-clause". No functional change. Signed-off-by: Federico Serafini <federico.serafini@xxxxxxxxxxx> Acked-by: Jan Beulich <jbeulich@xxxxxxxx> --- xen/arch/x86/x86_emulate/decode.c | 6 ++++-- xen/arch/x86/x86_emulate/x86_emulate.c | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/xen/arch/x86/x86_emulate/decode.c b/xen/arch/x86/x86_emulate/decode.c index 32b9276dc5..0a0751f2ed 100644 --- a/xen/arch/x86/x86_emulate/decode.c +++ b/xen/arch/x86/x86_emulate/decode.c @@ -1356,7 +1356,8 @@ int x86emul_decode(struct x86_emulate_state *s, --disp8scale; break; } - /* vcvt{,t}s{s,d}2usi need special casing: fall through */ + /* vcvt{,t}s{s,d}2usi need special casing. */ + fallthrough; case 0x2c: /* vcvtts{s,d}2si need special casing */ case 0x2d: /* vcvts{s,d}2si need special casing */ if ( evex_encoded() ) @@ -1530,7 +1531,8 @@ int x86emul_decode(struct x86_emulate_state *s, disp8scale -= 1 + (s->evex.pfx == vex_66); break; } - /* vcvt{,t}sh2usi needs special casing: fall through */ + /* vcvt{,t}sh2usi needs special casing. */ + fallthrough; case 0x2c: case 0x2d: /* vcvt{,t}sh2si need special casing */ disp8scale = 1; break; diff --git a/xen/arch/x86/x86_emulate/x86_emulate.c b/xen/arch/x86/x86_emulate/x86_emulate.c index ecfb62b003..c91d048d26 100644 --- a/xen/arch/x86/x86_emulate/x86_emulate.c +++ b/xen/arch/x86/x86_emulate/x86_emulate.c @@ -1460,6 +1460,7 @@ x86_emulate( d = (d & ~DstMask) | DstMem; /* Becomes a normal DstMem operation from here on. */ + fallthrough; case DstMem: generate_exception_if(ea.type == OP_MEM && evex.z, X86_EXC_UD); if ( state->simd_size != simd_none ) @@ -1942,6 +1943,7 @@ x86_emulate( break; } generate_exception_if((modrm_reg & 7) != 0, X86_EXC_UD); + fallthrough; case 0x88 ... 0x8b: /* mov */ case 0xa0 ... 0xa1: /* mov mem.offs,{%al,%ax,%eax,%rax} */ case 0xa2 ... 0xa3: /* mov {%al,%ax,%eax,%rax},mem.offs */ -- generated by git-patchbot for /home/xen/git/xen.git#staging
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |