Skip to contentSkip to conversation

x86 emulator: Simplify emulating Grp4/Grp5 instructions.

PATCH In review Mohammed Gamal 1 participant 2 messages Aug 18, 2008 – Aug 20, 2008

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86 emulator: Simplify emulating Grp4/Grp5 instructions.

emulate_grp45() always returns 0. Therefore there is no need to check its return value.

---
 arch/x86/kvm/x86_emulate.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)
arch/x86/kvm/x86_emulate.c +1 -3
index b97e80e..3aa9acb 100644
@@ -1810,9 +1810,7 @@ special_insn:
 		c->dst.type = OP_NONE;	/* Disable writeback. */
 		break;
 	case 0xfe ... 0xff:	/* Grp4/Grp5 */
-		rc = emulate_grp45(ctxt, ops);
-		if (rc != 0)
-			goto done;
+		emulate_grp45(ctxt, ops);
 		break;
 	}
 
Signature · 1 line
1.5.4.3
#1 lore raw
Quoted 24 lines · Mohammed Gamal

emulate_grp45() always returns 0. Therefore there is no need to check its return value.

---
 arch/x86/kvm/x86_emulate.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)
arch/x86/kvm/x86_emulate.c +1 -4
index b97e80e..3aa9acb 100644
@@ -1810,9 +1810,7 @@ special_insn:
               c->dst.type = OP_NONE;  /* Disable writeback. */
               break;
       case 0xfe ... 0xff:     /* Grp4/Grp5 */
-               rc = emulate_grp45(ctxt, ops);
-               if (rc != 0)
-                       goto done;
+               emulate_grp45(ctxt, ops);
               break;
       }
 
--
Quoted 4 lines

1.5.4.3

Ignore this patch, it'd be wiser to keep the check when we add the rest of Grp4/5 instructions to emulate_grp45()