Skip to content

Commit

Permalink
Remove non-faulting property of instructions (all instructions are no…
Browse files Browse the repository at this point in the history
…n-faulting)
  • Loading branch information
copy committed Aug 31, 2020
1 parent 27a374e commit 46f9bc9
Show file tree
Hide file tree
Showing 3 changed files with 178 additions and 210 deletions.
21 changes: 2 additions & 19 deletions gen/generate_jit.js
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,6 @@ function gen_instruction_body_after_fixed_g(encoding, size)
);
}

const APPEND_NONFAULTING_FLAG = "*instr_flags |= ::jit::JIT_INSTR_NONFAULTING_FLAG;";

const imm_read = gen_read_imm_call(encoding, size);
const imm_read_bindings = [];
if(imm_read)
Expand All @@ -243,8 +241,8 @@ function gen_instruction_body_after_fixed_g(encoding, size)

if(encoding.e)
{
const reg_postfix = encoding.nonfaulting ? [APPEND_NONFAULTING_FLAG] : [];
const mem_postfix = encoding.memory_nonfaulting ? [APPEND_NONFAULTING_FLAG] : [];
const reg_postfix = [];
const mem_postfix = [];

if(encoding.mem_ud)
{
Expand Down Expand Up @@ -362,16 +360,6 @@ function gen_instruction_body_after_fixed_g(encoding, size)
{
// custom, but not modrm

if(encoding.prefix)
{
console.assert(!encoding.nonfaulting, "Prefix instructions cannot be marked as nonfaulting.");
}

if(encoding.nonfaulting)
{
instruction_postfix.push(APPEND_NONFAULTING_FLAG);
}

const args = ["ctx"];

if(imm_read)
Expand All @@ -395,11 +383,6 @@ function gen_instruction_body_after_fixed_g(encoding, size)
{
// instruction without modrm byte or prefix

if(encoding.nonfaulting)
{
instruction_postfix.push(APPEND_NONFAULTING_FLAG);
}

const args = ["ctx", `"${instruction_name}"`];

if(imm_read)
Expand Down
Loading

0 comments on commit 46f9bc9

Please sign in to comment.