SYSENTER/SYSEXIT must use continue, not break, to avoid the SAVEIP that would set the instruction pointer back to just after SYSENTER. I thought it seemed weird that Linux would execute SYSENTER just to then execute INT 80h

This commit is contained in:
Jonathan Campbell
2021-11-22 08:22:45 -08:00
parent fcd6bdb1bc
commit c2496f1404

View File

@@ -262,13 +262,13 @@
if (CPU_ArchitectureType<CPU_ARCHTYPE_PENTIUMII) goto illegal_opcode;
if (!CPU_SYSENTER()) goto illegal_opcode;
}
break;
continue;
CASE_0F_B(0x35) /* SYSEXIT */
{
if (CPU_ArchitectureType<CPU_ARCHTYPE_PENTIUMII) goto illegal_opcode;
if (!CPU_SYSEXIT()) goto illegal_opcode;
}
break;
continue;
// Pentium Pro Conditional Moves
CASE_0F_W(0x40) /* CMOVO */