Skip to content

Instantly share code, notes, and snippets.

@AmaanC
Last active February 22, 2018 08:44
Show Gist options
  • Save AmaanC/faff7066d16f1dee4bbbd6b73a72d831 to your computer and use it in GitHub Desktop.
Save AmaanC/faff7066d16f1dee4bbbd6b73a72d831 to your computer and use it in GitHub Desktop.

Criteria:

groups = ['arith', 'logical', 'conver', 'datamov', 'datamov arith', 'shftrot', 'flgctrl'];

// Excluded because they may trigger faults, so the optimization can't apply to them
excluded_opcodes = [
    // May trigger_ud
    '0x8C',
    // switch_seg may fault
    '0x8E',
    // mov to/from seg:offset (memory accesses)
    '0xA0',
    '0xA1',
    '0xA2',
    '0xA3',
    // Unimplemented in v86
    '0xD50A',
    '0x0F38F0',
    '0x0F38F1',
];
// Keywords that indicate a group/instruction which may fault
excluded_row_words = ['fpu', 'simd', 'mmx', 'sse', 'vmx', 'XLAT', 'DIV', 'AMX', 'AAM', 'CLI', 'STI', 'CMPXCHG8B'];

Instructions:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment