v86/src/rust/prefix.rs
Fabian 3a8d644d75 Port jit to Rust
The following files and functions were ported:
- jit.c
- codegen.c
- _jit functions in instructions*.c and misc_instr.c
- generate_{analyzer,jit}.js (produces Rust code)
- jit_* from cpu.c

And the following data structures:
- hot_code_addresses
- wasm_table_index_free_list
- entry_points
- jit_cache_array
- page_first_jit_cache_entry

Other miscellaneous changes:
- Page is an abstract type
- Addresses, locals and bitflags are unsigned
- Make the number of entry points a growable type
- Avoid use of global state wherever possible
- Delete string packing
- Make CachedStateFlags abstract
- Make AnalysisType product type
- Make BasicBlockType product type
- Restore opcode assertion
- Set opt-level=2 in debug mode (for test performance)
- Delete JIT_ALWAYS instrumentation (now possible via api)
- Refactor generate_analyzer.js
- Refactor generate_jit.js
2020-08-30 19:29:13 -05:00

15 lines
433 B
Rust

pub const PREFIX_REPZ: u32 = 0b01000;
pub const PREFIX_REPNZ: u32 = 0b10000;
pub const PREFIX_MASK_OPSIZE: u32 = 0b100000;
pub const PREFIX_MASK_ADDRSIZE: u32 = 0b1000000;
pub const PREFIX_66: u32 = PREFIX_MASK_OPSIZE;
pub const PREFIX_67: u32 = PREFIX_MASK_ADDRSIZE;
pub const PREFIX_F2: u32 = PREFIX_REPNZ;
pub const PREFIX_F3: u32 = PREFIX_REPZ;
pub const SEG_PREFIX_ZERO: u32 = 7;
pub const PREFIX_MASK_SEGMENT: u32 = 0b111;