x86/emul: Annotate more intentional fallthrough cases
PATCH 1/1 x86/emul: Annotate more intentional fallthrough cases
Some recent change in x86_emulate.c has simplified the callgraph sufficiently for Coverity to notice these, rather than hitting its upper path limit.
All are legitimate fallthoughs. Annotate them as such.
Signed-off-by Andrew Cooper <[email protected]>
---
CC: Jan Beulich <[email protected]>
--- xen/arch/x86/x86_emulate/x86_emulate.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
xen/arch/x86/x86_emulate/x86_emulate.c +3 -1
@@ -2644,8 +2644,8 @@ x86_emulate( ea.mem.off += (src.val >>3 ) & ~(op_bytes -1L ); src.val &= (op_bytes <<3 ) -1 ; } -/* Becomes a normal DstMem operation from here on. */ d = (d & ~DstMask) | DstMem; +/* Becomes a normal DstMem operation from here on. */ case DstMem: ea.bytes = (d & ByteOp) ?1 : op_bytes; dst = ea;
@@ -2987,6 +2987,7 @@ x86_emulate(case 0x82 :/* Grp1 (x86/32 only) */ generate_exception_if (mode_64bit (),EXC_UD ); +/* Fallthrough. */ case 0x80 :case 0x81 :case 0x83 :/* Grp1 */ switch ( modrm_reg &7 ) {
@@ -4314,6 +4315,7 @@ x86_emulate(case 0xfe :/* Grp4 */ generate_exception_if ((modrm_reg &7 ) >=2 ,EXC_UD ); +/* Fallthough. */ case 0xff :/* Grp5 */ switch ( modrm_reg &7 ) {
Signature · 7 lines
2.1.4 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
xen/arch/x86/x86_emulate/x86_emulate.c x86_emulate( · line 4318
Quoted 6 lines
Quoted 1 line
Quoted 1 line · On 12.12.16 at 11:05, <[email protected]> wrote:
xen/arch/x86/x86_emulate/x86_emulate.c +1
-0@@ -4314,6 +4315,7 @@ x86_emulate(case 0xfe :/* Grp4 */ generate_exception_if ((modrm_reg &7 ) >=2 ,EXC_UD ); +/* Fallthough. */
With the missing r added,
Reviewed-by Jan Beulich <[email protected]>
Jan
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel