mirror of
https://github.com/copy/v86.git
synced 2025-12-31 04:23:15 +00:00
Make std/cld custom (FC/FD), remove unused unguarded_register and no_register properties from x86 table
This commit is contained in:
parent
732cc2ee1c
commit
e99da40215
3 changed files with 29 additions and 5 deletions
|
|
@ -241,7 +241,7 @@ function gen_instruction_body_after_fixed_g(encoding, size)
|
|||
|
||||
if(!encoding.prefix)
|
||||
{
|
||||
if(encoding.custom && !encoding.unguarded_register || encoding.no_register)
|
||||
if(encoding.custom)
|
||||
{
|
||||
}
|
||||
else
|
||||
|
|
@ -252,7 +252,6 @@ function gen_instruction_body_after_fixed_g(encoding, size)
|
|||
instruction_postfix.push(
|
||||
gen_call("::codegen::gen_move_registers_from_memory_to_locals", ["ctx"])
|
||||
);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -399,8 +399,8 @@ const encodings = [
|
|||
{ opcode: 0xFA, custom: 1, skip: 1 },
|
||||
// sti: not a jump, but can cause a change in eip
|
||||
{ opcode: 0xFB, block_boundary: 1, skip: 1, },
|
||||
{ opcode: 0xFC, no_register: 1, },
|
||||
{ opcode: 0xFD, no_register: 1, },
|
||||
{ opcode: 0xFC, custom: 1, },
|
||||
{ opcode: 0xFD, custom: 1, },
|
||||
|
||||
{ opcode: 0xFE, e: 1, fixed_g: 0, },
|
||||
{ opcode: 0xFE, e: 1, fixed_g: 1, },
|
||||
|
|
|
|||
|
|
@ -3,7 +3,8 @@
|
|||
use codegen;
|
||||
use cpu::BitSize;
|
||||
use cpu2::cpu::{
|
||||
FLAGS_ALL, FLAGS_DEFAULT, FLAGS_MASK, FLAG_ADJUST, FLAG_CARRY, FLAG_OVERFLOW, OPSIZE_32,
|
||||
FLAGS_ALL, FLAGS_DEFAULT, FLAGS_MASK, FLAG_ADJUST, FLAG_CARRY, FLAG_DIRECTION, FLAG_OVERFLOW,
|
||||
OPSIZE_32,
|
||||
};
|
||||
use global_pointers;
|
||||
use jit::JitContext;
|
||||
|
|
@ -3497,6 +3498,30 @@ pub fn instr_FA_jit(ctx: &mut JitContext) {
|
|||
ctx.builder.instruction_body.block_end();
|
||||
}
|
||||
|
||||
pub fn instr_FC_jit(ctx: &mut JitContext) {
|
||||
ctx.builder
|
||||
.instruction_body
|
||||
.const_i32(global_pointers::FLAGS as i32);
|
||||
ctx.builder
|
||||
.instruction_body
|
||||
.load_aligned_i32(global_pointers::FLAGS);
|
||||
ctx.builder.instruction_body.const_i32(!FLAG_DIRECTION);
|
||||
ctx.builder.instruction_body.and_i32();
|
||||
ctx.builder.instruction_body.store_aligned_i32(0);
|
||||
}
|
||||
|
||||
pub fn instr_FD_jit(ctx: &mut JitContext) {
|
||||
ctx.builder
|
||||
.instruction_body
|
||||
.const_i32(global_pointers::FLAGS as i32);
|
||||
ctx.builder
|
||||
.instruction_body
|
||||
.load_aligned_i32(global_pointers::FLAGS);
|
||||
ctx.builder.instruction_body.const_i32(FLAG_DIRECTION);
|
||||
ctx.builder.instruction_body.or_i32();
|
||||
ctx.builder.instruction_body.store_aligned_i32(0);
|
||||
}
|
||||
|
||||
define_instruction_read_write_mem16!(
|
||||
"inc16",
|
||||
"instr16_FF_0_mem",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue