v86/gen
Amaan Cheval 41c8241d5e x86_table: Mark state-altering instructions as JIT block boundaries
These instructions, if included within a compiled JIT block, may alter the
state_flags of a block entry (such as whether flat segmentation is used or not),
which may invalidate the block that is running - this caused bugs in OpenBSD
because of a block like this being compiled:

0xF81F2: 8E DB                mov ds, bx
0xF81F4: 8E D3                mov ss, bx
0xF81F6: 66 8B 26 B8 F5       mov esp, dword ptr [0xf5b8] <--
0xF81FB: 66 89 36 B8 F5       mov dword ptr [0xf5b8], esi <--

The memory accesses implicitly use DS. If we include flat-segmenetation as a
flag within state_flags and optimize calls to get_seg based on it, this behavior
would cause issues (and did, in OpenBSD).

By marking these instructions as block boundaries, we remediate that issue.
2020-07-21 20:10:14 -05:00
..
c_ast.js Squash 2020-07-21 20:10:12 -05:00
generate_interpreter.js Have generate_{jit,interpreter}.js scripts "mkdir -p" for --output-dir 2020-07-21 20:10:14 -05:00
generate_jit.js gen: s/jump/block_boundary/ 2020-07-21 20:10:14 -05:00
util.js Have generate_{jit,interpreter}.js scripts "mkdir -p" for --output-dir 2020-07-21 20:10:14 -05:00
x86_table.js x86_table: Mark state-altering instructions as JIT block boundaries 2020-07-21 20:10:14 -05:00