From ccf8504dd1209503905dfb97a0210f2a20e2acaa Mon Sep 17 00:00:00 2001 From: Ryan Fleury Date: Tue, 23 Jul 2024 16:23:29 -0700 Subject: [PATCH] switch ctrl flow analysis etc. to zydis from udis86; unify disassembling path in dasm_cache layer, use single instruction decode path in frontend for ctrl flow analysis; use in dasm cache layer for disassembly textualization --- src/dasm_cache/dasm_cache.c | 236 +- src/dasm_cache/dasm_cache.h | 559 +- src/df/core/df_core.c | 242 +- src/df/core/df_core.h | 76 +- src/df/gfx/df_view_rules.c | 2888 ++++---- src/df/gfx/df_views.c | 34 +- src/df/gfx/df_views.h | 1142 ++-- src/third_party/udis86/CHANGES | 47 - src/third_party/udis86/LICENSE | 22 - src/third_party/udis86/README | 91 - src/third_party/udis86/README.rad | 24 - src/third_party/udis86/config.h | 72 - src/third_party/udis86/libudis86/decode.c | 1264 ---- src/third_party/udis86/libudis86/decode.h | 197 - src/third_party/udis86/libudis86/extern.h | 113 - src/third_party/udis86/libudis86/itab.c | 5937 ----------------- src/third_party/udis86/libudis86/itab.h | 935 --- src/third_party/udis86/libudis86/syn-att.c | 228 - src/third_party/udis86/libudis86/syn-intel.c | 225 - src/third_party/udis86/libudis86/syn.c | 212 - src/third_party/udis86/libudis86/syn.h | 53 - src/third_party/udis86/libudis86/types.h | 259 - src/third_party/udis86/libudis86/udint.h | 97 - src/third_party/udis86/libudis86/udis86.c | 458 -- src/third_party/udis86/udis86.h | 33 - .../udis86/udis86_v56ff6c8.LICENSE | 27 - src/third_party/udis86/udis86_v56ff6c8.tps | 19 - src/third_party/zydis/zydis.c | 8 +- 28 files changed, 2531 insertions(+), 12967 deletions(-) delete mode 100644 src/third_party/udis86/CHANGES delete mode 100644 src/third_party/udis86/LICENSE delete mode 100644 src/third_party/udis86/README delete mode 100644 src/third_party/udis86/README.rad delete mode 100644 src/third_party/udis86/config.h delete mode 100644 src/third_party/udis86/libudis86/decode.c delete mode 100644 src/third_party/udis86/libudis86/decode.h delete mode 100644 src/third_party/udis86/libudis86/extern.h delete mode 100644 src/third_party/udis86/libudis86/itab.c delete mode 100644 src/third_party/udis86/libudis86/itab.h delete mode 100644 src/third_party/udis86/libudis86/syn-att.c delete mode 100644 src/third_party/udis86/libudis86/syn-intel.c delete mode 100644 src/third_party/udis86/libudis86/syn.c delete mode 100644 src/third_party/udis86/libudis86/syn.h delete mode 100644 src/third_party/udis86/libudis86/types.h delete mode 100644 src/third_party/udis86/libudis86/udint.h delete mode 100644 src/third_party/udis86/libudis86/udis86.c delete mode 100644 src/third_party/udis86/udis86.h delete mode 100644 src/third_party/udis86/udis86_v56ff6c8.LICENSE delete mode 100644 src/third_party/udis86/udis86_v56ff6c8.tps diff --git a/src/dasm_cache/dasm_cache.c b/src/dasm_cache/dasm_cache.c index 5f216aba..a92c940e 100644 --- a/src/dasm_cache/dasm_cache.c +++ b/src/dasm_cache/dasm_cache.c @@ -2,19 +2,137 @@ // Licensed under the MIT license (https://opensource.org/license/mit/) //////////////////////////////// -//~ rjf: Third Party Includes +//~ rjf: Instruction Decoding/Disassembling Type Functions +#if !defined(ZYDIS_H) #include "third_party/zydis/zydis.h" #include "third_party/zydis/zydis.c" +#endif -#include "third_party/udis86/config.h" -#include "third_party/udis86/udis86.h" -#include "third_party/udis86/libudis86/decode.c" -#include "third_party/udis86/libudis86/itab.c" -#include "third_party/udis86/libudis86/syn-att.c" -#include "third_party/udis86/libudis86/syn-intel.c" -#include "third_party/udis86/libudis86/syn.c" -#include "third_party/udis86/libudis86/udis86.c" +internal DASM_Inst +dasm_inst_from_code(Arena *arena, Architecture arch, U64 vaddr, String8 code, DASM_Syntax syntax) +{ + DASM_Inst inst = {0}; + switch(arch) + { + default:{}break; + + //- rjf: x86/x64 disassembly + case Architecture_x86: + case Architecture_x64: + { + // rjf: determine zydis formatter style + ZydisFormatterStyle style = ZYDIS_FORMATTER_STYLE_INTEL; + switch(syntax) + { + default:{}break; + case DASM_Syntax_Intel:{style = ZYDIS_FORMATTER_STYLE_INTEL;}break; + case DASM_Syntax_ATT: {style = ZYDIS_FORMATTER_STYLE_ATT;}break; + } + + // rjf: disassemble one instruction + ZydisDisassembledInstruction zinst = {0}; + ZyanStatus status = ZydisDisassemble(ZYDIS_MACHINE_MODE_LONG_64, vaddr, code.str, code.size, &zinst, style); + + // rjf: analyze + DASM_InstFlags flags = 0; + U64 jump_dest_vaddr = 0; + { + ZydisDecodedOperand *first_visible_op = (zinst.info.operand_count_visible > 0 ? &zinst.operands[0] : 0); + ZydisDecodedOperand *first_op = (zinst.info.operand_count > 0 ? &zinst.operands[0] : 0); + ZydisDecodedOperand *second_op = (zinst.info.operand_count > 1 ? &zinst.operands[1] : 0); + if(first_visible_op != 0) + { + ZydisCalcAbsoluteAddress(&zinst.info, first_visible_op, vaddr, &jump_dest_vaddr); + } + if(first_op != 0 && second_op != 0 && first_op->type == ZYDIS_OPERAND_TYPE_REGISTER && + (first_op->reg.value == ZYDIS_REGISTER_RSP || + first_op->reg.value == ZYDIS_REGISTER_ESP || + first_op->reg.value == ZYDIS_REGISTER_SP)) + { + flags |= DASM_InstFlag_ChangesStackPointer; + if(second_op->type != ZYDIS_OPERAND_TYPE_IMMEDIATE) + { + flags |= DASM_InstFlag_ChangesStackPointerVariably; + } + } + if(zinst.info.attributes & (ZYDIS_ATTRIB_HAS_REP| + ZYDIS_ATTRIB_HAS_REPE| + ZYDIS_ATTRIB_HAS_REPZ| + ZYDIS_ATTRIB_HAS_REPNZ| + ZYDIS_ATTRIB_HAS_REPNE)) + { + flags |= DASM_InstFlag_Repeats; + } + switch(zinst.info.mnemonic) + { + case ZYDIS_MNEMONIC_CALL: + { + flags |= DASM_InstFlag_Call; + }break; + + case ZYDIS_MNEMONIC_JB: + case ZYDIS_MNEMONIC_JBE: + case ZYDIS_MNEMONIC_JCXZ: + case ZYDIS_MNEMONIC_JECXZ: + case ZYDIS_MNEMONIC_JKNZD: + case ZYDIS_MNEMONIC_JKZD: + case ZYDIS_MNEMONIC_JL: + case ZYDIS_MNEMONIC_JLE: + case ZYDIS_MNEMONIC_JNB: + case ZYDIS_MNEMONIC_JNBE: + case ZYDIS_MNEMONIC_JNL: + case ZYDIS_MNEMONIC_JNLE: + case ZYDIS_MNEMONIC_JNO: + case ZYDIS_MNEMONIC_JNP: + case ZYDIS_MNEMONIC_JNS: + case ZYDIS_MNEMONIC_JNZ: + case ZYDIS_MNEMONIC_JO: + case ZYDIS_MNEMONIC_JP: + case ZYDIS_MNEMONIC_JRCXZ: + case ZYDIS_MNEMONIC_JS: + case ZYDIS_MNEMONIC_JZ: + case ZYDIS_MNEMONIC_LOOP: + case ZYDIS_MNEMONIC_LOOPE: + case ZYDIS_MNEMONIC_LOOPNE: + { + flags |= DASM_InstFlag_Branch; + }break; + + case ZYDIS_MNEMONIC_JMP: + { + flags |= DASM_InstFlag_UnconditionalJump; + }break; + + case ZYDIS_MNEMONIC_RET: + { + flags |= DASM_InstFlag_Return; + }break; + + case ZYDIS_MNEMONIC_PUSH: + case ZYDIS_MNEMONIC_POP: + { + flags |= DASM_InstFlag_ChangesStackPointer; + }break; + + default: + { + flags |= DASM_InstFlag_NonFlow; + }break; + } + } + + // rjf: convert + { + inst.flags = flags; + inst.size = zinst.info.length; + inst.string = push_str8_copy(arena, str8_cstring(zinst.text)); + inst.jump_dest_vaddr = jump_dest_vaddr; + } + }break; + } + return inst; +} //////////////////////////////// //~ rjf: Parameter Type Functions @@ -32,42 +150,42 @@ dasm_params_match(DASM_Params *a, DASM_Params *b) } //////////////////////////////// -//~ rjf: Instruction Type Functions +//~ rjf: Line Type Functions internal void -dasm_inst_chunk_list_push(Arena *arena, DASM_InstChunkList *list, U64 cap, DASM_Inst *inst) +dasm_line_chunk_list_push(Arena *arena, DASM_LineChunkList *list, U64 cap, DASM_Line *inst) { - DASM_InstChunkNode *node = list->last; + DASM_LineChunkNode *node = list->last; if(node == 0 || node->count >= node->cap) { - node = push_array(arena, DASM_InstChunkNode, 1); - node->v = push_array_no_zero(arena, DASM_Inst, cap); + node = push_array(arena, DASM_LineChunkNode, 1); + node->v = push_array_no_zero(arena, DASM_Line, cap); node->cap = cap; SLLQueuePush(list->first, list->last, node); list->node_count += 1; } MemoryCopyStruct(&node->v[node->count], inst); node->count += 1; - list->inst_count += 1; + list->line_count += 1; } -internal DASM_InstArray -dasm_inst_array_from_chunk_list(Arena *arena, DASM_InstChunkList *list) +internal DASM_LineArray +dasm_line_array_from_chunk_list(Arena *arena, DASM_LineChunkList *list) { - DASM_InstArray array = {0}; - array.count = list->inst_count; - array.v = push_array_no_zero(arena, DASM_Inst, array.count); + DASM_LineArray array = {0}; + array.count = list->line_count; + array.v = push_array_no_zero(arena, DASM_Line, array.count); U64 idx = 0; - for(DASM_InstChunkNode *n = list->first; n != 0; n = n->next) + for(DASM_LineChunkNode *n = list->first; n != 0; n = n->next) { - MemoryCopy(array.v+idx, n->v, sizeof(DASM_Inst)*n->count); + MemoryCopy(array.v+idx, n->v, sizeof(DASM_Line)*n->count); idx += n->count; } return array; } internal U64 -dasm_inst_array_idx_from_code_off__linear_scan(DASM_InstArray *array, U64 off) +dasm_line_array_idx_from_code_off__linear_scan(DASM_LineArray *array, U64 off) { U64 result = 0; for(U64 idx = 0; idx < array->count; idx += 1) @@ -76,7 +194,7 @@ dasm_inst_array_idx_from_code_off__linear_scan(DASM_InstArray *array, U64 off) if(array->v[idx].code_off <= off && off < next_off) { result = idx; - if(!(array->v[idx].flags & DASM_InstFlag_Decorative)) + if(!(array->v[idx].flags & DASM_LineFlag_Decorative)) { break; } @@ -86,7 +204,7 @@ dasm_inst_array_idx_from_code_off__linear_scan(DASM_InstArray *array, U64 off) } internal U64 -dasm_inst_array_code_off_from_idx(DASM_InstArray *array, U64 idx) +dasm_line_array_code_off_from_idx(DASM_LineArray *array, U64 idx) { U64 off = 0; if(idx < array->count) @@ -288,7 +406,7 @@ dasm_info_from_key_params(DASM_Scope *scope, U128 key, DASM_Params *params, U128 { U128 hash = hs_hash_from_key(key, rewind_idx); result = dasm_info_from_hash_params(scope, hash, params); - if(result.insts.count != 0) + if(result.lines.count != 0) { if(hash_out) { @@ -419,7 +537,7 @@ dasm_parse_thread__entry_point(void *p) } //- rjf: data * arch * addr * dbg -> decode artifacts - DASM_InstChunkList inst_list = {0}; + DASM_LineChunkList line_list = {0}; String8List inst_strings = {0}; if(got_task) { @@ -431,42 +549,18 @@ dasm_parse_thread__entry_point(void *p) case Architecture_x64: case Architecture_x86: { - // rjf: determine zydis formatter style - ZydisFormatterStyle style = ZYDIS_FORMATTER_STYLE_INTEL; - switch(params.syntax) - { - default:{}break; - case DASM_Syntax_Intel:{style = ZYDIS_FORMATTER_STYLE_INTEL;}break; - case DASM_Syntax_ATT: {style = ZYDIS_FORMATTER_STYLE_ATT;}break; - } - // rjf: disassemble RDI_SourceFile *last_file = &rdi_nil_element_union.source_file; RDI_Line *last_line = 0; for(U64 off = 0; off < data.size;) { // rjf: disassemble one instruction - ZydisDisassembledInstruction zinst = {0}; - ZyanStatus status = ZydisDisassemble(ZYDIS_MACHINE_MODE_LONG_64, - params.vaddr+off, - data.str+off, - data.size-off, - &zinst, - style); - if(zinst.info.length == 0) + DASM_Inst inst = dasm_inst_from_code(scratch.arena, params.arch, params.vaddr+off, str8_skip(data, off), params.syntax); + if(inst.size == 0) { break; } - // rjf: analyze - ZydisDecodedOperand *first_op = (zinst.info.operand_count_visible > 0 ? &zinst.operands[0] : 0); - U64 rel_voff = 0; - if(first_op != 0) - { - ZydisCalcAbsoluteAddress(&zinst.info, first_op, params.vaddr+off, &rel_voff); - } - U64 jump_dst_vaddr = rel_voff; - // rjf: push strings derived from voff -> line info if(params.style_flags & (DASM_StyleFlag_SourceFilesNames|DASM_StyleFlag_SourceLines)) { @@ -491,17 +585,17 @@ dasm_parse_thread__entry_point(void *p) file->normal_full_path_string_idx != 0 && file_normalized_full_path.size != 0) { String8 inst_string = push_str8f(scratch.arena, "> %S", file_normalized_full_path); - DASM_Inst inst = {u32_from_u64_saturate(off), DASM_InstFlag_Decorative, 0, r1u64(inst_strings.total_size + inst_strings.node_count, + DASM_Line inst = {u32_from_u64_saturate(off), DASM_LineFlag_Decorative, 0, r1u64(inst_strings.total_size + inst_strings.node_count, inst_strings.total_size + inst_strings.node_count + inst_string.size)}; - dasm_inst_chunk_list_push(scratch.arena, &inst_list, 1024, &inst); + dasm_line_chunk_list_push(scratch.arena, &line_list, 1024, &inst); str8_list_push(scratch.arena, &inst_strings, inst_string); } if(params.style_flags & DASM_StyleFlag_SourceFilesNames && file->normal_full_path_string_idx == 0) { String8 inst_string = str8_lit(">"); - DASM_Inst inst = {u32_from_u64_saturate(off), DASM_InstFlag_Decorative, 0, r1u64(inst_strings.total_size + inst_strings.node_count, + DASM_Line inst = {u32_from_u64_saturate(off), DASM_LineFlag_Decorative, 0, r1u64(inst_strings.total_size + inst_strings.node_count, inst_strings.total_size + inst_strings.node_count + inst_string.size)}; - dasm_inst_chunk_list_push(scratch.arena, &inst_list, 1024, &inst); + dasm_line_chunk_list_push(scratch.arena, &line_list, 1024, &inst); str8_list_push(scratch.arena, &inst_strings, inst_string); } last_file = file; @@ -535,9 +629,9 @@ dasm_parse_thread__entry_point(void *p) if(line_text.size != 0) { String8 inst_string = push_str8f(scratch.arena, "> %S", line_text); - DASM_Inst inst = {u32_from_u64_saturate(off), DASM_InstFlag_Decorative, 0, r1u64(inst_strings.total_size + inst_strings.node_count, + DASM_Line inst = {u32_from_u64_saturate(off), DASM_LineFlag_Decorative, 0, r1u64(inst_strings.total_size + inst_strings.node_count, inst_strings.total_size + inst_strings.node_count + inst_string.size)}; - dasm_inst_chunk_list_push(scratch.arena, &inst_list, 1024, &inst); + dasm_line_chunk_list_push(scratch.arena, &line_list, 1024, &inst); str8_list_push(scratch.arena, &inst_strings, inst_string); } } @@ -548,7 +642,7 @@ dasm_parse_thread__entry_point(void *p) } } - // rjf: push + // rjf: push line String8 addr_part = {0}; if(params.style_flags & DASM_StyleFlag_Addresses) { @@ -559,11 +653,11 @@ dasm_parse_thread__entry_point(void *p) { String8List code_bytes_strings = {0}; str8_list_push(scratch.arena, &code_bytes_strings, str8_lit("{")); - for(U64 byte_idx = 0; byte_idx < zinst.info.length || byte_idx < 16; byte_idx += 1) + for(U64 byte_idx = 0; byte_idx < inst.size || byte_idx < 16; byte_idx += 1) { - if(byte_idx < zinst.info.length) + if(byte_idx < inst.size) { - str8_list_pushf(scratch.arena, &code_bytes_strings, "%02x%s ", (U32)data.str[off+byte_idx], byte_idx == zinst.info.length-1 ? "}" : ""); + str8_list_pushf(scratch.arena, &code_bytes_strings, "%02x%s ", (U32)data.str[off+byte_idx], byte_idx == inst.size-1 ? "}" : ""); } else if(byte_idx < 8) { @@ -574,9 +668,9 @@ dasm_parse_thread__entry_point(void *p) code_bytes_part = str8_list_join(scratch.arena, &code_bytes_strings, 0); } String8 symbol_part = {0}; - if(jump_dst_vaddr != 0 && rdi != &di_rdi_parsed_nil && params.style_flags & DASM_StyleFlag_SymbolNames) + if(inst.jump_dest_vaddr != 0 && rdi != &di_rdi_parsed_nil && params.style_flags & DASM_StyleFlag_SymbolNames) { - RDI_U32 scope_idx = rdi_vmap_idx_from_section_kind_voff(rdi, RDI_SectionKind_ScopeVMap, jump_dst_vaddr-params.base_vaddr); + RDI_U32 scope_idx = rdi_vmap_idx_from_section_kind_voff(rdi, RDI_SectionKind_ScopeVMap, inst.jump_dest_vaddr-params.base_vaddr); if(scope_idx != 0) { RDI_Scope *scope = rdi_element_from_name_idx(rdi, Scopes, scope_idx); @@ -590,14 +684,14 @@ dasm_parse_thread__entry_point(void *p) } } } - String8 inst_string = push_str8f(scratch.arena, "%S%S%s%S", addr_part, code_bytes_part, zinst.text, symbol_part); - DASM_Inst inst = {u32_from_u64_saturate(off), 0, rel_voff, r1u64(inst_strings.total_size + inst_strings.node_count, - inst_strings.total_size + inst_strings.node_count + inst_string.size)}; - dasm_inst_chunk_list_push(scratch.arena, &inst_list, 1024, &inst); + String8 inst_string = push_str8f(scratch.arena, "%S%S%S%S", addr_part, code_bytes_part, inst.string, symbol_part); + DASM_Line line = {u32_from_u64_saturate(off), 0, inst.jump_dest_vaddr, r1u64(inst_strings.total_size + inst_strings.node_count, + inst_strings.total_size + inst_strings.node_count + inst_string.size)}; + dasm_line_chunk_list_push(scratch.arena, &line_list, 1024, &line); str8_list_push(scratch.arena, &inst_strings, inst_string); // rjf: increment - off += zinst.info.length; + off += inst.size; } }break; } @@ -637,7 +731,7 @@ dasm_parse_thread__entry_point(void *p) //- rjf: produce value bundle info_arena = arena_alloc(); info.text_key = text_key; - info.insts = dasm_inst_array_from_chunk_list(info_arena, &inst_list); + info.lines = dasm_line_array_from_chunk_list(info_arena, &line_list); } //- rjf: commit results to cache diff --git a/src/dasm_cache/dasm_cache.h b/src/dasm_cache/dasm_cache.h index bb3e33e8..378fba5b 100644 --- a/src/dasm_cache/dasm_cache.h +++ b/src/dasm_cache/dasm_cache.h @@ -1,258 +1,301 @@ -// Copyright (c) 2024 Epic Games Tools -// Licensed under the MIT license (https://opensource.org/license/mit/) - -#ifndef DASM_CACHE_H -#define DASM_CACHE_H - -//////////////////////////////// -//~ rjf: Stringification Types - -typedef U32 DASM_StyleFlags; -enum -{ - DASM_StyleFlag_Addresses = (1<<0), - DASM_StyleFlag_CodeBytes = (1<<1), - DASM_StyleFlag_SourceFilesNames = (1<<2), - DASM_StyleFlag_SourceLines = (1<<3), - DASM_StyleFlag_SymbolNames = (1<<4), -}; - -typedef enum DASM_Syntax -{ - DASM_Syntax_Intel, - DASM_Syntax_ATT, - DASM_Syntax_COUNT -} -DASM_Syntax; - -//////////////////////////////// -//~ rjf: Disassembling Parameters Bundle - -typedef struct DASM_Params DASM_Params; -struct DASM_Params -{ - U64 vaddr; - Architecture arch; - DASM_StyleFlags style_flags; - DASM_Syntax syntax; - U64 base_vaddr; - DI_Key dbgi_key; -}; - -//////////////////////////////// -//~ rjf: Instruction Types - -typedef U32 DASM_InstFlags; -enum -{ - DASM_InstFlag_Decorative = (1<<0), -}; - -typedef struct DASM_Inst DASM_Inst; -struct DASM_Inst -{ - U32 code_off; - DASM_InstFlags flags; - U64 addr; - Rng1U64 text_range; -}; - -typedef struct DASM_InstChunkNode DASM_InstChunkNode; -struct DASM_InstChunkNode -{ - DASM_InstChunkNode *next; - DASM_Inst *v; - U64 cap; - U64 count; -}; - -typedef struct DASM_InstChunkList DASM_InstChunkList; -struct DASM_InstChunkList -{ - DASM_InstChunkNode *first; - DASM_InstChunkNode *last; - U64 node_count; - U64 inst_count; -}; - -typedef struct DASM_InstArray DASM_InstArray; -struct DASM_InstArray -{ - DASM_Inst *v; - U64 count; -}; - -//////////////////////////////// -//~ rjf: Value Bundle Type - -typedef struct DASM_Info DASM_Info; -struct DASM_Info -{ - U128 text_key; - DASM_InstArray insts; -}; - -//////////////////////////////// -//~ rjf: Cache Types - -typedef struct DASM_Node DASM_Node; -struct DASM_Node -{ - // rjf: links - DASM_Node *next; - DASM_Node *prev; - - // rjf: key - U128 hash; - DASM_Params params; - - // rjf: generations - U64 change_gen; - - // rjf: value - Arena *info_arena; - DASM_Info info; - - // rjf: metadata - B32 is_working; - U64 scope_ref_count; - U64 last_time_touched_us; - U64 last_user_clock_idx_touched; - U64 load_count; - U64 last_time_requested_us; - U64 last_user_clock_idx_requested; -}; - -typedef struct DASM_Slot DASM_Slot; -struct DASM_Slot -{ - DASM_Node *first; - DASM_Node *last; -}; - -typedef struct DASM_Stripe DASM_Stripe; -struct DASM_Stripe -{ - Arena *arena; - OS_Handle rw_mutex; - OS_Handle cv; - DASM_Node *free_node; -}; - -//////////////////////////////// -//~ rjf: Scoped Access Types - -typedef struct DASM_Touch DASM_Touch; -struct DASM_Touch -{ - DASM_Touch *next; - U128 hash; - DASM_Params params; -}; - -typedef struct DASM_Scope DASM_Scope; -struct DASM_Scope -{ - DASM_Scope *next; - DASM_Touch *top_touch; - U64 base_pos; -}; - -//////////////////////////////// -//~ rjf: Thread Context - -typedef struct DASM_TCTX DASM_TCTX; -struct DASM_TCTX -{ - Arena *arena; -}; - -//////////////////////////////// -//~ rjf: Shared State - -typedef struct DASM_Shared DASM_Shared; -struct DASM_Shared -{ - Arena *arena; - - // rjf: user clock - U64 user_clock_idx; - - // rjf: cache - U64 slots_count; - U64 stripes_count; - DASM_Slot *slots; - DASM_Stripe *stripes; - - // rjf: user -> parse thread - U64 u2p_ring_size; - U8 *u2p_ring_base; - U64 u2p_ring_write_pos; - U64 u2p_ring_read_pos; - OS_Handle u2p_ring_cv; - OS_Handle u2p_ring_mutex; - - // rjf: parse threads - U64 parse_thread_count; - OS_Handle *parse_threads; - - // rjf: evictor/detector thread - OS_Handle evictor_detector_thread; -}; - -//////////////////////////////// -//~ rjf: Globals - -thread_static DASM_TCTX *dasm_tctx = 0; -global DASM_Shared *dasm_shared = 0; - -//////////////////////////////// -//~ rjf: Parameter Type Functions - -internal B32 dasm_params_match(DASM_Params *a, DASM_Params *b); - -//////////////////////////////// -//~ rjf: Instruction Type Functions - -internal void dasm_inst_chunk_list_push(Arena *arena, DASM_InstChunkList *list, U64 cap, DASM_Inst *inst); -internal DASM_InstArray dasm_inst_array_from_chunk_list(Arena *arena, DASM_InstChunkList *list); -internal U64 dasm_inst_array_idx_from_code_off__linear_scan(DASM_InstArray *array, U64 off); -internal U64 dasm_inst_array_code_off_from_idx(DASM_InstArray *array, U64 idx); - -//////////////////////////////// -//~ rjf: Main Layer Initialization - -internal void dasm_init(void); - -//////////////////////////////// -//~ rjf: User Clock - -internal void dasm_user_clock_tick(void); -internal U64 dasm_user_clock_idx(void); - -//////////////////////////////// -//~ rjf: Scoped Access - -internal DASM_Scope *dasm_scope_open(void); -internal void dasm_scope_close(DASM_Scope *scope); -internal void dasm_scope_touch_node__stripe_r_guarded(DASM_Scope *scope, DASM_Node *node); - -//////////////////////////////// -//~ rjf: Cache Lookups - -internal DASM_Info dasm_info_from_hash_params(DASM_Scope *scope, U128 hash, DASM_Params *params); -internal DASM_Info dasm_info_from_key_params(DASM_Scope *scope, U128 key, DASM_Params *params, U128 *hash_out); - -//////////////////////////////// -//~ rjf: Parse Threads - -internal B32 dasm_u2p_enqueue_req(U128 hash, DASM_Params *params, U64 endt_us); -internal void dasm_u2p_dequeue_req(Arena *arena, U128 *hash_out, DASM_Params *params_out); -internal void dasm_parse_thread__entry_point(void *p); - -//////////////////////////////// -//~ rjf: Evictor/Detector Thread - -internal void dasm_evictor_detector_thread__entry_point(void *p); - -#endif // DASM_CACHE_H +// Copyright (c) 2024 Epic Games Tools +// Licensed under the MIT license (https://opensource.org/license/mit/) + +#ifndef DASM_CACHE_H +#define DASM_CACHE_H + +//////////////////////////////// +//~ rjf: Disassembly Syntax Types + +typedef enum DASM_Syntax +{ + DASM_Syntax_Intel, + DASM_Syntax_ATT, + DASM_Syntax_COUNT +} +DASM_Syntax; + +//////////////////////////////// +//~ rjf: Disassembly Instruction Info Types + +typedef U32 DASM_InstFlags; +enum +{ + DASM_InstFlag_Call = (1<<0), + DASM_InstFlag_Branch = (1<<1), + DASM_InstFlag_UnconditionalJump = (1<<2), + DASM_InstFlag_Return = (1<<3), + DASM_InstFlag_NonFlow = (1<<4), + DASM_InstFlag_Repeats = (1<<5), + DASM_InstFlag_ChangesStackPointer = (1<<6), + DASM_InstFlag_ChangesStackPointerVariably = (1<<7), +}; + +typedef struct DASM_Inst DASM_Inst; +struct DASM_Inst +{ + DASM_InstFlags flags; + U32 size; + String8 string; + U64 jump_dest_vaddr; +}; + +//////////////////////////////// +//~ rjf: Disassembly Text Decoration Types + +typedef U32 DASM_StyleFlags; +enum +{ + DASM_StyleFlag_Addresses = (1<<0), + DASM_StyleFlag_CodeBytes = (1<<1), + DASM_StyleFlag_SourceFilesNames = (1<<2), + DASM_StyleFlag_SourceLines = (1<<3), + DASM_StyleFlag_SymbolNames = (1<<4), +}; + +//////////////////////////////// +//~ rjf: Disassembling Parameters Bundle + +typedef struct DASM_Params DASM_Params; +struct DASM_Params +{ + U64 vaddr; + Architecture arch; + DASM_StyleFlags style_flags; + DASM_Syntax syntax; + U64 base_vaddr; + DI_Key dbgi_key; +}; + +//////////////////////////////// +//~ rjf: Disassembly Text Line Types + +typedef U32 DASM_LineFlags; +enum +{ + DASM_LineFlag_Decorative = (1<<0), +}; + +typedef struct DASM_Line DASM_Line; +struct DASM_Line +{ + U32 code_off; + DASM_LineFlags flags; + U64 addr; + Rng1U64 text_range; +}; + +typedef struct DASM_LineChunkNode DASM_LineChunkNode; +struct DASM_LineChunkNode +{ + DASM_LineChunkNode *next; + DASM_Line *v; + U64 cap; + U64 count; +}; + +typedef struct DASM_LineChunkList DASM_LineChunkList; +struct DASM_LineChunkList +{ + DASM_LineChunkNode *first; + DASM_LineChunkNode *last; + U64 node_count; + U64 line_count; +}; + +typedef struct DASM_LineArray DASM_LineArray; +struct DASM_LineArray +{ + DASM_Line *v; + U64 count; +}; + +//////////////////////////////// +//~ rjf: Disassembly Result Bundle + +typedef struct DASM_Result DASM_Result; +struct DASM_Result +{ + String8 text; + DASM_LineArray lines; +}; + +//////////////////////////////// +//~ rjf: Value Bundle Type + +typedef struct DASM_Info DASM_Info; +struct DASM_Info +{ + U128 text_key; + DASM_LineArray lines; +}; + +//////////////////////////////// +//~ rjf: Cache Types + +typedef struct DASM_Node DASM_Node; +struct DASM_Node +{ + // rjf: links + DASM_Node *next; + DASM_Node *prev; + + // rjf: key + U128 hash; + DASM_Params params; + + // rjf: generations + U64 change_gen; + + // rjf: value + Arena *info_arena; + DASM_Info info; + + // rjf: metadata + B32 is_working; + U64 scope_ref_count; + U64 last_time_touched_us; + U64 last_user_clock_idx_touched; + U64 load_count; + U64 last_time_requested_us; + U64 last_user_clock_idx_requested; +}; + +typedef struct DASM_Slot DASM_Slot; +struct DASM_Slot +{ + DASM_Node *first; + DASM_Node *last; +}; + +typedef struct DASM_Stripe DASM_Stripe; +struct DASM_Stripe +{ + Arena *arena; + OS_Handle rw_mutex; + OS_Handle cv; + DASM_Node *free_node; +}; + +//////////////////////////////// +//~ rjf: Scoped Access Types + +typedef struct DASM_Touch DASM_Touch; +struct DASM_Touch +{ + DASM_Touch *next; + U128 hash; + DASM_Params params; +}; + +typedef struct DASM_Scope DASM_Scope; +struct DASM_Scope +{ + DASM_Scope *next; + DASM_Touch *top_touch; + U64 base_pos; +}; + +//////////////////////////////// +//~ rjf: Thread Context + +typedef struct DASM_TCTX DASM_TCTX; +struct DASM_TCTX +{ + Arena *arena; +}; + +//////////////////////////////// +//~ rjf: Shared State + +typedef struct DASM_Shared DASM_Shared; +struct DASM_Shared +{ + Arena *arena; + + // rjf: user clock + U64 user_clock_idx; + + // rjf: cache + U64 slots_count; + U64 stripes_count; + DASM_Slot *slots; + DASM_Stripe *stripes; + + // rjf: user -> parse thread + U64 u2p_ring_size; + U8 *u2p_ring_base; + U64 u2p_ring_write_pos; + U64 u2p_ring_read_pos; + OS_Handle u2p_ring_cv; + OS_Handle u2p_ring_mutex; + + // rjf: parse threads + U64 parse_thread_count; + OS_Handle *parse_threads; + + // rjf: evictor/detector thread + OS_Handle evictor_detector_thread; +}; + +//////////////////////////////// +//~ rjf: Globals + +thread_static DASM_TCTX *dasm_tctx = 0; +global DASM_Shared *dasm_shared = 0; + +//////////////////////////////// +//~ rjf: Instruction Decoding/Disassembling Type Functions + +internal DASM_Inst dasm_inst_from_code(Arena *arena, Architecture arch, U64 vaddr, String8 code, DASM_Syntax syntax); + +//////////////////////////////// +//~ rjf: Parameter Type Functions + +internal B32 dasm_params_match(DASM_Params *a, DASM_Params *b); + +//////////////////////////////// +//~ rjf: Line Type Functions + +internal void dasm_line_chunk_list_push(Arena *arena, DASM_LineChunkList *list, U64 cap, DASM_Line *line); +internal DASM_LineArray dasm_line_array_from_chunk_list(Arena *arena, DASM_LineChunkList *list); +internal U64 dasm_line_array_idx_from_code_off__linear_scan(DASM_LineArray *array, U64 off); +internal U64 dasm_line_array_code_off_from_idx(DASM_LineArray *array, U64 idx); + +//////////////////////////////// +//~ rjf: Main Layer Initialization + +internal void dasm_init(void); + +//////////////////////////////// +//~ rjf: User Clock + +internal void dasm_user_clock_tick(void); +internal U64 dasm_user_clock_idx(void); + +//////////////////////////////// +//~ rjf: Scoped Access + +internal DASM_Scope *dasm_scope_open(void); +internal void dasm_scope_close(DASM_Scope *scope); +internal void dasm_scope_touch_node__stripe_r_guarded(DASM_Scope *scope, DASM_Node *node); + +//////////////////////////////// +//~ rjf: Cache Lookups + +internal DASM_Info dasm_info_from_hash_params(DASM_Scope *scope, U128 hash, DASM_Params *params); +internal DASM_Info dasm_info_from_key_params(DASM_Scope *scope, U128 key, DASM_Params *params, U128 *hash_out); + +//////////////////////////////// +//~ rjf: Parse Threads + +internal B32 dasm_u2p_enqueue_req(U128 hash, DASM_Params *params, U64 endt_us); +internal void dasm_u2p_dequeue_req(Arena *arena, U128 *hash_out, DASM_Params *params_out); +internal void dasm_parse_thread__entry_point(void *p); + +//////////////////////////////// +//~ rjf: Evictor/Detector Thread + +internal void dasm_evictor_detector_thread__entry_point(void *p); + +#endif // DASM_CACHE_H diff --git a/src/df/core/df_core.c b/src/df/core/df_core.c index 4d6076e6..23c1b8bb 100644 --- a/src/df/core/df_core.c +++ b/src/df/core/df_core.c @@ -668,175 +668,6 @@ df_string_from_cfg_node_key(DF_CfgNode *node, String8 key, StringMatchFlags flag return child->first->string; } -//////////////////////////////// -//~ rjf: Disassembling - -#include "third_party/udis86/config.h" -#include "third_party/udis86/udis86.h" -#include "third_party/udis86/libudis86/syn.h" - -internal DF_Inst -df_single_inst_from_machine_code__x64(Arena *arena, U64 start_voff, String8 string) -{ - Architecture arch = Architecture_x64; - - //- rjf: prep ud state - struct ud ud_ctx_; - struct ud *ud_ctx = &ud_ctx_; - ud_init(ud_ctx); - ud_set_mode(ud_ctx, bit_size_from_arch(arch)); - ud_set_pc(ud_ctx, start_voff); - ud_set_input_buffer(ud_ctx, string.str, string.size); - ud_set_vendor(ud_ctx, UD_VENDOR_ANY); - ud_set_syntax(ud_ctx, UD_SYN_INTEL); - - //- rjf: disassembly + get info - U32 bytes_disassembled = ud_disassemble(ud_ctx); - struct ud_operand *first_op = (struct ud_operand *)ud_insn_opr(ud_ctx, 0); - U64 rel_voff = (first_op != 0 && first_op->type == UD_OP_JIMM) ? ud_syn_rel_target(ud_ctx, first_op) : 0; - DF_InstFlags flags = 0; - enum ud_mnemonic_code code = ud_insn_mnemonic(ud_ctx); - switch(code) - { - case UD_Icall: - { - flags |= DF_InstFlag_Call; - }break; - - /* TODO(wonchun) - case UD_Iiretd: - case UD_Iiretw: - */ - - case UD_Ija: - case UD_Ijae: - case UD_Ijb: - case UD_Ijbe: - case UD_Ijcxz: - case UD_Ijecxz: - case UD_Ijg: - case UD_Ijge: - case UD_Ijl: - case UD_Ijle: - { - flags |= DF_InstFlag_Branch; - }break; - - case UD_Ijmp: - { - flags |= DF_InstFlag_UnconditionalJump; - }break; - - case UD_Ijno: - case UD_Ijnp: - case UD_Ijns: - case UD_Ijnz: - case UD_Ijo: - case UD_Ijp: - case UD_Ijrcxz: - case UD_Ijs: - case UD_Ijz: - case UD_Iloop: - case UD_Iloope: - case UD_Iloopne: - { - flags |= DF_InstFlag_Branch; - }break; - - case UD_Iret: - case UD_Iretf: - { - flags |= DF_InstFlag_Return; - }break; - - /* TODO(wonchun) - case UD_Isyscall: - case UD_Isysenter: - case UD_Isysexit: - case UD_Isysret: - case UD_Ivmcall: - case UD_Ivmmcall: - */ - default: - { - flags |= DF_InstFlag_NonFlow; - }break; - } - - //- rjf: check for stack pointer modifications - S64 sp_delta = 0; - { - struct ud_operand *dst_op = (struct ud_operand *)ud_insn_opr(ud_ctx, 0); - struct ud_operand *src_op = (struct ud_operand *)ud_insn_opr(ud_ctx, 1); - - // rjf: direct additions/subtractions to RSP - if(dst_op && src_op && dst_op->base == UD_R_RSP && dst_op->type == UD_OP_REG) - { - flags |= DF_InstFlag_ChangesStackPointer; - // TODO(rjf): does the library report constant changes to the stack pointer - // as UD_OP_CONST too? what does UD_OP_JIMM refer to? - if(src_op->base == UD_NONE && src_op->type == UD_OP_IMM && code == UD_Isub) - { - S64 sign = -1; - sp_delta = sign * src_op->lval.sqword; - } - else if(src_op->base == UD_NONE && src_op->type == UD_OP_IMM && code == UD_Iadd) - { - S64 sign = +1; - sp_delta = sign * src_op->lval.sqword; - } - else - { - flags |= DF_InstFlag_ChangesStackPointerVariably; - } - } - - // rjf: push/pop - if(code == UD_Ipush) - { - flags |= DF_InstFlag_ChangesStackPointer; - sp_delta = -8; - } - else if(code == UD_Ipop) - { - flags |= DF_InstFlag_ChangesStackPointer; - sp_delta = +8; - } - - // rjf: mark extra flags - if(ud_ctx->pfx_rep != 0 || - ud_ctx->pfx_repe != 0 || - ud_ctx->pfx_repne != 0) - { - flags |= DF_InstFlag_Repeats; - } - } - - //- rjf: fill+return - DF_Inst inst = {0}; - inst.size = bytes_disassembled; - inst.string = push_str8_copy(arena, str8_cstring((char *)ud_insn_asm(ud_ctx))); - inst.rel_voff = rel_voff; - inst.sp_delta = sp_delta; - inst.flags = flags; - return inst; -} - -internal DF_Inst -df_single_inst_from_machine_code(Arena *arena, Architecture arch, U64 start_voff, String8 string) -{ - DF_Inst result = {0}; - switch(arch) - { - default:{}break; - case Architecture_x64: - { - result = df_single_inst_from_machine_code__x64(arena, start_voff, string); - }break; - } - return result; -} - //////////////////////////////// //~ rjf: Debug Info Extraction Type Pure Functions @@ -859,15 +690,14 @@ df_line_list_copy(Arena *arena, DF_LineList *list) //~ rjf: Control Flow Analysis Functions internal DF_CtrlFlowInfo -df_ctrl_flow_info_from_vaddr_code__x64(Arena *arena, DF_InstFlags exit_points_mask, U64 vaddr, String8 code) +df_ctrl_flow_info_from_arch_vaddr_code(Arena *arena, DASM_InstFlags exit_points_mask, Architecture arch, U64 vaddr, String8 code) { Temp scratch = scratch_begin(&arena, 1); DF_CtrlFlowInfo info = {0}; for(U64 offset = 0; offset < code.size;) { - DF_Inst inst = df_single_inst_from_machine_code__x64(scratch.arena, 0, str8_skip(code, offset)); + DASM_Inst inst = dasm_inst_from_code(scratch.arena, arch, vaddr+offset, str8_skip(code, offset), DASM_Syntax_Intel); U64 inst_vaddr = vaddr+offset; - info.cumulative_sp_delta += inst.sp_delta; offset += inst.size; info.total_size += inst.size; if(inst.flags & exit_points_mask) @@ -875,12 +705,7 @@ df_ctrl_flow_info_from_vaddr_code__x64(Arena *arena, DF_InstFlags exit_points_ma DF_CtrlFlowPoint point = {0}; point.inst_flags = inst.flags; point.vaddr = inst_vaddr; - point.jump_dest_vaddr = 0; - point.expected_sp_delta = info.cumulative_sp_delta; - if(inst.rel_voff != 0) - { - point.jump_dest_vaddr = (U64)(point.vaddr + (S64)((S32)inst.rel_voff)); - } + point.jump_dest_vaddr = inst.jump_dest_vaddr; DF_CtrlFlowPointNode *node = push_array(arena, DF_CtrlFlowPointNode, 1); node->v = point; SLLQueuePush(info.exit_points.first, info.exit_points.last, node); @@ -891,21 +716,6 @@ df_ctrl_flow_info_from_vaddr_code__x64(Arena *arena, DF_InstFlags exit_points_ma return info; } -internal DF_CtrlFlowInfo -df_ctrl_flow_info_from_arch_vaddr_code(Arena *arena, DF_InstFlags exit_points_mask, Architecture arch, U64 vaddr, String8 code) -{ - DF_CtrlFlowInfo result = {0}; - switch(arch) - { - default:{}break; - case Architecture_x64: - { - result = df_ctrl_flow_info_from_vaddr_code__x64(arena, exit_points_mask, vaddr, code); - }break; - } - return result; -} - //////////////////////////////// //~ rjf: Command Type Pure Functions @@ -2833,10 +2643,10 @@ df_trap_net_from_thread__step_over_inst(Arena *arena, DF_Entity *thread) if(machine_code.size != 0) { // rjf: decode instruction - DF_Inst inst = df_single_inst_from_machine_code(scratch.arena, arch, ip_vaddr, machine_code); + DASM_Inst inst = dasm_inst_from_code(scratch.arena, arch, ip_vaddr, machine_code, DASM_Syntax_Intel); // rjf: call => run until call returns - if(inst.flags & DF_InstFlag_Call || inst.flags & DF_InstFlag_Repeats) + if(inst.flags & DASM_InstFlag_Call || inst.flags & DASM_InstFlag_Repeats) { CTRL_Trap trap = {CTRL_TrapFlag_EndStepping, ip_vaddr+inst.size}; ctrl_trap_list_push(arena, &result, &trap); @@ -2925,11 +2735,11 @@ df_trap_net_from_thread__step_over_line(Arena *arena, DF_Entity *thread) if(good_line_info) { ctrl_flow_info = df_ctrl_flow_info_from_arch_vaddr_code(scratch.arena, - DF_InstFlag_Call| - DF_InstFlag_Branch| - DF_InstFlag_UnconditionalJump| - DF_InstFlag_ChangesStackPointer| - DF_InstFlag_Return, + DASM_InstFlag_Call| + DASM_InstFlag_Branch| + DASM_InstFlag_UnconditionalJump| + DASM_InstFlag_ChangesStackPointer| + DASM_InstFlag_Return, arch, line_vaddr_rng.min, machine_code); @@ -2938,7 +2748,7 @@ df_trap_net_from_thread__step_over_line(Arena *arena, DF_Entity *thread) log_infof("flags: %x\n", ctrl_flow_info.flags); LogInfoNamedBlockF("exit_points") for(DF_CtrlFlowPointNode *n = ctrl_flow_info.exit_points.first; n != 0; n = n->next) { - log_infof("{vaddr:0x%I64x, jump_dest_vaddr:0x%I64x, expected_sp_delta:0x%I64x, inst_flags:%x}\n", n->v.vaddr, n->v.jump_dest_vaddr, n->v.expected_sp_delta, n->v.inst_flags); + log_infof("{vaddr:0x%I64x, jump_dest_vaddr:0x%I64x, inst_flags:%x}\n", n->v.vaddr, n->v.jump_dest_vaddr, n->v.inst_flags); } } } @@ -2952,9 +2762,9 @@ df_trap_net_from_thread__step_over_line(Arena *arena, DF_Entity *thread) U64 trap_addr = point->vaddr; // rjf: branches/jumps/returns => single-step & end, OR trap @ destination. - if(point->inst_flags & (DF_InstFlag_Branch| - DF_InstFlag_UnconditionalJump| - DF_InstFlag_Return)) + if(point->inst_flags & (DASM_InstFlag_Branch| + DASM_InstFlag_UnconditionalJump| + DASM_InstFlag_Return)) { flags |= (CTRL_TrapFlag_SingleStepAfterHit|CTRL_TrapFlag_EndStepping); @@ -2974,13 +2784,13 @@ df_trap_net_from_thread__step_over_line(Arena *arena, DF_Entity *thread) } // rjf: call => place spoof at return spot in stack, single-step after hitting - else if(point->inst_flags & DF_InstFlag_Call) + else if(point->inst_flags & DASM_InstFlag_Call) { flags |= (CTRL_TrapFlag_BeginSpoofMode|CTRL_TrapFlag_SingleStepAfterHit); } // rjf: instruction changes stack pointer => save off the stack pointer, single-step over, keep stepping - else if(point->inst_flags & DF_InstFlag_ChangesStackPointer) + else if(point->inst_flags & DASM_InstFlag_ChangesStackPointer) { flags |= (CTRL_TrapFlag_SingleStepAfterHit|CTRL_TrapFlag_SaveStackPointer); } @@ -3066,11 +2876,11 @@ df_trap_net_from_thread__step_into_line(Arena *arena, DF_Entity *thread) if(good_line_info) { ctrl_flow_info = df_ctrl_flow_info_from_arch_vaddr_code(scratch.arena, - DF_InstFlag_Call| - DF_InstFlag_Branch| - DF_InstFlag_UnconditionalJump| - DF_InstFlag_ChangesStackPointer| - DF_InstFlag_Return, + DASM_InstFlag_Call| + DASM_InstFlag_Branch| + DASM_InstFlag_UnconditionalJump| + DASM_InstFlag_ChangesStackPointer| + DASM_InstFlag_Return, arch, line_vaddr_rng.min, machine_code); @@ -3085,10 +2895,10 @@ df_trap_net_from_thread__step_into_line(Arena *arena, DF_Entity *thread) U64 trap_addr = point->vaddr; // rjf: branches/jumps/returns => single-step & end, OR trap @ destination. - if(point->inst_flags & (DF_InstFlag_Call| - DF_InstFlag_Branch| - DF_InstFlag_UnconditionalJump| - DF_InstFlag_Return)) + if(point->inst_flags & (DASM_InstFlag_Call| + DASM_InstFlag_Branch| + DASM_InstFlag_UnconditionalJump| + DASM_InstFlag_Return)) { flags |= (CTRL_TrapFlag_SingleStepAfterHit|CTRL_TrapFlag_EndStepping|CTRL_TrapFlag_IgnoreStackPointerCheck); @@ -3107,7 +2917,7 @@ df_trap_net_from_thread__step_into_line(Arena *arena, DF_Entity *thread) } // rjf: instruction changes stack pointer => save off the stack pointer, single-step over, keep stepping - else if(point->inst_flags & DF_InstFlag_ChangesStackPointer) + else if(point->inst_flags & DASM_InstFlag_ChangesStackPointer) { flags |= (CTRL_TrapFlag_SingleStepAfterHit|CTRL_TrapFlag_SaveStackPointer); } diff --git a/src/df/core/df_core.h b/src/df/core/df_core.h index dd47c823..0c938483 100644 --- a/src/df/core/df_core.h +++ b/src/df/core/df_core.h @@ -138,69 +138,6 @@ typedef enum DF_RunKind } DF_RunKind; -//////////////////////////////// -//~ rjf: Disassembly Types - -typedef U32 DF_InstFlags; -enum -{ - DF_InstFlag_Call = (1<<0), - DF_InstFlag_Branch = (1<<1), - DF_InstFlag_UnconditionalJump = (1<<2), - DF_InstFlag_Return = (1<<3), - DF_InstFlag_NonFlow = (1<<4), - DF_InstFlag_Repeats = (1<<5), - DF_InstFlag_ChangesStackPointer = (1<<6), - DF_InstFlag_ChangesStackPointerVariably = (1<<7), -}; - -typedef struct DF_Inst DF_Inst; -struct DF_Inst -{ - DF_InstFlags flags; - U64 size; - String8 string; - U64 rel_voff; - S64 sp_delta; -}; - -typedef struct DF_InstNode DF_InstNode; -struct DF_InstNode -{ - DF_InstNode *next; - DF_Inst inst; -}; - -typedef struct DF_InstList DF_InstList; -struct DF_InstList -{ - DF_InstNode *first; - DF_InstNode *last; - U64 count; -}; - -typedef struct DF_InstArray DF_InstArray; -struct DF_InstArray -{ - DF_InstArray *v; - U64 count; -}; - -typedef struct DF_InstMemVOffTuple DF_InstMemVOffTuple; -struct DF_InstMemVOffTuple -{ - DF_Inst inst; - String8 mem; - U64 voff; -}; - -typedef struct DF_InstMemVOffTupleArray DF_InstMemVOffTupleArray; -struct DF_InstMemVOffTupleArray -{ - DF_InstMemVOffTuple *v; - U64 count; -}; - //////////////////////////////// //~ rjf: Control Flow Analysis Types @@ -215,8 +152,7 @@ struct DF_CtrlFlowPoint { U64 vaddr; U64 jump_dest_vaddr; - S64 expected_sp_delta; - DF_InstFlags inst_flags; + DASM_InstFlags inst_flags; }; typedef struct DF_CtrlFlowPointNode DF_CtrlFlowPointNode; @@ -240,7 +176,6 @@ struct DF_CtrlFlowInfo DF_CtrlFlowFlags flags; DF_CtrlFlowPointList exit_points; U64 total_size; - S64 cumulative_sp_delta; }; //////////////////////////////// @@ -1456,12 +1391,6 @@ internal String8 df_string_from_cfg_node_children(Arena *arena, DF_CfgNode *node internal Vec4F32 df_hsva_from_cfg_node(DF_CfgNode *node); internal String8 df_string_from_cfg_node_key(DF_CfgNode *node, String8 key, StringMatchFlags flags); -//////////////////////////////// -//~ rjf: Disassembly Pure Functions - -internal DF_Inst df_single_inst_from_machine_code__x64(Arena *arena, U64 start_voff, String8 string); -internal DF_Inst df_single_inst_from_machine_code(Arena *arena, Architecture arch, U64 start_voff, String8 string); - //////////////////////////////// //~ rjf: Debug Info Extraction Type Pure Functions @@ -1470,8 +1399,7 @@ internal DF_LineList df_line_list_copy(Arena *arena, DF_LineList *list); //////////////////////////////// //~ rjf: Control Flow Analysis Pure Functions -internal DF_CtrlFlowInfo df_ctrl_flow_info_from_vaddr_code__x64(Arena *arena, DF_InstFlags exit_points_mask, U64 vaddr, String8 code); -internal DF_CtrlFlowInfo df_ctrl_flow_info_from_arch_vaddr_code(Arena *arena, DF_InstFlags exit_points_mask, Architecture arch, U64 vaddr, String8 code); +internal DF_CtrlFlowInfo df_ctrl_flow_info_from_arch_vaddr_code(Arena *arena, DASM_InstFlags exit_points_mask, Architecture arch, U64 vaddr, String8 code); //////////////////////////////// //~ rjf: Command Type Pure Functions diff --git a/src/df/gfx/df_view_rules.c b/src/df/gfx/df_view_rules.c index d8fb7cfc..93a43467 100644 --- a/src/df/gfx/df_view_rules.c +++ b/src/df/gfx/df_view_rules.c @@ -1,1444 +1,1444 @@ -// Copyright (c) 2024 Epic Games Tools -// Licensed under the MIT license (https://opensource.org/license/mit/) - -//////////////////////////////// -//~ rjf: "array" - -DF_CORE_VIEW_RULE_EVAL_RESOLUTION_FUNCTION_DEF(array) -{ - Temp scratch = scratch_begin(&arena, 1); - TG_Key type_key = eval.type_key; - TG_Kind type_kind = tg_kind_from_key(type_key); - if(type_kind == TG_Kind_Ptr || type_kind == TG_Kind_LRef || type_kind == TG_Kind_RRef) - { - DF_CfgNode *array_node = val->last; - if(array_node != &df_g_nil_cfg_node) - { - // rjf: determine array size - U64 array_size = 0; - { - String8List array_size_expr_strs = {0}; - for(DF_CfgNode *child = array_node->first; child != &df_g_nil_cfg_node; child = child->next) - { - str8_list_push(scratch.arena, &array_size_expr_strs, child->string); - } - String8 array_size_expr = str8_list_join(scratch.arena, &array_size_expr_strs, 0); - DF_Eval array_size_eval = df_eval_from_string(arena, di_scope, ctrl_ctx, parse_ctx, macro_map, array_size_expr); - DF_Eval array_size_eval_value = df_value_mode_eval_from_eval(parse_ctx->type_graph, parse_ctx->rdi, ctrl_ctx, array_size_eval); - eval_error_list_concat_in_place(&eval.errors, &array_size_eval.errors); - array_size = array_size_eval_value.imm_u64; - } - - // rjf: apply array size to type - TG_Key pointee = tg_ptee_from_graph_rdi_key(parse_ctx->type_graph, parse_ctx->rdi, type_key); - TG_Key array_type = tg_cons_type_make(parse_ctx->type_graph, TG_Kind_Array, pointee, array_size); - eval.type_key = tg_cons_type_make(parse_ctx->type_graph, TG_Kind_Ptr, array_type, 0); - } - } - scratch_end(scratch); - return eval; -} - -//////////////////////////////// -//~ rjf: "slice" - -DF_CORE_VIEW_RULE_EVAL_RESOLUTION_FUNCTION_DEF(slice) -{ - return eval; -} - -//////////////////////////////// -//~ rjf: "list" - -DF_CORE_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_DEF(list){} -DF_GFX_VIEW_RULE_VIZ_ROW_PROD_FUNCTION_DEF(list){} - -//////////////////////////////// -//~ rjf: "bswap" - -DF_CORE_VIEW_RULE_EVAL_RESOLUTION_FUNCTION_DEF(bswap) -{ - Temp scratch = scratch_begin(&arena, 1); - TG_Key type_key = eval.type_key; - TG_Kind type_kind = tg_kind_from_key(type_key); - U64 type_size_bytes = tg_byte_size_from_graph_rdi_key(parse_ctx->type_graph, parse_ctx->rdi, type_key); - if(TG_Kind_Char8 <= type_kind && type_kind <= TG_Kind_S256 && - (type_size_bytes == 2 || - type_size_bytes == 4 || - type_size_bytes == 8)) - { - DF_Eval value_eval = df_value_mode_eval_from_eval(parse_ctx->type_graph, parse_ctx->rdi, ctrl_ctx, eval); - if(value_eval.mode == EVAL_EvalMode_Value) - { - switch(type_size_bytes) - { - default:{}break; - case 2:{U16 v = (U16)value_eval.imm_u64; v = bswap_u16(v); value_eval.imm_u64 = (U64)v;}break; - case 4:{U32 v = (U32)value_eval.imm_u64; v = bswap_u32(v); value_eval.imm_u64 = (U64)v;}break; - case 8:{U64 v = value_eval.imm_u64; v = bswap_u64(v); value_eval.imm_u64 = v;}break; - } - } - eval = value_eval; - } - scratch_end(scratch); - return eval; -} - -//////////////////////////////// -//~ rjf: "dec" - -DF_GFX_VIEW_RULE_LINE_STRINGIZE_FUNCTION_DEF(dec){} - -//////////////////////////////// -//~ rjf: "bin" - -DF_GFX_VIEW_RULE_LINE_STRINGIZE_FUNCTION_DEF(bin){} - -//////////////////////////////// -//~ rjf: "oct" - -DF_GFX_VIEW_RULE_LINE_STRINGIZE_FUNCTION_DEF(oct){} - -//////////////////////////////// -//~ rjf: "hex" - -DF_GFX_VIEW_RULE_LINE_STRINGIZE_FUNCTION_DEF(hex){} - -//////////////////////////////// -//~ rjf: "only" - -DF_CORE_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_DEF(only){} -DF_GFX_VIEW_RULE_VIZ_ROW_PROD_FUNCTION_DEF(only){} -DF_GFX_VIEW_RULE_LINE_STRINGIZE_FUNCTION_DEF(only){} - -//////////////////////////////// -//~ rjf: "omit" - -DF_CORE_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_DEF(omit){} -DF_GFX_VIEW_RULE_VIZ_ROW_PROD_FUNCTION_DEF(omit){} -DF_GFX_VIEW_RULE_LINE_STRINGIZE_FUNCTION_DEF(omit){} - -//////////////////////////////// -//~ rjf: "no_addr" - -DF_GFX_VIEW_RULE_LINE_STRINGIZE_FUNCTION_DEF(no_addr){} - -//////////////////////////////// -//~ rjf: "rgba" - -internal Vec4F32 -df_vr_rgba_from_eval(DF_Eval eval, TG_Graph *graph, RDI_Parsed *raddbg, DF_Entity *process) -{ - Vec4F32 rgba = {0}; - Temp scratch = scratch_begin(0, 0); - TG_Key type_key = eval.type_key; - TG_Kind type_kind = tg_kind_from_key(type_key); - switch(type_kind) - { - default:{}break; - - // rjf: extract r/g/b/a bytes from u32 - case TG_Kind_U32: - case TG_Kind_S32: - { - U32 hex_val = (U32)eval.imm_u64; - rgba = rgba_from_u32(hex_val); - }break; - - // rjf: extract r/g/b/a values from array - case TG_Kind_Array: - if(eval.mode == EVAL_EvalMode_Addr) - { - U64 array_total_size = tg_byte_size_from_graph_rdi_key(graph, raddbg, type_key); - U64 array_total_size_capped = ClampTop(array_total_size, 64); - Rng1U64 array_memory_vaddr_rng = r1u64(eval.offset, eval.offset + array_total_size_capped); - CTRL_ProcessMemorySlice array_slice = ctrl_query_cached_data_from_process_vaddr_range(scratch.arena, process->ctrl_machine_id, process->ctrl_handle, array_memory_vaddr_rng, 0); - String8 array_memory = array_slice.data; - TG_Key element_type_key = tg_unwrapped_direct_from_graph_rdi_key(graph, raddbg, type_key); - TG_Kind element_type_kind = tg_kind_from_key(element_type_key); - U64 element_type_size = tg_byte_size_from_graph_rdi_key(graph, raddbg, element_type_key); - for(U64 element_idx = 0; element_idx < 4; element_idx += 1) - { - U64 offset = element_idx*element_type_size; - if(offset >= array_memory.size) - { - break; - } - switch(element_type_kind) - { - default:{}break; - case TG_Kind_U8: - { - U8 byte = array_memory.str[offset]; - rgba.v[element_idx] = byte/255.f; - }break; - case TG_Kind_F32: - { - rgba.v[element_idx] = *(F32 *)(array_memory.str+offset); - }break; - } - } - }break; - - // rjf: extract r/g/b/a values from struct - case TG_Kind_Struct: - case TG_Kind_Class: - case TG_Kind_Union: - if(eval.mode == EVAL_EvalMode_Addr) - { - U64 struct_total_size = tg_byte_size_from_graph_rdi_key(graph, raddbg, type_key); - U64 struct_total_size_capped = ClampTop(struct_total_size, 64); - Rng1U64 struct_memory_vaddr_rng = r1u64(eval.offset, eval.offset + struct_total_size_capped); - CTRL_ProcessMemorySlice struct_slice = ctrl_query_cached_data_from_process_vaddr_range(scratch.arena, process->ctrl_machine_id, process->ctrl_handle, struct_memory_vaddr_rng, 0); - String8 struct_memory = struct_slice.data; - TG_Type *type = tg_type_from_graph_rdi_key(scratch.arena, graph, raddbg, type_key); - for(U64 element_idx = 0, member_idx = 0; - element_idx < 4 && member_idx < type->count; - member_idx += 1) - { - TG_Member *member = &type->members[member_idx]; - TG_Key member_type_key = member->type_key; - TG_Kind member_type_kind = tg_kind_from_key(member_type_key); - B32 member_is_component = 1; - switch(member_type_kind) - { - default:{member_is_component = 0;}break; - case TG_Kind_U8: - { - rgba.v[element_idx] = struct_memory.str[member->off]/255.f; - }break; - case TG_Kind_F32: - { - rgba.v[element_idx] = *(F32 *)(struct_memory.str + member->off); - }break; - } - if(member_is_component) - { - element_idx += 1; - } - } - }break; - } - scratch_end(scratch); - return rgba; -} - -internal void -df_vr_eval_commit_rgba(DF_Eval eval, TG_Graph *graph, RDI_Parsed *raddbg, DF_CtrlCtx *ctrl_ctx, Vec4F32 rgba) -{ - TG_Key type_key = eval.type_key; - TG_Kind type_kind = tg_kind_from_key(type_key); - switch(type_kind) - { - default:{}break; - - // rjf: extract r/g/b/a bytes from u32 - case TG_Kind_U32: - case TG_Kind_S32: - { - U32 val = u32_from_rgba(rgba); - DF_Eval src_eval = eval; - src_eval.mode = EVAL_EvalMode_Value; - src_eval.imm_u64 = (U64)val; - df_commit_eval_value(graph, raddbg, ctrl_ctx, eval, src_eval); - }break; - -#if 0 - // rjf: extract r/g/b/a values from array - case TG_Kind_Array: - if(eval.mode == EVAL_EvalMode_Addr) - { - U64 array_total_size = tg_byte_size_from_graph_rdi_key(graph, raddbg, type_key); - U64 array_total_size_capped = ClampTop(array_total_size, 64); - Rng1U64 array_memory_vaddr_rng = r1u64(eval.offset, eval.offset + array_total_size_capped); - String8 array_memory = ctrl_query_cached_data_from_process_vaddr_range(scratch.arena, process->ctrl_machine_id, process->ctrl_handle, array_memory_vaddr_rng); - TG_Key element_type_key = tg_unwrapped_direct_from_graph_rdi_key(graph, raddbg, type_key); - TG_Kind element_type_kind = tg_kind_from_key(element_type_key); - U64 element_type_size = tg_byte_size_from_graph_rdi_key(graph, raddbg, element_type_key); - for(U64 element_idx = 0; element_idx < 4; element_idx += 1) - { - U64 offset = element_idx*element_type_size; - if(offset >= array_memory.size) - { - break; - } - switch(element_type_kind) - { - default:{}break; - case TG_Kind_U8: - { - U8 byte = array_memory.str[offset]; - rgba.v[element_idx] = byte/255.f; - }break; - case TG_Kind_F32: - { - rgba.v[element_idx] = *(F32 *)(array_memory.str+offset); - }break; - } - } - }break; - - // rjf: extract r/g/b/a values from struct - case TG_Kind_Struct: - case TG_Kind_Class: - case TG_Kind_Union: - if(eval.mode == EVAL_EvalMode_Addr) - { - U64 struct_total_size = tg_byte_size_from_graph_rdi_key(graph, raddbg, type_key); - U64 struct_total_size_capped = ClampTop(struct_total_size, 64); - Rng1U64 struct_memory_vaddr_rng = r1u64(eval.offset, eval.offset + struct_total_size_capped); - String8 struct_memory = ctrl_query_cached_data_from_process_vaddr_range(scratch.arena, process->ctrl_machine_id, process->ctrl_handle, struct_memory_vaddr_rng); - TG_Type *type = tg_type_from_graph_rdi_key(scratch.arena, graph, raddbg, type_key); - for(U64 element_idx = 0, member_idx = 0; - element_idx < 4 && member_idx < type->count; - member_idx += 1) - { - TG_Member *member = &type->members[member_idx]; - TG_Key member_type_key = member->type_key; - TG_Kind member_type_kind = tg_kind_from_key(member_type_key); - B32 member_is_component = 1; - switch(member_type_kind) - { - default:{member_is_component = 0;}break; - case TG_Kind_U8: - { - rgba.v[element_idx] = struct_memory.str[member->off]/255.f; - }break; - case TG_Kind_F32: - { - rgba.v[element_idx] = *(F32 *)(struct_memory.str + member->off); - }break; - } - if(member_is_component) - { - element_idx += 1; - } - } - }break; -#endif - } -} - -DF_CORE_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_DEF(rgba) -{ - DF_EvalVizBlock *vb = df_eval_viz_block_begin(arena, DF_EvalVizBlockKind_Canvas, key, df_expand_key_make(df_hash_from_expand_key(key), 1), depth); - vb->eval = eval; - vb->string = string; - vb->cfg_table = *cfg_table; - vb->visual_idx_range = r1u64(0, 8); - vb->semantic_idx_range = r1u64(0, 1); - df_eval_viz_block_end(out, vb); -} - -DF_GFX_VIEW_RULE_ROW_UI_FUNCTION_DEF(rgba) -{ - Temp scratch = scratch_begin(0, 0); - DF_Entity *thread = df_entity_from_handle(ctrl_ctx->thread); - DF_Entity *process = df_entity_ancestor_from_kind(thread, DF_EntityKind_Process); - - //- rjf: grab hsva - DF_Eval value_eval = df_value_mode_eval_from_eval(parse_ctx->type_graph, parse_ctx->rdi, ctrl_ctx, eval); - Vec4F32 rgba = df_vr_rgba_from_eval(value_eval, parse_ctx->type_graph, parse_ctx->rdi, process); - Vec4F32 hsva = hsva_from_rgba(rgba); - - //- rjf: build text box - UI_Box *text_box = &ui_g_nil_box; - UI_WidthFill DF_Font(ws, DF_FontSlot_Code) - { - text_box = ui_build_box_from_key(UI_BoxFlag_DrawText, ui_key_zero()); - D_FancyStringList fancy_strings = {0}; - { - D_FancyString open_paren = {ui_top_font(), str8_lit("("), ui_top_palette()->text, ui_top_font_size(), 0, 0}; - D_FancyString comma = {ui_top_font(), str8_lit(", "), ui_top_palette()->text, ui_top_font_size(), 0, 0}; - D_FancyString r_fstr = {ui_top_font(), push_str8f(scratch.arena, "%.2f", rgba.x), v4f32(1.f, 0.25f, 0.25f, 1.f), ui_top_font_size(), 4.f, 0}; - D_FancyString g_fstr = {ui_top_font(), push_str8f(scratch.arena, "%.2f", rgba.y), v4f32(0.25f, 1.f, 0.25f, 1.f), ui_top_font_size(), 4.f, 0}; - D_FancyString b_fstr = {ui_top_font(), push_str8f(scratch.arena, "%.2f", rgba.z), v4f32(0.25f, 0.25f, 1.f, 1.f), ui_top_font_size(), 4.f, 0}; - D_FancyString a_fstr = {ui_top_font(), push_str8f(scratch.arena, "%.2f", rgba.w), v4f32(1.f, 1.f, 1.f, 1.f), ui_top_font_size(), 4.f, 0}; - D_FancyString clse_paren = {ui_top_font(), str8_lit(")"), ui_top_palette()->text, ui_top_font_size(), 0, 0}; - d_fancy_string_list_push(scratch.arena, &fancy_strings, &open_paren); - d_fancy_string_list_push(scratch.arena, &fancy_strings, &r_fstr); - d_fancy_string_list_push(scratch.arena, &fancy_strings, &comma); - d_fancy_string_list_push(scratch.arena, &fancy_strings, &g_fstr); - d_fancy_string_list_push(scratch.arena, &fancy_strings, &comma); - d_fancy_string_list_push(scratch.arena, &fancy_strings, &b_fstr); - d_fancy_string_list_push(scratch.arena, &fancy_strings, &comma); - d_fancy_string_list_push(scratch.arena, &fancy_strings, &a_fstr); - d_fancy_string_list_push(scratch.arena, &fancy_strings, &clse_paren); - } - ui_box_equip_display_fancy_strings(text_box, &fancy_strings); - } - - //- rjf: build color box - UI_Box *color_box = &ui_g_nil_box; - UI_PrefWidth(ui_em(1.875f, 1.f)) UI_ChildLayoutAxis(Axis2_Y) - { - color_box = ui_build_box_from_stringf(UI_BoxFlag_Clickable, "color_box"); - UI_Parent(color_box) UI_PrefHeight(ui_em(1.875f, 1.f)) UI_Padding(ui_pct(1, 0)) - { - UI_Palette(ui_build_palette(ui_top_palette(), .background = rgba)) UI_CornerRadius(ui_top_font_size()*0.5f) - ui_build_box_from_key(UI_BoxFlag_DrawBackground|UI_BoxFlag_DrawBorder, ui_key_zero()); - } - } - - //- rjf: space - ui_spacer(ui_em(0.375f, 1.f)); - - //- rjf: hover color box -> show components - UI_Signal sig = ui_signal_from_box(color_box); - if(ui_hovering(sig)) - { - ui_do_color_tooltip_hsva(hsva); - } - - scratch_end(scratch); -} - -DF_GFX_VIEW_RULE_BLOCK_UI_FUNCTION_DEF(rgba) -{ - Temp scratch = scratch_begin(0, 0); - DF_Entity *thread = df_entity_from_handle(ctrl_ctx->thread); - DF_Entity *process = df_entity_ancestor_from_kind(thread, DF_EntityKind_Process); - DF_VR_RGBAState *state = df_view_rule_block_user_state(key, DF_VR_RGBAState); - - //- rjf: grab hsva - Vec4F32 rgba = {0}; - Vec4F32 hsva = {0}; - { - if(state->memgen_idx >= ctrl_mem_gen()) - { - hsva = state->hsva; - rgba = rgba_from_hsva(hsva); - } - else - { - DF_Eval value_eval = df_value_mode_eval_from_eval(parse_ctx->type_graph, parse_ctx->rdi, ctrl_ctx, eval); - rgba = df_vr_rgba_from_eval(value_eval, parse_ctx->type_graph, parse_ctx->rdi, process); - state->hsva = hsva = hsva_from_rgba(rgba); - state->memgen_idx = ctrl_mem_gen(); - } - } - Vec4F32 initial_hsva = hsva; - - //- rjf: build color picker - B32 commit = 0; - UI_Padding(ui_pct(1.f, 0.f)) - { - UI_PrefWidth(ui_px(dim.y, 1.f)) - { - UI_Signal sv_sig = ui_sat_val_pickerf(hsva.x, &hsva.y, &hsva.z, "sat_val_picker"); - commit = commit || ui_released(sv_sig); - } - UI_PrefWidth(ui_em(3.f, 1.f)) - { - UI_Signal h_sig = ui_hue_pickerf(&hsva.x, hsva.y, hsva.z, "hue_picker"); - commit = commit || ui_released(h_sig); - } - UI_PrefWidth(ui_children_sum(1)) UI_Column UI_PrefWidth(ui_text_dim(10, 1)) DF_Font(ws, DF_FontSlot_Code) UI_FlagsAdd(UI_BoxFlag_DrawTextWeak) - { - ui_labelf("Hex"); - ui_labelf("R"); - ui_labelf("G"); - ui_labelf("B"); - ui_labelf("H"); - ui_labelf("S"); - ui_labelf("V"); - ui_labelf("A"); - } - UI_PrefWidth(ui_children_sum(1)) UI_Column UI_PrefWidth(ui_text_dim(10, 1)) DF_Font(ws, DF_FontSlot_Code) - { - String8 hex_string = hex_string_from_rgba_4f32(scratch.arena, rgba); - ui_label(hex_string); - ui_labelf("%.2f", rgba.x); - ui_labelf("%.2f", rgba.y); - ui_labelf("%.2f", rgba.z); - ui_labelf("%.2f", hsva.x); - ui_labelf("%.2f", hsva.y); - ui_labelf("%.2f", hsva.z); - ui_labelf("%.2f", rgba.w); - } - } - - //- rjf: commit edited hsva back - if(commit) - { - Vec4F32 rgba = rgba_from_hsva(hsva); - df_vr_eval_commit_rgba(eval, parse_ctx->type_graph, parse_ctx->rdi, ctrl_ctx, rgba); - state->memgen_idx = ctrl_mem_gen(); - } - - //- rjf: commit possible edited value to state - state->hsva = hsva; - - scratch_end(scratch); -} - -//////////////////////////////// -//~ rjf: "text" - -internal DF_TxtTopologyInfo -df_vr_txt_topology_info_from_cfg(DI_Scope *scope, DF_CtrlCtx *ctrl_ctx, EVAL_ParseCtx *parse_ctx, EVAL_String2ExprMap *macro_map, DF_CfgNode *cfg) -{ - Temp scratch = scratch_begin(0, 0); - DF_TxtTopologyInfo result = zero_struct; - { - StringJoin join = {0}; - join.sep = str8_lit(" "); - DF_CfgNode *size_cfg = df_cfg_node_child_from_string(cfg, str8_lit("size"), 0); - DF_CfgNode *lang_cfg = df_cfg_node_child_from_string(cfg, str8_lit("lang"), 0); - String8List size_expr_strs = {0}; - String8 lang_string = {0}; - for(DF_CfgNode *child = size_cfg->first; child != &df_g_nil_cfg_node; child = child->next) - { - str8_list_push(scratch.arena, &size_expr_strs, child->string); - } - lang_string = lang_cfg->first->string; - String8 size_expr = str8_list_join(scratch.arena, &size_expr_strs, &join); - DF_Eval size_eval = df_eval_from_string(scratch.arena, scope, ctrl_ctx, parse_ctx, macro_map, size_expr); - DF_Eval size_val_eval = df_value_mode_eval_from_eval(parse_ctx->type_graph, parse_ctx->rdi, ctrl_ctx, size_eval); - result.lang = txt_lang_kind_from_extension(lang_string); - result.size_cap = size_val_eval.imm_u64; - } - scratch_end(scratch); - return result; -} - -DF_CORE_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_DEF(text) -{ - DF_EvalVizBlock *vb = df_eval_viz_block_begin(arena, DF_EvalVizBlockKind_Canvas, key, df_expand_key_make(df_hash_from_expand_key(key), 1), depth); - vb->eval = eval; - vb->string = string; - vb->cfg_table = *cfg_table; - vb->visual_idx_range = r1u64(0, 8); - vb->semantic_idx_range = r1u64(0, 1); - df_eval_viz_block_end(out, vb); -} - -DF_GFX_VIEW_RULE_BLOCK_UI_FUNCTION_DEF(text) -{ - Temp scratch = scratch_begin(0, 0); - HS_Scope *hs_scope = hs_scope_open(); - TXT_Scope *txt_scope = txt_scope_open(); - - ////////////////////////////// - //- rjf: get & initialize state - // - DF_VR_TextState *state = df_view_rule_block_user_state(key, DF_VR_TextState); - if(!state->initialized) - { - state->initialized = 1; - state->cursor = state->mark = txt_pt(1, 1); - } - - ////////////////////////////// - //- rjf: unpack evaluation / view rule params - // - DF_Entity *thread = df_entity_from_handle(ctrl_ctx->thread); - DF_Entity *process = df_entity_ancestor_from_kind(thread, DF_EntityKind_Process); - DF_TxtTopologyInfo top = df_vr_txt_topology_info_from_cfg(di_scope, ctrl_ctx, parse_ctx, macro_map, cfg); - DF_Eval value_eval = df_value_mode_eval_from_eval(parse_ctx->type_graph, parse_ctx->rdi, ctrl_ctx, eval); - U64 base_vaddr = value_eval.imm_u64 ? value_eval.imm_u64 : value_eval.offset; - Rng1U64 vaddr_range = r1u64(base_vaddr, base_vaddr + (top.size_cap ? top.size_cap : 2048)); - - ////////////////////////////// - //- rjf: evaluation info -> text visualization info - // - String8 data = {0}; - TXT_TextInfo info = {0}; - TXT_LineTokensSlice line_tokens_slice = {0}; - U128 text_key = {0}; - { - U128 text_hash = {0}; - text_key = ctrl_hash_store_key_from_process_vaddr_range(process->ctrl_machine_id, process->ctrl_handle, vaddr_range, 1); - info = txt_text_info_from_key_lang(txt_scope, text_key, top.lang, &text_hash); - data = hs_data_from_hash(hs_scope, text_hash); - line_tokens_slice = txt_line_tokens_slice_from_info_data_line_range(scratch.arena, &info, data, r1s64(1, info.lines_count)); - } - - ////////////////////////////// - //- rjf: info -> code slice info - // - DF_CodeSliceParams code_slice_params = {0}; - { - code_slice_params.flags = DF_CodeSliceFlag_LineNums; - code_slice_params.line_num_range = r1s64(1, info.lines_count); - code_slice_params.line_text = push_array(scratch.arena, String8, info.lines_count); - code_slice_params.line_ranges = push_array(scratch.arena, Rng1U64, info.lines_count); - code_slice_params.line_tokens = push_array(scratch.arena, TXT_TokenArray, info.lines_count); - code_slice_params.line_bps = push_array(scratch.arena, DF_EntityList, info.lines_count); - code_slice_params.line_ips = push_array(scratch.arena, DF_EntityList, info.lines_count); - code_slice_params.line_pins = push_array(scratch.arena, DF_EntityList, info.lines_count); - code_slice_params.line_vaddrs = push_array(scratch.arena, U64, info.lines_count); - code_slice_params.line_infos = push_array(scratch.arena, DF_LineList, info.lines_count); - for(U64 line_idx = 0; line_idx < info.lines_count; line_idx += 1) - { - code_slice_params.line_text[line_idx] = str8_substr(data, info.lines_ranges[line_idx]); - code_slice_params.line_ranges[line_idx] = info.lines_ranges[line_idx]; - code_slice_params.line_tokens[line_idx] = line_tokens_slice.line_tokens[line_idx]; - } - code_slice_params.font = df_font_from_slot(DF_FontSlot_Code); - code_slice_params.font_size = ui_top_font_size(); - code_slice_params.tab_size = f_column_size_from_tag_size(code_slice_params.font, code_slice_params.font_size)*df_setting_val_from_code(ws, DF_SettingCode_TabWidth).s32; - code_slice_params.line_height_px = ui_top_font_size()*1.5f; - code_slice_params.priority_margin_width_px = 0; - code_slice_params.catchall_margin_width_px = 0; - code_slice_params.line_num_width_px = ui_top_font_size()*5.f; - code_slice_params.line_text_max_width_px = ui_top_font_size()*2.f*info.lines_max_size; - } - - ////////////////////////////// - //- rjf: build UI - // - if(info.lines_count != 0) - { - //- rjf: build top-level container - UI_Box *container = &ui_g_nil_box; - UI_PrefWidth(ui_px(dim.x, 1.f)) UI_PrefHeight(ui_px(dim.y, 1.f)) - { - container = ui_build_box_from_stringf(UI_BoxFlag_AllowOverflow|UI_BoxFlag_Clip, "###text_container"); - } - - //- rjf: build code slice - UI_WidthFill UI_HeightFill UI_Parent(container) - { - DF_CodeSliceSignal slice_sig = df_code_slice(ws, ctrl_ctx, parse_ctx, &code_slice_params, &state->cursor, &state->mark, &state->preferred_column, str8_lit("###slice")); - } - } - - txt_scope_close(txt_scope); - hs_scope_close(hs_scope); - scratch_end(scratch); -} - -DF_VIEW_SETUP_FUNCTION_DEF(text) {} -DF_VIEW_STRING_FROM_STATE_FUNCTION_DEF(text) { return str8_lit(""); } -DF_VIEW_CMD_FUNCTION_DEF(text) {} -DF_VIEW_UI_FUNCTION_DEF(text) -{ -} - -//////////////////////////////// -//~ rjf: "disasm" - -internal DF_DisasmTopologyInfo -df_vr_disasm_topology_info_from_cfg(DI_Scope *scope, DF_CtrlCtx *ctrl_ctx, EVAL_ParseCtx *parse_ctx, EVAL_String2ExprMap *macro_map, DF_CfgNode *cfg) -{ - Temp scratch = scratch_begin(0, 0); - DF_DisasmTopologyInfo result = zero_struct; - { - StringJoin join = {0}; - join.sep = str8_lit(" "); - DF_CfgNode *size_cfg = df_cfg_node_child_from_string(cfg, str8_lit("size"), 0); - DF_CfgNode *arch_cfg = df_cfg_node_child_from_string(cfg, str8_lit("arch"), 0); - String8List size_expr_strs = {0}; - String8 arch_string = {0}; - for(DF_CfgNode *child = size_cfg->first; child != &df_g_nil_cfg_node; child = child->next) - { - str8_list_push(scratch.arena, &size_expr_strs, child->string); - } - arch_string = arch_cfg->first->string; - String8 size_expr = str8_list_join(scratch.arena, &size_expr_strs, &join); - DF_Eval size_eval = df_eval_from_string(scratch.arena, scope, ctrl_ctx, parse_ctx, macro_map, size_expr); - DF_Eval size_val_eval = df_value_mode_eval_from_eval(parse_ctx->type_graph, parse_ctx->rdi, ctrl_ctx, size_eval); - if(str8_match(arch_string, str8_lit("x64"), StringMatchFlag_CaseInsensitive)) - { - result.arch = Architecture_x64; - } - result.size_cap = size_val_eval.imm_u64; - } - scratch_end(scratch); - return result; -} - -DF_CORE_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_DEF(disasm) -{ - DF_EvalVizBlock *vb = df_eval_viz_block_begin(arena, DF_EvalVizBlockKind_Canvas, key, df_expand_key_make(df_hash_from_expand_key(key), 1), depth); - vb->eval = eval; - vb->string = string; - vb->cfg_table = *cfg_table; - vb->visual_idx_range = r1u64(0, 8); - vb->semantic_idx_range = r1u64(0, 1); - df_eval_viz_block_end(out, vb); -} - -DF_GFX_VIEW_RULE_BLOCK_UI_FUNCTION_DEF(disasm) -{ - Temp scratch = scratch_begin(0, 0); - HS_Scope *hs_scope = hs_scope_open(); - TXT_Scope *txt_scope = txt_scope_open(); - DASM_Scope *dasm_scope = dasm_scope_open(); - DF_VR_DisasmState *state = df_view_rule_block_user_state(key, DF_VR_DisasmState); - if(!state->initialized) - { - state->initialized = 1; - state->cursor = state->mark = txt_pt(1, 1); - } - if(state->last_open_frame_idx+1 < df_frame_index()) - { - state->loaded_t = 0; - } - state->last_open_frame_idx = df_frame_index(); - { - //- rjf: unpack params - DF_DisasmTopologyInfo top = df_vr_disasm_topology_info_from_cfg(di_scope, ctrl_ctx, parse_ctx, macro_map, cfg); - - //- rjf: resolve to address value & range - DF_Eval value_eval = df_value_mode_eval_from_eval(parse_ctx->type_graph, parse_ctx->rdi, ctrl_ctx, eval); - U64 base_vaddr = value_eval.imm_u64 ? value_eval.imm_u64 : value_eval.offset; - Rng1U64 vaddr_range = r1u64(base_vaddr, base_vaddr + (top.size_cap ? top.size_cap : 2048)); - - //- rjf: unpack thread/process of eval - DF_Entity *thread = df_entity_from_handle(ctrl_ctx->thread); - DF_Entity *process = df_entity_ancestor_from_kind(thread, DF_EntityKind_Process); - - //- rjf: unpack key for this region in memory - U128 dasm_key = ctrl_hash_store_key_from_process_vaddr_range(process->ctrl_machine_id, process->ctrl_handle, vaddr_range, 0); - - //- rjf: key -> parsed text info - U128 data_hash = {0}; - DASM_Params dasm_params = {0}; - { - dasm_params.vaddr = vaddr_range.min; - dasm_params.arch = top.arch; - dasm_params.style_flags = DASM_StyleFlag_Addresses; - dasm_params.syntax = DASM_Syntax_Intel; - dasm_params.base_vaddr = 0; - } - DASM_Info dasm_info = dasm_info_from_key_params(dasm_scope, dasm_key, &dasm_params, &data_hash); - String8 dasm_text_data = {0}; - TXT_TextInfo dasm_text_info = {0}; - TXT_LangKind lang_kind = TXT_LangKind_DisasmX64Intel; - for(U64 rewind_idx = 0; rewind_idx < 2; rewind_idx += 1) - { - U128 dasm_text_hash = hs_hash_from_key(dasm_info.text_key, rewind_idx); - dasm_text_data = hs_data_from_hash(hs_scope, dasm_text_hash); - dasm_text_info = txt_text_info_from_hash_lang(txt_scope, dasm_text_hash, lang_kind); - if(dasm_text_info.lines_count != 0) - { - break; - } - } - TXT_LineTokensSlice line_tokens_slice = txt_line_tokens_slice_from_info_data_line_range(scratch.arena, &dasm_text_info, dasm_text_data, r1s64(1, dasm_info.insts.count)); - - //- rjf: info -> code slice info - DF_CodeSliceParams code_slice_params = {0}; - { - code_slice_params.flags = DF_CodeSliceFlag_LineNums; - code_slice_params.line_num_range = r1s64(1, dasm_text_info.lines_count); - code_slice_params.line_text = push_array(scratch.arena, String8, dasm_text_info.lines_count); - code_slice_params.line_ranges = push_array(scratch.arena, Rng1U64, dasm_text_info.lines_count); - code_slice_params.line_tokens = push_array(scratch.arena, TXT_TokenArray, dasm_text_info.lines_count); - code_slice_params.line_bps = push_array(scratch.arena, DF_EntityList, dasm_text_info.lines_count); - code_slice_params.line_ips = push_array(scratch.arena, DF_EntityList, dasm_text_info.lines_count); - code_slice_params.line_pins = push_array(scratch.arena, DF_EntityList, dasm_text_info.lines_count); - code_slice_params.line_vaddrs = push_array(scratch.arena, U64, dasm_text_info.lines_count); - code_slice_params.line_infos = push_array(scratch.arena, DF_LineList, dasm_text_info.lines_count); - for(U64 line_idx = 0; line_idx < dasm_text_info.lines_count; line_idx += 1) - { - code_slice_params.line_text[line_idx] = str8_substr(dasm_text_data, dasm_info.insts.v[line_idx].text_range); - code_slice_params.line_ranges[line_idx] = dasm_info.insts.v[line_idx].text_range; - code_slice_params.line_tokens[line_idx] = line_tokens_slice.line_tokens[line_idx]; - } - code_slice_params.font = df_font_from_slot(DF_FontSlot_Code); - code_slice_params.font_size = ui_top_font_size(); - code_slice_params.tab_size = f_column_size_from_tag_size(code_slice_params.font, code_slice_params.font_size)*df_setting_val_from_code(ws, DF_SettingCode_TabWidth).s32; - code_slice_params.line_height_px = ui_top_font_size()*1.5f; - code_slice_params.priority_margin_width_px = 0; - code_slice_params.catchall_margin_width_px = 0; - code_slice_params.line_num_width_px = ui_top_font_size()*5.f; - code_slice_params.line_text_max_width_px = ui_top_font_size()*2.f*dasm_text_info.lines_max_size; - } - - //- rjf: build code slice - if(dasm_info.insts.count != 0 && dasm_text_info.lines_count != 0) - UI_Padding(ui_pct(1, 0)) UI_PrefWidth(ui_px(dasm_text_info.lines_max_size*ui_top_font_size()*1.2f, 1.f)) UI_Column UI_Padding(ui_pct(1, 0)) - { - DF_CodeSliceSignal sig = df_code_slice(ws, ctrl_ctx, parse_ctx, &code_slice_params, &state->cursor, &state->mark, &state->preferred_column, str8_lit("###code_slice")); - } - } - dasm_scope_close(dasm_scope); - txt_scope_close(txt_scope); - hs_scope_close(hs_scope); - scratch_end(scratch); -} - -DF_VIEW_SETUP_FUNCTION_DEF(disasm) {} -DF_VIEW_STRING_FROM_STATE_FUNCTION_DEF(disasm) { return str8_lit(""); } -DF_VIEW_CMD_FUNCTION_DEF(disasm) {} -DF_VIEW_UI_FUNCTION_DEF(disasm) -{ -} - -//////////////////////////////// -//~ rjf: "graph" - -DF_CORE_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_DEF(graph) -{ - DF_EvalVizBlock *vb = df_eval_viz_block_begin(arena, DF_EvalVizBlockKind_Canvas, key, df_expand_key_make(df_hash_from_expand_key(key), 1), depth); - vb->eval = eval; - vb->string = string; - vb->cfg_table = *cfg_table; - vb->visual_idx_range = r1u64(0, 8); - vb->semantic_idx_range = r1u64(0, 1); - df_eval_viz_block_end(out, vb); -} - -DF_GFX_VIEW_RULE_BLOCK_UI_FUNCTION_DEF(graph) -{ -} - -DF_VIEW_SETUP_FUNCTION_DEF(graph) {} -DF_VIEW_STRING_FROM_STATE_FUNCTION_DEF(graph) { return str8_lit(""); } -DF_VIEW_CMD_FUNCTION_DEF(graph) {} -DF_VIEW_UI_FUNCTION_DEF(graph) -{ -} - -//////////////////////////////// -//~ rjf: "bitmap" - -internal Vec2F32 -df_bitmap_view_state__screen_from_canvas_pos(DF_BitmapViewState *bvs, Rng2F32 rect, Vec2F32 cvs) -{ - Vec2F32 scr = - { - (rect.x0+rect.x1)/2 + (cvs.x - bvs->view_center_pos.x) * bvs->zoom, - (rect.y0+rect.y1)/2 + (cvs.y - bvs->view_center_pos.y) * bvs->zoom, - }; - return scr; -} - -internal Rng2F32 -df_bitmap_view_state__screen_from_canvas_rect(DF_BitmapViewState *bvs, Rng2F32 rect, Rng2F32 cvs) -{ - Rng2F32 scr = r2f32(df_bitmap_view_state__screen_from_canvas_pos(bvs, rect, cvs.p0), df_bitmap_view_state__screen_from_canvas_pos(bvs, rect, cvs.p1)); - return scr; -} - -internal Vec2F32 -df_bitmap_view_state__canvas_from_screen_pos(DF_BitmapViewState *bvs, Rng2F32 rect, Vec2F32 scr) -{ - Vec2F32 cvs = - { - (scr.x - (rect.x0+rect.x1)/2) / bvs->zoom + bvs->view_center_pos.x, - (scr.y - (rect.y0+rect.y1)/2) / bvs->zoom + bvs->view_center_pos.y, - }; - return cvs; -} - -internal Rng2F32 -df_bitmap_view_state__canvas_from_screen_rect(DF_BitmapViewState *bvs, Rng2F32 rect, Rng2F32 scr) -{ - Rng2F32 cvs = r2f32(df_bitmap_view_state__canvas_from_screen_pos(bvs, rect, scr.p0), df_bitmap_view_state__canvas_from_screen_pos(bvs, rect, scr.p1)); - return cvs; -} - -internal DF_BitmapTopologyInfo -df_vr_bitmap_topology_info_from_cfg(DI_Scope *scope, DF_CtrlCtx *ctrl_ctx, EVAL_ParseCtx *parse_ctx, EVAL_String2ExprMap *macro_map, DF_CfgNode *cfg) -{ - Temp scratch = scratch_begin(0, 0); - DF_BitmapTopologyInfo info = {0}; - { - info.fmt = R_Tex2DFormat_RGBA8; - } - { - DF_CfgNode *width_cfg = df_cfg_node_child_from_string(cfg, str8_lit("w"), 0); - DF_CfgNode *height_cfg = df_cfg_node_child_from_string(cfg, str8_lit("h"), 0); - DF_CfgNode *fmt_cfg = df_cfg_node_child_from_string(cfg, str8_lit("fmt"), 0); - String8List width_expr_strs = {0}; - String8List height_expr_strs = {0}; - for(DF_CfgNode *child = width_cfg->first; child != &df_g_nil_cfg_node; child = child->next) - { - str8_list_push(scratch.arena, &width_expr_strs, child->string); - } - for(DF_CfgNode *child = height_cfg->first; child != &df_g_nil_cfg_node; child = child->next) - { - str8_list_push(scratch.arena, &height_expr_strs, child->string); - } - String8 width_expr = str8_list_join(scratch.arena, &width_expr_strs, 0); - String8 height_expr = str8_list_join(scratch.arena, &height_expr_strs, 0); - String8 fmt_string = fmt_cfg->first->string; - DF_Eval width_eval = df_eval_from_string(scratch.arena, scope, ctrl_ctx, parse_ctx, macro_map, width_expr); - DF_Eval width_eval_value = df_value_mode_eval_from_eval(parse_ctx->type_graph, parse_ctx->rdi, ctrl_ctx, width_eval); - info.width = width_eval_value.imm_u64; - DF_Eval height_eval = df_eval_from_string(scratch.arena, scope, ctrl_ctx, parse_ctx, macro_map, height_expr); - DF_Eval height_eval_value = df_value_mode_eval_from_eval(parse_ctx->type_graph, parse_ctx->rdi, ctrl_ctx, height_eval); - info.height = height_eval_value.imm_u64; - if(fmt_string.size != 0) - { - for(R_Tex2DFormat fmt = (R_Tex2DFormat)0; fmt < R_Tex2DFormat_COUNT; fmt = (R_Tex2DFormat)(fmt+1)) - { - if(str8_match(r_tex2d_format_display_string_table[fmt], fmt_string, StringMatchFlag_CaseInsensitive)) - { - info.fmt = fmt; - break; - } - } - } - } - scratch_end(scratch); - return info; -} - -internal UI_BOX_CUSTOM_DRAW(df_vr_bitmap_box_draw) -{ - DF_VR_BitmapBoxDrawData *draw_data = (DF_VR_BitmapBoxDrawData *)user_data; - Vec4F32 bg_color = box->palette->background; - d_img(box->rect, draw_data->src, draw_data->texture, v4f32(1, 1, 1, 1), 0, 0, 0); - if(draw_data->loaded_t < 0.98f) - { - Rng2F32 clip = box->rect; - for(UI_Box *b = box->parent; !ui_box_is_nil(b); b = b->parent) - { - if(b->flags & UI_BoxFlag_Clip) - { - clip = intersect_2f32(b->rect, clip); - } - } - d_blur(intersect_2f32(clip, box->rect), 10.f-9.f*draw_data->loaded_t, 0); - } - if(r_handle_match(draw_data->texture, r_handle_zero())) - { - d_rect(box->rect, v4f32(0, 0, 0, 1), 0, 0, 0); - } - d_rect(box->rect, v4f32(bg_color.x*bg_color.w, bg_color.y*bg_color.w, bg_color.z*bg_color.w, 1.f-draw_data->loaded_t), 0, 0, 0); - if(draw_data->hovered) - { - Vec4F32 indicator_color = v4f32(1, 1, 1, 1); - d_rect(pad_2f32(r2f32p(box->rect.x0 + draw_data->mouse_px.x*draw_data->ui_per_bmp_px, - box->rect.y0 + draw_data->mouse_px.y*draw_data->ui_per_bmp_px, - box->rect.x0 + draw_data->mouse_px.x*draw_data->ui_per_bmp_px + draw_data->ui_per_bmp_px, - box->rect.y0 + draw_data->mouse_px.y*draw_data->ui_per_bmp_px + draw_data->ui_per_bmp_px), - 3.f), - indicator_color, 3.f, 4.f, 1.f); - } -} - -DF_CORE_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_DEF(bitmap) -{ - DF_EvalVizBlock *vb = df_eval_viz_block_begin(arena, DF_EvalVizBlockKind_Canvas, key, df_expand_key_make(df_hash_from_expand_key(key), 1), depth); - vb->eval = eval; - vb->string = string; - vb->cfg_table = *cfg_table; - vb->visual_idx_range = r1u64(0, 8); - vb->semantic_idx_range = r1u64(0, 1); - df_eval_viz_block_end(out, vb); -} - -DF_GFX_VIEW_RULE_ROW_UI_FUNCTION_DEF(bitmap) -{ - DF_Eval value_eval = df_value_mode_eval_from_eval(parse_ctx->type_graph, parse_ctx->rdi, ctrl_ctx, eval); - U64 base_vaddr = value_eval.imm_u64 ? value_eval.imm_u64 : value_eval.offset; - DF_BitmapTopologyInfo topology = df_vr_bitmap_topology_info_from_cfg(scope, ctrl_ctx, parse_ctx, macro_map, cfg); - U64 expected_size = topology.width*topology.height*r_tex2d_format_bytes_per_pixel_table[topology.fmt]; - DF_Font(ws, DF_FontSlot_Code) UI_FlagsAdd(UI_BoxFlag_DrawTextWeak) - ui_labelf("0x%I64x -> Bitmap (%I64u x %I64u)", base_vaddr, topology.width, topology.height); -} - -DF_GFX_VIEW_RULE_BLOCK_UI_FUNCTION_DEF(bitmap) -{ - Temp scratch = scratch_begin(0, 0); - HS_Scope *hs_scope = hs_scope_open(); - TEX_Scope *tex_scope = tex_scope_open(); - DF_VR_BitmapState *state = df_view_rule_block_user_state(key, DF_VR_BitmapState); - if(state->last_open_frame_idx+1 < df_frame_index()) - { - state->loaded_t = 0; - } - state->last_open_frame_idx = df_frame_index(); - - ////////////////////////////// - //- rjf: unpack context - // - DF_Entity *thread = df_entity_from_handle(ctrl_ctx->thread); - DF_Entity *process = df_entity_ancestor_from_kind(thread, DF_EntityKind_Process); - - ////////////////////////////// - //- rjf: evaluate expression - // - DF_Eval value_eval = df_value_mode_eval_from_eval(parse_ctx->type_graph, parse_ctx->rdi, ctrl_ctx, eval); - U64 base_vaddr = value_eval.imm_u64 ? value_eval.imm_u64 : value_eval.offset; - DF_BitmapTopologyInfo topology_info = df_vr_bitmap_topology_info_from_cfg(di_scope, ctrl_ctx, parse_ctx, macro_map, cfg); - U64 expected_size = topology_info.width*topology_info.height*r_tex2d_format_bytes_per_pixel_table[topology_info.fmt]; - Rng1U64 vaddr_range = r1u64(base_vaddr, base_vaddr+expected_size); - - ////////////////////////////// - //- rjf: map expression artifacts -> texture - // - U128 texture_key = ctrl_hash_store_key_from_process_vaddr_range(process->ctrl_machine_id, process->ctrl_handle, vaddr_range, 0); - TEX_Topology topology = tex_topology_make(v2s32((S32)topology_info.width, (S32)topology_info.height), topology_info.fmt); - R_Handle texture = tex_texture_from_key_topology(tex_scope, texture_key, topology, 0); - - ////////////////////////////// - //- rjf: animate - // - if(expected_size != 0) - { - if(r_handle_match(r_handle_zero(), texture)) - { - df_gfx_request_frame(); - state->loaded_t = 0; - } - else - { - F32 rate = 1 - pow_f32(2, (-15.f * df_dt())); - state->loaded_t += (1.f - state->loaded_t) * rate; - if(state->loaded_t < 0.99f) - { - df_gfx_request_frame(); - } - } - } - - ////////////////////////////// - //- rjf: build preview - // - if(expected_size != 0) - { - F32 img_dim = dim.y - ui_top_font_size()*2.f; - UI_Padding(ui_pct(1.f, 0.f)) - UI_PrefWidth(ui_px(img_dim*((F32)topology_info.width/(F32)topology_info.height), 1.f)) - UI_Column UI_Padding(ui_pct(1.f, 0.f)) - UI_PrefHeight(ui_px(img_dim, 1.f)) - { - ui_image(texture, R_Tex2DSampleKind_Nearest, r2f32(v2f32(0, 0), v2f32((F32)topology_info.width, (F32)topology_info.height)), v4f32(1, 1, 1, state->loaded_t), 10.f*(1-state->loaded_t), str8_lit("image_box")); - } - } - - tex_scope_close(tex_scope); - hs_scope_close(hs_scope); - scratch_end(scratch); -} - -DF_VIEW_SETUP_FUNCTION_DEF(bitmap) -{ - DF_BitmapViewState *bvs = df_view_user_state(view, DF_BitmapViewState); - DI_Scope *di_scope = di_scope_open(); - DF_CfgNode *view_center_cfg = df_cfg_node_child_from_string(cfg_root, str8_lit("view_center"), StringMatchFlag_CaseInsensitive); - DF_CfgNode *zoom_cfg = df_cfg_node_child_from_string(cfg_root, str8_lit("zoom"), StringMatchFlag_CaseInsensitive); - DF_CfgNode *bitmap_cfg = df_cfg_node_child_from_string(cfg_root, str8_lit("bitmap"), StringMatchFlag_CaseInsensitive); - DF_CtrlCtx ctrl_ctx = df_ctrl_ctx_from_view(ws, view); - DF_Entity *thread = df_entity_from_handle(ctrl_ctx.thread); - DF_Entity *process = df_entity_ancestor_from_kind(thread, DF_EntityKind_Process); - U64 thread_unwind_rip_vaddr = df_query_cached_rip_from_thread_unwind(thread, ctrl_ctx.unwind_count); - EVAL_ParseCtx parse_ctx = df_eval_parse_ctx_from_process_vaddr(di_scope, process, thread_unwind_rip_vaddr); - bvs->view_center_pos.x = (F32)f64_from_str8(bitmap_cfg->first->string); - bvs->view_center_pos.y = (F32)f64_from_str8(bitmap_cfg->first->next->string); - bvs->zoom = (F32)f64_from_str8(zoom_cfg->first->string); - bvs->top = df_vr_bitmap_topology_info_from_cfg(di_scope, &ctrl_ctx, &parse_ctx, &eval_string2expr_map_nil, bitmap_cfg); - if(bvs->zoom == 0) - { - bvs->zoom = 1.f; - } - di_scope_close(di_scope); -} - -DF_VIEW_STRING_FROM_STATE_FUNCTION_DEF(bitmap) -{ - DF_BitmapViewState *bvs = df_view_user_state(view, DF_BitmapViewState); - String8 result = push_str8f(arena, "view_center:(%.2f %.2f) zoom:(%.2f) bitmap:(w:%I64u, h:%I64u, fmt:%S)", - bvs->view_center_pos.x, - bvs->view_center_pos.y, - bvs->zoom, - bvs->top.width, - bvs->top.height, - r_tex2d_format_display_string_table[bvs->top.fmt]); - return result; -} - -DF_VIEW_CMD_FUNCTION_DEF(bitmap) -{ -} - -internal UI_BOX_CUSTOM_DRAW(df_bitmap_view_canvas_box_draw) -{ - DF_BitmapViewState *bvs = (DF_BitmapViewState *)user_data; - Rng2F32 rect_scrn = box->rect; - Rng2F32 rect_cvs = df_bitmap_view_state__canvas_from_screen_rect(bvs, rect_scrn, rect_scrn); - F32 grid_cell_size_cvs = box->font_size*10.f; - F32 grid_line_thickness_px = Max(2.f, box->font_size*0.1f); - Vec4F32 grid_line_color = df_rgba_from_theme_color(DF_ThemeColor_TextWeak); - for(EachEnumVal(Axis2, axis)) - { - for(F32 v = rect_cvs.p0.v[axis] - mod_f32(rect_cvs.p0.v[axis], grid_cell_size_cvs); - v < rect_cvs.p1.v[axis]; - v += grid_cell_size_cvs) - { - Vec2F32 p_cvs = {0}; - p_cvs.v[axis] = v; - Vec2F32 p_scr = df_bitmap_view_state__screen_from_canvas_pos(bvs, rect_scrn, p_cvs); - Rng2F32 rect = {0}; - rect.p0.v[axis] = p_scr.v[axis] - grid_line_thickness_px/2; - rect.p1.v[axis] = p_scr.v[axis] + grid_line_thickness_px/2; - rect.p0.v[axis2_flip(axis)] = box->rect.p0.v[axis2_flip(axis)]; - rect.p1.v[axis2_flip(axis)] = box->rect.p1.v[axis2_flip(axis)]; - d_rect(rect, grid_line_color, 0, 0, 1.f); - } - } -} - -DF_VIEW_UI_FUNCTION_DEF(bitmap) -{ - DF_BitmapViewState *bvs = df_view_user_state(view, DF_BitmapViewState); - Temp scratch = scratch_begin(0, 0); - DI_Scope *di_scope = di_scope_open(); - HS_Scope *hs_scope = hs_scope_open(); - TEX_Scope *tex_scope = tex_scope_open(); - - ////////////////////////////// - //- rjf: unpack context - // - DF_CtrlCtx ctrl_ctx = df_ctrl_ctx_from_view(ws, view); - DF_Entity *thread = df_entity_from_handle(ctrl_ctx.thread); - DF_Entity *process = df_entity_ancestor_from_kind(thread, DF_EntityKind_Process); - U64 thread_unwind_rip_vaddr = df_query_cached_rip_from_thread_unwind(thread, ctrl_ctx.unwind_count); - EVAL_ParseCtx parse_ctx = df_eval_parse_ctx_from_process_vaddr(di_scope, process, thread_unwind_rip_vaddr); - - ////////////////////////////// - //- rjf: evaluate expression - // - String8 expr = str8(view->query_buffer, view->query_string_size); - DF_Eval eval = df_eval_from_string(scratch.arena, di_scope, &ctrl_ctx, &parse_ctx, &eval_string2expr_map_nil, expr); - DF_Eval value_eval = df_value_mode_eval_from_eval(parse_ctx.type_graph, parse_ctx.rdi, &ctrl_ctx, eval); - U64 base_vaddr = value_eval.imm_u64 ? value_eval.imm_u64 : value_eval.offset; - U64 expected_size = bvs->top.width*bvs->top.height*r_tex2d_format_bytes_per_pixel_table[bvs->top.fmt]; - Rng1U64 vaddr_range = r1u64(base_vaddr, base_vaddr+expected_size); - - ////////////////////////////// - //- rjf: map expression artifacts -> texture - // - U128 texture_key = ctrl_hash_store_key_from_process_vaddr_range(process->ctrl_machine_id, process->ctrl_handle, vaddr_range, 0); - TEX_Topology topology = tex_topology_make(v2s32((S32)bvs->top.width, (S32)bvs->top.height), bvs->top.fmt); - U128 data_hash = {0}; - R_Handle texture = tex_texture_from_key_topology(tex_scope, texture_key, topology, &data_hash); - String8 data = hs_data_from_hash(hs_scope, data_hash); - - ////////////////////////////// - //- rjf: build canvas box - // - UI_Box *canvas_box = &ui_g_nil_box; - Vec2F32 canvas_dim = dim_2f32(rect); - Rng2F32 canvas_rect = r2f32p(0, 0, canvas_dim.x, canvas_dim.y); - UI_Rect(canvas_rect) - { - canvas_box = ui_build_box_from_stringf(UI_BoxFlag_Clip|UI_BoxFlag_Clickable|UI_BoxFlag_Scroll, "bmp_canvas_%p", view); - ui_box_equip_custom_draw(canvas_box, df_bitmap_view_canvas_box_draw, bvs); - } - - ////////////////////////////// - //- rjf: canvas dragging - // - UI_Signal canvas_sig = ui_signal_from_box(canvas_box); - { - if(ui_dragging(canvas_sig)) - { - if(ui_pressed(canvas_sig)) - { - DF_CmdParams p = df_cmd_params_from_view(ws, panel, view); - df_push_cmd__root(&p, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_FocusPanel)); - ui_store_drag_struct(&bvs->view_center_pos); - } - Vec2F32 start_view_center_pos = *ui_get_drag_struct(Vec2F32); - Vec2F32 drag_delta_scr = ui_drag_delta(); - Vec2F32 drag_delta_cvs = scale_2f32(drag_delta_scr, 1.f/bvs->zoom); - Vec2F32 new_view_center_pos = sub_2f32(start_view_center_pos, drag_delta_cvs); - bvs->view_center_pos = new_view_center_pos; - } - if(canvas_sig.scroll.y != 0) - { - F32 new_zoom = bvs->zoom - bvs->zoom*canvas_sig.scroll.y/10.f; - new_zoom = Clamp(1.f/256.f, new_zoom, 256.f); - Vec2F32 mouse_scr_pre = sub_2f32(ui_mouse(), rect.p0); - Vec2F32 mouse_cvs = df_bitmap_view_state__canvas_from_screen_pos(bvs, canvas_rect, mouse_scr_pre); - bvs->zoom = new_zoom; - Vec2F32 mouse_scr_pst = df_bitmap_view_state__screen_from_canvas_pos(bvs, canvas_rect, mouse_cvs); - Vec2F32 drift_scr = sub_2f32(mouse_scr_pst, mouse_scr_pre); - bvs->view_center_pos = add_2f32(bvs->view_center_pos, scale_2f32(drift_scr, 1.f/new_zoom)); - } - if(ui_double_clicked(canvas_sig)) - { - ui_kill_action(); - MemoryZeroStruct(&bvs->view_center_pos); - bvs->zoom = 1.f; - } - } - - ////////////////////////////// - //- rjf: calculate image coordinates - // - Rng2F32 img_rect_cvs = r2f32p(-topology.dim.x/2, -topology.dim.y/2, +topology.dim.x/2, +topology.dim.y/2); - Rng2F32 img_rect_scr = df_bitmap_view_state__screen_from_canvas_rect(bvs, canvas_rect, img_rect_cvs); - - ////////////////////////////// - //- rjf: image-region canvas interaction - // - Vec2S32 mouse_bmp = {-1, -1}; - if(ui_hovering(canvas_sig) && !ui_dragging(canvas_sig)) - { - Vec2F32 mouse_scr = sub_2f32(ui_mouse(), rect.p0); - Vec2F32 mouse_cvs = df_bitmap_view_state__canvas_from_screen_pos(bvs, canvas_rect, mouse_scr); - if(contains_2f32(img_rect_cvs, mouse_cvs)) - { - mouse_bmp = v2s32((S32)(mouse_cvs.x-img_rect_cvs.x0), (S32)(mouse_cvs.y-img_rect_cvs.y0)); - S64 off_px = mouse_bmp.y*topology.dim.x + mouse_bmp.x; - S64 off_bytes = off_px*r_tex2d_format_bytes_per_pixel_table[topology.fmt]; - if(0 <= off_bytes && off_bytes+r_tex2d_format_bytes_per_pixel_table[topology.fmt] <= data.size && - r_tex2d_format_bytes_per_pixel_table[topology.fmt] != 0) - { - B32 color_is_good = 1; - Vec4F32 color = {0}; - switch(topology.fmt) - { - default:{color_is_good = 0;}break; - case R_Tex2DFormat_R8: {color = v4f32(((U8 *)(data.str+off_bytes))[0]/255.f, 0, 0, 1);}break; - case R_Tex2DFormat_RG8: {color = v4f32(((U8 *)(data.str+off_bytes))[0]/255.f, ((U8 *)(data.str+off_bytes))[1]/255.f, 0, 1);}break; - case R_Tex2DFormat_RGBA8: {color = v4f32(((U8 *)(data.str+off_bytes))[0]/255.f, ((U8 *)(data.str+off_bytes))[1]/255.f, ((U8 *)(data.str+off_bytes))[2]/255.f, ((U8 *)(data.str+off_bytes))[3]/255.f);}break; - case R_Tex2DFormat_BGRA8: {color = v4f32(((U8 *)(data.str+off_bytes))[3]/255.f, ((U8 *)(data.str+off_bytes))[2]/255.f, ((U8 *)(data.str+off_bytes))[1]/255.f, ((U8 *)(data.str+off_bytes))[0]/255.f);}break; - case R_Tex2DFormat_R16: {color = v4f32(((U16 *)(data.str+off_bytes))[0]/(F32)max_U16, 0, 0, 1);}break; - case R_Tex2DFormat_RGBA16: {color = v4f32(((U16 *)(data.str+off_bytes))[0]/(F32)max_U16, ((U16 *)(data.str+off_bytes))[1]/(F32)max_U16, ((U16 *)(data.str+off_bytes))[2]/(F32)max_U16, ((U16 *)(data.str+off_bytes))[3]/(F32)max_U16);}break; - case R_Tex2DFormat_R32: {color = v4f32(((F32 *)(data.str+off_bytes))[0], 0, 0, 1);}break; - case R_Tex2DFormat_RG32: {color = v4f32(((F32 *)(data.str+off_bytes))[0], ((F32 *)(data.str+off_bytes))[1], 0, 1);}break; - case R_Tex2DFormat_RGBA32: {color = v4f32(((F32 *)(data.str+off_bytes))[0], ((F32 *)(data.str+off_bytes))[1], ((F32 *)(data.str+off_bytes))[2], ((F32 *)(data.str+off_bytes))[3]);}break; - } - if(color_is_good) - { - Vec4F32 hsva = hsva_from_rgba(color); - ui_do_color_tooltip_hsva(hsva); - } - } - } - } - - ////////////////////////////// - //- rjf: build image - // - UI_Parent(canvas_box) - { - if(0 <= mouse_bmp.x && mouse_bmp.x < bvs->top.width && - 0 <= mouse_bmp.x && mouse_bmp.x < bvs->top.height) - { - F32 pixel_size_scr = 1.f*bvs->zoom; - Rng2F32 indicator_rect_scr = r2f32p(img_rect_scr.x0 + mouse_bmp.x*pixel_size_scr, - img_rect_scr.y0 + mouse_bmp.y*pixel_size_scr, - img_rect_scr.x0 + (mouse_bmp.x+1)*pixel_size_scr, - img_rect_scr.y0 + (mouse_bmp.y+1)*pixel_size_scr); - UI_Rect(indicator_rect_scr) - { - ui_build_box_from_key(UI_BoxFlag_DrawBorder|UI_BoxFlag_Floating, ui_key_zero()); - } - } - UI_Rect(img_rect_scr) UI_Flags(UI_BoxFlag_DrawBorder|UI_BoxFlag_DrawDropShadow|UI_BoxFlag_Floating) - { - ui_image(texture, R_Tex2DSampleKind_Nearest, r2f32p(0, 0, (F32)bvs->top.width, (F32)bvs->top.height), v4f32(1, 1, 1, 1), 0, str8_lit("bmp_image")); - } - } - - hs_scope_close(hs_scope); - tex_scope_close(tex_scope); - di_scope_close(di_scope); - scratch_end(scratch); -} - -//////////////////////////////// -//~ rjf: "geo" - -internal DF_GeoTopologyInfo -df_vr_geo_topology_info_from_cfg(DI_Scope *scope, DF_CtrlCtx *ctrl_ctx, EVAL_ParseCtx *parse_ctx, EVAL_String2ExprMap *macro_map, DF_CfgNode *cfg) -{ - Temp scratch = scratch_begin(0, 0); - DF_GeoTopologyInfo result = {0}; - { - StringJoin join = {0}; - join.sep = str8_lit(" "); - DF_CfgNode *count_cfg = df_cfg_node_child_from_string(cfg, str8_lit("count"), 0); - DF_CfgNode *vertices_base_cfg = df_cfg_node_child_from_string(cfg, str8_lit("vertices_base"), 0); - DF_CfgNode *vertices_size_cfg = df_cfg_node_child_from_string(cfg, str8_lit("vertices_size"), 0); - String8List count_expr_strs = {0}; - String8List vertices_base_expr_strs = {0}; - String8List vertices_size_expr_strs = {0}; - for(DF_CfgNode *child = count_cfg->first; child != &df_g_nil_cfg_node; child = child->next) - { - str8_list_push(scratch.arena, &count_expr_strs, child->string); - } - for(DF_CfgNode *child = vertices_base_cfg->first; child != &df_g_nil_cfg_node; child = child->next) - { - str8_list_push(scratch.arena, &vertices_base_expr_strs, child->string); - } - for(DF_CfgNode *child = vertices_size_cfg->first; child != &df_g_nil_cfg_node; child = child->next) - { - str8_list_push(scratch.arena, &vertices_size_expr_strs, child->string); - } - String8 count_expr = str8_list_join(scratch.arena, &count_expr_strs, &join); - String8 vertices_base_expr = str8_list_join(scratch.arena, &vertices_base_expr_strs, &join); - String8 vertices_size_expr = str8_list_join(scratch.arena, &vertices_size_expr_strs, &join); - DF_Eval count_eval = df_eval_from_string(scratch.arena, scope, ctrl_ctx, parse_ctx, macro_map, count_expr); - DF_Eval vertices_base_eval = df_eval_from_string(scratch.arena, scope, ctrl_ctx, parse_ctx, macro_map, vertices_base_expr); - DF_Eval vertices_size_eval = df_eval_from_string(scratch.arena, scope, ctrl_ctx, parse_ctx, macro_map, vertices_size_expr); - DF_Eval count_val_eval = df_value_mode_eval_from_eval(parse_ctx->type_graph, parse_ctx->rdi, ctrl_ctx, count_eval); - DF_Eval vertices_base_val_eval = df_value_mode_eval_from_eval(parse_ctx->type_graph, parse_ctx->rdi, ctrl_ctx, vertices_base_eval); - DF_Eval vertices_size_val_eval = df_value_mode_eval_from_eval(parse_ctx->type_graph, parse_ctx->rdi, ctrl_ctx, vertices_size_eval); - U64 vertices_base_vaddr = vertices_base_val_eval.imm_u64 ? vertices_base_val_eval.imm_u64 : vertices_base_val_eval.offset; - result.index_count = count_val_eval.imm_u64; - result.vertices_vaddr_range = r1u64(vertices_base_vaddr, vertices_base_vaddr+vertices_size_val_eval.imm_u64); - } - scratch_end(scratch); - return result; -} - -internal UI_BOX_CUSTOM_DRAW(df_vr_geo_box_draw) -{ - DF_VR_GeoBoxDrawData *draw_data = (DF_VR_GeoBoxDrawData *)user_data; - DF_VR_GeoState *state = df_view_rule_block_user_state(draw_data->key, DF_VR_GeoState); - - // rjf: get clip - Rng2F32 clip = box->rect; - for(UI_Box *b = box->parent; !ui_box_is_nil(b); b = b->parent) - { - if(b->flags & UI_BoxFlag_Clip) - { - clip = intersect_2f32(b->rect, clip); - } - } - - // rjf: calculate eye/target - Vec3F32 target = {0}; - Vec3F32 eye = v3f32(state->zoom*cos_f32(state->yaw)*sin_f32(state->pitch), - state->zoom*sin_f32(state->yaw)*sin_f32(state->pitch), - state->zoom*cos_f32(state->pitch)); - - // rjf: mesh - Vec2F32 box_dim = dim_2f32(box->rect); - R_PassParams_Geo3D *pass = d_geo3d_begin(box->rect, - make_look_at_4x4f32(eye, target, v3f32(0, 0, 1)), - make_perspective_4x4f32(0.25f, box_dim.x/box_dim.y, 0.1f, 500.f)); - pass->clip = clip; - d_mesh(draw_data->vertex_buffer, draw_data->index_buffer, R_GeoTopologyKind_Triangles, R_GeoVertexFlag_TexCoord|R_GeoVertexFlag_Normals|R_GeoVertexFlag_RGB, r_handle_zero(), mat_4x4f32(1.f)); - - // rjf: blur - if(draw_data->loaded_t < 0.98f) - { - d_blur(intersect_2f32(clip, box->rect), 10.f-9.f*draw_data->loaded_t, 0); - } -} - -DF_CORE_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_DEF(geo) -{ - DF_EvalVizBlock *vb = df_eval_viz_block_begin(arena, DF_EvalVizBlockKind_Canvas, key, df_expand_key_make(df_hash_from_expand_key(key), 1), depth); - vb->eval = eval; - vb->string = string; - vb->cfg_table = *cfg_table; - vb->visual_idx_range = r1u64(0, 16); - vb->semantic_idx_range = r1u64(0, 1); - df_eval_viz_block_end(out, vb); -} - -DF_GFX_VIEW_RULE_ROW_UI_FUNCTION_DEF(geo) -{ - DF_Eval value_eval = df_value_mode_eval_from_eval(parse_ctx->type_graph, parse_ctx->rdi, ctrl_ctx, eval); - U64 base_vaddr = value_eval.imm_u64 ? value_eval.imm_u64 : value_eval.offset; - DF_Font(ws, DF_FontSlot_Code) UI_FlagsAdd(UI_BoxFlag_DrawTextWeak) - ui_labelf("0x%I64x -> Geometry", base_vaddr); -} - -DF_GFX_VIEW_RULE_BLOCK_UI_FUNCTION_DEF(geo) -{ - Temp scratch = scratch_begin(0, 0); - GEO_Scope *geo_scope = geo_scope_open(); - DF_VR_GeoState *state = df_view_rule_block_user_state(key, DF_VR_GeoState); - if(!state->initialized) - { - state->initialized = 1; - state->zoom_target = 3.5f; - state->yaw = state->yaw_target = -0.125f; - state->pitch = state->pitch_target = -0.125f; - } - if(state->last_open_frame_idx+1 < df_frame_index()) - { - state->loaded_t = 0; - } - state->last_open_frame_idx = df_frame_index(); - - //- rjf: resolve to address value - DF_Eval value_eval = df_value_mode_eval_from_eval(parse_ctx->type_graph, parse_ctx->rdi, ctrl_ctx, eval); - U64 base_vaddr = value_eval.imm_u64 ? value_eval.imm_u64 : value_eval.offset; - - //- rjf: extract extra geo topology info from view rule - DF_GeoTopologyInfo top = df_vr_geo_topology_info_from_cfg(di_scope, ctrl_ctx, parse_ctx, macro_map, cfg); - Rng1U64 index_buffer_vaddr_range = r1u64(base_vaddr, base_vaddr+top.index_count*sizeof(U32)); - Rng1U64 vertex_buffer_vaddr_range = top.vertices_vaddr_range; - - //- rjf: unpack thread/process of eval - DF_Entity *thread = df_entity_from_handle(ctrl_ctx->thread); - DF_Entity *process = df_entity_ancestor_from_kind(thread, DF_EntityKind_Process); - - //- rjf: obtain keys for index buffer & vertex buffer memory - U128 index_buffer_key = ctrl_hash_store_key_from_process_vaddr_range(process->ctrl_machine_id, process->ctrl_handle, index_buffer_vaddr_range, 0); - U128 vertex_buffer_key = ctrl_hash_store_key_from_process_vaddr_range(process->ctrl_machine_id, process->ctrl_handle, vertex_buffer_vaddr_range, 0); - - //- rjf: get gpu buffers - R_Handle index_buffer = geo_buffer_from_key(geo_scope, index_buffer_key); - R_Handle vertex_buffer = geo_buffer_from_key(geo_scope, vertex_buffer_key); - - //- rjf: build preview - F32 rate = 1 - pow_f32(2, (-15.f * df_dt())); - if(top.index_count != 0) - { - UI_Padding(ui_pct(1.f, 0.f)) - UI_PrefWidth(ui_px(dim.y, 1.f)) - UI_Column UI_Padding(ui_pct(1.f, 0.f)) - UI_PrefHeight(ui_px(dim.y, 1.f)) - { - UI_Box *box = ui_build_box_from_stringf(UI_BoxFlag_DrawBorder|UI_BoxFlag_DrawBackground|UI_BoxFlag_Clickable, "geo_box"); - UI_Signal sig = ui_signal_from_box(box); - if(ui_dragging(sig)) - { - if(ui_pressed(sig)) - { - Vec2F32 data = v2f32(state->yaw_target, state->pitch_target); - ui_store_drag_struct(&data); - } - Vec2F32 drag_delta = ui_drag_delta(); - Vec2F32 drag_start_data = *ui_get_drag_struct(Vec2F32); - state->yaw_target = drag_start_data.x + drag_delta.x/dim_2f32(box->rect).x; - state->pitch_target = drag_start_data.y + drag_delta.y/dim_2f32(box->rect).y; - } - state->zoom += (state->zoom_target - state->zoom) * rate; - state->yaw += (state->yaw_target - state->yaw) * rate; - state->pitch += (state->pitch_target - state->pitch) * rate; - if(abs_f32(state->zoom-state->zoom_target) > 0.001f || - abs_f32(state->yaw-state->yaw_target) > 0.001f || - abs_f32(state->pitch-state->pitch_target) > 0.001f) - { - df_gfx_request_frame(); - } - DF_VR_GeoBoxDrawData *draw_data = push_array(ui_build_arena(), DF_VR_GeoBoxDrawData, 1); - draw_data->key = key; - draw_data->vertex_buffer = vertex_buffer; - draw_data->index_buffer = index_buffer; - draw_data->loaded_t = state->loaded_t; - ui_box_equip_custom_draw(box, df_vr_geo_box_draw, draw_data); - if(r_handle_match(r_handle_zero(), vertex_buffer)) - { - df_gfx_request_frame(); - state->loaded_t = 0; - } - else - { - state->loaded_t += (1.f - state->loaded_t) * rate; - if(state->loaded_t < 0.99f) - { - df_gfx_request_frame(); - } - } - } - } - - geo_scope_close(geo_scope); - scratch_end(scratch); -} - -DF_VIEW_SETUP_FUNCTION_DEF(geo) {} -DF_VIEW_STRING_FROM_STATE_FUNCTION_DEF(geo) { return str8_lit(""); } -DF_VIEW_CMD_FUNCTION_DEF(geo) {} -DF_VIEW_UI_FUNCTION_DEF(geo) -{ -} +// Copyright (c) 2024 Epic Games Tools +// Licensed under the MIT license (https://opensource.org/license/mit/) + +//////////////////////////////// +//~ rjf: "array" + +DF_CORE_VIEW_RULE_EVAL_RESOLUTION_FUNCTION_DEF(array) +{ + Temp scratch = scratch_begin(&arena, 1); + TG_Key type_key = eval.type_key; + TG_Kind type_kind = tg_kind_from_key(type_key); + if(type_kind == TG_Kind_Ptr || type_kind == TG_Kind_LRef || type_kind == TG_Kind_RRef) + { + DF_CfgNode *array_node = val->last; + if(array_node != &df_g_nil_cfg_node) + { + // rjf: determine array size + U64 array_size = 0; + { + String8List array_size_expr_strs = {0}; + for(DF_CfgNode *child = array_node->first; child != &df_g_nil_cfg_node; child = child->next) + { + str8_list_push(scratch.arena, &array_size_expr_strs, child->string); + } + String8 array_size_expr = str8_list_join(scratch.arena, &array_size_expr_strs, 0); + DF_Eval array_size_eval = df_eval_from_string(arena, di_scope, ctrl_ctx, parse_ctx, macro_map, array_size_expr); + DF_Eval array_size_eval_value = df_value_mode_eval_from_eval(parse_ctx->type_graph, parse_ctx->rdi, ctrl_ctx, array_size_eval); + eval_error_list_concat_in_place(&eval.errors, &array_size_eval.errors); + array_size = array_size_eval_value.imm_u64; + } + + // rjf: apply array size to type + TG_Key pointee = tg_ptee_from_graph_rdi_key(parse_ctx->type_graph, parse_ctx->rdi, type_key); + TG_Key array_type = tg_cons_type_make(parse_ctx->type_graph, TG_Kind_Array, pointee, array_size); + eval.type_key = tg_cons_type_make(parse_ctx->type_graph, TG_Kind_Ptr, array_type, 0); + } + } + scratch_end(scratch); + return eval; +} + +//////////////////////////////// +//~ rjf: "slice" + +DF_CORE_VIEW_RULE_EVAL_RESOLUTION_FUNCTION_DEF(slice) +{ + return eval; +} + +//////////////////////////////// +//~ rjf: "list" + +DF_CORE_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_DEF(list){} +DF_GFX_VIEW_RULE_VIZ_ROW_PROD_FUNCTION_DEF(list){} + +//////////////////////////////// +//~ rjf: "bswap" + +DF_CORE_VIEW_RULE_EVAL_RESOLUTION_FUNCTION_DEF(bswap) +{ + Temp scratch = scratch_begin(&arena, 1); + TG_Key type_key = eval.type_key; + TG_Kind type_kind = tg_kind_from_key(type_key); + U64 type_size_bytes = tg_byte_size_from_graph_rdi_key(parse_ctx->type_graph, parse_ctx->rdi, type_key); + if(TG_Kind_Char8 <= type_kind && type_kind <= TG_Kind_S256 && + (type_size_bytes == 2 || + type_size_bytes == 4 || + type_size_bytes == 8)) + { + DF_Eval value_eval = df_value_mode_eval_from_eval(parse_ctx->type_graph, parse_ctx->rdi, ctrl_ctx, eval); + if(value_eval.mode == EVAL_EvalMode_Value) + { + switch(type_size_bytes) + { + default:{}break; + case 2:{U16 v = (U16)value_eval.imm_u64; v = bswap_u16(v); value_eval.imm_u64 = (U64)v;}break; + case 4:{U32 v = (U32)value_eval.imm_u64; v = bswap_u32(v); value_eval.imm_u64 = (U64)v;}break; + case 8:{U64 v = value_eval.imm_u64; v = bswap_u64(v); value_eval.imm_u64 = v;}break; + } + } + eval = value_eval; + } + scratch_end(scratch); + return eval; +} + +//////////////////////////////// +//~ rjf: "dec" + +DF_GFX_VIEW_RULE_LINE_STRINGIZE_FUNCTION_DEF(dec){} + +//////////////////////////////// +//~ rjf: "bin" + +DF_GFX_VIEW_RULE_LINE_STRINGIZE_FUNCTION_DEF(bin){} + +//////////////////////////////// +//~ rjf: "oct" + +DF_GFX_VIEW_RULE_LINE_STRINGIZE_FUNCTION_DEF(oct){} + +//////////////////////////////// +//~ rjf: "hex" + +DF_GFX_VIEW_RULE_LINE_STRINGIZE_FUNCTION_DEF(hex){} + +//////////////////////////////// +//~ rjf: "only" + +DF_CORE_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_DEF(only){} +DF_GFX_VIEW_RULE_VIZ_ROW_PROD_FUNCTION_DEF(only){} +DF_GFX_VIEW_RULE_LINE_STRINGIZE_FUNCTION_DEF(only){} + +//////////////////////////////// +//~ rjf: "omit" + +DF_CORE_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_DEF(omit){} +DF_GFX_VIEW_RULE_VIZ_ROW_PROD_FUNCTION_DEF(omit){} +DF_GFX_VIEW_RULE_LINE_STRINGIZE_FUNCTION_DEF(omit){} + +//////////////////////////////// +//~ rjf: "no_addr" + +DF_GFX_VIEW_RULE_LINE_STRINGIZE_FUNCTION_DEF(no_addr){} + +//////////////////////////////// +//~ rjf: "rgba" + +internal Vec4F32 +df_vr_rgba_from_eval(DF_Eval eval, TG_Graph *graph, RDI_Parsed *raddbg, DF_Entity *process) +{ + Vec4F32 rgba = {0}; + Temp scratch = scratch_begin(0, 0); + TG_Key type_key = eval.type_key; + TG_Kind type_kind = tg_kind_from_key(type_key); + switch(type_kind) + { + default:{}break; + + // rjf: extract r/g/b/a bytes from u32 + case TG_Kind_U32: + case TG_Kind_S32: + { + U32 hex_val = (U32)eval.imm_u64; + rgba = rgba_from_u32(hex_val); + }break; + + // rjf: extract r/g/b/a values from array + case TG_Kind_Array: + if(eval.mode == EVAL_EvalMode_Addr) + { + U64 array_total_size = tg_byte_size_from_graph_rdi_key(graph, raddbg, type_key); + U64 array_total_size_capped = ClampTop(array_total_size, 64); + Rng1U64 array_memory_vaddr_rng = r1u64(eval.offset, eval.offset + array_total_size_capped); + CTRL_ProcessMemorySlice array_slice = ctrl_query_cached_data_from_process_vaddr_range(scratch.arena, process->ctrl_machine_id, process->ctrl_handle, array_memory_vaddr_rng, 0); + String8 array_memory = array_slice.data; + TG_Key element_type_key = tg_unwrapped_direct_from_graph_rdi_key(graph, raddbg, type_key); + TG_Kind element_type_kind = tg_kind_from_key(element_type_key); + U64 element_type_size = tg_byte_size_from_graph_rdi_key(graph, raddbg, element_type_key); + for(U64 element_idx = 0; element_idx < 4; element_idx += 1) + { + U64 offset = element_idx*element_type_size; + if(offset >= array_memory.size) + { + break; + } + switch(element_type_kind) + { + default:{}break; + case TG_Kind_U8: + { + U8 byte = array_memory.str[offset]; + rgba.v[element_idx] = byte/255.f; + }break; + case TG_Kind_F32: + { + rgba.v[element_idx] = *(F32 *)(array_memory.str+offset); + }break; + } + } + }break; + + // rjf: extract r/g/b/a values from struct + case TG_Kind_Struct: + case TG_Kind_Class: + case TG_Kind_Union: + if(eval.mode == EVAL_EvalMode_Addr) + { + U64 struct_total_size = tg_byte_size_from_graph_rdi_key(graph, raddbg, type_key); + U64 struct_total_size_capped = ClampTop(struct_total_size, 64); + Rng1U64 struct_memory_vaddr_rng = r1u64(eval.offset, eval.offset + struct_total_size_capped); + CTRL_ProcessMemorySlice struct_slice = ctrl_query_cached_data_from_process_vaddr_range(scratch.arena, process->ctrl_machine_id, process->ctrl_handle, struct_memory_vaddr_rng, 0); + String8 struct_memory = struct_slice.data; + TG_Type *type = tg_type_from_graph_rdi_key(scratch.arena, graph, raddbg, type_key); + for(U64 element_idx = 0, member_idx = 0; + element_idx < 4 && member_idx < type->count; + member_idx += 1) + { + TG_Member *member = &type->members[member_idx]; + TG_Key member_type_key = member->type_key; + TG_Kind member_type_kind = tg_kind_from_key(member_type_key); + B32 member_is_component = 1; + switch(member_type_kind) + { + default:{member_is_component = 0;}break; + case TG_Kind_U8: + { + rgba.v[element_idx] = struct_memory.str[member->off]/255.f; + }break; + case TG_Kind_F32: + { + rgba.v[element_idx] = *(F32 *)(struct_memory.str + member->off); + }break; + } + if(member_is_component) + { + element_idx += 1; + } + } + }break; + } + scratch_end(scratch); + return rgba; +} + +internal void +df_vr_eval_commit_rgba(DF_Eval eval, TG_Graph *graph, RDI_Parsed *raddbg, DF_CtrlCtx *ctrl_ctx, Vec4F32 rgba) +{ + TG_Key type_key = eval.type_key; + TG_Kind type_kind = tg_kind_from_key(type_key); + switch(type_kind) + { + default:{}break; + + // rjf: extract r/g/b/a bytes from u32 + case TG_Kind_U32: + case TG_Kind_S32: + { + U32 val = u32_from_rgba(rgba); + DF_Eval src_eval = eval; + src_eval.mode = EVAL_EvalMode_Value; + src_eval.imm_u64 = (U64)val; + df_commit_eval_value(graph, raddbg, ctrl_ctx, eval, src_eval); + }break; + +#if 0 + // rjf: extract r/g/b/a values from array + case TG_Kind_Array: + if(eval.mode == EVAL_EvalMode_Addr) + { + U64 array_total_size = tg_byte_size_from_graph_rdi_key(graph, raddbg, type_key); + U64 array_total_size_capped = ClampTop(array_total_size, 64); + Rng1U64 array_memory_vaddr_rng = r1u64(eval.offset, eval.offset + array_total_size_capped); + String8 array_memory = ctrl_query_cached_data_from_process_vaddr_range(scratch.arena, process->ctrl_machine_id, process->ctrl_handle, array_memory_vaddr_rng); + TG_Key element_type_key = tg_unwrapped_direct_from_graph_rdi_key(graph, raddbg, type_key); + TG_Kind element_type_kind = tg_kind_from_key(element_type_key); + U64 element_type_size = tg_byte_size_from_graph_rdi_key(graph, raddbg, element_type_key); + for(U64 element_idx = 0; element_idx < 4; element_idx += 1) + { + U64 offset = element_idx*element_type_size; + if(offset >= array_memory.size) + { + break; + } + switch(element_type_kind) + { + default:{}break; + case TG_Kind_U8: + { + U8 byte = array_memory.str[offset]; + rgba.v[element_idx] = byte/255.f; + }break; + case TG_Kind_F32: + { + rgba.v[element_idx] = *(F32 *)(array_memory.str+offset); + }break; + } + } + }break; + + // rjf: extract r/g/b/a values from struct + case TG_Kind_Struct: + case TG_Kind_Class: + case TG_Kind_Union: + if(eval.mode == EVAL_EvalMode_Addr) + { + U64 struct_total_size = tg_byte_size_from_graph_rdi_key(graph, raddbg, type_key); + U64 struct_total_size_capped = ClampTop(struct_total_size, 64); + Rng1U64 struct_memory_vaddr_rng = r1u64(eval.offset, eval.offset + struct_total_size_capped); + String8 struct_memory = ctrl_query_cached_data_from_process_vaddr_range(scratch.arena, process->ctrl_machine_id, process->ctrl_handle, struct_memory_vaddr_rng); + TG_Type *type = tg_type_from_graph_rdi_key(scratch.arena, graph, raddbg, type_key); + for(U64 element_idx = 0, member_idx = 0; + element_idx < 4 && member_idx < type->count; + member_idx += 1) + { + TG_Member *member = &type->members[member_idx]; + TG_Key member_type_key = member->type_key; + TG_Kind member_type_kind = tg_kind_from_key(member_type_key); + B32 member_is_component = 1; + switch(member_type_kind) + { + default:{member_is_component = 0;}break; + case TG_Kind_U8: + { + rgba.v[element_idx] = struct_memory.str[member->off]/255.f; + }break; + case TG_Kind_F32: + { + rgba.v[element_idx] = *(F32 *)(struct_memory.str + member->off); + }break; + } + if(member_is_component) + { + element_idx += 1; + } + } + }break; +#endif + } +} + +DF_CORE_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_DEF(rgba) +{ + DF_EvalVizBlock *vb = df_eval_viz_block_begin(arena, DF_EvalVizBlockKind_Canvas, key, df_expand_key_make(df_hash_from_expand_key(key), 1), depth); + vb->eval = eval; + vb->string = string; + vb->cfg_table = *cfg_table; + vb->visual_idx_range = r1u64(0, 8); + vb->semantic_idx_range = r1u64(0, 1); + df_eval_viz_block_end(out, vb); +} + +DF_GFX_VIEW_RULE_ROW_UI_FUNCTION_DEF(rgba) +{ + Temp scratch = scratch_begin(0, 0); + DF_Entity *thread = df_entity_from_handle(ctrl_ctx->thread); + DF_Entity *process = df_entity_ancestor_from_kind(thread, DF_EntityKind_Process); + + //- rjf: grab hsva + DF_Eval value_eval = df_value_mode_eval_from_eval(parse_ctx->type_graph, parse_ctx->rdi, ctrl_ctx, eval); + Vec4F32 rgba = df_vr_rgba_from_eval(value_eval, parse_ctx->type_graph, parse_ctx->rdi, process); + Vec4F32 hsva = hsva_from_rgba(rgba); + + //- rjf: build text box + UI_Box *text_box = &ui_g_nil_box; + UI_WidthFill DF_Font(ws, DF_FontSlot_Code) + { + text_box = ui_build_box_from_key(UI_BoxFlag_DrawText, ui_key_zero()); + D_FancyStringList fancy_strings = {0}; + { + D_FancyString open_paren = {ui_top_font(), str8_lit("("), ui_top_palette()->text, ui_top_font_size(), 0, 0}; + D_FancyString comma = {ui_top_font(), str8_lit(", "), ui_top_palette()->text, ui_top_font_size(), 0, 0}; + D_FancyString r_fstr = {ui_top_font(), push_str8f(scratch.arena, "%.2f", rgba.x), v4f32(1.f, 0.25f, 0.25f, 1.f), ui_top_font_size(), 4.f, 0}; + D_FancyString g_fstr = {ui_top_font(), push_str8f(scratch.arena, "%.2f", rgba.y), v4f32(0.25f, 1.f, 0.25f, 1.f), ui_top_font_size(), 4.f, 0}; + D_FancyString b_fstr = {ui_top_font(), push_str8f(scratch.arena, "%.2f", rgba.z), v4f32(0.25f, 0.25f, 1.f, 1.f), ui_top_font_size(), 4.f, 0}; + D_FancyString a_fstr = {ui_top_font(), push_str8f(scratch.arena, "%.2f", rgba.w), v4f32(1.f, 1.f, 1.f, 1.f), ui_top_font_size(), 4.f, 0}; + D_FancyString clse_paren = {ui_top_font(), str8_lit(")"), ui_top_palette()->text, ui_top_font_size(), 0, 0}; + d_fancy_string_list_push(scratch.arena, &fancy_strings, &open_paren); + d_fancy_string_list_push(scratch.arena, &fancy_strings, &r_fstr); + d_fancy_string_list_push(scratch.arena, &fancy_strings, &comma); + d_fancy_string_list_push(scratch.arena, &fancy_strings, &g_fstr); + d_fancy_string_list_push(scratch.arena, &fancy_strings, &comma); + d_fancy_string_list_push(scratch.arena, &fancy_strings, &b_fstr); + d_fancy_string_list_push(scratch.arena, &fancy_strings, &comma); + d_fancy_string_list_push(scratch.arena, &fancy_strings, &a_fstr); + d_fancy_string_list_push(scratch.arena, &fancy_strings, &clse_paren); + } + ui_box_equip_display_fancy_strings(text_box, &fancy_strings); + } + + //- rjf: build color box + UI_Box *color_box = &ui_g_nil_box; + UI_PrefWidth(ui_em(1.875f, 1.f)) UI_ChildLayoutAxis(Axis2_Y) + { + color_box = ui_build_box_from_stringf(UI_BoxFlag_Clickable, "color_box"); + UI_Parent(color_box) UI_PrefHeight(ui_em(1.875f, 1.f)) UI_Padding(ui_pct(1, 0)) + { + UI_Palette(ui_build_palette(ui_top_palette(), .background = rgba)) UI_CornerRadius(ui_top_font_size()*0.5f) + ui_build_box_from_key(UI_BoxFlag_DrawBackground|UI_BoxFlag_DrawBorder, ui_key_zero()); + } + } + + //- rjf: space + ui_spacer(ui_em(0.375f, 1.f)); + + //- rjf: hover color box -> show components + UI_Signal sig = ui_signal_from_box(color_box); + if(ui_hovering(sig)) + { + ui_do_color_tooltip_hsva(hsva); + } + + scratch_end(scratch); +} + +DF_GFX_VIEW_RULE_BLOCK_UI_FUNCTION_DEF(rgba) +{ + Temp scratch = scratch_begin(0, 0); + DF_Entity *thread = df_entity_from_handle(ctrl_ctx->thread); + DF_Entity *process = df_entity_ancestor_from_kind(thread, DF_EntityKind_Process); + DF_VR_RGBAState *state = df_view_rule_block_user_state(key, DF_VR_RGBAState); + + //- rjf: grab hsva + Vec4F32 rgba = {0}; + Vec4F32 hsva = {0}; + { + if(state->memgen_idx >= ctrl_mem_gen()) + { + hsva = state->hsva; + rgba = rgba_from_hsva(hsva); + } + else + { + DF_Eval value_eval = df_value_mode_eval_from_eval(parse_ctx->type_graph, parse_ctx->rdi, ctrl_ctx, eval); + rgba = df_vr_rgba_from_eval(value_eval, parse_ctx->type_graph, parse_ctx->rdi, process); + state->hsva = hsva = hsva_from_rgba(rgba); + state->memgen_idx = ctrl_mem_gen(); + } + } + Vec4F32 initial_hsva = hsva; + + //- rjf: build color picker + B32 commit = 0; + UI_Padding(ui_pct(1.f, 0.f)) + { + UI_PrefWidth(ui_px(dim.y, 1.f)) + { + UI_Signal sv_sig = ui_sat_val_pickerf(hsva.x, &hsva.y, &hsva.z, "sat_val_picker"); + commit = commit || ui_released(sv_sig); + } + UI_PrefWidth(ui_em(3.f, 1.f)) + { + UI_Signal h_sig = ui_hue_pickerf(&hsva.x, hsva.y, hsva.z, "hue_picker"); + commit = commit || ui_released(h_sig); + } + UI_PrefWidth(ui_children_sum(1)) UI_Column UI_PrefWidth(ui_text_dim(10, 1)) DF_Font(ws, DF_FontSlot_Code) UI_FlagsAdd(UI_BoxFlag_DrawTextWeak) + { + ui_labelf("Hex"); + ui_labelf("R"); + ui_labelf("G"); + ui_labelf("B"); + ui_labelf("H"); + ui_labelf("S"); + ui_labelf("V"); + ui_labelf("A"); + } + UI_PrefWidth(ui_children_sum(1)) UI_Column UI_PrefWidth(ui_text_dim(10, 1)) DF_Font(ws, DF_FontSlot_Code) + { + String8 hex_string = hex_string_from_rgba_4f32(scratch.arena, rgba); + ui_label(hex_string); + ui_labelf("%.2f", rgba.x); + ui_labelf("%.2f", rgba.y); + ui_labelf("%.2f", rgba.z); + ui_labelf("%.2f", hsva.x); + ui_labelf("%.2f", hsva.y); + ui_labelf("%.2f", hsva.z); + ui_labelf("%.2f", rgba.w); + } + } + + //- rjf: commit edited hsva back + if(commit) + { + Vec4F32 rgba = rgba_from_hsva(hsva); + df_vr_eval_commit_rgba(eval, parse_ctx->type_graph, parse_ctx->rdi, ctrl_ctx, rgba); + state->memgen_idx = ctrl_mem_gen(); + } + + //- rjf: commit possible edited value to state + state->hsva = hsva; + + scratch_end(scratch); +} + +//////////////////////////////// +//~ rjf: "text" + +internal DF_TxtTopologyInfo +df_vr_txt_topology_info_from_cfg(DI_Scope *scope, DF_CtrlCtx *ctrl_ctx, EVAL_ParseCtx *parse_ctx, EVAL_String2ExprMap *macro_map, DF_CfgNode *cfg) +{ + Temp scratch = scratch_begin(0, 0); + DF_TxtTopologyInfo result = zero_struct; + { + StringJoin join = {0}; + join.sep = str8_lit(" "); + DF_CfgNode *size_cfg = df_cfg_node_child_from_string(cfg, str8_lit("size"), 0); + DF_CfgNode *lang_cfg = df_cfg_node_child_from_string(cfg, str8_lit("lang"), 0); + String8List size_expr_strs = {0}; + String8 lang_string = {0}; + for(DF_CfgNode *child = size_cfg->first; child != &df_g_nil_cfg_node; child = child->next) + { + str8_list_push(scratch.arena, &size_expr_strs, child->string); + } + lang_string = lang_cfg->first->string; + String8 size_expr = str8_list_join(scratch.arena, &size_expr_strs, &join); + DF_Eval size_eval = df_eval_from_string(scratch.arena, scope, ctrl_ctx, parse_ctx, macro_map, size_expr); + DF_Eval size_val_eval = df_value_mode_eval_from_eval(parse_ctx->type_graph, parse_ctx->rdi, ctrl_ctx, size_eval); + result.lang = txt_lang_kind_from_extension(lang_string); + result.size_cap = size_val_eval.imm_u64; + } + scratch_end(scratch); + return result; +} + +DF_CORE_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_DEF(text) +{ + DF_EvalVizBlock *vb = df_eval_viz_block_begin(arena, DF_EvalVizBlockKind_Canvas, key, df_expand_key_make(df_hash_from_expand_key(key), 1), depth); + vb->eval = eval; + vb->string = string; + vb->cfg_table = *cfg_table; + vb->visual_idx_range = r1u64(0, 8); + vb->semantic_idx_range = r1u64(0, 1); + df_eval_viz_block_end(out, vb); +} + +DF_GFX_VIEW_RULE_BLOCK_UI_FUNCTION_DEF(text) +{ + Temp scratch = scratch_begin(0, 0); + HS_Scope *hs_scope = hs_scope_open(); + TXT_Scope *txt_scope = txt_scope_open(); + + ////////////////////////////// + //- rjf: get & initialize state + // + DF_VR_TextState *state = df_view_rule_block_user_state(key, DF_VR_TextState); + if(!state->initialized) + { + state->initialized = 1; + state->cursor = state->mark = txt_pt(1, 1); + } + + ////////////////////////////// + //- rjf: unpack evaluation / view rule params + // + DF_Entity *thread = df_entity_from_handle(ctrl_ctx->thread); + DF_Entity *process = df_entity_ancestor_from_kind(thread, DF_EntityKind_Process); + DF_TxtTopologyInfo top = df_vr_txt_topology_info_from_cfg(di_scope, ctrl_ctx, parse_ctx, macro_map, cfg); + DF_Eval value_eval = df_value_mode_eval_from_eval(parse_ctx->type_graph, parse_ctx->rdi, ctrl_ctx, eval); + U64 base_vaddr = value_eval.imm_u64 ? value_eval.imm_u64 : value_eval.offset; + Rng1U64 vaddr_range = r1u64(base_vaddr, base_vaddr + (top.size_cap ? top.size_cap : 2048)); + + ////////////////////////////// + //- rjf: evaluation info -> text visualization info + // + String8 data = {0}; + TXT_TextInfo info = {0}; + TXT_LineTokensSlice line_tokens_slice = {0}; + U128 text_key = {0}; + { + U128 text_hash = {0}; + text_key = ctrl_hash_store_key_from_process_vaddr_range(process->ctrl_machine_id, process->ctrl_handle, vaddr_range, 1); + info = txt_text_info_from_key_lang(txt_scope, text_key, top.lang, &text_hash); + data = hs_data_from_hash(hs_scope, text_hash); + line_tokens_slice = txt_line_tokens_slice_from_info_data_line_range(scratch.arena, &info, data, r1s64(1, info.lines_count)); + } + + ////////////////////////////// + //- rjf: info -> code slice info + // + DF_CodeSliceParams code_slice_params = {0}; + { + code_slice_params.flags = DF_CodeSliceFlag_LineNums; + code_slice_params.line_num_range = r1s64(1, info.lines_count); + code_slice_params.line_text = push_array(scratch.arena, String8, info.lines_count); + code_slice_params.line_ranges = push_array(scratch.arena, Rng1U64, info.lines_count); + code_slice_params.line_tokens = push_array(scratch.arena, TXT_TokenArray, info.lines_count); + code_slice_params.line_bps = push_array(scratch.arena, DF_EntityList, info.lines_count); + code_slice_params.line_ips = push_array(scratch.arena, DF_EntityList, info.lines_count); + code_slice_params.line_pins = push_array(scratch.arena, DF_EntityList, info.lines_count); + code_slice_params.line_vaddrs = push_array(scratch.arena, U64, info.lines_count); + code_slice_params.line_infos = push_array(scratch.arena, DF_LineList, info.lines_count); + for(U64 line_idx = 0; line_idx < info.lines_count; line_idx += 1) + { + code_slice_params.line_text[line_idx] = str8_substr(data, info.lines_ranges[line_idx]); + code_slice_params.line_ranges[line_idx] = info.lines_ranges[line_idx]; + code_slice_params.line_tokens[line_idx] = line_tokens_slice.line_tokens[line_idx]; + } + code_slice_params.font = df_font_from_slot(DF_FontSlot_Code); + code_slice_params.font_size = ui_top_font_size(); + code_slice_params.tab_size = f_column_size_from_tag_size(code_slice_params.font, code_slice_params.font_size)*df_setting_val_from_code(ws, DF_SettingCode_TabWidth).s32; + code_slice_params.line_height_px = ui_top_font_size()*1.5f; + code_slice_params.priority_margin_width_px = 0; + code_slice_params.catchall_margin_width_px = 0; + code_slice_params.line_num_width_px = ui_top_font_size()*5.f; + code_slice_params.line_text_max_width_px = ui_top_font_size()*2.f*info.lines_max_size; + } + + ////////////////////////////// + //- rjf: build UI + // + if(info.lines_count != 0) + { + //- rjf: build top-level container + UI_Box *container = &ui_g_nil_box; + UI_PrefWidth(ui_px(dim.x, 1.f)) UI_PrefHeight(ui_px(dim.y, 1.f)) + { + container = ui_build_box_from_stringf(UI_BoxFlag_AllowOverflow|UI_BoxFlag_Clip, "###text_container"); + } + + //- rjf: build code slice + UI_WidthFill UI_HeightFill UI_Parent(container) + { + DF_CodeSliceSignal slice_sig = df_code_slice(ws, ctrl_ctx, parse_ctx, &code_slice_params, &state->cursor, &state->mark, &state->preferred_column, str8_lit("###slice")); + } + } + + txt_scope_close(txt_scope); + hs_scope_close(hs_scope); + scratch_end(scratch); +} + +DF_VIEW_SETUP_FUNCTION_DEF(text) {} +DF_VIEW_STRING_FROM_STATE_FUNCTION_DEF(text) { return str8_lit(""); } +DF_VIEW_CMD_FUNCTION_DEF(text) {} +DF_VIEW_UI_FUNCTION_DEF(text) +{ +} + +//////////////////////////////// +//~ rjf: "disasm" + +internal DF_DisasmTopologyInfo +df_vr_disasm_topology_info_from_cfg(DI_Scope *scope, DF_CtrlCtx *ctrl_ctx, EVAL_ParseCtx *parse_ctx, EVAL_String2ExprMap *macro_map, DF_CfgNode *cfg) +{ + Temp scratch = scratch_begin(0, 0); + DF_DisasmTopologyInfo result = zero_struct; + { + StringJoin join = {0}; + join.sep = str8_lit(" "); + DF_CfgNode *size_cfg = df_cfg_node_child_from_string(cfg, str8_lit("size"), 0); + DF_CfgNode *arch_cfg = df_cfg_node_child_from_string(cfg, str8_lit("arch"), 0); + String8List size_expr_strs = {0}; + String8 arch_string = {0}; + for(DF_CfgNode *child = size_cfg->first; child != &df_g_nil_cfg_node; child = child->next) + { + str8_list_push(scratch.arena, &size_expr_strs, child->string); + } + arch_string = arch_cfg->first->string; + String8 size_expr = str8_list_join(scratch.arena, &size_expr_strs, &join); + DF_Eval size_eval = df_eval_from_string(scratch.arena, scope, ctrl_ctx, parse_ctx, macro_map, size_expr); + DF_Eval size_val_eval = df_value_mode_eval_from_eval(parse_ctx->type_graph, parse_ctx->rdi, ctrl_ctx, size_eval); + if(str8_match(arch_string, str8_lit("x64"), StringMatchFlag_CaseInsensitive)) + { + result.arch = Architecture_x64; + } + result.size_cap = size_val_eval.imm_u64; + } + scratch_end(scratch); + return result; +} + +DF_CORE_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_DEF(disasm) +{ + DF_EvalVizBlock *vb = df_eval_viz_block_begin(arena, DF_EvalVizBlockKind_Canvas, key, df_expand_key_make(df_hash_from_expand_key(key), 1), depth); + vb->eval = eval; + vb->string = string; + vb->cfg_table = *cfg_table; + vb->visual_idx_range = r1u64(0, 8); + vb->semantic_idx_range = r1u64(0, 1); + df_eval_viz_block_end(out, vb); +} + +DF_GFX_VIEW_RULE_BLOCK_UI_FUNCTION_DEF(disasm) +{ + Temp scratch = scratch_begin(0, 0); + HS_Scope *hs_scope = hs_scope_open(); + TXT_Scope *txt_scope = txt_scope_open(); + DASM_Scope *dasm_scope = dasm_scope_open(); + DF_VR_DisasmState *state = df_view_rule_block_user_state(key, DF_VR_DisasmState); + if(!state->initialized) + { + state->initialized = 1; + state->cursor = state->mark = txt_pt(1, 1); + } + if(state->last_open_frame_idx+1 < df_frame_index()) + { + state->loaded_t = 0; + } + state->last_open_frame_idx = df_frame_index(); + { + //- rjf: unpack params + DF_DisasmTopologyInfo top = df_vr_disasm_topology_info_from_cfg(di_scope, ctrl_ctx, parse_ctx, macro_map, cfg); + + //- rjf: resolve to address value & range + DF_Eval value_eval = df_value_mode_eval_from_eval(parse_ctx->type_graph, parse_ctx->rdi, ctrl_ctx, eval); + U64 base_vaddr = value_eval.imm_u64 ? value_eval.imm_u64 : value_eval.offset; + Rng1U64 vaddr_range = r1u64(base_vaddr, base_vaddr + (top.size_cap ? top.size_cap : 2048)); + + //- rjf: unpack thread/process of eval + DF_Entity *thread = df_entity_from_handle(ctrl_ctx->thread); + DF_Entity *process = df_entity_ancestor_from_kind(thread, DF_EntityKind_Process); + + //- rjf: unpack key for this region in memory + U128 dasm_key = ctrl_hash_store_key_from_process_vaddr_range(process->ctrl_machine_id, process->ctrl_handle, vaddr_range, 0); + + //- rjf: key -> parsed text info + U128 data_hash = {0}; + DASM_Params dasm_params = {0}; + { + dasm_params.vaddr = vaddr_range.min; + dasm_params.arch = top.arch; + dasm_params.style_flags = DASM_StyleFlag_Addresses; + dasm_params.syntax = DASM_Syntax_Intel; + dasm_params.base_vaddr = 0; + } + DASM_Info dasm_info = dasm_info_from_key_params(dasm_scope, dasm_key, &dasm_params, &data_hash); + String8 dasm_text_data = {0}; + TXT_TextInfo dasm_text_info = {0}; + TXT_LangKind lang_kind = TXT_LangKind_DisasmX64Intel; + for(U64 rewind_idx = 0; rewind_idx < 2; rewind_idx += 1) + { + U128 dasm_text_hash = hs_hash_from_key(dasm_info.text_key, rewind_idx); + dasm_text_data = hs_data_from_hash(hs_scope, dasm_text_hash); + dasm_text_info = txt_text_info_from_hash_lang(txt_scope, dasm_text_hash, lang_kind); + if(dasm_text_info.lines_count != 0) + { + break; + } + } + TXT_LineTokensSlice line_tokens_slice = txt_line_tokens_slice_from_info_data_line_range(scratch.arena, &dasm_text_info, dasm_text_data, r1s64(1, dasm_info.lines.count)); + + //- rjf: info -> code slice info + DF_CodeSliceParams code_slice_params = {0}; + { + code_slice_params.flags = DF_CodeSliceFlag_LineNums; + code_slice_params.line_num_range = r1s64(1, dasm_text_info.lines_count); + code_slice_params.line_text = push_array(scratch.arena, String8, dasm_text_info.lines_count); + code_slice_params.line_ranges = push_array(scratch.arena, Rng1U64, dasm_text_info.lines_count); + code_slice_params.line_tokens = push_array(scratch.arena, TXT_TokenArray, dasm_text_info.lines_count); + code_slice_params.line_bps = push_array(scratch.arena, DF_EntityList, dasm_text_info.lines_count); + code_slice_params.line_ips = push_array(scratch.arena, DF_EntityList, dasm_text_info.lines_count); + code_slice_params.line_pins = push_array(scratch.arena, DF_EntityList, dasm_text_info.lines_count); + code_slice_params.line_vaddrs = push_array(scratch.arena, U64, dasm_text_info.lines_count); + code_slice_params.line_infos = push_array(scratch.arena, DF_LineList, dasm_text_info.lines_count); + for(U64 line_idx = 0; line_idx < dasm_text_info.lines_count; line_idx += 1) + { + code_slice_params.line_text[line_idx] = str8_substr(dasm_text_data, dasm_info.lines.v[line_idx].text_range); + code_slice_params.line_ranges[line_idx] = dasm_info.lines.v[line_idx].text_range; + code_slice_params.line_tokens[line_idx] = line_tokens_slice.line_tokens[line_idx]; + } + code_slice_params.font = df_font_from_slot(DF_FontSlot_Code); + code_slice_params.font_size = ui_top_font_size(); + code_slice_params.tab_size = f_column_size_from_tag_size(code_slice_params.font, code_slice_params.font_size)*df_setting_val_from_code(ws, DF_SettingCode_TabWidth).s32; + code_slice_params.line_height_px = ui_top_font_size()*1.5f; + code_slice_params.priority_margin_width_px = 0; + code_slice_params.catchall_margin_width_px = 0; + code_slice_params.line_num_width_px = ui_top_font_size()*5.f; + code_slice_params.line_text_max_width_px = ui_top_font_size()*2.f*dasm_text_info.lines_max_size; + } + + //- rjf: build code slice + if(dasm_info.lines.count != 0 && dasm_text_info.lines_count != 0) + UI_Padding(ui_pct(1, 0)) UI_PrefWidth(ui_px(dasm_text_info.lines_max_size*ui_top_font_size()*1.2f, 1.f)) UI_Column UI_Padding(ui_pct(1, 0)) + { + DF_CodeSliceSignal sig = df_code_slice(ws, ctrl_ctx, parse_ctx, &code_slice_params, &state->cursor, &state->mark, &state->preferred_column, str8_lit("###code_slice")); + } + } + dasm_scope_close(dasm_scope); + txt_scope_close(txt_scope); + hs_scope_close(hs_scope); + scratch_end(scratch); +} + +DF_VIEW_SETUP_FUNCTION_DEF(disasm) {} +DF_VIEW_STRING_FROM_STATE_FUNCTION_DEF(disasm) { return str8_lit(""); } +DF_VIEW_CMD_FUNCTION_DEF(disasm) {} +DF_VIEW_UI_FUNCTION_DEF(disasm) +{ +} + +//////////////////////////////// +//~ rjf: "graph" + +DF_CORE_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_DEF(graph) +{ + DF_EvalVizBlock *vb = df_eval_viz_block_begin(arena, DF_EvalVizBlockKind_Canvas, key, df_expand_key_make(df_hash_from_expand_key(key), 1), depth); + vb->eval = eval; + vb->string = string; + vb->cfg_table = *cfg_table; + vb->visual_idx_range = r1u64(0, 8); + vb->semantic_idx_range = r1u64(0, 1); + df_eval_viz_block_end(out, vb); +} + +DF_GFX_VIEW_RULE_BLOCK_UI_FUNCTION_DEF(graph) +{ +} + +DF_VIEW_SETUP_FUNCTION_DEF(graph) {} +DF_VIEW_STRING_FROM_STATE_FUNCTION_DEF(graph) { return str8_lit(""); } +DF_VIEW_CMD_FUNCTION_DEF(graph) {} +DF_VIEW_UI_FUNCTION_DEF(graph) +{ +} + +//////////////////////////////// +//~ rjf: "bitmap" + +internal Vec2F32 +df_bitmap_view_state__screen_from_canvas_pos(DF_BitmapViewState *bvs, Rng2F32 rect, Vec2F32 cvs) +{ + Vec2F32 scr = + { + (rect.x0+rect.x1)/2 + (cvs.x - bvs->view_center_pos.x) * bvs->zoom, + (rect.y0+rect.y1)/2 + (cvs.y - bvs->view_center_pos.y) * bvs->zoom, + }; + return scr; +} + +internal Rng2F32 +df_bitmap_view_state__screen_from_canvas_rect(DF_BitmapViewState *bvs, Rng2F32 rect, Rng2F32 cvs) +{ + Rng2F32 scr = r2f32(df_bitmap_view_state__screen_from_canvas_pos(bvs, rect, cvs.p0), df_bitmap_view_state__screen_from_canvas_pos(bvs, rect, cvs.p1)); + return scr; +} + +internal Vec2F32 +df_bitmap_view_state__canvas_from_screen_pos(DF_BitmapViewState *bvs, Rng2F32 rect, Vec2F32 scr) +{ + Vec2F32 cvs = + { + (scr.x - (rect.x0+rect.x1)/2) / bvs->zoom + bvs->view_center_pos.x, + (scr.y - (rect.y0+rect.y1)/2) / bvs->zoom + bvs->view_center_pos.y, + }; + return cvs; +} + +internal Rng2F32 +df_bitmap_view_state__canvas_from_screen_rect(DF_BitmapViewState *bvs, Rng2F32 rect, Rng2F32 scr) +{ + Rng2F32 cvs = r2f32(df_bitmap_view_state__canvas_from_screen_pos(bvs, rect, scr.p0), df_bitmap_view_state__canvas_from_screen_pos(bvs, rect, scr.p1)); + return cvs; +} + +internal DF_BitmapTopologyInfo +df_vr_bitmap_topology_info_from_cfg(DI_Scope *scope, DF_CtrlCtx *ctrl_ctx, EVAL_ParseCtx *parse_ctx, EVAL_String2ExprMap *macro_map, DF_CfgNode *cfg) +{ + Temp scratch = scratch_begin(0, 0); + DF_BitmapTopologyInfo info = {0}; + { + info.fmt = R_Tex2DFormat_RGBA8; + } + { + DF_CfgNode *width_cfg = df_cfg_node_child_from_string(cfg, str8_lit("w"), 0); + DF_CfgNode *height_cfg = df_cfg_node_child_from_string(cfg, str8_lit("h"), 0); + DF_CfgNode *fmt_cfg = df_cfg_node_child_from_string(cfg, str8_lit("fmt"), 0); + String8List width_expr_strs = {0}; + String8List height_expr_strs = {0}; + for(DF_CfgNode *child = width_cfg->first; child != &df_g_nil_cfg_node; child = child->next) + { + str8_list_push(scratch.arena, &width_expr_strs, child->string); + } + for(DF_CfgNode *child = height_cfg->first; child != &df_g_nil_cfg_node; child = child->next) + { + str8_list_push(scratch.arena, &height_expr_strs, child->string); + } + String8 width_expr = str8_list_join(scratch.arena, &width_expr_strs, 0); + String8 height_expr = str8_list_join(scratch.arena, &height_expr_strs, 0); + String8 fmt_string = fmt_cfg->first->string; + DF_Eval width_eval = df_eval_from_string(scratch.arena, scope, ctrl_ctx, parse_ctx, macro_map, width_expr); + DF_Eval width_eval_value = df_value_mode_eval_from_eval(parse_ctx->type_graph, parse_ctx->rdi, ctrl_ctx, width_eval); + info.width = width_eval_value.imm_u64; + DF_Eval height_eval = df_eval_from_string(scratch.arena, scope, ctrl_ctx, parse_ctx, macro_map, height_expr); + DF_Eval height_eval_value = df_value_mode_eval_from_eval(parse_ctx->type_graph, parse_ctx->rdi, ctrl_ctx, height_eval); + info.height = height_eval_value.imm_u64; + if(fmt_string.size != 0) + { + for(R_Tex2DFormat fmt = (R_Tex2DFormat)0; fmt < R_Tex2DFormat_COUNT; fmt = (R_Tex2DFormat)(fmt+1)) + { + if(str8_match(r_tex2d_format_display_string_table[fmt], fmt_string, StringMatchFlag_CaseInsensitive)) + { + info.fmt = fmt; + break; + } + } + } + } + scratch_end(scratch); + return info; +} + +internal UI_BOX_CUSTOM_DRAW(df_vr_bitmap_box_draw) +{ + DF_VR_BitmapBoxDrawData *draw_data = (DF_VR_BitmapBoxDrawData *)user_data; + Vec4F32 bg_color = box->palette->background; + d_img(box->rect, draw_data->src, draw_data->texture, v4f32(1, 1, 1, 1), 0, 0, 0); + if(draw_data->loaded_t < 0.98f) + { + Rng2F32 clip = box->rect; + for(UI_Box *b = box->parent; !ui_box_is_nil(b); b = b->parent) + { + if(b->flags & UI_BoxFlag_Clip) + { + clip = intersect_2f32(b->rect, clip); + } + } + d_blur(intersect_2f32(clip, box->rect), 10.f-9.f*draw_data->loaded_t, 0); + } + if(r_handle_match(draw_data->texture, r_handle_zero())) + { + d_rect(box->rect, v4f32(0, 0, 0, 1), 0, 0, 0); + } + d_rect(box->rect, v4f32(bg_color.x*bg_color.w, bg_color.y*bg_color.w, bg_color.z*bg_color.w, 1.f-draw_data->loaded_t), 0, 0, 0); + if(draw_data->hovered) + { + Vec4F32 indicator_color = v4f32(1, 1, 1, 1); + d_rect(pad_2f32(r2f32p(box->rect.x0 + draw_data->mouse_px.x*draw_data->ui_per_bmp_px, + box->rect.y0 + draw_data->mouse_px.y*draw_data->ui_per_bmp_px, + box->rect.x0 + draw_data->mouse_px.x*draw_data->ui_per_bmp_px + draw_data->ui_per_bmp_px, + box->rect.y0 + draw_data->mouse_px.y*draw_data->ui_per_bmp_px + draw_data->ui_per_bmp_px), + 3.f), + indicator_color, 3.f, 4.f, 1.f); + } +} + +DF_CORE_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_DEF(bitmap) +{ + DF_EvalVizBlock *vb = df_eval_viz_block_begin(arena, DF_EvalVizBlockKind_Canvas, key, df_expand_key_make(df_hash_from_expand_key(key), 1), depth); + vb->eval = eval; + vb->string = string; + vb->cfg_table = *cfg_table; + vb->visual_idx_range = r1u64(0, 8); + vb->semantic_idx_range = r1u64(0, 1); + df_eval_viz_block_end(out, vb); +} + +DF_GFX_VIEW_RULE_ROW_UI_FUNCTION_DEF(bitmap) +{ + DF_Eval value_eval = df_value_mode_eval_from_eval(parse_ctx->type_graph, parse_ctx->rdi, ctrl_ctx, eval); + U64 base_vaddr = value_eval.imm_u64 ? value_eval.imm_u64 : value_eval.offset; + DF_BitmapTopologyInfo topology = df_vr_bitmap_topology_info_from_cfg(scope, ctrl_ctx, parse_ctx, macro_map, cfg); + U64 expected_size = topology.width*topology.height*r_tex2d_format_bytes_per_pixel_table[topology.fmt]; + DF_Font(ws, DF_FontSlot_Code) UI_FlagsAdd(UI_BoxFlag_DrawTextWeak) + ui_labelf("0x%I64x -> Bitmap (%I64u x %I64u)", base_vaddr, topology.width, topology.height); +} + +DF_GFX_VIEW_RULE_BLOCK_UI_FUNCTION_DEF(bitmap) +{ + Temp scratch = scratch_begin(0, 0); + HS_Scope *hs_scope = hs_scope_open(); + TEX_Scope *tex_scope = tex_scope_open(); + DF_VR_BitmapState *state = df_view_rule_block_user_state(key, DF_VR_BitmapState); + if(state->last_open_frame_idx+1 < df_frame_index()) + { + state->loaded_t = 0; + } + state->last_open_frame_idx = df_frame_index(); + + ////////////////////////////// + //- rjf: unpack context + // + DF_Entity *thread = df_entity_from_handle(ctrl_ctx->thread); + DF_Entity *process = df_entity_ancestor_from_kind(thread, DF_EntityKind_Process); + + ////////////////////////////// + //- rjf: evaluate expression + // + DF_Eval value_eval = df_value_mode_eval_from_eval(parse_ctx->type_graph, parse_ctx->rdi, ctrl_ctx, eval); + U64 base_vaddr = value_eval.imm_u64 ? value_eval.imm_u64 : value_eval.offset; + DF_BitmapTopologyInfo topology_info = df_vr_bitmap_topology_info_from_cfg(di_scope, ctrl_ctx, parse_ctx, macro_map, cfg); + U64 expected_size = topology_info.width*topology_info.height*r_tex2d_format_bytes_per_pixel_table[topology_info.fmt]; + Rng1U64 vaddr_range = r1u64(base_vaddr, base_vaddr+expected_size); + + ////////////////////////////// + //- rjf: map expression artifacts -> texture + // + U128 texture_key = ctrl_hash_store_key_from_process_vaddr_range(process->ctrl_machine_id, process->ctrl_handle, vaddr_range, 0); + TEX_Topology topology = tex_topology_make(v2s32((S32)topology_info.width, (S32)topology_info.height), topology_info.fmt); + R_Handle texture = tex_texture_from_key_topology(tex_scope, texture_key, topology, 0); + + ////////////////////////////// + //- rjf: animate + // + if(expected_size != 0) + { + if(r_handle_match(r_handle_zero(), texture)) + { + df_gfx_request_frame(); + state->loaded_t = 0; + } + else + { + F32 rate = 1 - pow_f32(2, (-15.f * df_dt())); + state->loaded_t += (1.f - state->loaded_t) * rate; + if(state->loaded_t < 0.99f) + { + df_gfx_request_frame(); + } + } + } + + ////////////////////////////// + //- rjf: build preview + // + if(expected_size != 0) + { + F32 img_dim = dim.y - ui_top_font_size()*2.f; + UI_Padding(ui_pct(1.f, 0.f)) + UI_PrefWidth(ui_px(img_dim*((F32)topology_info.width/(F32)topology_info.height), 1.f)) + UI_Column UI_Padding(ui_pct(1.f, 0.f)) + UI_PrefHeight(ui_px(img_dim, 1.f)) + { + ui_image(texture, R_Tex2DSampleKind_Nearest, r2f32(v2f32(0, 0), v2f32((F32)topology_info.width, (F32)topology_info.height)), v4f32(1, 1, 1, state->loaded_t), 10.f*(1-state->loaded_t), str8_lit("image_box")); + } + } + + tex_scope_close(tex_scope); + hs_scope_close(hs_scope); + scratch_end(scratch); +} + +DF_VIEW_SETUP_FUNCTION_DEF(bitmap) +{ + DF_BitmapViewState *bvs = df_view_user_state(view, DF_BitmapViewState); + DI_Scope *di_scope = di_scope_open(); + DF_CfgNode *view_center_cfg = df_cfg_node_child_from_string(cfg_root, str8_lit("view_center"), StringMatchFlag_CaseInsensitive); + DF_CfgNode *zoom_cfg = df_cfg_node_child_from_string(cfg_root, str8_lit("zoom"), StringMatchFlag_CaseInsensitive); + DF_CfgNode *bitmap_cfg = df_cfg_node_child_from_string(cfg_root, str8_lit("bitmap"), StringMatchFlag_CaseInsensitive); + DF_CtrlCtx ctrl_ctx = df_ctrl_ctx_from_view(ws, view); + DF_Entity *thread = df_entity_from_handle(ctrl_ctx.thread); + DF_Entity *process = df_entity_ancestor_from_kind(thread, DF_EntityKind_Process); + U64 thread_unwind_rip_vaddr = df_query_cached_rip_from_thread_unwind(thread, ctrl_ctx.unwind_count); + EVAL_ParseCtx parse_ctx = df_eval_parse_ctx_from_process_vaddr(di_scope, process, thread_unwind_rip_vaddr); + bvs->view_center_pos.x = (F32)f64_from_str8(bitmap_cfg->first->string); + bvs->view_center_pos.y = (F32)f64_from_str8(bitmap_cfg->first->next->string); + bvs->zoom = (F32)f64_from_str8(zoom_cfg->first->string); + bvs->top = df_vr_bitmap_topology_info_from_cfg(di_scope, &ctrl_ctx, &parse_ctx, &eval_string2expr_map_nil, bitmap_cfg); + if(bvs->zoom == 0) + { + bvs->zoom = 1.f; + } + di_scope_close(di_scope); +} + +DF_VIEW_STRING_FROM_STATE_FUNCTION_DEF(bitmap) +{ + DF_BitmapViewState *bvs = df_view_user_state(view, DF_BitmapViewState); + String8 result = push_str8f(arena, "view_center:(%.2f %.2f) zoom:(%.2f) bitmap:(w:%I64u, h:%I64u, fmt:%S)", + bvs->view_center_pos.x, + bvs->view_center_pos.y, + bvs->zoom, + bvs->top.width, + bvs->top.height, + r_tex2d_format_display_string_table[bvs->top.fmt]); + return result; +} + +DF_VIEW_CMD_FUNCTION_DEF(bitmap) +{ +} + +internal UI_BOX_CUSTOM_DRAW(df_bitmap_view_canvas_box_draw) +{ + DF_BitmapViewState *bvs = (DF_BitmapViewState *)user_data; + Rng2F32 rect_scrn = box->rect; + Rng2F32 rect_cvs = df_bitmap_view_state__canvas_from_screen_rect(bvs, rect_scrn, rect_scrn); + F32 grid_cell_size_cvs = box->font_size*10.f; + F32 grid_line_thickness_px = Max(2.f, box->font_size*0.1f); + Vec4F32 grid_line_color = df_rgba_from_theme_color(DF_ThemeColor_TextWeak); + for(EachEnumVal(Axis2, axis)) + { + for(F32 v = rect_cvs.p0.v[axis] - mod_f32(rect_cvs.p0.v[axis], grid_cell_size_cvs); + v < rect_cvs.p1.v[axis]; + v += grid_cell_size_cvs) + { + Vec2F32 p_cvs = {0}; + p_cvs.v[axis] = v; + Vec2F32 p_scr = df_bitmap_view_state__screen_from_canvas_pos(bvs, rect_scrn, p_cvs); + Rng2F32 rect = {0}; + rect.p0.v[axis] = p_scr.v[axis] - grid_line_thickness_px/2; + rect.p1.v[axis] = p_scr.v[axis] + grid_line_thickness_px/2; + rect.p0.v[axis2_flip(axis)] = box->rect.p0.v[axis2_flip(axis)]; + rect.p1.v[axis2_flip(axis)] = box->rect.p1.v[axis2_flip(axis)]; + d_rect(rect, grid_line_color, 0, 0, 1.f); + } + } +} + +DF_VIEW_UI_FUNCTION_DEF(bitmap) +{ + DF_BitmapViewState *bvs = df_view_user_state(view, DF_BitmapViewState); + Temp scratch = scratch_begin(0, 0); + DI_Scope *di_scope = di_scope_open(); + HS_Scope *hs_scope = hs_scope_open(); + TEX_Scope *tex_scope = tex_scope_open(); + + ////////////////////////////// + //- rjf: unpack context + // + DF_CtrlCtx ctrl_ctx = df_ctrl_ctx_from_view(ws, view); + DF_Entity *thread = df_entity_from_handle(ctrl_ctx.thread); + DF_Entity *process = df_entity_ancestor_from_kind(thread, DF_EntityKind_Process); + U64 thread_unwind_rip_vaddr = df_query_cached_rip_from_thread_unwind(thread, ctrl_ctx.unwind_count); + EVAL_ParseCtx parse_ctx = df_eval_parse_ctx_from_process_vaddr(di_scope, process, thread_unwind_rip_vaddr); + + ////////////////////////////// + //- rjf: evaluate expression + // + String8 expr = str8(view->query_buffer, view->query_string_size); + DF_Eval eval = df_eval_from_string(scratch.arena, di_scope, &ctrl_ctx, &parse_ctx, &eval_string2expr_map_nil, expr); + DF_Eval value_eval = df_value_mode_eval_from_eval(parse_ctx.type_graph, parse_ctx.rdi, &ctrl_ctx, eval); + U64 base_vaddr = value_eval.imm_u64 ? value_eval.imm_u64 : value_eval.offset; + U64 expected_size = bvs->top.width*bvs->top.height*r_tex2d_format_bytes_per_pixel_table[bvs->top.fmt]; + Rng1U64 vaddr_range = r1u64(base_vaddr, base_vaddr+expected_size); + + ////////////////////////////// + //- rjf: map expression artifacts -> texture + // + U128 texture_key = ctrl_hash_store_key_from_process_vaddr_range(process->ctrl_machine_id, process->ctrl_handle, vaddr_range, 0); + TEX_Topology topology = tex_topology_make(v2s32((S32)bvs->top.width, (S32)bvs->top.height), bvs->top.fmt); + U128 data_hash = {0}; + R_Handle texture = tex_texture_from_key_topology(tex_scope, texture_key, topology, &data_hash); + String8 data = hs_data_from_hash(hs_scope, data_hash); + + ////////////////////////////// + //- rjf: build canvas box + // + UI_Box *canvas_box = &ui_g_nil_box; + Vec2F32 canvas_dim = dim_2f32(rect); + Rng2F32 canvas_rect = r2f32p(0, 0, canvas_dim.x, canvas_dim.y); + UI_Rect(canvas_rect) + { + canvas_box = ui_build_box_from_stringf(UI_BoxFlag_Clip|UI_BoxFlag_Clickable|UI_BoxFlag_Scroll, "bmp_canvas_%p", view); + ui_box_equip_custom_draw(canvas_box, df_bitmap_view_canvas_box_draw, bvs); + } + + ////////////////////////////// + //- rjf: canvas dragging + // + UI_Signal canvas_sig = ui_signal_from_box(canvas_box); + { + if(ui_dragging(canvas_sig)) + { + if(ui_pressed(canvas_sig)) + { + DF_CmdParams p = df_cmd_params_from_view(ws, panel, view); + df_push_cmd__root(&p, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_FocusPanel)); + ui_store_drag_struct(&bvs->view_center_pos); + } + Vec2F32 start_view_center_pos = *ui_get_drag_struct(Vec2F32); + Vec2F32 drag_delta_scr = ui_drag_delta(); + Vec2F32 drag_delta_cvs = scale_2f32(drag_delta_scr, 1.f/bvs->zoom); + Vec2F32 new_view_center_pos = sub_2f32(start_view_center_pos, drag_delta_cvs); + bvs->view_center_pos = new_view_center_pos; + } + if(canvas_sig.scroll.y != 0) + { + F32 new_zoom = bvs->zoom - bvs->zoom*canvas_sig.scroll.y/10.f; + new_zoom = Clamp(1.f/256.f, new_zoom, 256.f); + Vec2F32 mouse_scr_pre = sub_2f32(ui_mouse(), rect.p0); + Vec2F32 mouse_cvs = df_bitmap_view_state__canvas_from_screen_pos(bvs, canvas_rect, mouse_scr_pre); + bvs->zoom = new_zoom; + Vec2F32 mouse_scr_pst = df_bitmap_view_state__screen_from_canvas_pos(bvs, canvas_rect, mouse_cvs); + Vec2F32 drift_scr = sub_2f32(mouse_scr_pst, mouse_scr_pre); + bvs->view_center_pos = add_2f32(bvs->view_center_pos, scale_2f32(drift_scr, 1.f/new_zoom)); + } + if(ui_double_clicked(canvas_sig)) + { + ui_kill_action(); + MemoryZeroStruct(&bvs->view_center_pos); + bvs->zoom = 1.f; + } + } + + ////////////////////////////// + //- rjf: calculate image coordinates + // + Rng2F32 img_rect_cvs = r2f32p(-topology.dim.x/2, -topology.dim.y/2, +topology.dim.x/2, +topology.dim.y/2); + Rng2F32 img_rect_scr = df_bitmap_view_state__screen_from_canvas_rect(bvs, canvas_rect, img_rect_cvs); + + ////////////////////////////// + //- rjf: image-region canvas interaction + // + Vec2S32 mouse_bmp = {-1, -1}; + if(ui_hovering(canvas_sig) && !ui_dragging(canvas_sig)) + { + Vec2F32 mouse_scr = sub_2f32(ui_mouse(), rect.p0); + Vec2F32 mouse_cvs = df_bitmap_view_state__canvas_from_screen_pos(bvs, canvas_rect, mouse_scr); + if(contains_2f32(img_rect_cvs, mouse_cvs)) + { + mouse_bmp = v2s32((S32)(mouse_cvs.x-img_rect_cvs.x0), (S32)(mouse_cvs.y-img_rect_cvs.y0)); + S64 off_px = mouse_bmp.y*topology.dim.x + mouse_bmp.x; + S64 off_bytes = off_px*r_tex2d_format_bytes_per_pixel_table[topology.fmt]; + if(0 <= off_bytes && off_bytes+r_tex2d_format_bytes_per_pixel_table[topology.fmt] <= data.size && + r_tex2d_format_bytes_per_pixel_table[topology.fmt] != 0) + { + B32 color_is_good = 1; + Vec4F32 color = {0}; + switch(topology.fmt) + { + default:{color_is_good = 0;}break; + case R_Tex2DFormat_R8: {color = v4f32(((U8 *)(data.str+off_bytes))[0]/255.f, 0, 0, 1);}break; + case R_Tex2DFormat_RG8: {color = v4f32(((U8 *)(data.str+off_bytes))[0]/255.f, ((U8 *)(data.str+off_bytes))[1]/255.f, 0, 1);}break; + case R_Tex2DFormat_RGBA8: {color = v4f32(((U8 *)(data.str+off_bytes))[0]/255.f, ((U8 *)(data.str+off_bytes))[1]/255.f, ((U8 *)(data.str+off_bytes))[2]/255.f, ((U8 *)(data.str+off_bytes))[3]/255.f);}break; + case R_Tex2DFormat_BGRA8: {color = v4f32(((U8 *)(data.str+off_bytes))[3]/255.f, ((U8 *)(data.str+off_bytes))[2]/255.f, ((U8 *)(data.str+off_bytes))[1]/255.f, ((U8 *)(data.str+off_bytes))[0]/255.f);}break; + case R_Tex2DFormat_R16: {color = v4f32(((U16 *)(data.str+off_bytes))[0]/(F32)max_U16, 0, 0, 1);}break; + case R_Tex2DFormat_RGBA16: {color = v4f32(((U16 *)(data.str+off_bytes))[0]/(F32)max_U16, ((U16 *)(data.str+off_bytes))[1]/(F32)max_U16, ((U16 *)(data.str+off_bytes))[2]/(F32)max_U16, ((U16 *)(data.str+off_bytes))[3]/(F32)max_U16);}break; + case R_Tex2DFormat_R32: {color = v4f32(((F32 *)(data.str+off_bytes))[0], 0, 0, 1);}break; + case R_Tex2DFormat_RG32: {color = v4f32(((F32 *)(data.str+off_bytes))[0], ((F32 *)(data.str+off_bytes))[1], 0, 1);}break; + case R_Tex2DFormat_RGBA32: {color = v4f32(((F32 *)(data.str+off_bytes))[0], ((F32 *)(data.str+off_bytes))[1], ((F32 *)(data.str+off_bytes))[2], ((F32 *)(data.str+off_bytes))[3]);}break; + } + if(color_is_good) + { + Vec4F32 hsva = hsva_from_rgba(color); + ui_do_color_tooltip_hsva(hsva); + } + } + } + } + + ////////////////////////////// + //- rjf: build image + // + UI_Parent(canvas_box) + { + if(0 <= mouse_bmp.x && mouse_bmp.x < bvs->top.width && + 0 <= mouse_bmp.x && mouse_bmp.x < bvs->top.height) + { + F32 pixel_size_scr = 1.f*bvs->zoom; + Rng2F32 indicator_rect_scr = r2f32p(img_rect_scr.x0 + mouse_bmp.x*pixel_size_scr, + img_rect_scr.y0 + mouse_bmp.y*pixel_size_scr, + img_rect_scr.x0 + (mouse_bmp.x+1)*pixel_size_scr, + img_rect_scr.y0 + (mouse_bmp.y+1)*pixel_size_scr); + UI_Rect(indicator_rect_scr) + { + ui_build_box_from_key(UI_BoxFlag_DrawBorder|UI_BoxFlag_Floating, ui_key_zero()); + } + } + UI_Rect(img_rect_scr) UI_Flags(UI_BoxFlag_DrawBorder|UI_BoxFlag_DrawDropShadow|UI_BoxFlag_Floating) + { + ui_image(texture, R_Tex2DSampleKind_Nearest, r2f32p(0, 0, (F32)bvs->top.width, (F32)bvs->top.height), v4f32(1, 1, 1, 1), 0, str8_lit("bmp_image")); + } + } + + hs_scope_close(hs_scope); + tex_scope_close(tex_scope); + di_scope_close(di_scope); + scratch_end(scratch); +} + +//////////////////////////////// +//~ rjf: "geo" + +internal DF_GeoTopologyInfo +df_vr_geo_topology_info_from_cfg(DI_Scope *scope, DF_CtrlCtx *ctrl_ctx, EVAL_ParseCtx *parse_ctx, EVAL_String2ExprMap *macro_map, DF_CfgNode *cfg) +{ + Temp scratch = scratch_begin(0, 0); + DF_GeoTopologyInfo result = {0}; + { + StringJoin join = {0}; + join.sep = str8_lit(" "); + DF_CfgNode *count_cfg = df_cfg_node_child_from_string(cfg, str8_lit("count"), 0); + DF_CfgNode *vertices_base_cfg = df_cfg_node_child_from_string(cfg, str8_lit("vertices_base"), 0); + DF_CfgNode *vertices_size_cfg = df_cfg_node_child_from_string(cfg, str8_lit("vertices_size"), 0); + String8List count_expr_strs = {0}; + String8List vertices_base_expr_strs = {0}; + String8List vertices_size_expr_strs = {0}; + for(DF_CfgNode *child = count_cfg->first; child != &df_g_nil_cfg_node; child = child->next) + { + str8_list_push(scratch.arena, &count_expr_strs, child->string); + } + for(DF_CfgNode *child = vertices_base_cfg->first; child != &df_g_nil_cfg_node; child = child->next) + { + str8_list_push(scratch.arena, &vertices_base_expr_strs, child->string); + } + for(DF_CfgNode *child = vertices_size_cfg->first; child != &df_g_nil_cfg_node; child = child->next) + { + str8_list_push(scratch.arena, &vertices_size_expr_strs, child->string); + } + String8 count_expr = str8_list_join(scratch.arena, &count_expr_strs, &join); + String8 vertices_base_expr = str8_list_join(scratch.arena, &vertices_base_expr_strs, &join); + String8 vertices_size_expr = str8_list_join(scratch.arena, &vertices_size_expr_strs, &join); + DF_Eval count_eval = df_eval_from_string(scratch.arena, scope, ctrl_ctx, parse_ctx, macro_map, count_expr); + DF_Eval vertices_base_eval = df_eval_from_string(scratch.arena, scope, ctrl_ctx, parse_ctx, macro_map, vertices_base_expr); + DF_Eval vertices_size_eval = df_eval_from_string(scratch.arena, scope, ctrl_ctx, parse_ctx, macro_map, vertices_size_expr); + DF_Eval count_val_eval = df_value_mode_eval_from_eval(parse_ctx->type_graph, parse_ctx->rdi, ctrl_ctx, count_eval); + DF_Eval vertices_base_val_eval = df_value_mode_eval_from_eval(parse_ctx->type_graph, parse_ctx->rdi, ctrl_ctx, vertices_base_eval); + DF_Eval vertices_size_val_eval = df_value_mode_eval_from_eval(parse_ctx->type_graph, parse_ctx->rdi, ctrl_ctx, vertices_size_eval); + U64 vertices_base_vaddr = vertices_base_val_eval.imm_u64 ? vertices_base_val_eval.imm_u64 : vertices_base_val_eval.offset; + result.index_count = count_val_eval.imm_u64; + result.vertices_vaddr_range = r1u64(vertices_base_vaddr, vertices_base_vaddr+vertices_size_val_eval.imm_u64); + } + scratch_end(scratch); + return result; +} + +internal UI_BOX_CUSTOM_DRAW(df_vr_geo_box_draw) +{ + DF_VR_GeoBoxDrawData *draw_data = (DF_VR_GeoBoxDrawData *)user_data; + DF_VR_GeoState *state = df_view_rule_block_user_state(draw_data->key, DF_VR_GeoState); + + // rjf: get clip + Rng2F32 clip = box->rect; + for(UI_Box *b = box->parent; !ui_box_is_nil(b); b = b->parent) + { + if(b->flags & UI_BoxFlag_Clip) + { + clip = intersect_2f32(b->rect, clip); + } + } + + // rjf: calculate eye/target + Vec3F32 target = {0}; + Vec3F32 eye = v3f32(state->zoom*cos_f32(state->yaw)*sin_f32(state->pitch), + state->zoom*sin_f32(state->yaw)*sin_f32(state->pitch), + state->zoom*cos_f32(state->pitch)); + + // rjf: mesh + Vec2F32 box_dim = dim_2f32(box->rect); + R_PassParams_Geo3D *pass = d_geo3d_begin(box->rect, + make_look_at_4x4f32(eye, target, v3f32(0, 0, 1)), + make_perspective_4x4f32(0.25f, box_dim.x/box_dim.y, 0.1f, 500.f)); + pass->clip = clip; + d_mesh(draw_data->vertex_buffer, draw_data->index_buffer, R_GeoTopologyKind_Triangles, R_GeoVertexFlag_TexCoord|R_GeoVertexFlag_Normals|R_GeoVertexFlag_RGB, r_handle_zero(), mat_4x4f32(1.f)); + + // rjf: blur + if(draw_data->loaded_t < 0.98f) + { + d_blur(intersect_2f32(clip, box->rect), 10.f-9.f*draw_data->loaded_t, 0); + } +} + +DF_CORE_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_DEF(geo) +{ + DF_EvalVizBlock *vb = df_eval_viz_block_begin(arena, DF_EvalVizBlockKind_Canvas, key, df_expand_key_make(df_hash_from_expand_key(key), 1), depth); + vb->eval = eval; + vb->string = string; + vb->cfg_table = *cfg_table; + vb->visual_idx_range = r1u64(0, 16); + vb->semantic_idx_range = r1u64(0, 1); + df_eval_viz_block_end(out, vb); +} + +DF_GFX_VIEW_RULE_ROW_UI_FUNCTION_DEF(geo) +{ + DF_Eval value_eval = df_value_mode_eval_from_eval(parse_ctx->type_graph, parse_ctx->rdi, ctrl_ctx, eval); + U64 base_vaddr = value_eval.imm_u64 ? value_eval.imm_u64 : value_eval.offset; + DF_Font(ws, DF_FontSlot_Code) UI_FlagsAdd(UI_BoxFlag_DrawTextWeak) + ui_labelf("0x%I64x -> Geometry", base_vaddr); +} + +DF_GFX_VIEW_RULE_BLOCK_UI_FUNCTION_DEF(geo) +{ + Temp scratch = scratch_begin(0, 0); + GEO_Scope *geo_scope = geo_scope_open(); + DF_VR_GeoState *state = df_view_rule_block_user_state(key, DF_VR_GeoState); + if(!state->initialized) + { + state->initialized = 1; + state->zoom_target = 3.5f; + state->yaw = state->yaw_target = -0.125f; + state->pitch = state->pitch_target = -0.125f; + } + if(state->last_open_frame_idx+1 < df_frame_index()) + { + state->loaded_t = 0; + } + state->last_open_frame_idx = df_frame_index(); + + //- rjf: resolve to address value + DF_Eval value_eval = df_value_mode_eval_from_eval(parse_ctx->type_graph, parse_ctx->rdi, ctrl_ctx, eval); + U64 base_vaddr = value_eval.imm_u64 ? value_eval.imm_u64 : value_eval.offset; + + //- rjf: extract extra geo topology info from view rule + DF_GeoTopologyInfo top = df_vr_geo_topology_info_from_cfg(di_scope, ctrl_ctx, parse_ctx, macro_map, cfg); + Rng1U64 index_buffer_vaddr_range = r1u64(base_vaddr, base_vaddr+top.index_count*sizeof(U32)); + Rng1U64 vertex_buffer_vaddr_range = top.vertices_vaddr_range; + + //- rjf: unpack thread/process of eval + DF_Entity *thread = df_entity_from_handle(ctrl_ctx->thread); + DF_Entity *process = df_entity_ancestor_from_kind(thread, DF_EntityKind_Process); + + //- rjf: obtain keys for index buffer & vertex buffer memory + U128 index_buffer_key = ctrl_hash_store_key_from_process_vaddr_range(process->ctrl_machine_id, process->ctrl_handle, index_buffer_vaddr_range, 0); + U128 vertex_buffer_key = ctrl_hash_store_key_from_process_vaddr_range(process->ctrl_machine_id, process->ctrl_handle, vertex_buffer_vaddr_range, 0); + + //- rjf: get gpu buffers + R_Handle index_buffer = geo_buffer_from_key(geo_scope, index_buffer_key); + R_Handle vertex_buffer = geo_buffer_from_key(geo_scope, vertex_buffer_key); + + //- rjf: build preview + F32 rate = 1 - pow_f32(2, (-15.f * df_dt())); + if(top.index_count != 0) + { + UI_Padding(ui_pct(1.f, 0.f)) + UI_PrefWidth(ui_px(dim.y, 1.f)) + UI_Column UI_Padding(ui_pct(1.f, 0.f)) + UI_PrefHeight(ui_px(dim.y, 1.f)) + { + UI_Box *box = ui_build_box_from_stringf(UI_BoxFlag_DrawBorder|UI_BoxFlag_DrawBackground|UI_BoxFlag_Clickable, "geo_box"); + UI_Signal sig = ui_signal_from_box(box); + if(ui_dragging(sig)) + { + if(ui_pressed(sig)) + { + Vec2F32 data = v2f32(state->yaw_target, state->pitch_target); + ui_store_drag_struct(&data); + } + Vec2F32 drag_delta = ui_drag_delta(); + Vec2F32 drag_start_data = *ui_get_drag_struct(Vec2F32); + state->yaw_target = drag_start_data.x + drag_delta.x/dim_2f32(box->rect).x; + state->pitch_target = drag_start_data.y + drag_delta.y/dim_2f32(box->rect).y; + } + state->zoom += (state->zoom_target - state->zoom) * rate; + state->yaw += (state->yaw_target - state->yaw) * rate; + state->pitch += (state->pitch_target - state->pitch) * rate; + if(abs_f32(state->zoom-state->zoom_target) > 0.001f || + abs_f32(state->yaw-state->yaw_target) > 0.001f || + abs_f32(state->pitch-state->pitch_target) > 0.001f) + { + df_gfx_request_frame(); + } + DF_VR_GeoBoxDrawData *draw_data = push_array(ui_build_arena(), DF_VR_GeoBoxDrawData, 1); + draw_data->key = key; + draw_data->vertex_buffer = vertex_buffer; + draw_data->index_buffer = index_buffer; + draw_data->loaded_t = state->loaded_t; + ui_box_equip_custom_draw(box, df_vr_geo_box_draw, draw_data); + if(r_handle_match(r_handle_zero(), vertex_buffer)) + { + df_gfx_request_frame(); + state->loaded_t = 0; + } + else + { + state->loaded_t += (1.f - state->loaded_t) * rate; + if(state->loaded_t < 0.99f) + { + df_gfx_request_frame(); + } + } + } + } + + geo_scope_close(geo_scope); + scratch_end(scratch); +} + +DF_VIEW_SETUP_FUNCTION_DEF(geo) {} +DF_VIEW_STRING_FROM_STATE_FUNCTION_DEF(geo) { return str8_lit(""); } +DF_VIEW_CMD_FUNCTION_DEF(geo) {} +DF_VIEW_UI_FUNCTION_DEF(geo) +{ +} diff --git a/src/df/gfx/df_views.c b/src/df/gfx/df_views.c index 311330fb..2b8e3f11 100644 --- a/src/df/gfx/df_views.c +++ b/src/df/gfx/df_views.c @@ -410,7 +410,7 @@ df_code_view_init(DF_CodeViewState *cv, DF_View *view) } internal void -df_code_view_cmds(DF_Window *ws, DF_Panel *panel, DF_View *view, DF_CodeViewState *cv, DF_CmdList *cmds, String8 text_data, TXT_TextInfo *text_info, DASM_InstArray *dasm_insts, Rng1U64 dasm_vaddr_range, DI_Key dasm_dbgi_key) +df_code_view_cmds(DF_Window *ws, DF_Panel *panel, DF_View *view, DF_CodeViewState *cv, DF_CmdList *cmds, String8 text_data, TXT_TextInfo *text_info, DASM_LineArray *dasm_lines, Rng1U64 dasm_vaddr_range, DI_Key dasm_dbgi_key) { for(DF_CmdNode *n = cmds->first; n != 0; n = n->next) { @@ -459,7 +459,7 @@ df_code_view_cmds(DF_Window *ws, DF_Panel *panel, DF_View *view, DF_CodeViewStat } internal DF_CodeViewBuildResult -df_code_view_build(Arena *arena, DF_Window *ws, DF_Panel *panel, DF_View *view, DF_CodeViewState *cv, DF_CodeViewBuildFlags flags, Rng2F32 rect, String8 text_data, TXT_TextInfo *text_info, DASM_InstArray *dasm_insts, Rng1U64 dasm_vaddr_range, DI_Key dasm_dbgi_key) +df_code_view_build(Arena *arena, DF_Window *ws, DF_Panel *panel, DF_View *view, DF_CodeViewState *cv, DF_CodeViewBuildFlags flags, Rng2F32 rect, String8 text_data, TXT_TextInfo *text_info, DASM_LineArray *dasm_lines, Rng1U64 dasm_vaddr_range, DI_Key dasm_dbgi_key) { ProfBeginFunction(); Temp scratch = scratch_begin(&arena, 1); @@ -669,7 +669,7 @@ df_code_view_build(Arena *arena, DF_Window *ws, DF_Panel *panel, DF_View *view, } // rjf: find live threads mapping to disasm - if(dasm_insts) ProfScope("find live threads mapping to this disassembly") + if(dasm_lines) ProfScope("find live threads mapping to this disassembly") { DF_Entity *selected_thread = df_entity_from_handle(ctrl_ctx.thread); DF_EntityList threads = df_query_cached_entity_list_with_kind(DF_EntityKind_Thread); @@ -681,7 +681,7 @@ df_code_view_build(Arena *arena, DF_Window *ws, DF_Panel *panel, DF_View *view, if(df_entity_ancestor_from_kind(thread, DF_EntityKind_Process) == process && contains_1u64(dasm_vaddr_range, rip_vaddr)) { U64 rip_off = rip_vaddr - dasm_vaddr_range.min; - S64 line_num = dasm_inst_array_idx_from_code_off__linear_scan(dasm_insts, rip_off)+1; + S64 line_num = dasm_line_array_idx_from_code_off__linear_scan(dasm_lines, rip_off)+1; if(contains_1s64(visible_line_num_range, line_num)) { U64 slice_line_idx = (line_num-visible_line_num_range.min); @@ -692,7 +692,7 @@ df_code_view_build(Arena *arena, DF_Window *ws, DF_Panel *panel, DF_View *view, } // rjf: find breakpoints mapping to this disasm - if(dasm_insts) ProfScope("find breakpoints mapping to this disassembly") + if(dasm_lines) ProfScope("find breakpoints mapping to this disassembly") { DF_EntityList bps = df_query_cached_entity_list_with_kind(DF_EntityKind_Breakpoint); for(DF_EntityNode *n = bps.first; n != 0; n = n->next) @@ -701,7 +701,7 @@ df_code_view_build(Arena *arena, DF_Window *ws, DF_Panel *panel, DF_View *view, if(bp->flags & DF_EntityFlag_HasVAddr && contains_1u64(dasm_vaddr_range, bp->vaddr)) { U64 off = bp->vaddr-dasm_vaddr_range.min; - U64 idx = dasm_inst_array_idx_from_code_off__linear_scan(dasm_insts, off); + U64 idx = dasm_line_array_idx_from_code_off__linear_scan(dasm_lines, off); S64 line_num = (S64)(idx+1); if(contains_1s64(visible_line_num_range, line_num)) { @@ -713,7 +713,7 @@ df_code_view_build(Arena *arena, DF_Window *ws, DF_Panel *panel, DF_View *view, } // rjf: find watch pins mapping to this disasm - if(dasm_insts) ProfScope("find watch pins mapping to this disassembly") + if(dasm_lines) ProfScope("find watch pins mapping to this disassembly") { DF_EntityList pins = df_query_cached_entity_list_with_kind(DF_EntityKind_WatchPin); for(DF_EntityNode *n = pins.first; n != 0; n = n->next) @@ -722,7 +722,7 @@ df_code_view_build(Arena *arena, DF_Window *ws, DF_Panel *panel, DF_View *view, if(pin->flags & DF_EntityFlag_HasVAddr && contains_1u64(dasm_vaddr_range, pin->vaddr)) { U64 off = pin->vaddr-dasm_vaddr_range.min; - U64 idx = dasm_inst_array_idx_from_code_off__linear_scan(dasm_insts, off); + U64 idx = dasm_line_array_idx_from_code_off__linear_scan(dasm_lines, off); S64 line_num = (S64)(idx+1); if(contains_1s64(visible_line_num_range, line_num)) { @@ -734,13 +734,13 @@ df_code_view_build(Arena *arena, DF_Window *ws, DF_Panel *panel, DF_View *view, } // rjf: fill dasm -> src info - if(dasm_insts) + if(dasm_lines) { DF_Entity *module = df_module_from_process_vaddr(process, dasm_vaddr_range.min); DI_Key dbgi_key = df_dbgi_key_from_module(module); for(S64 line_num = visible_line_num_range.min; line_num < visible_line_num_range.max; line_num += 1) { - U64 vaddr = dasm_vaddr_range.min + dasm_inst_array_code_off_from_idx(dasm_insts, line_num-1); + U64 vaddr = dasm_vaddr_range.min + dasm_line_array_code_off_from_idx(dasm_lines, line_num-1); U64 voff = df_voff_from_vaddr(module, vaddr); U64 slice_idx = line_num-visible_line_num_range.min; code_slice_params.line_vaddrs[slice_idx] = vaddr; @@ -749,7 +749,7 @@ df_code_view_build(Arena *arena, DF_Window *ws, DF_Panel *panel, DF_View *view, } // rjf: add dasm dbgi key to relevant dbgis - if(dasm_insts != 0) + if(dasm_lines != 0) { di_key_list_push(scratch.arena, &code_slice_params.relevant_dbgi_keys, &dasm_dbgi_key); } @@ -6691,7 +6691,7 @@ DF_VIEW_CMD_FUNCTION_DEF(Disassembly) String8 dasm_text_data = hs_data_from_hash(hs_scope, dasm_text_hash); //- rjf: process general code-view commands - df_code_view_cmds(ws, panel, view, &dv->cv, cmds, dasm_text_data, &dasm_text_info, &dasm_info.insts, dasm_vaddr_range, dasm_dbgi_key); + df_code_view_cmds(ws, panel, view, &dv->cv, cmds, dasm_text_data, &dasm_text_info, &dasm_info.lines, dasm_vaddr_range, dasm_dbgi_key); //- rjf: process disassembly-specific commands for(DF_CmdNode *n = cmds->first; n != 0; n = n->next) @@ -6798,7 +6798,7 @@ DF_VIEW_UI_FUNCTION_DEF(Disassembly) U128 dasm_text_hash = {0}; TXT_TextInfo dasm_text_info = txt_text_info_from_key_lang(txt_scope, df_interact_regs()->text_key, df_interact_regs()->lang_kind, &dasm_text_hash); String8 dasm_text_data = hs_data_from_hash(hs_scope, dasm_text_hash); - B32 has_disasm = (dasm_info.insts.count != 0 && dasm_text_info.lines_count != 0); + B32 has_disasm = (dasm_info.lines.count != 0 && dasm_text_info.lines_count != 0); B32 is_loading = (!has_disasm && !df_entity_is_nil(process) && dim_1u64(dasm_vaddr_range) != 0); ////////////////////////////// @@ -6816,7 +6816,7 @@ DF_VIEW_UI_FUNCTION_DEF(Disassembly) { U64 vaddr = dv->goto_vaddr; dv->goto_vaddr = 0; - U64 line_idx = dasm_inst_array_idx_from_code_off__linear_scan(&dasm_info.insts, vaddr-dasm_vaddr_range.min); + U64 line_idx = dasm_line_array_idx_from_code_off__linear_scan(&dasm_info.lines, vaddr-dasm_vaddr_range.min); S64 line_num = (S64)(line_idx+1); cv->goto_line_num = line_num; } @@ -6826,7 +6826,7 @@ DF_VIEW_UI_FUNCTION_DEF(Disassembly) // if(!is_loading && has_disasm) { - df_code_view_build(scratch.arena, ws, panel, view, cv, DF_CodeViewBuildFlag_All, code_area_rect, dasm_text_data, &dasm_text_info, &dasm_info.insts, dasm_vaddr_range, dasm_dbgi_key); + df_code_view_build(scratch.arena, ws, panel, view, cv, DF_CodeViewBuildFlag_All, code_area_rect, dasm_text_data, &dasm_text_info, &dasm_info.lines, dasm_vaddr_range, dasm_dbgi_key); } ////////////////////////////// @@ -6834,7 +6834,7 @@ DF_VIEW_UI_FUNCTION_DEF(Disassembly) // if(!is_loading && has_disasm) { - U64 off = dasm_inst_array_code_off_from_idx(&dasm_info.insts, df_interact_regs()->cursor.line-1); + U64 off = dasm_line_array_code_off_from_idx(&dasm_info.lines, df_interact_regs()->cursor.line-1); df_interact_regs()->vaddr_range = r1u64(dasm_base_vaddr+off, dasm_base_vaddr+off); df_interact_regs()->voff_range = df_voff_range_from_vaddr_range(dasm_module, df_interact_regs()->vaddr_range); df_interact_regs()->lines = df_lines_from_dbgi_key_voff(df_frame_arena(), &dasm_dbgi_key, df_interact_regs()->voff_range.min); @@ -6854,7 +6854,7 @@ DF_VIEW_UI_FUNCTION_DEF(Disassembly) DF_Font(ws, DF_FontSlot_Code) { DF_Entity *module = df_module_from_process_vaddr(process, dasm_vaddr_range.min); - U64 cursor_vaddr = (1 <= view->cursor.line && view->cursor.line <= dasm_info.insts.count) ? (dasm_vaddr_range.min+dasm_info.insts.v[view->cursor.line-1].code_off) : 0; + U64 cursor_vaddr = (1 <= view->cursor.line && view->cursor.line <= dasm_info.lines.count) ? (dasm_vaddr_range.min+dasm_info.lines.v[view->cursor.line-1].code_off) : 0; ui_labelf("%S", path_normalized_from_string(scratch.arena, module->name)); ui_spacer(ui_em(1.5f, 1)); ui_labelf("Address: 0x%I64x, Line: %I64d, Column: %I64d", cursor_vaddr, view->cursor.line, view->cursor.column); diff --git a/src/df/gfx/df_views.h b/src/df/gfx/df_views.h index bed77ca0..8f101ffb 100644 --- a/src/df/gfx/df_views.h +++ b/src/df/gfx/df_views.h @@ -1,571 +1,571 @@ -// Copyright (c) 2024 Epic Games Tools -// Licensed under the MIT license (https://opensource.org/license/mit/) - -#ifndef DEBUG_FRONTEND_VIEWS_H -#define DEBUG_FRONTEND_VIEWS_H - -//////////////////////////////// -//~ rjf: FileSystem @view_types - -typedef enum DF_FileSortKind -{ - DF_FileSortKind_Null, - DF_FileSortKind_Filename, - DF_FileSortKind_LastModified, - DF_FileSortKind_Size, - DF_FileSortKind_COUNT -} -DF_FileSortKind; - -typedef struct DF_FileInfo DF_FileInfo; -struct DF_FileInfo -{ - String8 filename; - FileProperties props; - FuzzyMatchRangeList match_ranges; -}; - -typedef struct DF_FileInfoNode DF_FileInfoNode; -struct DF_FileInfoNode -{ - DF_FileInfoNode *next; - DF_FileInfo file_info; -}; - -typedef struct DF_FileSystemViewPathState DF_FileSystemViewPathState; -struct DF_FileSystemViewPathState -{ - DF_FileSystemViewPathState *hash_next; - String8 normalized_path; - Vec2S64 cursor; -}; - -typedef struct DF_FileSystemViewState DF_FileSystemViewState; -struct DF_FileSystemViewState -{ - B32 initialized; - U64 path_state_table_size; - DF_FileSystemViewPathState **path_state_table; - DF_FileSortKind sort_kind; - Side sort_side; - Arena *cached_files_arena; - String8 cached_files_path; - DF_FileSortKind cached_files_sort_kind; - Side cached_files_sort_side; - U64 cached_file_count; - DF_FileInfo *cached_files; - F32 col_pcts[3]; -}; - -//////////////////////////////// -//~ rjf: Commands @view_types - -typedef struct DF_CmdListerItem DF_CmdListerItem; -struct DF_CmdListerItem -{ - DF_CmdSpec *cmd_spec; - U64 registrar_idx; - U64 ordering_idx; - FuzzyMatchRangeList name_match_ranges; - FuzzyMatchRangeList desc_match_ranges; - FuzzyMatchRangeList tags_match_ranges; -}; - -typedef struct DF_CmdListerItemNode DF_CmdListerItemNode; -struct DF_CmdListerItemNode -{ - DF_CmdListerItemNode *next; - DF_CmdListerItem item; -}; - -typedef struct DF_CmdListerItemList DF_CmdListerItemList; -struct DF_CmdListerItemList -{ - DF_CmdListerItemNode *first; - DF_CmdListerItemNode *last; - U64 count; -}; - -typedef struct DF_CmdListerItemArray DF_CmdListerItemArray; -struct DF_CmdListerItemArray -{ - DF_CmdListerItem *v; - U64 count; -}; - -//////////////////////////////// -//~ rjf: PendingEntity @view_types - -typedef struct DF_PendingEntityViewState DF_PendingEntityViewState; -struct DF_PendingEntityViewState -{ - Arena *deferred_cmd_arena; - DF_CmdList deferred_cmds; - Arena *complete_cfg_arena; - DF_CfgNode *complete_cfg_root; -}; - -//////////////////////////////// -//~ rjf: EntityLister @view_types - -typedef struct DF_EntityListerItem DF_EntityListerItem; -struct DF_EntityListerItem -{ - DF_Entity *entity; - FuzzyMatchRangeList name_match_ranges; -}; - -typedef struct DF_EntityListerItemNode DF_EntityListerItemNode; -struct DF_EntityListerItemNode -{ - DF_EntityListerItemNode *next; - DF_EntityListerItem item; -}; - -typedef struct DF_EntityListerItemList DF_EntityListerItemList; -struct DF_EntityListerItemList -{ - DF_EntityListerItemNode *first; - DF_EntityListerItemNode *last; - U64 count; -}; - -typedef struct DF_EntityListerItemArray DF_EntityListerItemArray; -struct DF_EntityListerItemArray -{ - DF_EntityListerItem *v; - U64 count; -}; - -//////////////////////////////// -//~ rjf: SystemProcesses @view_types - -typedef struct DF_ProcessInfo DF_ProcessInfo; -struct DF_ProcessInfo -{ - DMN_ProcessInfo info; - B32 is_attached; - FuzzyMatchRangeList attached_match_ranges; - FuzzyMatchRangeList name_match_ranges; - FuzzyMatchRangeList pid_match_ranges; -}; - -typedef struct DF_ProcessInfoNode DF_ProcessInfoNode; -struct DF_ProcessInfoNode -{ - DF_ProcessInfoNode *next; - DF_ProcessInfo info; -}; - -typedef struct DF_ProcessInfoList DF_ProcessInfoList; -struct DF_ProcessInfoList -{ - DF_ProcessInfoNode *first; - DF_ProcessInfoNode *last; - U64 count; -}; - -typedef struct DF_ProcessInfoArray DF_ProcessInfoArray; -struct DF_ProcessInfoArray -{ - DF_ProcessInfo *v; - U64 count; -}; - -//////////////////////////////// -//~ rjf: Breakpoint @view_types - -typedef struct DF_BreakpointViewState DF_BreakpointViewState; -struct DF_BreakpointViewState -{ - B32 initialized; - Vec2S32 selected_p; - F32 key_pct; - F32 val_pct; -}; - -//////////////////////////////// -//~ rjf: Target @view_types - -typedef struct DF_TargetViewState DF_TargetViewState; -struct DF_TargetViewState -{ - B32 initialized; - - // rjf: pick file kind - DF_EntityKind pick_dst_kind; - - // rjf: selection cursor - Vec2S64 cursor; - - // rjf: text input state - TxtPt input_cursor; - TxtPt input_mark; - U8 input_buffer[1024]; - U64 input_size; - B32 input_editing; - - // rjf: table column pcts - F32 key_pct; - F32 value_pct; -}; - -//////////////////////////////// -//~ rjf: FilePathMap @view_types - -typedef struct DF_FilePathMapViewState DF_FilePathMapViewState; -struct DF_FilePathMapViewState -{ - B32 initialized; - Vec2S64 cursor; - TxtPt input_cursor; - TxtPt input_mark; - U8 input_buffer[1024]; - U64 input_size; - B32 input_editing; - DF_Handle pick_file_dst_map; - Side pick_file_dst_side; - F32 src_column_pct; - F32 dst_column_pct; -}; - -//////////////////////////////// -//~ rjf: AutoViewRules @view_types - -typedef struct DF_AutoViewRulesViewState DF_AutoViewRulesViewState; -struct DF_AutoViewRulesViewState -{ - B32 initialized; - Vec2S64 cursor; - TxtPt input_cursor; - TxtPt input_mark; - U8 input_buffer[1024]; - U64 input_size; - B32 input_editing; - F32 src_column_pct; - F32 dst_column_pct; -}; - -//////////////////////////////// -//~ rjf: Modules @view_types - -typedef struct DF_ModulesViewState DF_ModulesViewState; -struct DF_ModulesViewState -{ - B32 initialized; - DF_Handle selected_entity; - S64 selected_column; - B32 txt_editing; - TxtPt txt_cursor; - TxtPt txt_mark; - U8 txt_buffer[1024]; - U64 txt_size; - DF_Handle pick_file_dst_entity; - F32 idx_col_pct; - F32 desc_col_pct; - F32 range_col_pct; - F32 dbg_col_pct; -}; - -//////////////////////////////// -//~ rjf: Watch, Locals, Registers @view_types - -typedef struct DF_EvalRoot DF_EvalRoot; -struct DF_EvalRoot -{ - DF_EvalRoot *next; - DF_EvalRoot *prev; - U64 expr_buffer_string_size; - U64 expr_buffer_cap; - U8 *expr_buffer; -}; - -typedef enum DF_WatchViewColumnKind -{ - DF_WatchViewColumnKind_Expr, - DF_WatchViewColumnKind_Value, - DF_WatchViewColumnKind_Type, - DF_WatchViewColumnKind_ViewRule, - DF_WatchViewColumnKind_COUNT -} -DF_WatchViewColumnKind; - -typedef enum DF_WatchViewFillKind -{ - DF_WatchViewFillKind_Mutable, - DF_WatchViewFillKind_Registers, - DF_WatchViewFillKind_Locals, - DF_WatchViewFillKind_Globals, - DF_WatchViewFillKind_ThreadLocals, - DF_WatchViewFillKind_Types, - DF_WatchViewFillKind_Procedures, - DF_WatchViewFillKind_COUNT -} -DF_WatchViewFillKind; - -typedef struct DF_WatchViewPoint DF_WatchViewPoint; -struct DF_WatchViewPoint -{ - DF_WatchViewColumnKind column_kind; - DF_ExpandKey parent_key; - DF_ExpandKey key; -}; - -typedef struct DF_WatchViewTextEditState DF_WatchViewTextEditState; -struct DF_WatchViewTextEditState -{ - DF_WatchViewTextEditState *pt_hash_next; - DF_WatchViewPoint pt; - TxtPt cursor; - TxtPt mark; - U8 input_buffer[1024]; - U64 input_size; - U8 initial_buffer[1024]; - U64 initial_size; -}; - -typedef struct DF_WatchViewState DF_WatchViewState; -struct DF_WatchViewState -{ - B32 initialized; - - // rjf: fill kind (way that the contents of the watch view are computed) - DF_WatchViewFillKind fill_kind; - - // rjf; table cursor state - DF_WatchViewPoint cursor; - DF_WatchViewPoint mark; - DF_WatchViewPoint next_cursor; - DF_WatchViewPoint next_mark; - - // rjf: text input state - Arena *text_edit_arena; - U64 text_edit_state_slots_count; - DF_WatchViewTextEditState dummy_text_edit_state; - DF_WatchViewTextEditState **text_edit_state_slots; - B32 text_editing; - - // rjf: table column width state - F32 expr_column_pct; - F32 value_column_pct; - F32 type_column_pct; - F32 view_rule_column_pct; - - // rjf: mutable fill-kind root expression state - DF_EvalRoot *first_root; - DF_EvalRoot *last_root; - DF_EvalRoot *first_free_root; - U64 root_count; -}; - -//////////////////////////////// -//~ rjf: Code, Output @view_types - -typedef U32 DF_CodeViewFlags; -enum -{ - DF_CodeViewFlag_StickToBottom = (1<<0), -}; - -typedef U32 DF_CodeViewBuildFlags; -enum -{ - DF_CodeViewBuildFlag_Margins = (1<<0), - DF_CodeViewBuildFlag_All = 0xffffffff, -}; - -typedef struct DF_CodeViewState DF_CodeViewState; -struct DF_CodeViewState -{ - // rjf: stable state - B32 initialized; - S64 preferred_column; - B32 drifted_for_search; - DF_Handle pick_file_override_target; - DF_CodeViewFlags flags; - - // rjf: per-frame command info - S64 goto_line_num; - B32 center_cursor; - B32 contain_cursor; - B32 watch_expr_at_mouse; - Arena *find_text_arena; - String8 find_text_fwd; - String8 find_text_bwd; -}; - -typedef struct DF_CodeViewBuildResult DF_CodeViewBuildResult; -struct DF_CodeViewBuildResult -{ - DI_KeyList dbgi_keys; -}; - -//////////////////////////////// -//~ rjf: Disassembly @view_types - -typedef struct DF_DisasmViewState DF_DisasmViewState; -struct DF_DisasmViewState -{ - B32 initialized; - DF_Handle process; - U64 base_vaddr; - DASM_StyleFlags style_flags; - U64 goto_vaddr; - DF_CodeViewState cv; -}; - -//////////////////////////////// -//~ rjf: Memory @view_types - -typedef struct DF_MemoryViewState DF_MemoryViewState; -struct DF_MemoryViewState -{ - B32 initialized; - - // rjf: last-viewed-memory cache - Arena *last_viewed_memory_cache_arena; - U8 *last_viewed_memory_cache_buffer; - Rng1U64 last_viewed_memory_cache_range; - U64 last_viewed_memory_cache_memgen_idx; - - // rjf: control state - U64 cursor; - U64 mark; - - // rjf: organization state - U64 num_columns; - U64 bytes_per_cell; - - // rjf: command pass-through data - B32 center_cursor; - B32 contain_cursor; -}; - -//////////////////////////////// -//~ rjf: Settings @view_types - -typedef enum DF_SettingsItemKind -{ - DF_SettingsItemKind_CategoryHeader, - DF_SettingsItemKind_GlobalSetting, - DF_SettingsItemKind_WindowSetting, - DF_SettingsItemKind_ThemeColor, - DF_SettingsItemKind_ThemePreset, - DF_SettingsItemKind_COUNT -} -DF_SettingsItemKind; - -typedef struct DF_SettingsItem DF_SettingsItem; -struct DF_SettingsItem -{ - DF_SettingsItemKind kind; - String8 kind_string; - String8 string; - FuzzyMatchRangeList kind_string_matches; - FuzzyMatchRangeList string_matches; - DF_IconKind icon_kind; - DF_SettingCode code; - DF_ThemeColor color; - DF_ThemePreset preset; - DF_SettingsItemKind category; -}; - -typedef struct DF_SettingsItemNode DF_SettingsItemNode; -struct DF_SettingsItemNode -{ - DF_SettingsItemNode *next; - DF_SettingsItem v; -}; - -typedef struct DF_SettingsItemList DF_SettingsItemList; -struct DF_SettingsItemList -{ - DF_SettingsItemNode *first; - DF_SettingsItemNode *last; - U64 count; -}; - -typedef struct DF_SettingsItemArray DF_SettingsItemArray; -struct DF_SettingsItemArray -{ - DF_SettingsItem *v; - U64 count; -}; - -//////////////////////////////// -//~ rjf: Quick Sort Comparisons - -internal int df_qsort_compare_file_info__default(DF_FileInfo *a, DF_FileInfo *b); -internal int df_qsort_compare_file_info__default_filtered(DF_FileInfo *a, DF_FileInfo *b); -internal int df_qsort_compare_file_info__filename(DF_FileInfo *a, DF_FileInfo *b); -internal int df_qsort_compare_file_info__last_modified(DF_FileInfo *a, DF_FileInfo *b); -internal int df_qsort_compare_file_info__size(DF_FileInfo *a, DF_FileInfo *b); -internal int df_qsort_compare_process_info(DF_ProcessInfo *a, DF_ProcessInfo *b); -internal int df_qsort_compare_cmd_lister__strength(DF_CmdListerItem *a, DF_CmdListerItem *b); -internal int df_qsort_compare_entity_lister__strength(DF_EntityListerItem *a, DF_EntityListerItem *b); -internal int df_qsort_compare_settings_item(DF_SettingsItem *a, DF_SettingsItem *b); - -//////////////////////////////// -//~ rjf: Command Lister - -internal DF_CmdListerItemList df_cmd_lister_item_list_from_needle(Arena *arena, String8 needle); -internal DF_CmdListerItemArray df_cmd_lister_item_array_from_list(Arena *arena, DF_CmdListerItemList list); -internal void df_cmd_lister_item_array_sort_by_strength__in_place(DF_CmdListerItemArray array); - -//////////////////////////////// -//~ rjf: System Process Lister - -internal DF_ProcessInfoList df_process_info_list_from_query(Arena *arena, String8 query); -internal DF_ProcessInfoArray df_process_info_array_from_list(Arena *arena, DF_ProcessInfoList list); -internal void df_process_info_array_sort_by_strength__in_place(DF_ProcessInfoArray array); - -//////////////////////////////// -//~ rjf: Entity Lister - -internal DF_EntityListerItemList df_entity_lister_item_list_from_needle(Arena *arena, DF_EntityKind kind, DF_EntityFlags omit_flags, String8 needle); -internal DF_EntityListerItemArray df_entity_lister_item_array_from_list(Arena *arena, DF_EntityListerItemList list); -internal void df_entity_lister_item_array_sort_by_strength__in_place(DF_EntityListerItemArray array); - -//////////////////////////////// -//~ rjf: Code Views - -internal void df_code_view_init(DF_CodeViewState *cv, DF_View *view); -internal void df_code_view_cmds(DF_Window *ws, DF_Panel *panel, DF_View *view, DF_CodeViewState *cv, DF_CmdList *cmds, String8 text_data, TXT_TextInfo *text_info, DASM_InstArray *dasm_insts, Rng1U64 dasm_vaddr_range, DI_Key dasm_dbgi_key); -internal DF_CodeViewBuildResult df_code_view_build(Arena *arena, DF_Window *ws, DF_Panel *panel, DF_View *view, DF_CodeViewState *cv, DF_CodeViewBuildFlags flags, Rng2F32 rect, String8 text_data, TXT_TextInfo *text_info, DASM_InstArray *dasm_insts, Rng1U64 dasm_vaddr_range, DI_Key dasm_dbgi_key); - -//////////////////////////////// -//~ rjf: Watch Views - -//- rjf: eval watch view instance -> eval view key -internal DF_EvalViewKey df_eval_view_key_from_eval_watch_view(DF_WatchViewState *ewv); - -//- rjf: root allocation/deallocation/mutation -internal DF_EvalRoot * df_eval_root_alloc(DF_View *view, DF_WatchViewState *ews); -internal void df_eval_root_release(DF_WatchViewState *ews, DF_EvalRoot *root); -internal void df_eval_root_equip_string(DF_EvalRoot *root, String8 string); -internal DF_EvalRoot * df_eval_root_from_string(DF_WatchViewState *ews, String8 string); -internal DF_EvalRoot * df_eval_root_from_expand_key(DF_WatchViewState *ews, DF_EvalView *eval_view, DF_ExpandKey expand_key); -internal String8 df_string_from_eval_root(DF_EvalRoot *root); -internal DF_ExpandKey df_parent_expand_key_from_eval_root(DF_EvalRoot *root); -internal DF_ExpandKey df_expand_key_from_eval_root(DF_EvalRoot *root); - -//- rjf: watch view points <-> table coordinates -internal B32 df_watch_view_point_match(DF_WatchViewPoint a, DF_WatchViewPoint b); -internal DF_WatchViewPoint df_watch_view_point_from_tbl(DF_EvalVizBlockList *blocks, Vec2S64 tbl); -internal Vec2S64 df_tbl_from_watch_view_point(DF_EvalVizBlockList *blocks, DF_WatchViewPoint pt); - -//- rjf: table coordinates -> strings -internal String8 df_string_from_eval_viz_row_column_kind(Arena *arena, DF_EvalView *ev, TG_Graph *graph, RDI_Parsed *rdi, DF_EvalVizRow *row, DF_WatchViewColumnKind col_kind, B32 editable); - -//- rjf: table coordinates -> text edit state -internal DF_WatchViewTextEditState *df_watch_view_text_edit_state_from_pt(DF_WatchViewState *wv, DF_WatchViewPoint pt); - -//- rjf: windowed watch tree visualization -internal DF_EvalVizBlockList df_eval_viz_block_list_from_watch_view_state(Arena *arena, DI_Scope *di_scope, FZY_Scope *fzy_scope, DF_CtrlCtx *ctrl_ctx, EVAL_ParseCtx *parse_ctx, EVAL_String2ExprMap *macro_map, DF_View *view, DF_WatchViewState *ews); - -//- rjf: eval/watch views main hooks -internal void df_watch_view_init(DF_WatchViewState *ewv, DF_View *view, DF_WatchViewFillKind fill_kind); -internal void df_watch_view_cmds(DF_Window *ws, DF_Panel *panel, DF_View *view, DF_WatchViewState *ewv, DF_CmdList *cmds); -internal void df_watch_view_build(DF_Window *ws, DF_Panel *panel, DF_View *view, DF_WatchViewState *ewv, B32 modifiable, U32 default_radix, Rng2F32 rect); - -#endif // DEBUG_FRONTEND_VIEWS_H +// Copyright (c) 2024 Epic Games Tools +// Licensed under the MIT license (https://opensource.org/license/mit/) + +#ifndef DEBUG_FRONTEND_VIEWS_H +#define DEBUG_FRONTEND_VIEWS_H + +//////////////////////////////// +//~ rjf: FileSystem @view_types + +typedef enum DF_FileSortKind +{ + DF_FileSortKind_Null, + DF_FileSortKind_Filename, + DF_FileSortKind_LastModified, + DF_FileSortKind_Size, + DF_FileSortKind_COUNT +} +DF_FileSortKind; + +typedef struct DF_FileInfo DF_FileInfo; +struct DF_FileInfo +{ + String8 filename; + FileProperties props; + FuzzyMatchRangeList match_ranges; +}; + +typedef struct DF_FileInfoNode DF_FileInfoNode; +struct DF_FileInfoNode +{ + DF_FileInfoNode *next; + DF_FileInfo file_info; +}; + +typedef struct DF_FileSystemViewPathState DF_FileSystemViewPathState; +struct DF_FileSystemViewPathState +{ + DF_FileSystemViewPathState *hash_next; + String8 normalized_path; + Vec2S64 cursor; +}; + +typedef struct DF_FileSystemViewState DF_FileSystemViewState; +struct DF_FileSystemViewState +{ + B32 initialized; + U64 path_state_table_size; + DF_FileSystemViewPathState **path_state_table; + DF_FileSortKind sort_kind; + Side sort_side; + Arena *cached_files_arena; + String8 cached_files_path; + DF_FileSortKind cached_files_sort_kind; + Side cached_files_sort_side; + U64 cached_file_count; + DF_FileInfo *cached_files; + F32 col_pcts[3]; +}; + +//////////////////////////////// +//~ rjf: Commands @view_types + +typedef struct DF_CmdListerItem DF_CmdListerItem; +struct DF_CmdListerItem +{ + DF_CmdSpec *cmd_spec; + U64 registrar_idx; + U64 ordering_idx; + FuzzyMatchRangeList name_match_ranges; + FuzzyMatchRangeList desc_match_ranges; + FuzzyMatchRangeList tags_match_ranges; +}; + +typedef struct DF_CmdListerItemNode DF_CmdListerItemNode; +struct DF_CmdListerItemNode +{ + DF_CmdListerItemNode *next; + DF_CmdListerItem item; +}; + +typedef struct DF_CmdListerItemList DF_CmdListerItemList; +struct DF_CmdListerItemList +{ + DF_CmdListerItemNode *first; + DF_CmdListerItemNode *last; + U64 count; +}; + +typedef struct DF_CmdListerItemArray DF_CmdListerItemArray; +struct DF_CmdListerItemArray +{ + DF_CmdListerItem *v; + U64 count; +}; + +//////////////////////////////// +//~ rjf: PendingEntity @view_types + +typedef struct DF_PendingEntityViewState DF_PendingEntityViewState; +struct DF_PendingEntityViewState +{ + Arena *deferred_cmd_arena; + DF_CmdList deferred_cmds; + Arena *complete_cfg_arena; + DF_CfgNode *complete_cfg_root; +}; + +//////////////////////////////// +//~ rjf: EntityLister @view_types + +typedef struct DF_EntityListerItem DF_EntityListerItem; +struct DF_EntityListerItem +{ + DF_Entity *entity; + FuzzyMatchRangeList name_match_ranges; +}; + +typedef struct DF_EntityListerItemNode DF_EntityListerItemNode; +struct DF_EntityListerItemNode +{ + DF_EntityListerItemNode *next; + DF_EntityListerItem item; +}; + +typedef struct DF_EntityListerItemList DF_EntityListerItemList; +struct DF_EntityListerItemList +{ + DF_EntityListerItemNode *first; + DF_EntityListerItemNode *last; + U64 count; +}; + +typedef struct DF_EntityListerItemArray DF_EntityListerItemArray; +struct DF_EntityListerItemArray +{ + DF_EntityListerItem *v; + U64 count; +}; + +//////////////////////////////// +//~ rjf: SystemProcesses @view_types + +typedef struct DF_ProcessInfo DF_ProcessInfo; +struct DF_ProcessInfo +{ + DMN_ProcessInfo info; + B32 is_attached; + FuzzyMatchRangeList attached_match_ranges; + FuzzyMatchRangeList name_match_ranges; + FuzzyMatchRangeList pid_match_ranges; +}; + +typedef struct DF_ProcessInfoNode DF_ProcessInfoNode; +struct DF_ProcessInfoNode +{ + DF_ProcessInfoNode *next; + DF_ProcessInfo info; +}; + +typedef struct DF_ProcessInfoList DF_ProcessInfoList; +struct DF_ProcessInfoList +{ + DF_ProcessInfoNode *first; + DF_ProcessInfoNode *last; + U64 count; +}; + +typedef struct DF_ProcessInfoArray DF_ProcessInfoArray; +struct DF_ProcessInfoArray +{ + DF_ProcessInfo *v; + U64 count; +}; + +//////////////////////////////// +//~ rjf: Breakpoint @view_types + +typedef struct DF_BreakpointViewState DF_BreakpointViewState; +struct DF_BreakpointViewState +{ + B32 initialized; + Vec2S32 selected_p; + F32 key_pct; + F32 val_pct; +}; + +//////////////////////////////// +//~ rjf: Target @view_types + +typedef struct DF_TargetViewState DF_TargetViewState; +struct DF_TargetViewState +{ + B32 initialized; + + // rjf: pick file kind + DF_EntityKind pick_dst_kind; + + // rjf: selection cursor + Vec2S64 cursor; + + // rjf: text input state + TxtPt input_cursor; + TxtPt input_mark; + U8 input_buffer[1024]; + U64 input_size; + B32 input_editing; + + // rjf: table column pcts + F32 key_pct; + F32 value_pct; +}; + +//////////////////////////////// +//~ rjf: FilePathMap @view_types + +typedef struct DF_FilePathMapViewState DF_FilePathMapViewState; +struct DF_FilePathMapViewState +{ + B32 initialized; + Vec2S64 cursor; + TxtPt input_cursor; + TxtPt input_mark; + U8 input_buffer[1024]; + U64 input_size; + B32 input_editing; + DF_Handle pick_file_dst_map; + Side pick_file_dst_side; + F32 src_column_pct; + F32 dst_column_pct; +}; + +//////////////////////////////// +//~ rjf: AutoViewRules @view_types + +typedef struct DF_AutoViewRulesViewState DF_AutoViewRulesViewState; +struct DF_AutoViewRulesViewState +{ + B32 initialized; + Vec2S64 cursor; + TxtPt input_cursor; + TxtPt input_mark; + U8 input_buffer[1024]; + U64 input_size; + B32 input_editing; + F32 src_column_pct; + F32 dst_column_pct; +}; + +//////////////////////////////// +//~ rjf: Modules @view_types + +typedef struct DF_ModulesViewState DF_ModulesViewState; +struct DF_ModulesViewState +{ + B32 initialized; + DF_Handle selected_entity; + S64 selected_column; + B32 txt_editing; + TxtPt txt_cursor; + TxtPt txt_mark; + U8 txt_buffer[1024]; + U64 txt_size; + DF_Handle pick_file_dst_entity; + F32 idx_col_pct; + F32 desc_col_pct; + F32 range_col_pct; + F32 dbg_col_pct; +}; + +//////////////////////////////// +//~ rjf: Watch, Locals, Registers @view_types + +typedef struct DF_EvalRoot DF_EvalRoot; +struct DF_EvalRoot +{ + DF_EvalRoot *next; + DF_EvalRoot *prev; + U64 expr_buffer_string_size; + U64 expr_buffer_cap; + U8 *expr_buffer; +}; + +typedef enum DF_WatchViewColumnKind +{ + DF_WatchViewColumnKind_Expr, + DF_WatchViewColumnKind_Value, + DF_WatchViewColumnKind_Type, + DF_WatchViewColumnKind_ViewRule, + DF_WatchViewColumnKind_COUNT +} +DF_WatchViewColumnKind; + +typedef enum DF_WatchViewFillKind +{ + DF_WatchViewFillKind_Mutable, + DF_WatchViewFillKind_Registers, + DF_WatchViewFillKind_Locals, + DF_WatchViewFillKind_Globals, + DF_WatchViewFillKind_ThreadLocals, + DF_WatchViewFillKind_Types, + DF_WatchViewFillKind_Procedures, + DF_WatchViewFillKind_COUNT +} +DF_WatchViewFillKind; + +typedef struct DF_WatchViewPoint DF_WatchViewPoint; +struct DF_WatchViewPoint +{ + DF_WatchViewColumnKind column_kind; + DF_ExpandKey parent_key; + DF_ExpandKey key; +}; + +typedef struct DF_WatchViewTextEditState DF_WatchViewTextEditState; +struct DF_WatchViewTextEditState +{ + DF_WatchViewTextEditState *pt_hash_next; + DF_WatchViewPoint pt; + TxtPt cursor; + TxtPt mark; + U8 input_buffer[1024]; + U64 input_size; + U8 initial_buffer[1024]; + U64 initial_size; +}; + +typedef struct DF_WatchViewState DF_WatchViewState; +struct DF_WatchViewState +{ + B32 initialized; + + // rjf: fill kind (way that the contents of the watch view are computed) + DF_WatchViewFillKind fill_kind; + + // rjf; table cursor state + DF_WatchViewPoint cursor; + DF_WatchViewPoint mark; + DF_WatchViewPoint next_cursor; + DF_WatchViewPoint next_mark; + + // rjf: text input state + Arena *text_edit_arena; + U64 text_edit_state_slots_count; + DF_WatchViewTextEditState dummy_text_edit_state; + DF_WatchViewTextEditState **text_edit_state_slots; + B32 text_editing; + + // rjf: table column width state + F32 expr_column_pct; + F32 value_column_pct; + F32 type_column_pct; + F32 view_rule_column_pct; + + // rjf: mutable fill-kind root expression state + DF_EvalRoot *first_root; + DF_EvalRoot *last_root; + DF_EvalRoot *first_free_root; + U64 root_count; +}; + +//////////////////////////////// +//~ rjf: Code, Output @view_types + +typedef U32 DF_CodeViewFlags; +enum +{ + DF_CodeViewFlag_StickToBottom = (1<<0), +}; + +typedef U32 DF_CodeViewBuildFlags; +enum +{ + DF_CodeViewBuildFlag_Margins = (1<<0), + DF_CodeViewBuildFlag_All = 0xffffffff, +}; + +typedef struct DF_CodeViewState DF_CodeViewState; +struct DF_CodeViewState +{ + // rjf: stable state + B32 initialized; + S64 preferred_column; + B32 drifted_for_search; + DF_Handle pick_file_override_target; + DF_CodeViewFlags flags; + + // rjf: per-frame command info + S64 goto_line_num; + B32 center_cursor; + B32 contain_cursor; + B32 watch_expr_at_mouse; + Arena *find_text_arena; + String8 find_text_fwd; + String8 find_text_bwd; +}; + +typedef struct DF_CodeViewBuildResult DF_CodeViewBuildResult; +struct DF_CodeViewBuildResult +{ + DI_KeyList dbgi_keys; +}; + +//////////////////////////////// +//~ rjf: Disassembly @view_types + +typedef struct DF_DisasmViewState DF_DisasmViewState; +struct DF_DisasmViewState +{ + B32 initialized; + DF_Handle process; + U64 base_vaddr; + DASM_StyleFlags style_flags; + U64 goto_vaddr; + DF_CodeViewState cv; +}; + +//////////////////////////////// +//~ rjf: Memory @view_types + +typedef struct DF_MemoryViewState DF_MemoryViewState; +struct DF_MemoryViewState +{ + B32 initialized; + + // rjf: last-viewed-memory cache + Arena *last_viewed_memory_cache_arena; + U8 *last_viewed_memory_cache_buffer; + Rng1U64 last_viewed_memory_cache_range; + U64 last_viewed_memory_cache_memgen_idx; + + // rjf: control state + U64 cursor; + U64 mark; + + // rjf: organization state + U64 num_columns; + U64 bytes_per_cell; + + // rjf: command pass-through data + B32 center_cursor; + B32 contain_cursor; +}; + +//////////////////////////////// +//~ rjf: Settings @view_types + +typedef enum DF_SettingsItemKind +{ + DF_SettingsItemKind_CategoryHeader, + DF_SettingsItemKind_GlobalSetting, + DF_SettingsItemKind_WindowSetting, + DF_SettingsItemKind_ThemeColor, + DF_SettingsItemKind_ThemePreset, + DF_SettingsItemKind_COUNT +} +DF_SettingsItemKind; + +typedef struct DF_SettingsItem DF_SettingsItem; +struct DF_SettingsItem +{ + DF_SettingsItemKind kind; + String8 kind_string; + String8 string; + FuzzyMatchRangeList kind_string_matches; + FuzzyMatchRangeList string_matches; + DF_IconKind icon_kind; + DF_SettingCode code; + DF_ThemeColor color; + DF_ThemePreset preset; + DF_SettingsItemKind category; +}; + +typedef struct DF_SettingsItemNode DF_SettingsItemNode; +struct DF_SettingsItemNode +{ + DF_SettingsItemNode *next; + DF_SettingsItem v; +}; + +typedef struct DF_SettingsItemList DF_SettingsItemList; +struct DF_SettingsItemList +{ + DF_SettingsItemNode *first; + DF_SettingsItemNode *last; + U64 count; +}; + +typedef struct DF_SettingsItemArray DF_SettingsItemArray; +struct DF_SettingsItemArray +{ + DF_SettingsItem *v; + U64 count; +}; + +//////////////////////////////// +//~ rjf: Quick Sort Comparisons + +internal int df_qsort_compare_file_info__default(DF_FileInfo *a, DF_FileInfo *b); +internal int df_qsort_compare_file_info__default_filtered(DF_FileInfo *a, DF_FileInfo *b); +internal int df_qsort_compare_file_info__filename(DF_FileInfo *a, DF_FileInfo *b); +internal int df_qsort_compare_file_info__last_modified(DF_FileInfo *a, DF_FileInfo *b); +internal int df_qsort_compare_file_info__size(DF_FileInfo *a, DF_FileInfo *b); +internal int df_qsort_compare_process_info(DF_ProcessInfo *a, DF_ProcessInfo *b); +internal int df_qsort_compare_cmd_lister__strength(DF_CmdListerItem *a, DF_CmdListerItem *b); +internal int df_qsort_compare_entity_lister__strength(DF_EntityListerItem *a, DF_EntityListerItem *b); +internal int df_qsort_compare_settings_item(DF_SettingsItem *a, DF_SettingsItem *b); + +//////////////////////////////// +//~ rjf: Command Lister + +internal DF_CmdListerItemList df_cmd_lister_item_list_from_needle(Arena *arena, String8 needle); +internal DF_CmdListerItemArray df_cmd_lister_item_array_from_list(Arena *arena, DF_CmdListerItemList list); +internal void df_cmd_lister_item_array_sort_by_strength__in_place(DF_CmdListerItemArray array); + +//////////////////////////////// +//~ rjf: System Process Lister + +internal DF_ProcessInfoList df_process_info_list_from_query(Arena *arena, String8 query); +internal DF_ProcessInfoArray df_process_info_array_from_list(Arena *arena, DF_ProcessInfoList list); +internal void df_process_info_array_sort_by_strength__in_place(DF_ProcessInfoArray array); + +//////////////////////////////// +//~ rjf: Entity Lister + +internal DF_EntityListerItemList df_entity_lister_item_list_from_needle(Arena *arena, DF_EntityKind kind, DF_EntityFlags omit_flags, String8 needle); +internal DF_EntityListerItemArray df_entity_lister_item_array_from_list(Arena *arena, DF_EntityListerItemList list); +internal void df_entity_lister_item_array_sort_by_strength__in_place(DF_EntityListerItemArray array); + +//////////////////////////////// +//~ rjf: Code Views + +internal void df_code_view_init(DF_CodeViewState *cv, DF_View *view); +internal void df_code_view_cmds(DF_Window *ws, DF_Panel *panel, DF_View *view, DF_CodeViewState *cv, DF_CmdList *cmds, String8 text_data, TXT_TextInfo *text_info, DASM_LineArray *dasm_lines, Rng1U64 dasm_vaddr_range, DI_Key dasm_dbgi_key); +internal DF_CodeViewBuildResult df_code_view_build(Arena *arena, DF_Window *ws, DF_Panel *panel, DF_View *view, DF_CodeViewState *cv, DF_CodeViewBuildFlags flags, Rng2F32 rect, String8 text_data, TXT_TextInfo *text_info, DASM_LineArray *dasm_lines, Rng1U64 dasm_vaddr_range, DI_Key dasm_dbgi_key); + +//////////////////////////////// +//~ rjf: Watch Views + +//- rjf: eval watch view instance -> eval view key +internal DF_EvalViewKey df_eval_view_key_from_eval_watch_view(DF_WatchViewState *ewv); + +//- rjf: root allocation/deallocation/mutation +internal DF_EvalRoot * df_eval_root_alloc(DF_View *view, DF_WatchViewState *ews); +internal void df_eval_root_release(DF_WatchViewState *ews, DF_EvalRoot *root); +internal void df_eval_root_equip_string(DF_EvalRoot *root, String8 string); +internal DF_EvalRoot * df_eval_root_from_string(DF_WatchViewState *ews, String8 string); +internal DF_EvalRoot * df_eval_root_from_expand_key(DF_WatchViewState *ews, DF_EvalView *eval_view, DF_ExpandKey expand_key); +internal String8 df_string_from_eval_root(DF_EvalRoot *root); +internal DF_ExpandKey df_parent_expand_key_from_eval_root(DF_EvalRoot *root); +internal DF_ExpandKey df_expand_key_from_eval_root(DF_EvalRoot *root); + +//- rjf: watch view points <-> table coordinates +internal B32 df_watch_view_point_match(DF_WatchViewPoint a, DF_WatchViewPoint b); +internal DF_WatchViewPoint df_watch_view_point_from_tbl(DF_EvalVizBlockList *blocks, Vec2S64 tbl); +internal Vec2S64 df_tbl_from_watch_view_point(DF_EvalVizBlockList *blocks, DF_WatchViewPoint pt); + +//- rjf: table coordinates -> strings +internal String8 df_string_from_eval_viz_row_column_kind(Arena *arena, DF_EvalView *ev, TG_Graph *graph, RDI_Parsed *rdi, DF_EvalVizRow *row, DF_WatchViewColumnKind col_kind, B32 editable); + +//- rjf: table coordinates -> text edit state +internal DF_WatchViewTextEditState *df_watch_view_text_edit_state_from_pt(DF_WatchViewState *wv, DF_WatchViewPoint pt); + +//- rjf: windowed watch tree visualization +internal DF_EvalVizBlockList df_eval_viz_block_list_from_watch_view_state(Arena *arena, DI_Scope *di_scope, FZY_Scope *fzy_scope, DF_CtrlCtx *ctrl_ctx, EVAL_ParseCtx *parse_ctx, EVAL_String2ExprMap *macro_map, DF_View *view, DF_WatchViewState *ews); + +//- rjf: eval/watch views main hooks +internal void df_watch_view_init(DF_WatchViewState *ewv, DF_View *view, DF_WatchViewFillKind fill_kind); +internal void df_watch_view_cmds(DF_Window *ws, DF_Panel *panel, DF_View *view, DF_WatchViewState *ewv, DF_CmdList *cmds); +internal void df_watch_view_build(DF_Window *ws, DF_Panel *panel, DF_View *view, DF_WatchViewState *ewv, B32 modifiable, U32 default_radix, Rng2F32 rect); + +#endif // DEBUG_FRONTEND_VIEWS_H diff --git a/src/third_party/udis86/CHANGES b/src/third_party/udis86/CHANGES deleted file mode 100644 index 34c4c050..00000000 --- a/src/third_party/udis86/CHANGES +++ /dev/null @@ -1,47 +0,0 @@ -v1.7.2 - - * Clean up input handling, removing unnecessary caching - of input, which should speed up things. - * Add the missing ud_insn_mnemonic api function. - * Rename ud_opr_isgpr to ud_opr_is_gpr. - * Fix decoding of relative jumps. - * Fix build with automake-1.14 - * Minor fix to AT&T syntax (missing "$" prefix for immedaites) - * Add a new api checker (tests/libcheck.c). - * Add a standalone script for diff-testing (tests/difftest.sh) - * Refinements to the documentation. - - Acknowledgements: - - Brendan Long (https://github.com/brendanlong) - radare (https://github.com/radare) - Sergey Basalaev (https://github.com/SBasalaev) - ebfe (https://github.com/ebfe) - -v1.7.1 - - * Full support for SSSE3, SSE4.1, SSE4.2, SMX, AES. - * New Sphinx-doc/RST based documentation. - * New api for client size symbol resolver. - * Visual Studio 2010 Build Support. - * Added an operand tester. - * Python 3.0 compatibility changes. - * Minor fixes to AT&T syntax. - * Fix install directory for data files. - * Many bug fixes, and optable updates. - * Add Texinfo document (make install-info). - - Acknowledgements: - - L Peter Deutsch (https://github.com/ghghost) - Bjoern Doebel (https://github.com/bjoernd) - Justin Stenning (http://github.com/spazzarama) - Jamie Iles (https://github.com/jamieiles) - Stephen Fewer (https://github.com/stephenfewer) - Piotr Gaczkowski (https://github.com/DoomHammer) - Evan Pheonix - mbarbu (https://github.com/mbarbu) - - - -Please see the commit logs for change information for older releases diff --git a/src/third_party/udis86/LICENSE b/src/third_party/udis86/LICENSE deleted file mode 100644 index 580f3598..00000000 --- a/src/third_party/udis86/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -Copyright (c) 2002-2012, Vivek Thampi -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/src/third_party/udis86/README b/src/third_party/udis86/README deleted file mode 100644 index 03eaee5f..00000000 --- a/src/third_party/udis86/README +++ /dev/null @@ -1,91 +0,0 @@ -Udis86 -====== - -Udis86 is a disassembler for the x86 and x86-64 class of instruction set -architectures. It consists of a C library called libudis86 which -provides a clean and simple interface to decode a stream of raw binary -data, and to inspect the disassembled instructions in a structured -manner. - - -LICENSE -------- - -Udis86 is distributed under the terms of the 2-clause "Simplified BSD -License". A copy of the license is included with the source in LICENSE. - - -libudis86 ---------- - - o Supports all x86 and x86-64 (AMD64) General purpose and - System instructions. - o Supported ISA extensions: - - MMX, FPU (x87), AMD 3DNow - - SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, AES, - - AMD-V, INTEL-VMX, SMX - o Instructions are defined in an XML document, with opcode - tables generated for performance. - o Supports output in both INTEL (NASM) as well as AT&T (GNU as) style - assembly language syntax. - o Supports a variety of input methods: Files, Memory Buffers, and - Function Callback hooks. - o Re-entrant, no dynamic memory allocation. - o Fully documented API - - - -- EXAMPLE ----------------------------------------------------------- - - ud_t u; - - ud_init(&u); - ud_set_input_file(&u, stdin); - ud_set_mode(&u, 64); - ud_set_syntax(&u, UD_SYN_INTEL); - - while (ud_disassemble(&u)) { - printf("\t%s\n", ud_insn_asm(&ud_obj)); - } - - ---------------------------------------------------------------------- - - -udcli ------ - -udcli is a small command-line tool for your quick disassembly needs. - - -- EXAMPLE ----------------------------------------------------------- - - $ echo "65 67 89 87 76 65 54 56 78 89 09 00 90" | udcli -32 -x - 0000000080000800 656789877665 mov [gs:bx+0x6576], eax - 0000000080000806 54 push esp - 0000000080000807 56 push esi - 0000000080000808 7889 js 0x80000793 - 000000008000080a 0900 or [eax], eax - 000000008000080c 90 nop - - ---------------------------------------------------------------------- - - -Documentation -------------- - -The libudis86 api is fully documented. The package distribution contains -a Texinfo file which can be installed by invoking "make install-info". -You can also find an online html version of the documentation available -at http://udis86.sourceforge.net/. - - -Autotools Build ---------------- - -You need autotools if building from sources cloned form version control -system, or if you need to regenerate the build system. The wrapper -script 'autogen.sh' is provided that'll generate the build system. - - -AUTHOR ------- - -Udis86 is written and maintained by Vivek Thampi (vivek.mt@gmail.com). diff --git a/src/third_party/udis86/README.rad b/src/third_party/udis86/README.rad deleted file mode 100644 index 34e17129..00000000 --- a/src/third_party/udis86/README.rad +++ /dev/null @@ -1,24 +0,0 @@ -udis86 Version 1.7.2 -Disassembler library written in C, by vivek.mt@gmail.com -2-clause BSD license (see LICENSE) - -Documentation: http://udis86.sourceforge.net/ - -Checked out from https://github.com/vmt/udis86 -commit b24baf1e32bdd9ea12cc9f6dc4882b6ba04de0d7 -Date: Thu Nov 14 12:28:33 2013 -0800 - -Various unnecessary parts, like unittests, bootstrapping scripts and a -command-line utility have been stripped out. This is just the bare -library. - -In a normal build, libudis86/itab.h libudis86/itab.c are actually -generated from XML tables and a python script, but I've simply checked -in the generated results to keep things smaller and avoid that -bootstrapping step. - -I did something similar with config.h, which would normally be -generated through automake/configure. This is probably less OK, but -will do for now. - --Won (wonc@radgametools.com) \ No newline at end of file diff --git a/src/third_party/udis86/config.h b/src/third_party/udis86/config.h deleted file mode 100644 index f2284173..00000000 --- a/src/third_party/udis86/config.h +++ /dev/null @@ -1,72 +0,0 @@ -/* config.h. Generated from config.h.in by configure. */ -/* config.h.in. Generated from configure.ac by autoheader. */ - -/* Define to 1 if you have the header file. */ -#define HAVE_ASSERT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_DLFCN_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_INTTYPES_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_MEMORY_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDINT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDIO_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDLIB_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRINGS_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STRING_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_STAT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TYPES_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_UNISTD_H 1 - -/* Define to the sub-directory in which libtool stores uninstalled libraries. - */ -#define LT_OBJDIR ".libs/" - -/* Define to 1 if your C compiler doesn't accept -c and -o together. */ -/* #undef NO_MINUS_C_MINUS_O */ - -/* Name of package */ -#define PACKAGE "udis86" - -/* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT "vivek.mt@gmail.com" - -/* Define to the full name of this package. */ -#define PACKAGE_NAME "udis86" - -/* Define to the full name and version of this package. */ -#define PACKAGE_STRING "udis86 1.7.2" - -/* Define to the one symbol short name of this package. */ -#define PACKAGE_TARNAME "udis86" - -/* Define to the home page for this package. */ -#define PACKAGE_URL "" - -/* Define to the version of this package. */ -#define PACKAGE_VERSION "1.7.2" - -/* Define to 1 if you have the ANSI C header files. */ -#define STDC_HEADERS 1 - -/* Version number of package */ -#define VERSION "1.7.2" diff --git a/src/third_party/udis86/libudis86/decode.c b/src/third_party/udis86/libudis86/decode.c deleted file mode 100644 index 39714732..00000000 --- a/src/third_party/udis86/libudis86/decode.c +++ /dev/null @@ -1,1264 +0,0 @@ -/* udis86 - libudis86/decode.c - * - * Copyright (c) 2002-2009 Vivek Thampi - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -#include "udint.h" -#include "types.h" -#include "extern.h" -#include "decode.h" - -#ifndef __UD_STANDALONE__ -# include -#endif /* __UD_STANDALONE__ */ - -/* The max number of prefixes to an instruction */ -#define MAX_PREFIXES 15 - -/* rex prefix bits */ -#define REX_W(r) ( ( 0xF & ( r ) ) >> 3 ) -#define REX_R(r) ( ( 0x7 & ( r ) ) >> 2 ) -#define REX_X(r) ( ( 0x3 & ( r ) ) >> 1 ) -#define REX_B(r) ( ( 0x1 & ( r ) ) >> 0 ) -#define REX_PFX_MASK(n) ( ( P_REXW(n) << 3 ) | \ -( P_REXR(n) << 2 ) | \ -( P_REXX(n) << 1 ) | \ -( P_REXB(n) << 0 ) ) - -/* scable-index-base bits */ -#define SIB_S(b) ( ( b ) >> 6 ) -#define SIB_I(b) ( ( ( b ) >> 3 ) & 7 ) -#define SIB_B(b) ( ( b ) & 7 ) - -/* modrm bits */ -#define MODRM_REG(b) ( ( ( b ) >> 3 ) & 7 ) -#define MODRM_NNN(b) ( ( ( b ) >> 3 ) & 7 ) -#define MODRM_MOD(b) ( ( ( b ) >> 6 ) & 3 ) -#define MODRM_RM(b) ( ( b ) & 7 ) - -static int decode_ext(struct ud *u, uint16_t ptr); -static int decode_opcode(struct ud *u); - -enum reg_class { /* register classes */ - REGCLASS_GPR, - REGCLASS_MMX, - REGCLASS_CR, - REGCLASS_DB, - REGCLASS_SEG, - REGCLASS_XMM -}; - -/* -* inp_start -* Should be called before each de-code operation. -*/ -static void -inp_start(struct ud *u) -{ - u->inp_ctr = 0; -} - -static uint8_t -inp_peek(struct ud *u) -{ - if (u->inp_end == 0) { - if (u->inp_buf != NULL) { - if (u->inp_buf_index < u->inp_buf_size) { - return u->inp_buf[u->inp_buf_index]; - } - } else if (u->inp_peek != UD_EOI) { - return u->inp_peek; - } else { - int c; - if ((c = u->inp_hook(u)) != UD_EOI) { - u->inp_peek = c; - return u->inp_peek; - } - } - } - u->inp_end = 1; - UDERR(u, "byte expected, eoi received\n"); - return 0; -} - -static uint8_t -inp_next(struct ud *u) -{ - if (u->inp_end == 0) { - if (u->inp_buf != NULL) { - if (u->inp_buf_index < u->inp_buf_size) { - u->inp_ctr++; - return (u->inp_curr = u->inp_buf[u->inp_buf_index++]); - } - } else { - int c = u->inp_peek; - if (c != UD_EOI || (c = u->inp_hook(u)) != UD_EOI) { - u->inp_peek = UD_EOI; - u->inp_curr = c; - u->inp_sess[u->inp_ctr++] = u->inp_curr; - return u->inp_curr; - } - } - } - u->inp_end = 1; - UDERR(u, "byte expected, eoi received\n"); - return 0; -} - -static uint8_t -inp_curr(struct ud *u) -{ - return u->inp_curr; -} - - -/* - * inp_uint8 - * int_uint16 - * int_uint32 - * int_uint64 - * Load little-endian values from input - */ -static uint8_t -inp_uint8(struct ud* u) -{ - return inp_next(u); -} - -static uint16_t -inp_uint16(struct ud* u) -{ - uint16_t r, ret; - - ret = inp_next(u); - r = inp_next(u); - return ret | (r << 8); -} - -static uint32_t -inp_uint32(struct ud* u) -{ - uint32_t r, ret; - - ret = inp_next(u); - r = inp_next(u); - ret = ret | (r << 8); - r = inp_next(u); - ret = ret | (r << 16); - r = inp_next(u); - return ret | (r << 24); -} - -static uint64_t -inp_uint64(struct ud* u) -{ - uint64_t r, ret; - - ret = inp_next(u); - r = inp_next(u); - ret = ret | (r << 8); - r = inp_next(u); - ret = ret | (r << 16); - r = inp_next(u); - ret = ret | (r << 24); - r = inp_next(u); - ret = ret | (r << 32); - r = inp_next(u); - ret = ret | (r << 40); - r = inp_next(u); - ret = ret | (r << 48); - r = inp_next(u); - return ret | (r << 56); -} - - -static UD_INLINE int -eff_opr_mode(int dis_mode, int rex_w, int pfx_opr) -{ - if (dis_mode == 64) { - return rex_w ? 64 : (pfx_opr ? 16 : 32); - } else if (dis_mode == 32) { - return pfx_opr ? 16 : 32; - } else { - UD_ASSERT(dis_mode == 16); - return pfx_opr ? 32 : 16; - } -} - - -static UD_INLINE int -eff_adr_mode(int dis_mode, int pfx_adr) -{ - if (dis_mode == 64) { - return pfx_adr ? 32 : 64; - } else if (dis_mode == 32) { - return pfx_adr ? 16 : 32; - } else { - UD_ASSERT(dis_mode == 16); - return pfx_adr ? 32 : 16; - } -} - - -/* - * decode_prefixes - * - * Extracts instruction prefixes. - */ -static int -decode_prefixes(struct ud *u) -{ - int done = 0; - uint8_t curr = 0, last = 0; - UD_RETURN_ON_ERROR(u); - - do { - last = curr; - curr = inp_next(u); - UD_RETURN_ON_ERROR(u); - if (u->inp_ctr == MAX_INSN_LENGTH) { - UD_RETURN_WITH_ERROR(u, "max instruction length"); - } - - switch (curr) - { - case 0x2E: - u->pfx_seg = UD_R_CS; - break; - case 0x36: - u->pfx_seg = UD_R_SS; - break; - case 0x3E: - u->pfx_seg = UD_R_DS; - break; - case 0x26: - u->pfx_seg = UD_R_ES; - break; - case 0x64: - u->pfx_seg = UD_R_FS; - break; - case 0x65: - u->pfx_seg = UD_R_GS; - break; - case 0x67: /* adress-size override prefix */ - u->pfx_adr = 0x67; - break; - case 0xF0: - u->pfx_lock = 0xF0; - break; - case 0x66: - u->pfx_opr = 0x66; - break; - case 0xF2: - u->pfx_str = 0xf2; - break; - case 0xF3: - u->pfx_str = 0xf3; - break; - default: - /* consume if rex */ - done = (u->dis_mode == 64 && (curr & 0xF0) == 0x40) ? 0 : 1; - break; - } - } while (!done); - /* rex prefixes in 64bit mode, must be the last prefix */ - if (u->dis_mode == 64 && (last & 0xF0) == 0x40) { - u->pfx_rex = last; - } - return 0; -} - - -/* - * vex_l, vex_w - * Return the vex.L and vex.W bits - */ -static UD_INLINE uint8_t -vex_l(const struct ud *u) -{ - UD_ASSERT(u->vex_op != 0); - return ((u->vex_op == 0xc4 ? u->vex_b2 : u->vex_b1) >> 2) & 1; -} - -static UD_INLINE uint8_t -vex_w(const struct ud *u) -{ - UD_ASSERT(u->vex_op != 0); - return u->vex_op == 0xc4 ? ((u->vex_b2 >> 7) & 1) : 0; -} - - -static UD_INLINE uint8_t -modrm(struct ud * u) -{ - if ( !u->have_modrm ) { - u->modrm = inp_next( u ); - u->have_modrm = 1; - } - return u->modrm; -} - - -static unsigned int -resolve_operand_size(const struct ud* u, ud_operand_size_t osize) -{ - switch (osize) { - case SZ_V: - return u->opr_mode; - case SZ_Z: - return u->opr_mode == 16 ? 16 : 32; - case SZ_Y: - return u->opr_mode == 16 ? 32 : u->opr_mode; - case SZ_RDQ: - return u->dis_mode == 64 ? 64 : 32; - case SZ_X: - UD_ASSERT(u->vex_op != 0); - return (P_VEXL(u->itab_entry->prefix) && vex_l(u)) ? SZ_QQ : SZ_DQ; - default: - return osize; - } -} - - -static int resolve_mnemonic( struct ud* u ) -{ - /* resolve 3dnow weirdness. */ - if ( u->mnemonic == UD_I3dnow ) { - u->mnemonic = ud_itab[ u->le->table[ inp_curr( u ) ] ].mnemonic; - } - /* SWAPGS is only valid in 64bits mode */ - if ( u->mnemonic == UD_Iswapgs && u->dis_mode != 64 ) { - UDERR(u, "swapgs invalid in 64bits mode\n"); - return -1; - } - - if (u->mnemonic == UD_Ixchg) { - if ((u->operand[0].type == UD_OP_REG && u->operand[0].base == UD_R_AX && - u->operand[1].type == UD_OP_REG && u->operand[1].base == UD_R_AX) || - (u->operand[0].type == UD_OP_REG && u->operand[0].base == UD_R_EAX && - u->operand[1].type == UD_OP_REG && u->operand[1].base == UD_R_EAX)) { - u->operand[0].type = UD_NONE; - u->operand[1].type = UD_NONE; - u->mnemonic = UD_Inop; - } - } - - if (u->mnemonic == UD_Inop && u->pfx_repe) { - u->pfx_repe = 0; - u->mnemonic = UD_Ipause; - } - return 0; -} - - -/* ----------------------------------------------------------------------------- - * decode_a()- Decodes operands of the type seg:offset - * ----------------------------------------------------------------------------- - */ -static void -decode_a(struct ud* u, struct ud_operand *op) -{ - if (u->opr_mode == 16) { - /* seg16:off16 */ - op->type = UD_OP_PTR; - op->size = 32; - op->lval.ptr.off = inp_uint16(u); - op->lval.ptr.seg = inp_uint16(u); - } else { - /* seg16:off32 */ - op->type = UD_OP_PTR; - op->size = 48; - op->lval.ptr.off = inp_uint32(u); - op->lval.ptr.seg = inp_uint16(u); - } -} - -/* ----------------------------------------------------------------------------- - * decode_gpr() - Returns decoded General Purpose Register - * ----------------------------------------------------------------------------- - */ -static enum ud_type -decode_gpr(/*register*/ struct ud* u, unsigned int s, unsigned char rm) -{ - switch (s) { - case 64: - return (enum ud_type)(UD_R_RAX + rm); - case 32: - return (enum ud_type)(UD_R_EAX + rm); - case 16: - return (enum ud_type)(UD_R_AX + rm); - case 8: - if (u->dis_mode == 64 && u->pfx_rex) { - if (rm >= 4) - return (enum ud_type)(UD_R_SPL + (rm-4)); - return (enum ud_type)(UD_R_AL + rm); - } else return (enum ud_type)(UD_R_AL + rm); - case 0: - /* invalid size in case of a decode error */ - UD_ASSERT(u->error); - return UD_NONE; - default: - UD_ASSERT(!"invalid operand size"); - return UD_NONE; - } -} - -static void -decode_reg(struct ud *u, - struct ud_operand *opr, - int type, - int num, - int size) -{ - int reg; - size = resolve_operand_size(u, size); - switch (type) { - case REGCLASS_GPR : reg = decode_gpr(u, size, num); break; - case REGCLASS_MMX : reg = UD_R_MM0 + (num & 7); break; - case REGCLASS_XMM : - reg = num + (size == SZ_QQ ? UD_R_YMM0 : UD_R_XMM0); - break; - case REGCLASS_CR : reg = UD_R_CR0 + num; break; - case REGCLASS_DB : reg = UD_R_DR0 + num; break; - case REGCLASS_SEG : { - /* - * Only 6 segment registers, anything else is an error. - */ - if ((num & 7) > 5) { - UDERR(u, "invalid segment register value\n"); - return; - } else { - reg = UD_R_ES + (num & 7); - } - break; - } - default: - UD_ASSERT(!"invalid register type"); - return; - } - opr->type = UD_OP_REG; - opr->base = (enum ud_type)(reg); - opr->size = size; -} - - -/* - * decode_imm - * - * Decode Immediate values. - */ -static void -decode_imm(struct ud* u, unsigned int size, struct ud_operand *op) -{ - op->size = resolve_operand_size(u, size); - op->type = UD_OP_IMM; - - switch (op->size) { - case 8: op->lval.sbyte = inp_uint8(u); break; - case 16: op->lval.uword = inp_uint16(u); break; - case 32: op->lval.udword = inp_uint32(u); break; - case 64: op->lval.uqword = inp_uint64(u); break; - default: return; - } -} - - -/* - * decode_mem_disp - * - * Decode mem address displacement. - */ -static void -decode_mem_disp(struct ud* u, unsigned int size, struct ud_operand *op) -{ - switch (size) { - case 8: - op->offset = 8; - op->lval.ubyte = inp_uint8(u); - break; - case 16: - op->offset = 16; - op->lval.uword = inp_uint16(u); - break; - case 32: - op->offset = 32; - op->lval.udword = inp_uint32(u); - break; - case 64: - op->offset = 64; - op->lval.uqword = inp_uint64(u); - break; - default: - return; - } -} - - -/* - * decode_modrm_reg - * - * Decodes reg field of mod/rm byte - * - */ -static UD_INLINE void -decode_modrm_reg(struct ud *u, - struct ud_operand *operand, - unsigned int type, - unsigned int size) -{ - uint8_t reg = (REX_R(u->_rex) << 3) | MODRM_REG(modrm(u)); - decode_reg(u, operand, type, reg, size); -} - - -/* - * decode_modrm_rm - * - * Decodes rm field of mod/rm byte - * - */ -static void -decode_modrm_rm(struct ud *u, - struct ud_operand *op, - unsigned char type, /* register type */ - unsigned int size) /* operand size */ - -{ - size_t offset = 0; - unsigned char mod, rm; - - /* get mod, r/m and reg fields */ - mod = MODRM_MOD(modrm(u)); - rm = (REX_B(u->_rex) << 3) | MODRM_RM(modrm(u)); - - /* - * If mod is 11b, then the modrm.rm specifies a register. - * - */ - if (mod == 3) { - decode_reg(u, op, type, rm, size); - return; - } - - /* - * !11b => Memory Address - */ - op->type = UD_OP_MEM; - op->size = resolve_operand_size(u, size); - - if (u->adr_mode == 64) { - op->base = (enum ud_type)(UD_R_RAX + rm); - if (mod == 1) { - offset = 8; - } else if (mod == 2) { - offset = 32; - } else if (mod == 0 && (rm & 7) == 5) { - op->base = UD_R_RIP; - offset = 32; - } else { - offset = 0; - } - /* - * Scale-Index-Base (SIB) - */ - if ((rm & 7) == 4) { - inp_next(u); - - op->base = (enum ud_type)(UD_R_RAX + (SIB_B(inp_curr(u)) | (REX_B(u->_rex) << 3))); - op->index = (enum ud_type)(UD_R_RAX + (SIB_I(inp_curr(u)) | (REX_X(u->_rex) << 3))); - /* special conditions for base reference */ - if (op->index == UD_R_RSP) { - op->index = UD_NONE; - op->scale = UD_NONE; - } else { - op->scale = (1 << SIB_S(inp_curr(u))) & ~1; - } - - if (op->base == UD_R_RBP || op->base == UD_R_R13) { - if (mod == 0) { - op->base = UD_NONE; - } - if (mod == 1) { - offset = 8; - } else { - offset = 32; - } - } - } else { - op->scale = UD_NONE; - op->index = UD_NONE; - } - } else if (u->adr_mode == 32) { - op->base = (enum ud_type)(UD_R_EAX + rm); - if (mod == 1) { - offset = 8; - } else if (mod == 2) { - offset = 32; - } else if (mod == 0 && rm == 5) { - op->base = UD_NONE; - offset = 32; - } else { - offset = 0; - } - - /* Scale-Index-Base (SIB) */ - if ((rm & 7) == 4) { - inp_next(u); - - op->scale = (1 << SIB_S(inp_curr(u))) & ~1; - op->index = (enum ud_type)(UD_R_EAX + (SIB_I(inp_curr(u)) | (REX_X(u->pfx_rex) << 3))); - op->base = (enum ud_type)(UD_R_EAX + (SIB_B(inp_curr(u)) | (REX_B(u->pfx_rex) << 3))); - - if (op->index == UD_R_ESP) { - op->index = UD_NONE; - op->scale = UD_NONE; - } - - /* special condition for base reference */ - if (op->base == UD_R_EBP) { - if (mod == 0) { - op->base = UD_NONE; - } - if (mod == 1) { - offset = 8; - } else { - offset = 32; - } - } - } else { - op->scale = UD_NONE; - op->index = UD_NONE; - } - } else { - const unsigned int bases[] = { UD_R_BX, UD_R_BX, UD_R_BP, UD_R_BP, - UD_R_SI, UD_R_DI, UD_R_BP, UD_R_BX }; - const unsigned int indices[] = { UD_R_SI, UD_R_DI, UD_R_SI, UD_R_DI, - UD_NONE, UD_NONE, UD_NONE, UD_NONE }; - op->base = (enum ud_type)(bases[rm & 7]); - op->index = (enum ud_type)(indices[rm & 7]); - op->scale = UD_NONE; - if (mod == 0 && rm == 6) { - offset = 16; - op->base = UD_NONE; - } else if (mod == 1) { - offset = 8; - } else if (mod == 2) { - offset = 16; - } - } - - if (offset) { - decode_mem_disp(u, offset, op); - } else { - op->offset = 0; - } -} - - -/* - * decode_moffset - * Decode offset-only memory operand - */ -static void -decode_moffset(struct ud *u, unsigned int size, struct ud_operand *opr) -{ - opr->type = UD_OP_MEM; - opr->base = UD_NONE; - opr->index = UD_NONE; - opr->scale = UD_NONE; - opr->size = resolve_operand_size(u, size); - decode_mem_disp(u, u->adr_mode, opr); -} - - -static void -decode_vex_vvvv(struct ud *u, struct ud_operand *opr, unsigned size) -{ - uint8_t vvvv; - UD_ASSERT(u->vex_op != 0); - vvvv = ((u->vex_op == 0xc4 ? u->vex_b2 : u->vex_b1) >> 3) & 0xf; - decode_reg(u, opr, REGCLASS_XMM, (0xf & ~vvvv), size); -} - - -/* - * decode_vex_immreg - * Decode source operand encoded in immediate byte [7:4] - */ -static int -decode_vex_immreg(struct ud *u, struct ud_operand *opr, unsigned size) -{ - uint8_t imm = inp_next(u); - uint8_t mask = u->dis_mode == 64 ? 0xf : 0x7; - UD_RETURN_ON_ERROR(u); - UD_ASSERT(u->vex_op != 0); - decode_reg(u, opr, REGCLASS_XMM, mask & (imm >> 4), size); - return 0; -} - - -/* - * decode_operand - * - * Decodes a single operand. - * Returns the type of the operand (UD_NONE if none) - */ -static int -decode_operand(struct ud *u, - struct ud_operand *operand, - enum ud_operand_code type, - unsigned int size) -{ - operand->type = UD_NONE; - operand->_oprcode = type; - - switch (type) { - case OP_A : - decode_a(u, operand); - break; - case OP_MR: - decode_modrm_rm(u, operand, REGCLASS_GPR, - MODRM_MOD(modrm(u)) == 3 ? - Mx_reg_size(size) : Mx_mem_size(size)); - break; - case OP_F: - u->br_far = 1; - /* intended fall through */ - case OP_M: - if (MODRM_MOD(modrm(u)) == 3) { - UDERR(u, "expected modrm.mod != 3\n"); - } - /* intended fall through */ - case OP_E: - decode_modrm_rm(u, operand, REGCLASS_GPR, size); - break; - case OP_G: - decode_modrm_reg(u, operand, REGCLASS_GPR, size); - break; - case OP_sI: - case OP_I: - decode_imm(u, size, operand); - break; - case OP_I1: - operand->type = UD_OP_CONST; - operand->lval.udword = 1; - break; - case OP_N: - if (MODRM_MOD(modrm(u)) != 3) { - UDERR(u, "expected modrm.mod == 3\n"); - } - /* intended fall through */ - case OP_Q: - decode_modrm_rm(u, operand, REGCLASS_MMX, size); - break; - case OP_P: - decode_modrm_reg(u, operand, REGCLASS_MMX, size); - break; - case OP_U: - if (MODRM_MOD(modrm(u)) != 3) { - UDERR(u, "expected modrm.mod == 3\n"); - } - /* intended fall through */ - case OP_W: - decode_modrm_rm(u, operand, REGCLASS_XMM, size); - break; - case OP_V: - decode_modrm_reg(u, operand, REGCLASS_XMM, size); - break; - case OP_H: - decode_vex_vvvv(u, operand, size); - break; - case OP_MU: - decode_modrm_rm(u, operand, REGCLASS_XMM, - MODRM_MOD(modrm(u)) == 3 ? - Mx_reg_size(size) : Mx_mem_size(size)); - break; - case OP_S: - decode_modrm_reg(u, operand, REGCLASS_SEG, size); - break; - case OP_O: - decode_moffset(u, size, operand); - break; - case OP_R0: - case OP_R1: - case OP_R2: - case OP_R3: - case OP_R4: - case OP_R5: - case OP_R6: - case OP_R7: - decode_reg(u, operand, REGCLASS_GPR, - (REX_B(u->_rex) << 3) | (type - OP_R0), size); - break; - case OP_AL: - case OP_AX: - case OP_eAX: - case OP_rAX: - decode_reg(u, operand, REGCLASS_GPR, 0, size); - break; - case OP_CL: - case OP_CX: - case OP_eCX: - decode_reg(u, operand, REGCLASS_GPR, 1, size); - break; - case OP_DL: - case OP_DX: - case OP_eDX: - decode_reg(u, operand, REGCLASS_GPR, 2, size); - break; - case OP_ES: - case OP_CS: - case OP_DS: - case OP_SS: - case OP_FS: - case OP_GS: - /* in 64bits mode, only fs and gs are allowed */ - if (u->dis_mode == 64) { - if (type != OP_FS && type != OP_GS) { - UDERR(u, "invalid segment register in 64bits\n"); - } - } - operand->type = UD_OP_REG; - operand->base = (enum ud_type)((type - OP_ES) + UD_R_ES); - operand->size = 16; - break; - case OP_J : - decode_imm(u, size, operand); - operand->type = UD_OP_JIMM; - break ; - case OP_R : - if (MODRM_MOD(modrm(u)) != 3) { - UDERR(u, "expected modrm.mod == 3\n"); - } - decode_modrm_rm(u, operand, REGCLASS_GPR, size); - break; - case OP_C: - decode_modrm_reg(u, operand, REGCLASS_CR, size); - break; - case OP_D: - decode_modrm_reg(u, operand, REGCLASS_DB, size); - break; - case OP_I3 : - operand->type = UD_OP_CONST; - operand->lval.sbyte = 3; - break; - case OP_ST0: - case OP_ST1: - case OP_ST2: - case OP_ST3: - case OP_ST4: - case OP_ST5: - case OP_ST6: - case OP_ST7: - operand->type = UD_OP_REG; - operand->base = (enum ud_type)((type - OP_ST0) + UD_R_ST0); - operand->size = 80; - break; - case OP_L: - decode_vex_immreg(u, operand, size); - break; - default : - operand->type = UD_NONE; - break; - } - return operand->type; -} - - -/* - * decode_operands - * - * Disassemble upto 3 operands of the current instruction being - * disassembled. By the end of the function, the operand fields - * of the ud structure will have been filled. - */ -static int -decode_operands(struct ud* u) -{ - decode_operand(u, &u->operand[0], - u->itab_entry->operand1.type, - u->itab_entry->operand1.size); - if (u->operand[0].type != UD_NONE) { - decode_operand(u, &u->operand[1], - u->itab_entry->operand2.type, - u->itab_entry->operand2.size); - } - if (u->operand[1].type != UD_NONE) { - decode_operand(u, &u->operand[2], - u->itab_entry->operand3.type, - u->itab_entry->operand3.size); - } - if (u->operand[2].type != UD_NONE) { - decode_operand(u, &u->operand[3], - u->itab_entry->operand4.type, - u->itab_entry->operand4.size); - } - return 0; -} - -/* ----------------------------------------------------------------------------- - * clear_insn() - clear instruction structure - * ----------------------------------------------------------------------------- - */ -static void -clear_insn(register struct ud* u) -{ - u->error = 0; - u->pfx_seg = 0; - u->pfx_opr = 0; - u->pfx_adr = 0; - u->pfx_lock = 0; - u->pfx_repne = 0; - u->pfx_rep = 0; - u->pfx_repe = 0; - u->pfx_rex = 0; - u->pfx_str = 0; - u->mnemonic = UD_Inone; - u->itab_entry = NULL; - u->have_modrm = 0; - u->br_far = 0; - u->vex_op = 0; - u->_rex = 0; - u->operand[0].type = UD_NONE; - u->operand[1].type = UD_NONE; - u->operand[2].type = UD_NONE; - u->operand[3].type = UD_NONE; -} - - -static UD_INLINE int -resolve_pfx_str(struct ud* u) -{ - if (u->pfx_str == 0xf3) { - if (P_STR(u->itab_entry->prefix)) { - u->pfx_rep = 0xf3; - } else { - u->pfx_repe = 0xf3; - } - } else if (u->pfx_str == 0xf2) { - u->pfx_repne = 0xf3; - } - return 0; -} - - -static int -resolve_mode( struct ud* u ) -{ - /* if in error state, bail out */ - if ( u->error ) return -1; - - /* propagate prefix effects */ - if ( u->dis_mode == 64 ) { /* set 64bit-mode flags */ - - /* Check validity of instruction m64 */ - if ( P_INV64( u->itab_entry->prefix ) ) { - UDERR(u, "instruction invalid in 64bits\n"); - return -1; - } - - /* compute effective rex based on, - * - vex prefix (if any) - * - rex prefix (if any, and not vex) - * - allowed prefixes specified by the opcode map - */ - if (u->vex_op == 0xc4) { - /* vex has rex.rxb in 1's complement */ - u->_rex = ((~(u->vex_b1 >> 5) & 0x7) /* rex.0rxb */ | - ((u->vex_b2 >> 4) & 0x8) /* rex.w000 */); - } else if (u->vex_op == 0xc5) { - /* vex has rex.r in 1's complement */ - u->_rex = (~(u->vex_b1 >> 5)) & 4; - } else { - UD_ASSERT(u->vex_op == 0); - u->_rex = u->pfx_rex; - } - u->_rex &= REX_PFX_MASK(u->itab_entry->prefix); - - /* whether this instruction has a default operand size of - * 64bit, also hardcoded into the opcode map. - */ - int default64 = P_DEF64( u->itab_entry->prefix ); - /* calculate effective operand size */ - if (REX_W(u->_rex)) { - u->opr_mode = 64; - } else if ( u->pfx_opr ) { - u->opr_mode = 16; - } else { - /* unless the default opr size of instruction is 64, - * the effective operand size in the absence of rex.w - * prefix is 32. - */ - u->opr_mode = default64 ? 64 : 32; - } - - /* calculate effective address size */ - u->adr_mode = (u->pfx_adr) ? 32 : 64; - } else if ( u->dis_mode == 32 ) { /* set 32bit-mode flags */ - u->opr_mode = ( u->pfx_opr ) ? 16 : 32; - u->adr_mode = ( u->pfx_adr ) ? 16 : 32; - } else if ( u->dis_mode == 16 ) { /* set 16bit-mode flags */ - u->opr_mode = ( u->pfx_opr ) ? 32 : 16; - u->adr_mode = ( u->pfx_adr ) ? 32 : 16; - } - - return 0; -} - - -static UD_INLINE int -decode_insn(struct ud *u, uint16_t ptr) -{ - UD_ASSERT((ptr & 0x8000) == 0); - u->itab_entry = &ud_itab[ ptr ]; - u->mnemonic = u->itab_entry->mnemonic; - return (resolve_pfx_str(u) == 0 && - resolve_mode(u) == 0 && - decode_operands(u) == 0 && - resolve_mnemonic(u) == 0) ? 0 : -1; -} - - -/* - * decode_3dnow() - * - * Decoding 3dnow is a little tricky because of its strange opcode - * structure. The final opcode disambiguation depends on the last - * byte that comes after the operands have been decoded. Fortunately, - * all 3dnow instructions have the same set of operand types. So we - * go ahead and decode the instruction by picking an arbitrarily chosen - * valid entry in the table, decode the operands, and read the final - * byte to resolve the menmonic. - */ -static UD_INLINE int -decode_3dnow(struct ud* u) -{ - uint16_t ptr; - UD_ASSERT(u->le->type == UD_TAB__OPC_3DNOW); - UD_ASSERT(u->le->table[0xc] != 0); - decode_insn(u, u->le->table[0xc]); - inp_next(u); - if (u->error) { - return -1; - } - ptr = u->le->table[inp_curr(u)]; - UD_ASSERT((ptr & 0x8000) == 0); - u->mnemonic = ud_itab[ptr].mnemonic; - return 0; -} - - -static int -decode_ssepfx(struct ud *u) -{ - uint8_t idx; - uint8_t pfx; - - /* - * String prefixes (f2, f3) take precedence over operand - * size prefix (66). - */ - pfx = u->pfx_str; - if (pfx == 0) { - pfx = u->pfx_opr; - } - idx = ((pfx & 0xf) + 1) / 2; - if (u->le->table[idx] == 0) { - idx = 0; - } - if (idx && u->le->table[idx] != 0) { - /* - * "Consume" the prefix as a part of the opcode, so it is no - * longer exported as an instruction prefix. - */ - u->pfx_str = 0; - if (pfx == 0x66) { - /* - * consume "66" only if it was used for decoding, leaving - * it to be used as an operands size override for some - * simd instructions. - */ - u->pfx_opr = 0; - } - } - return decode_ext(u, u->le->table[idx]); -} - - -static int -decode_vex(struct ud *u) -{ - uint8_t index; - if (u->dis_mode != 64 && MODRM_MOD(inp_peek(u)) != 0x3) { - index = 0; - } else { - u->vex_op = inp_curr(u); - u->vex_b1 = inp_next(u); - if (u->vex_op == 0xc4) { - uint8_t pp, m; - /* 3-byte vex */ - u->vex_b2 = inp_next(u); - UD_RETURN_ON_ERROR(u); - m = u->vex_b1 & 0x1f; - if (m == 0 || m > 3) { - UD_RETURN_WITH_ERROR(u, "reserved vex.m-mmmm value"); - } - pp = u->vex_b2 & 0x3; - index = (pp << 2) | m; - } else { - /* 2-byte vex */ - UD_ASSERT(u->vex_op == 0xc5); - index = 0x1 | ((u->vex_b1 & 0x3) << 2); - } - } - return decode_ext(u, u->le->table[index]); -} - - -/* - * decode_ext() - * - * Decode opcode extensions (if any) - */ -static int -decode_ext(struct ud *u, uint16_t ptr) -{ - uint8_t idx = 0; - if ((ptr & 0x8000) == 0) { - return decode_insn(u, ptr); - } - u->le = &ud_lookup_table_list[(~0x8000 & ptr)]; - if (u->le->type == UD_TAB__OPC_3DNOW) { - return decode_3dnow(u); - } - - switch (u->le->type) { - case UD_TAB__OPC_MOD: - /* !11 = 0, 11 = 1 */ - idx = (MODRM_MOD(modrm(u)) + 1) / 4; - break; - /* disassembly mode/operand size/address size based tables. - * 16 = 0,, 32 = 1, 64 = 2 - */ - case UD_TAB__OPC_MODE: - idx = u->dis_mode != 64 ? 0 : 1; - break; - case UD_TAB__OPC_OSIZE: - idx = eff_opr_mode(u->dis_mode, REX_W(u->pfx_rex), u->pfx_opr) / 32; - break; - case UD_TAB__OPC_ASIZE: - idx = eff_adr_mode(u->dis_mode, u->pfx_adr) / 32; - break; - case UD_TAB__OPC_X87: - idx = modrm(u) - 0xC0; - break; - case UD_TAB__OPC_VENDOR: - if (u->vendor == UD_VENDOR_ANY) { - /* choose a valid entry */ - idx = (u->le->table[idx] != 0) ? 0 : 1; - } else if (u->vendor == UD_VENDOR_AMD) { - idx = 0; - } else { - idx = 1; - } - break; - case UD_TAB__OPC_RM: - idx = MODRM_RM(modrm(u)); - break; - case UD_TAB__OPC_REG: - idx = MODRM_REG(modrm(u)); - break; - case UD_TAB__OPC_SSE: - return decode_ssepfx(u); - case UD_TAB__OPC_VEX: - return decode_vex(u); - case UD_TAB__OPC_VEX_W: - idx = vex_w(u); - break; - case UD_TAB__OPC_VEX_L: - idx = vex_l(u); - break; - case UD_TAB__OPC_TABLE: - inp_next(u); - return decode_opcode(u); - default: - UD_ASSERT(!"not reached"); - break; - } - - return decode_ext(u, u->le->table[idx]); -} - - -static int -decode_opcode(struct ud *u) -{ - uint16_t ptr; - UD_ASSERT(u->le->type == UD_TAB__OPC_TABLE); - UD_RETURN_ON_ERROR(u); - ptr = u->le->table[inp_curr(u)]; - return decode_ext(u, ptr); -} - - -/* ============================================================================= - * ud_decode() - Instruction decoder. Returns the number of bytes decoded. - * ============================================================================= - */ -unsigned int -ud_decode(struct ud *u) -{ - inp_start(u); - clear_insn(u); - u->le = &ud_lookup_table_list[0]; - u->error = decode_prefixes(u) == -1 || - decode_opcode(u) == -1 || - u->error; - /* Handle decode error. */ - if (u->error) { - /* clear out the decode data. */ - clear_insn(u); - /* mark the sequence of bytes as invalid. */ - u->itab_entry = &ud_itab[0]; /* entry 0 is invalid */ - u->mnemonic = u->itab_entry->mnemonic; - } - - /* maybe this stray segment override byte - * should be spewed out? - */ - if ( !P_SEG( u->itab_entry->prefix ) && - u->operand[0].type != UD_OP_MEM && - u->operand[1].type != UD_OP_MEM ) - u->pfx_seg = 0; - - u->insn_offset = u->pc; /* set offset of instruction */ - u->asm_buf_fill = 0; /* set translation buffer index to 0 */ - u->pc += u->inp_ctr; /* move program counter by bytes decoded */ - - /* return number of bytes disassembled. */ - return u->inp_ctr; -} - -/* -vim: set ts=2 sw=2 expandtab -*/ diff --git a/src/third_party/udis86/libudis86/decode.h b/src/third_party/udis86/libudis86/decode.h deleted file mode 100644 index 3949c4e2..00000000 --- a/src/third_party/udis86/libudis86/decode.h +++ /dev/null @@ -1,197 +0,0 @@ -/* udis86 - libudis86/decode.h - * - * Copyright (c) 2002-2009 Vivek Thampi - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -#ifndef UD_DECODE_H -#define UD_DECODE_H - -#include "types.h" -#include "udint.h" -#include "itab.h" - -#define MAX_INSN_LENGTH 15 - -/* itab prefix bits */ -#define P_none ( 0 ) - -#define P_inv64 ( 1 << 0 ) -#define P_INV64(n) ( ( n >> 0 ) & 1 ) -#define P_def64 ( 1 << 1 ) -#define P_DEF64(n) ( ( n >> 1 ) & 1 ) - -#define P_oso ( 1 << 2 ) -#define P_OSO(n) ( ( n >> 2 ) & 1 ) -#define P_aso ( 1 << 3 ) -#define P_ASO(n) ( ( n >> 3 ) & 1 ) - -#define P_rexb ( 1 << 4 ) -#define P_REXB(n) ( ( n >> 4 ) & 1 ) -#define P_rexw ( 1 << 5 ) -#define P_REXW(n) ( ( n >> 5 ) & 1 ) -#define P_rexr ( 1 << 6 ) -#define P_REXR(n) ( ( n >> 6 ) & 1 ) -#define P_rexx ( 1 << 7 ) -#define P_REXX(n) ( ( n >> 7 ) & 1 ) - -#define P_seg ( 1 << 8 ) -#define P_SEG(n) ( ( n >> 8 ) & 1 ) - -#define P_vexl ( 1 << 9 ) -#define P_VEXL(n) ( ( n >> 9 ) & 1 ) -#define P_vexw ( 1 << 10 ) -#define P_VEXW(n) ( ( n >> 10 ) & 1 ) - -#define P_str ( 1 << 11 ) -#define P_STR(n) ( ( n >> 11 ) & 1 ) -#define P_strz ( 1 << 12 ) -#define P_STR_ZF(n) ( ( n >> 12 ) & 1 ) - -/* operand type constants -- order is important! */ - -enum ud_operand_code { - OP_NONE, - - OP_A, OP_E, OP_M, OP_G, - OP_I, OP_F, - - OP_R0, OP_R1, OP_R2, OP_R3, - OP_R4, OP_R5, OP_R6, OP_R7, - - OP_AL, OP_CL, OP_DL, - OP_AX, OP_CX, OP_DX, - OP_eAX, OP_eCX, OP_eDX, - OP_rAX, OP_rCX, OP_rDX, - - OP_ES, OP_CS, OP_SS, OP_DS, - OP_FS, OP_GS, - - OP_ST0, OP_ST1, OP_ST2, OP_ST3, - OP_ST4, OP_ST5, OP_ST6, OP_ST7, - - OP_J, OP_S, OP_O, - OP_I1, OP_I3, OP_sI, - - OP_V, OP_W, OP_Q, OP_P, - OP_U, OP_N, OP_MU, OP_H, - OP_L, - - OP_R, OP_C, OP_D, - - OP_MR -} UD_ATTR_PACKED; - - -/* - * Operand size constants - * - * Symbolic constants for various operand sizes. Some of these constants - * are given a value equal to the width of the data (SZ_B == 8), such - * that they maybe used interchangeably in the internals. Modifying them - * will most certainly break things! - */ -typedef uint16_t ud_operand_size_t; - -#define SZ_NA 0 -#define SZ_Z 1 -#define SZ_V 2 -#define SZ_Y 3 -#define SZ_X 4 -#define SZ_RDQ 7 -#define SZ_B 8 -#define SZ_W 16 -#define SZ_D 32 -#define SZ_Q 64 -#define SZ_T 80 -#define SZ_O 12 -#define SZ_DQ 128 /* double quad */ -#define SZ_QQ 256 /* quad quad */ - -/* - * Complex size types; that encode sizes for operands of type MR (memory or - * register); for internal use only. Id space above 256. - */ -#define SZ_BD ((SZ_B << 8) | SZ_D) -#define SZ_BV ((SZ_B << 8) | SZ_V) -#define SZ_WD ((SZ_W << 8) | SZ_D) -#define SZ_WV ((SZ_W << 8) | SZ_V) -#define SZ_WY ((SZ_W << 8) | SZ_Y) -#define SZ_DY ((SZ_D << 8) | SZ_Y) -#define SZ_WO ((SZ_W << 8) | SZ_O) -#define SZ_DO ((SZ_D << 8) | SZ_O) -#define SZ_QO ((SZ_Q << 8) | SZ_O) - - -/* resolve complex size type. - */ -static UD_INLINE ud_operand_size_t -Mx_mem_size(ud_operand_size_t size) -{ - return (size >> 8) & 0xff; -} - -static UD_INLINE ud_operand_size_t -Mx_reg_size(ud_operand_size_t size) -{ - return size & 0xff; -} - -/* A single operand of an entry in the instruction table. - * (internal use only) - */ -struct ud_itab_entry_operand -{ - enum ud_operand_code type; - ud_operand_size_t size; -}; - - -/* A single entry in an instruction table. - *(internal use only) - */ -struct ud_itab_entry -{ - enum ud_mnemonic_code mnemonic; - struct ud_itab_entry_operand operand1; - struct ud_itab_entry_operand operand2; - struct ud_itab_entry_operand operand3; - struct ud_itab_entry_operand operand4; - uint32_t prefix; -}; - -struct ud_lookup_table_list_entry { - const uint16_t *table; - enum ud_table_type type; - const char *meta; -}; - -extern struct ud_itab_entry ud_itab[]; -extern struct ud_lookup_table_list_entry ud_lookup_table_list[]; - -#endif /* UD_DECODE_H */ - -/* vim:cindent - * vim:expandtab - * vim:ts=4 - * vim:sw=4 - */ diff --git a/src/third_party/udis86/libudis86/extern.h b/src/third_party/udis86/libudis86/extern.h deleted file mode 100644 index ba1c0b34..00000000 --- a/src/third_party/udis86/libudis86/extern.h +++ /dev/null @@ -1,113 +0,0 @@ -/* udis86 - libudis86/extern.h - * - * Copyright (c) 2002-2009, 2013 Vivek Thampi - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -#ifndef UD_EXTERN_H -#define UD_EXTERN_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include "types.h" - -#if defined(_MSC_VER) && defined(_USRDLL) -# ifdef LIBUDIS86_EXPORTS -# define LIBUDIS86_DLLEXTERN __declspec(dllexport) -# else -# define LIBUDIS86_DLLEXTERN __declspec(dllimport) -# endif -#else -# define LIBUDIS86_DLLEXTERN -#endif - - /* ============================= PUBLIC API ================================= */ - - extern LIBUDIS86_DLLEXTERN void ud_init(struct ud*); - - extern LIBUDIS86_DLLEXTERN void ud_set_mode(struct ud*, uint8_t); - - extern LIBUDIS86_DLLEXTERN void ud_set_pc(struct ud*, uint64_t); - - extern LIBUDIS86_DLLEXTERN void ud_set_input_hook(struct ud*, int (*)(struct ud*)); - - extern LIBUDIS86_DLLEXTERN void ud_set_input_buffer(struct ud*, const uint8_t*, size_t); - -#ifndef __UD_STANDALONE__ - extern LIBUDIS86_DLLEXTERN void ud_set_input_file(struct ud*, FILE*); -#endif /* __UD_STANDALONE__ */ - - extern LIBUDIS86_DLLEXTERN void ud_set_vendor(struct ud*, unsigned); - - extern LIBUDIS86_DLLEXTERN void ud_set_syntax(struct ud*, void (*)(struct ud*)); - - extern LIBUDIS86_DLLEXTERN void ud_input_skip(struct ud*, size_t); - - extern LIBUDIS86_DLLEXTERN int ud_input_end(const struct ud*); - - extern LIBUDIS86_DLLEXTERN unsigned int ud_decode(struct ud*); - - extern LIBUDIS86_DLLEXTERN unsigned int ud_disassemble(struct ud*); - - extern LIBUDIS86_DLLEXTERN void ud_translate_intel(struct ud*); - - extern LIBUDIS86_DLLEXTERN void ud_translate_att(struct ud*); - - extern LIBUDIS86_DLLEXTERN const char* ud_insn_asm(const struct ud* u); - - extern LIBUDIS86_DLLEXTERN const uint8_t* ud_insn_ptr(const struct ud* u); - - extern LIBUDIS86_DLLEXTERN uint64_t ud_insn_off(const struct ud*); - - extern LIBUDIS86_DLLEXTERN const char* ud_insn_hex(struct ud*); - - extern LIBUDIS86_DLLEXTERN unsigned int ud_insn_len(const struct ud* u); - - extern LIBUDIS86_DLLEXTERN const struct ud_operand* ud_insn_opr(const struct ud *u, unsigned int n); - - extern LIBUDIS86_DLLEXTERN int ud_opr_is_sreg(const struct ud_operand *opr); - - extern LIBUDIS86_DLLEXTERN int ud_opr_is_gpr(const struct ud_operand *opr); - - extern LIBUDIS86_DLLEXTERN enum ud_mnemonic_code ud_insn_mnemonic(const struct ud *u); - - extern LIBUDIS86_DLLEXTERN const char* ud_lookup_mnemonic(enum ud_mnemonic_code c); - - extern LIBUDIS86_DLLEXTERN void ud_set_user_opaque_data(struct ud*, void*); - - extern LIBUDIS86_DLLEXTERN void* ud_get_user_opaque_data(const struct ud*); - - extern LIBUDIS86_DLLEXTERN void ud_set_asm_buffer(struct ud *u, char *buf, size_t size); - - extern LIBUDIS86_DLLEXTERN void ud_set_sym_resolver(struct ud *u, - const char* (*resolver)(struct ud*, - uint64_t addr, - int64_t *offset)); - - /* ========================================================================== */ - -#ifdef __cplusplus -} -#endif -#endif /* UD_EXTERN_H */ diff --git a/src/third_party/udis86/libudis86/itab.c b/src/third_party/udis86/libudis86/itab.c deleted file mode 100644 index 7ea0569e..00000000 --- a/src/third_party/udis86/libudis86/itab.c +++ /dev/null @@ -1,5937 +0,0 @@ -/* itab.c -- generated by udis86:scripts/ud_itab.py, do no edit */ -#include "decode.h" - -#define GROUP(n) (0x8000 | (n)) -#define INVALID 0 - - -const uint16_t ud_itab__0[] = { - /* 0 */ 15, 16, 17, 18, - /* 4 */ 19, 20, GROUP(1), GROUP(2), - /* 8 */ 960, 961, 962, 963, - /* c */ 964, 965, GROUP(3), GROUP(4), - /* 10 */ 5, 6, 7, 8, - /* 14 */ 9, 10, GROUP(284), GROUP(285), - /* 18 */ 1332, 1333, 1334, 1335, - /* 1c */ 1336, 1337, GROUP(286), GROUP(287), - /* 20 */ 49, 50, 51, 52, - /* 24 */ 53, 54, INVALID, GROUP(288), - /* 28 */ 1403, 1404, 1405, 1406, - /* 2c */ 1407, 1408, INVALID, GROUP(289), - /* 30 */ 1483, 1484, 1485, 1486, - /* 34 */ 1487, 1488, INVALID, GROUP(290), - /* 38 */ 100, 101, 102, 103, - /* 3c */ 104, 105, INVALID, GROUP(291), - /* 40 */ 695, 696, 697, 698, - /* 44 */ 699, 700, 701, 702, - /* 48 */ 175, 176, 177, 178, - /* 4c */ 179, 180, 181, 182, - /* 50 */ 1242, 1243, 1244, 1245, - /* 54 */ 1246, 1247, 1248, 1249, - /* 58 */ 1097, 1098, 1099, 1100, - /* 5c */ 1101, 1102, 1103, 1104, - /* 60 */ GROUP(292), GROUP(295), GROUP(298), GROUP(299), - /* 64 */ INVALID, INVALID, INVALID, INVALID, - /* 68 */ 1250, 693, 1252, 694, - /* 6c */ 705, GROUP(300), 978, GROUP(301), - /* 70 */ 722, 724, 726, 728, - /* 74 */ 730, 732, 734, 736, - /* 78 */ 738, 740, 742, 744, - /* 7c */ 746, 748, 750, 752, - /* 80 */ GROUP(302), GROUP(303), GROUP(304), GROUP(313), - /* 84 */ 1429, 1430, 1471, 1472, - /* 88 */ 824, 825, 826, 827, - /* 8c */ 828, 766, 829, GROUP(314), - /* 90 */ 1473, 1474, 1475, 1476, - /* 94 */ 1477, 1478, 1479, 1480, - /* 98 */ GROUP(315), GROUP(316), GROUP(317), 1466, - /* 9c */ GROUP(318), GROUP(322), 1306, 762, - /* a0 */ 830, 831, 832, 833, - /* a4 */ 918, GROUP(326), 114, GROUP(327), - /* a8 */ 1431, 1432, 1398, GROUP(328), - /* ac */ 786, GROUP(329), 1342, GROUP(330), - /* b0 */ 834, 835, 836, 837, - /* b4 */ 838, 839, 840, 841, - /* b8 */ 842, 843, 844, 845, - /* bc */ 846, 847, 848, 849, - /* c0 */ GROUP(331), GROUP(332), 1297, 1298, - /* c4 */ GROUP(333), GROUP(403), GROUP(405), GROUP(406), - /* c8 */ 200, 772, 1299, 1300, - /* cc */ 709, 710, GROUP(407), GROUP(408), - /* d0 */ GROUP(409), GROUP(410), GROUP(411), GROUP(412), - /* d4 */ GROUP(413), GROUP(414), GROUP(415), 1482, - /* d8 */ GROUP(416), GROUP(419), GROUP(422), GROUP(425), - /* dc */ GROUP(428), GROUP(431), GROUP(434), GROUP(437), - /* e0 */ 790, 791, 792, GROUP(440), - /* e4 */ 686, 687, 974, 975, - /* e8 */ 72, 759, GROUP(441), 761, - /* ec */ 688, 689, 976, 977, - /* f0 */ 785, 708, 1295, 1296, - /* f4 */ 683, 83, GROUP(442), GROUP(443), - /* f8 */ 77, 1391, 81, 1394, - /* fc */ 78, 1392, GROUP(444), GROUP(445), -}; - -static const uint16_t ud_itab__1[] = { - /* 0 */ 1236, INVALID, -}; - -static const uint16_t ud_itab__2[] = { - /* 0 */ 1092, INVALID, -}; - -static const uint16_t ud_itab__3[] = { - /* 0 */ 1237, INVALID, -}; - -static const uint16_t ud_itab__4[] = { - /* 0 */ GROUP(5), GROUP(6), 763, 793, - /* 4 */ INVALID, 1422, 82, 1427, - /* 8 */ 712, 1467, INVALID, 1440, - /* c */ INVALID, GROUP(27), 430, GROUP(28), - /* 10 */ GROUP(29), GROUP(30), GROUP(31), GROUP(34), - /* 14 */ GROUP(35), GROUP(36), GROUP(37), GROUP(40), - /* 18 */ GROUP(41), 951, 952, 953, - /* 1c */ 954, 955, 956, 957, - /* 20 */ 850, 851, 852, 853, - /* 24 */ INVALID, INVALID, INVALID, INVALID, - /* 28 */ GROUP(42), GROUP(43), GROUP(44), GROUP(45), - /* 2c */ GROUP(46), GROUP(47), GROUP(48), GROUP(49), - /* 30 */ 1468, 1293, 1291, 1292, - /* 34 */ GROUP(50), GROUP(52), INVALID, 1510, - /* 38 */ GROUP(54), INVALID, GROUP(116), INVALID, - /* 3c */ INVALID, INVALID, INVALID, INVALID, - /* 40 */ 84, 85, 86, 87, - /* 44 */ 88, 89, 90, 91, - /* 48 */ 92, 93, 94, 95, - /* 4c */ 96, 97, 98, 99, - /* 50 */ GROUP(143), GROUP(144), GROUP(145), GROUP(146), - /* 54 */ GROUP(147), GROUP(148), GROUP(149), GROUP(150), - /* 58 */ GROUP(151), GROUP(152), GROUP(153), GROUP(154), - /* 5c */ GROUP(155), GROUP(156), GROUP(157), GROUP(158), - /* 60 */ GROUP(159), GROUP(160), GROUP(161), GROUP(162), - /* 64 */ GROUP(163), GROUP(164), GROUP(165), GROUP(166), - /* 68 */ GROUP(167), GROUP(168), GROUP(169), GROUP(170), - /* 6c */ GROUP(171), GROUP(172), GROUP(173), GROUP(176), - /* 70 */ GROUP(177), GROUP(178), GROUP(182), GROUP(186), - /* 74 */ GROUP(191), GROUP(192), GROUP(193), 199, - /* 78 */ GROUP(194), GROUP(195), INVALID, INVALID, - /* 7c */ GROUP(196), GROUP(197), GROUP(198), GROUP(201), - /* 80 */ 723, 725, 727, 729, - /* 84 */ 731, 733, 735, 737, - /* 88 */ 739, 741, 743, 745, - /* 8c */ 747, 749, 751, 753, - /* 90 */ 1346, 1347, 1348, 1349, - /* 94 */ 1350, 1351, 1352, 1353, - /* 98 */ 1354, 1355, 1356, 1357, - /* 9c */ 1358, 1359, 1360, 1361, - /* a0 */ 1241, 1096, 131, 1665, - /* a4 */ 1371, 1372, GROUP(202), GROUP(207), - /* a8 */ 1240, 1095, 1301, 1670, - /* ac */ 1373, 1374, GROUP(215), 690, - /* b0 */ 122, 123, 771, 1668, - /* b4 */ 768, 769, 936, 937, - /* b8 */ GROUP(221), INVALID, GROUP(222), 1666, - /* bc */ 1654, 1655, 926, 927, - /* c0 */ 1469, 1470, GROUP(223), 900, - /* c4 */ GROUP(224), GROUP(225), GROUP(226), GROUP(227), - /* c8 */ 1656, 1657, 1658, 1659, - /* cc */ 1660, 1661, 1662, 1663, - /* d0 */ GROUP(236), GROUP(237), GROUP(238), GROUP(239), - /* d4 */ GROUP(240), GROUP(241), GROUP(242), GROUP(243), - /* d8 */ GROUP(244), GROUP(245), GROUP(246), GROUP(247), - /* dc */ GROUP(248), GROUP(249), GROUP(250), GROUP(251), - /* e0 */ GROUP(252), GROUP(253), GROUP(254), GROUP(255), - /* e4 */ GROUP(256), GROUP(257), GROUP(258), GROUP(259), - /* e8 */ GROUP(260), GROUP(261), GROUP(262), GROUP(263), - /* ec */ GROUP(264), GROUP(265), GROUP(266), GROUP(267), - /* f0 */ GROUP(268), GROUP(269), GROUP(270), GROUP(271), - /* f4 */ GROUP(272), GROUP(273), GROUP(274), GROUP(275), - /* f8 */ GROUP(277), GROUP(278), GROUP(279), GROUP(280), - /* fc */ GROUP(281), GROUP(282), GROUP(283), INVALID, -}; - -static const uint16_t ud_itab__5[] = { - /* 0 */ 1380, 1402, 782, 794, - /* 4 */ 1449, 1450, INVALID, INVALID, -}; - -static const uint16_t ud_itab__6[] = { - /* 0 */ GROUP(7), GROUP(8), -}; - -static const uint16_t ud_itab__7[] = { - /* 0 */ 1370, 1379, 781, 770, - /* 4 */ 1381, INVALID, 783, 715, -}; - -static const uint16_t ud_itab__8[] = { - /* 0 */ GROUP(9), GROUP(14), GROUP(15), GROUP(16), - /* 4 */ 1382, INVALID, 784, GROUP(25), -}; - -static const uint16_t ud_itab__9[] = { - /* 0 */ INVALID, GROUP(10), GROUP(11), GROUP(12), - /* 4 */ GROUP(13), INVALID, INVALID, INVALID, -}; - -static const uint16_t ud_itab__10[] = { - /* 0 */ INVALID, 1451, INVALID, -}; - -static const uint16_t ud_itab__11[] = { - /* 0 */ INVALID, 1457, INVALID, -}; - -static const uint16_t ud_itab__12[] = { - /* 0 */ INVALID, 1458, INVALID, -}; - -static const uint16_t ud_itab__13[] = { - /* 0 */ INVALID, 1459, INVALID, -}; - -static const uint16_t ud_itab__14[] = { - /* 0 */ 820, 948, INVALID, INVALID, - /* 4 */ INVALID, INVALID, INVALID, INVALID, -}; - -static const uint16_t ud_itab__15[] = { - /* 0 */ 1481, 1504, INVALID, INVALID, - /* 4 */ INVALID, INVALID, INVALID, INVALID, -}; - -static const uint16_t ud_itab__16[] = { - /* 0 */ GROUP(17), GROUP(18), GROUP(19), GROUP(20), - /* 4 */ GROUP(21), GROUP(22), GROUP(23), GROUP(24), -}; - -static const uint16_t ud_itab__17[] = { - /* 0 */ 1462, INVALID, INVALID, -}; - -static const uint16_t ud_itab__18[] = { - /* 0 */ 1463, INVALID, INVALID, -}; - -static const uint16_t ud_itab__19[] = { - /* 0 */ 1464, INVALID, INVALID, -}; - -static const uint16_t ud_itab__20[] = { - /* 0 */ 1465, INVALID, INVALID, -}; - -static const uint16_t ud_itab__21[] = { - /* 0 */ 1393, INVALID, INVALID, -}; - -static const uint16_t ud_itab__22[] = { - /* 0 */ 80, INVALID, INVALID, -}; - -static const uint16_t ud_itab__23[] = { - /* 0 */ 1395, INVALID, INVALID, -}; - -static const uint16_t ud_itab__24[] = { - /* 0 */ 716, INVALID, INVALID, -}; - -static const uint16_t ud_itab__25[] = { - /* 0 */ 1421, GROUP(26), INVALID, INVALID, - /* 4 */ INVALID, INVALID, INVALID, INVALID, -}; - -static const uint16_t ud_itab__26[] = { - /* 0 */ 1294, INVALID, INVALID, -}; - -static const uint16_t ud_itab__27[] = { - /* 0 */ 1115, 1116, 1117, 1118, - /* 4 */ 1119, 1120, 1121, 1122, -}; - -static const uint16_t ud_itab__28[] = { - /* 0 */ INVALID, INVALID, INVALID, INVALID, - /* 4 */ INVALID, INVALID, INVALID, INVALID, - /* 8 */ INVALID, INVALID, INVALID, INVALID, - /* c */ 1212, 1213, INVALID, INVALID, - /* 10 */ INVALID, INVALID, INVALID, INVALID, - /* 14 */ INVALID, INVALID, INVALID, INVALID, - /* 18 */ INVALID, INVALID, INVALID, INVALID, - /* 1c */ 1214, 1215, INVALID, INVALID, - /* 20 */ INVALID, INVALID, INVALID, INVALID, - /* 24 */ INVALID, INVALID, INVALID, INVALID, - /* 28 */ INVALID, INVALID, INVALID, INVALID, - /* 2c */ INVALID, INVALID, INVALID, INVALID, - /* 30 */ INVALID, INVALID, INVALID, INVALID, - /* 34 */ INVALID, INVALID, INVALID, INVALID, - /* 38 */ INVALID, INVALID, INVALID, INVALID, - /* 3c */ INVALID, INVALID, INVALID, INVALID, - /* 40 */ INVALID, INVALID, INVALID, INVALID, - /* 44 */ INVALID, INVALID, INVALID, INVALID, - /* 48 */ INVALID, INVALID, INVALID, INVALID, - /* 4c */ INVALID, INVALID, INVALID, INVALID, - /* 50 */ INVALID, INVALID, INVALID, INVALID, - /* 54 */ INVALID, INVALID, INVALID, INVALID, - /* 58 */ INVALID, INVALID, INVALID, INVALID, - /* 5c */ INVALID, INVALID, INVALID, INVALID, - /* 60 */ INVALID, INVALID, INVALID, INVALID, - /* 64 */ INVALID, INVALID, INVALID, INVALID, - /* 68 */ INVALID, INVALID, INVALID, INVALID, - /* 6c */ INVALID, INVALID, INVALID, INVALID, - /* 70 */ INVALID, INVALID, INVALID, INVALID, - /* 74 */ INVALID, INVALID, INVALID, INVALID, - /* 78 */ INVALID, INVALID, INVALID, INVALID, - /* 7c */ INVALID, INVALID, INVALID, INVALID, - /* 80 */ INVALID, INVALID, INVALID, INVALID, - /* 84 */ INVALID, INVALID, INVALID, INVALID, - /* 88 */ INVALID, INVALID, 1216, INVALID, - /* 8c */ INVALID, INVALID, 1217, INVALID, - /* 90 */ 1218, INVALID, INVALID, INVALID, - /* 94 */ 1219, INVALID, 1220, 1221, - /* 98 */ INVALID, INVALID, 1222, INVALID, - /* 9c */ INVALID, INVALID, 1223, INVALID, - /* a0 */ 1224, INVALID, INVALID, INVALID, - /* a4 */ 1225, INVALID, 1226, 1227, - /* a8 */ INVALID, INVALID, 1228, INVALID, - /* ac */ INVALID, INVALID, 1229, INVALID, - /* b0 */ 1230, INVALID, INVALID, INVALID, - /* b4 */ 1231, INVALID, 1232, 1233, - /* b8 */ INVALID, INVALID, INVALID, 1234, - /* bc */ INVALID, INVALID, INVALID, 1235, - /* c0 */ INVALID, INVALID, INVALID, INVALID, - /* c4 */ INVALID, INVALID, INVALID, INVALID, - /* c8 */ INVALID, INVALID, INVALID, INVALID, - /* cc */ INVALID, INVALID, INVALID, INVALID, - /* d0 */ INVALID, INVALID, INVALID, INVALID, - /* d4 */ INVALID, INVALID, INVALID, INVALID, - /* d8 */ INVALID, INVALID, INVALID, INVALID, - /* dc */ INVALID, INVALID, INVALID, INVALID, - /* e0 */ INVALID, INVALID, INVALID, INVALID, - /* e4 */ INVALID, INVALID, INVALID, INVALID, - /* e8 */ INVALID, INVALID, INVALID, INVALID, - /* ec */ INVALID, INVALID, INVALID, INVALID, - /* f0 */ INVALID, INVALID, INVALID, INVALID, - /* f4 */ INVALID, INVALID, INVALID, INVALID, - /* f8 */ INVALID, INVALID, INVALID, INVALID, - /* fc */ INVALID, INVALID, INVALID, INVALID, -}; - -static const uint16_t ud_itab__29[] = { - /* 0 */ 932, 921, 924, 928, -}; - -static const uint16_t ud_itab__30[] = { - /* 0 */ 934, 922, 925, 930, -}; - -static const uint16_t ud_itab__31[] = { - /* 0 */ GROUP(32), GROUP(33), -}; - -static const uint16_t ud_itab__32[] = { - /* 0 */ 888, 1558, 1566, 884, -}; - -static const uint16_t ud_itab__33[] = { - /* 0 */ 892, 1556, 1564, INVALID, -}; - -static const uint16_t ud_itab__34[] = { - /* 0 */ 890, INVALID, INVALID, 886, -}; - -static const uint16_t ud_itab__35[] = { - /* 0 */ 1445, INVALID, INVALID, 1447, -}; - -static const uint16_t ud_itab__36[] = { - /* 0 */ 1443, INVALID, INVALID, 1441, -}; - -static const uint16_t ud_itab__37[] = { - /* 0 */ GROUP(38), GROUP(39), -}; - -static const uint16_t ud_itab__38[] = { - /* 0 */ 878, INVALID, 1562, 874, -}; - -static const uint16_t ud_itab__39[] = { - /* 0 */ 882, INVALID, 1560, INVALID, -}; - -static const uint16_t ud_itab__40[] = { - /* 0 */ 880, INVALID, INVALID, 876, -}; - -static const uint16_t ud_itab__41[] = { - /* 0 */ 1123, 1124, 1125, 1126, - /* 4 */ INVALID, INVALID, INVALID, INVALID, -}; - -static const uint16_t ud_itab__42[] = { - /* 0 */ 858, INVALID, INVALID, 854, -}; - -static const uint16_t ud_itab__43[] = { - /* 0 */ 860, INVALID, INVALID, 856, -}; - -static const uint16_t ud_itab__44[] = { - /* 0 */ 141, 152, 154, 142, -}; - -static const uint16_t ud_itab__45[] = { - /* 0 */ 903, INVALID, INVALID, 901, -}; - -static const uint16_t ud_itab__46[] = { - /* 0 */ 165, 166, 168, 162, -}; - -static const uint16_t ud_itab__47[] = { - /* 0 */ 147, 148, 158, 138, -}; - -static const uint16_t ud_itab__48[] = { - /* 0 */ 1438, INVALID, INVALID, 1436, -}; - -static const uint16_t ud_itab__49[] = { - /* 0 */ 129, INVALID, INVALID, 127, -}; - -static const uint16_t ud_itab__50[] = { - /* 0 */ 1423, GROUP(51), -}; - -static const uint16_t ud_itab__51[] = { - /* 0 */ INVALID, 1424, INVALID, -}; - -static const uint16_t ud_itab__52[] = { - /* 0 */ 1425, GROUP(53), -}; - -static const uint16_t ud_itab__53[] = { - /* 0 */ INVALID, 1426, INVALID, -}; - -static const uint16_t ud_itab__54[] = { - /* 0 */ GROUP(67), GROUP(68), GROUP(63), GROUP(64), - /* 4 */ GROUP(65), GROUP(66), GROUP(86), GROUP(90), - /* 8 */ GROUP(69), GROUP(70), GROUP(71), GROUP(72), - /* c */ INVALID, INVALID, INVALID, INVALID, - /* 10 */ GROUP(73), INVALID, INVALID, INVALID, - /* 14 */ GROUP(75), GROUP(76), INVALID, GROUP(77), - /* 18 */ INVALID, INVALID, INVALID, INVALID, - /* 1c */ GROUP(78), GROUP(79), GROUP(80), INVALID, - /* 20 */ GROUP(81), GROUP(82), GROUP(83), GROUP(84), - /* 24 */ GROUP(85), GROUP(108), INVALID, INVALID, - /* 28 */ GROUP(87), GROUP(88), GROUP(89), GROUP(74), - /* 2c */ INVALID, INVALID, INVALID, INVALID, - /* 30 */ GROUP(91), GROUP(92), GROUP(93), GROUP(94), - /* 34 */ GROUP(95), GROUP(96), INVALID, GROUP(97), - /* 38 */ GROUP(98), GROUP(99), GROUP(100), GROUP(101), - /* 3c */ GROUP(102), GROUP(103), GROUP(104), GROUP(105), - /* 40 */ GROUP(106), GROUP(107), INVALID, INVALID, - /* 44 */ INVALID, INVALID, INVALID, INVALID, - /* 48 */ INVALID, INVALID, INVALID, INVALID, - /* 4c */ INVALID, INVALID, INVALID, INVALID, - /* 50 */ INVALID, INVALID, INVALID, INVALID, - /* 54 */ INVALID, INVALID, INVALID, INVALID, - /* 58 */ INVALID, INVALID, INVALID, INVALID, - /* 5c */ INVALID, INVALID, INVALID, INVALID, - /* 60 */ INVALID, INVALID, INVALID, INVALID, - /* 64 */ INVALID, INVALID, INVALID, INVALID, - /* 68 */ INVALID, INVALID, INVALID, INVALID, - /* 6c */ INVALID, INVALID, INVALID, INVALID, - /* 70 */ INVALID, INVALID, INVALID, INVALID, - /* 74 */ INVALID, INVALID, INVALID, INVALID, - /* 78 */ INVALID, INVALID, INVALID, INVALID, - /* 7c */ INVALID, INVALID, INVALID, INVALID, - /* 80 */ GROUP(55), GROUP(59), INVALID, INVALID, - /* 84 */ INVALID, INVALID, INVALID, INVALID, - /* 88 */ INVALID, INVALID, INVALID, INVALID, - /* 8c */ INVALID, INVALID, INVALID, INVALID, - /* 90 */ INVALID, INVALID, INVALID, INVALID, - /* 94 */ INVALID, INVALID, INVALID, INVALID, - /* 98 */ INVALID, INVALID, INVALID, INVALID, - /* 9c */ INVALID, INVALID, INVALID, INVALID, - /* a0 */ INVALID, INVALID, INVALID, INVALID, - /* a4 */ INVALID, INVALID, INVALID, INVALID, - /* a8 */ INVALID, INVALID, INVALID, INVALID, - /* ac */ INVALID, INVALID, INVALID, INVALID, - /* b0 */ INVALID, INVALID, INVALID, INVALID, - /* b4 */ INVALID, INVALID, INVALID, INVALID, - /* b8 */ INVALID, INVALID, INVALID, INVALID, - /* bc */ INVALID, INVALID, INVALID, INVALID, - /* c0 */ INVALID, INVALID, INVALID, INVALID, - /* c4 */ INVALID, INVALID, INVALID, INVALID, - /* c8 */ INVALID, INVALID, INVALID, INVALID, - /* cc */ INVALID, INVALID, INVALID, INVALID, - /* d0 */ INVALID, INVALID, INVALID, INVALID, - /* d4 */ INVALID, INVALID, INVALID, INVALID, - /* d8 */ INVALID, INVALID, INVALID, GROUP(109), - /* dc */ GROUP(110), GROUP(111), GROUP(112), GROUP(113), - /* e0 */ INVALID, INVALID, INVALID, INVALID, - /* e4 */ INVALID, INVALID, INVALID, INVALID, - /* e8 */ INVALID, INVALID, INVALID, INVALID, - /* ec */ INVALID, INVALID, INVALID, INVALID, - /* f0 */ GROUP(114), GROUP(115), INVALID, INVALID, - /* f4 */ INVALID, INVALID, INVALID, INVALID, - /* f8 */ INVALID, INVALID, INVALID, INVALID, - /* fc */ INVALID, INVALID, INVALID, INVALID, -}; - -static const uint16_t ud_itab__55[] = { - /* 0 */ INVALID, INVALID, INVALID, GROUP(56), -}; - -static const uint16_t ud_itab__56[] = { - /* 0 */ GROUP(57), GROUP(58), -}; - -static const uint16_t ud_itab__57[] = { - /* 0 */ INVALID, 713, INVALID, -}; - -static const uint16_t ud_itab__58[] = { - /* 0 */ INVALID, 714, INVALID, -}; - -static const uint16_t ud_itab__59[] = { - /* 0 */ INVALID, INVALID, INVALID, GROUP(60), -}; - -static const uint16_t ud_itab__60[] = { - /* 0 */ GROUP(61), GROUP(62), -}; - -static const uint16_t ud_itab__61[] = { - /* 0 */ INVALID, 717, INVALID, -}; - -static const uint16_t ud_itab__62[] = { - /* 0 */ INVALID, 718, INVALID, -}; - -static const uint16_t ud_itab__63[] = { - /* 0 */ 1583, INVALID, INVALID, 1584, -}; - -static const uint16_t ud_itab__64[] = { - /* 0 */ 1586, INVALID, INVALID, 1587, -}; - -static const uint16_t ud_itab__65[] = { - /* 0 */ 1589, INVALID, INVALID, 1590, -}; - -static const uint16_t ud_itab__66[] = { - /* 0 */ 1592, INVALID, INVALID, 1593, -}; - -static const uint16_t ud_itab__67[] = { - /* 0 */ 1577, INVALID, INVALID, 1578, -}; - -static const uint16_t ud_itab__68[] = { - /* 0 */ 1580, INVALID, INVALID, 1581, -}; - -static const uint16_t ud_itab__69[] = { - /* 0 */ 1601, INVALID, INVALID, 1602, -}; - -static const uint16_t ud_itab__70[] = { - /* 0 */ 1607, INVALID, INVALID, 1608, -}; - -static const uint16_t ud_itab__71[] = { - /* 0 */ 1604, INVALID, INVALID, 1605, -}; - -static const uint16_t ud_itab__72[] = { - /* 0 */ 1610, INVALID, INVALID, 1611, -}; - -static const uint16_t ud_itab__73[] = { - /* 0 */ INVALID, INVALID, INVALID, 1616, -}; - -static const uint16_t ud_itab__74[] = { - /* 0 */ INVALID, INVALID, INVALID, 1678, -}; - -static const uint16_t ud_itab__75[] = { - /* 0 */ INVALID, INVALID, INVALID, 1652, -}; - -static const uint16_t ud_itab__76[] = { - /* 0 */ INVALID, INVALID, INVALID, 1651, -}; - -static const uint16_t ud_itab__77[] = { - /* 0 */ INVALID, INVALID, INVALID, 1706, -}; - -static const uint16_t ud_itab__78[] = { - /* 0 */ 1568, INVALID, INVALID, 1569, -}; - -static const uint16_t ud_itab__79[] = { - /* 0 */ 1571, INVALID, INVALID, 1572, -}; - -static const uint16_t ud_itab__80[] = { - /* 0 */ 1574, INVALID, INVALID, 1575, -}; - -static const uint16_t ud_itab__81[] = { - /* 0 */ INVALID, INVALID, INVALID, 1680, -}; - -static const uint16_t ud_itab__82[] = { - /* 0 */ INVALID, INVALID, INVALID, 1682, -}; - -static const uint16_t ud_itab__83[] = { - /* 0 */ INVALID, INVALID, INVALID, 1684, -}; - -static const uint16_t ud_itab__84[] = { - /* 0 */ INVALID, INVALID, INVALID, 1686, -}; - -static const uint16_t ud_itab__85[] = { - /* 0 */ INVALID, INVALID, INVALID, 1688, -}; - -static const uint16_t ud_itab__86[] = { - /* 0 */ 1595, INVALID, INVALID, 1596, -}; - -static const uint16_t ud_itab__87[] = { - /* 0 */ INVALID, INVALID, INVALID, 1617, -}; - -static const uint16_t ud_itab__88[] = { - /* 0 */ INVALID, INVALID, INVALID, 1703, -}; - -static const uint16_t ud_itab__89[] = { - /* 0 */ INVALID, INVALID, INVALID, 1676, -}; - -static const uint16_t ud_itab__90[] = { - /* 0 */ 1598, INVALID, INVALID, 1599, -}; - -static const uint16_t ud_itab__91[] = { - /* 0 */ INVALID, INVALID, INVALID, 1691, -}; - -static const uint16_t ud_itab__92[] = { - /* 0 */ INVALID, INVALID, INVALID, 1693, -}; - -static const uint16_t ud_itab__93[] = { - /* 0 */ INVALID, INVALID, INVALID, 1695, -}; - -static const uint16_t ud_itab__94[] = { - /* 0 */ INVALID, INVALID, INVALID, 1697, -}; - -static const uint16_t ud_itab__95[] = { - /* 0 */ INVALID, INVALID, INVALID, 1699, -}; - -static const uint16_t ud_itab__96[] = { - /* 0 */ INVALID, INVALID, INVALID, 1701, -}; - -static const uint16_t ud_itab__97[] = { - /* 0 */ INVALID, INVALID, INVALID, 1712, -}; - -static const uint16_t ud_itab__98[] = { - /* 0 */ INVALID, INVALID, INVALID, 1619, -}; - -static const uint16_t ud_itab__99[] = { - /* 0 */ INVALID, INVALID, INVALID, 1621, -}; - -static const uint16_t ud_itab__100[] = { - /* 0 */ INVALID, INVALID, INVALID, 1623, -}; - -static const uint16_t ud_itab__101[] = { - /* 0 */ INVALID, INVALID, INVALID, 1625, -}; - -static const uint16_t ud_itab__102[] = { - /* 0 */ INVALID, INVALID, INVALID, 1627, -}; - -static const uint16_t ud_itab__103[] = { - /* 0 */ INVALID, INVALID, INVALID, 1629, -}; - -static const uint16_t ud_itab__104[] = { - /* 0 */ INVALID, INVALID, INVALID, 1633, -}; - -static const uint16_t ud_itab__105[] = { - /* 0 */ INVALID, INVALID, INVALID, 1631, -}; - -static const uint16_t ud_itab__106[] = { - /* 0 */ INVALID, INVALID, INVALID, 1635, -}; - -static const uint16_t ud_itab__107[] = { - /* 0 */ INVALID, INVALID, INVALID, 1637, -}; - -static const uint16_t ud_itab__108[] = { - /* 0 */ INVALID, INVALID, INVALID, 1690, -}; - -static const uint16_t ud_itab__109[] = { - /* 0 */ INVALID, INVALID, INVALID, 45, -}; - -static const uint16_t ud_itab__110[] = { - /* 0 */ INVALID, INVALID, INVALID, 41, -}; - -static const uint16_t ud_itab__111[] = { - /* 0 */ INVALID, INVALID, INVALID, 43, -}; - -static const uint16_t ud_itab__112[] = { - /* 0 */ INVALID, INVALID, INVALID, 37, -}; - -static const uint16_t ud_itab__113[] = { - /* 0 */ INVALID, INVALID, INVALID, 39, -}; - -static const uint16_t ud_itab__114[] = { - /* 0 */ 1718, 1720, INVALID, INVALID, -}; - -static const uint16_t ud_itab__115[] = { - /* 0 */ 1719, 1721, INVALID, INVALID, -}; - -static const uint16_t ud_itab__116[] = { - /* 0 */ INVALID, INVALID, INVALID, INVALID, - /* 4 */ INVALID, INVALID, INVALID, INVALID, - /* 8 */ GROUP(117), GROUP(118), GROUP(119), GROUP(120), - /* c */ GROUP(121), GROUP(122), GROUP(123), GROUP(124), - /* 10 */ INVALID, INVALID, INVALID, INVALID, - /* 14 */ GROUP(125), GROUP(126), GROUP(127), GROUP(129), - /* 18 */ INVALID, INVALID, INVALID, INVALID, - /* 1c */ INVALID, INVALID, INVALID, INVALID, - /* 20 */ GROUP(130), GROUP(131), GROUP(132), INVALID, - /* 24 */ INVALID, INVALID, INVALID, INVALID, - /* 28 */ INVALID, INVALID, INVALID, INVALID, - /* 2c */ INVALID, INVALID, INVALID, INVALID, - /* 30 */ INVALID, INVALID, INVALID, INVALID, - /* 34 */ INVALID, INVALID, INVALID, INVALID, - /* 38 */ INVALID, INVALID, INVALID, INVALID, - /* 3c */ INVALID, INVALID, INVALID, INVALID, - /* 40 */ GROUP(134), GROUP(135), GROUP(136), INVALID, - /* 44 */ GROUP(137), INVALID, INVALID, INVALID, - /* 48 */ INVALID, INVALID, INVALID, INVALID, - /* 4c */ INVALID, INVALID, INVALID, INVALID, - /* 50 */ INVALID, INVALID, INVALID, INVALID, - /* 54 */ INVALID, INVALID, INVALID, INVALID, - /* 58 */ INVALID, INVALID, INVALID, INVALID, - /* 5c */ INVALID, INVALID, INVALID, INVALID, - /* 60 */ GROUP(139), GROUP(140), GROUP(141), GROUP(142), - /* 64 */ INVALID, INVALID, INVALID, INVALID, - /* 68 */ INVALID, INVALID, INVALID, INVALID, - /* 6c */ INVALID, INVALID, INVALID, INVALID, - /* 70 */ INVALID, INVALID, INVALID, INVALID, - /* 74 */ INVALID, INVALID, INVALID, INVALID, - /* 78 */ INVALID, INVALID, INVALID, INVALID, - /* 7c */ INVALID, INVALID, INVALID, INVALID, - /* 80 */ INVALID, INVALID, INVALID, INVALID, - /* 84 */ INVALID, INVALID, INVALID, INVALID, - /* 88 */ INVALID, INVALID, INVALID, INVALID, - /* 8c */ INVALID, INVALID, INVALID, INVALID, - /* 90 */ INVALID, INVALID, INVALID, INVALID, - /* 94 */ INVALID, INVALID, INVALID, INVALID, - /* 98 */ INVALID, INVALID, INVALID, INVALID, - /* 9c */ INVALID, INVALID, INVALID, INVALID, - /* a0 */ INVALID, INVALID, INVALID, INVALID, - /* a4 */ INVALID, INVALID, INVALID, INVALID, - /* a8 */ INVALID, INVALID, INVALID, INVALID, - /* ac */ INVALID, INVALID, INVALID, INVALID, - /* b0 */ INVALID, INVALID, INVALID, INVALID, - /* b4 */ INVALID, INVALID, INVALID, INVALID, - /* b8 */ INVALID, INVALID, INVALID, INVALID, - /* bc */ INVALID, INVALID, INVALID, INVALID, - /* c0 */ INVALID, INVALID, INVALID, INVALID, - /* c4 */ INVALID, INVALID, INVALID, INVALID, - /* c8 */ INVALID, INVALID, INVALID, INVALID, - /* cc */ INVALID, INVALID, INVALID, INVALID, - /* d0 */ INVALID, INVALID, INVALID, INVALID, - /* d4 */ INVALID, INVALID, INVALID, INVALID, - /* d8 */ INVALID, INVALID, INVALID, INVALID, - /* dc */ INVALID, INVALID, INVALID, GROUP(138), - /* e0 */ INVALID, INVALID, INVALID, INVALID, - /* e4 */ INVALID, INVALID, INVALID, INVALID, - /* e8 */ INVALID, INVALID, INVALID, INVALID, - /* ec */ INVALID, INVALID, INVALID, INVALID, - /* f0 */ INVALID, INVALID, INVALID, INVALID, - /* f4 */ INVALID, INVALID, INVALID, INVALID, - /* f8 */ INVALID, INVALID, INVALID, INVALID, - /* fc */ INVALID, INVALID, INVALID, INVALID, -}; - -static const uint16_t ud_itab__117[] = { - /* 0 */ INVALID, INVALID, INVALID, 1639, -}; - -static const uint16_t ud_itab__118[] = { - /* 0 */ INVALID, INVALID, INVALID, 1641, -}; - -static const uint16_t ud_itab__119[] = { - /* 0 */ INVALID, INVALID, INVALID, 1643, -}; - -static const uint16_t ud_itab__120[] = { - /* 0 */ INVALID, INVALID, INVALID, 1645, -}; - -static const uint16_t ud_itab__121[] = { - /* 0 */ INVALID, INVALID, INVALID, 1649, -}; - -static const uint16_t ud_itab__122[] = { - /* 0 */ INVALID, INVALID, INVALID, 1647, -}; - -static const uint16_t ud_itab__123[] = { - /* 0 */ INVALID, INVALID, INVALID, 1672, -}; - -static const uint16_t ud_itab__124[] = { - /* 0 */ 1613, INVALID, INVALID, 1614, -}; - -static const uint16_t ud_itab__125[] = { - /* 0 */ INVALID, INVALID, INVALID, 1041, -}; - -static const uint16_t ud_itab__126[] = { - /* 0 */ INVALID, INVALID, INVALID, 1052, -}; - -static const uint16_t ud_itab__127[] = { - /* 0 */ INVALID, INVALID, INVALID, GROUP(128), -}; - -static const uint16_t ud_itab__128[] = { - /* 0 */ 1043, 1045, 1047, -}; - -static const uint16_t ud_itab__129[] = { - /* 0 */ INVALID, INVALID, INVALID, 201, -}; - -static const uint16_t ud_itab__130[] = { - /* 0 */ INVALID, INVALID, INVALID, 1054, -}; - -static const uint16_t ud_itab__131[] = { - /* 0 */ INVALID, INVALID, INVALID, 1552, -}; - -static const uint16_t ud_itab__132[] = { - /* 0 */ INVALID, INVALID, INVALID, GROUP(133), -}; - -static const uint16_t ud_itab__133[] = { - /* 0 */ 1058, 1059, 1060, -}; - -static const uint16_t ud_itab__134[] = { - /* 0 */ INVALID, INVALID, INVALID, 197, -}; - -static const uint16_t ud_itab__135[] = { - /* 0 */ INVALID, INVALID, INVALID, 195, -}; - -static const uint16_t ud_itab__136[] = { - /* 0 */ INVALID, INVALID, INVALID, 1674, -}; - -static const uint16_t ud_itab__137[] = { - /* 0 */ INVALID, INVALID, INVALID, 1508, -}; - -static const uint16_t ud_itab__138[] = { - /* 0 */ INVALID, INVALID, INVALID, 47, -}; - -static const uint16_t ud_itab__139[] = { - /* 0 */ INVALID, INVALID, INVALID, 1710, -}; - -static const uint16_t ud_itab__140[] = { - /* 0 */ INVALID, INVALID, INVALID, 1708, -}; - -static const uint16_t ud_itab__141[] = { - /* 0 */ INVALID, INVALID, INVALID, 1716, -}; - -static const uint16_t ud_itab__142[] = { - /* 0 */ INVALID, INVALID, INVALID, 1714, -}; - -static const uint16_t ud_itab__143[] = { - /* 0 */ 896, INVALID, INVALID, 894, -}; - -static const uint16_t ud_itab__144[] = { - /* 0 */ 1383, 1387, 1389, 1385, -}; - -static const uint16_t ud_itab__145[] = { - /* 0 */ 1302, INVALID, 1304, INVALID, -}; - -static const uint16_t ud_itab__146[] = { - /* 0 */ 1287, INVALID, 1289, INVALID, -}; - -static const uint16_t ud_itab__147[] = { - /* 0 */ 61, INVALID, INVALID, 59, -}; - -static const uint16_t ud_itab__148[] = { - /* 0 */ 65, INVALID, INVALID, 63, -}; - -static const uint16_t ud_itab__149[] = { - /* 0 */ 972, INVALID, INVALID, 970, -}; - -static const uint16_t ud_itab__150[] = { - /* 0 */ 1495, INVALID, INVALID, 1493, -}; - -static const uint16_t ud_itab__151[] = { - /* 0 */ 27, 29, 31, 25, -}; - -static const uint16_t ud_itab__152[] = { - /* 0 */ 942, 944, 946, 940, -}; - -static const uint16_t ud_itab__153[] = { - /* 0 */ 145, 150, 156, 139, -}; - -static const uint16_t ud_itab__154[] = { - /* 0 */ 134, INVALID, 163, 143, -}; - -static const uint16_t ud_itab__155[] = { - /* 0 */ 1415, 1417, 1419, 1413, -}; - -static const uint16_t ud_itab__156[] = { - /* 0 */ 814, 816, 818, 812, -}; - -static const uint16_t ud_itab__157[] = { - /* 0 */ 189, 191, 193, 187, -}; - -static const uint16_t ud_itab__158[] = { - /* 0 */ 798, 800, 802, 796, -}; - -static const uint16_t ud_itab__159[] = { - /* 0 */ 1205, INVALID, INVALID, 1203, -}; - -static const uint16_t ud_itab__160[] = { - /* 0 */ 1208, INVALID, INVALID, 1206, -}; - -static const uint16_t ud_itab__161[] = { - /* 0 */ 1211, INVALID, INVALID, 1209, -}; - -static const uint16_t ud_itab__162[] = { - /* 0 */ 983, INVALID, INVALID, 981, -}; - -static const uint16_t ud_itab__163[] = { - /* 0 */ 1034, INVALID, INVALID, 1032, -}; - -static const uint16_t ud_itab__164[] = { - /* 0 */ 1037, INVALID, INVALID, 1035, -}; - -static const uint16_t ud_itab__165[] = { - /* 0 */ 1040, INVALID, INVALID, 1038, -}; - -static const uint16_t ud_itab__166[] = { - /* 0 */ 989, INVALID, INVALID, 987, -}; - -static const uint16_t ud_itab__167[] = { - /* 0 */ 1196, INVALID, INVALID, 1194, -}; - -static const uint16_t ud_itab__168[] = { - /* 0 */ 1199, INVALID, INVALID, 1197, -}; - -static const uint16_t ud_itab__169[] = { - /* 0 */ 1202, INVALID, INVALID, 1200, -}; - -static const uint16_t ud_itab__170[] = { - /* 0 */ 986, INVALID, INVALID, 984, -}; - -static const uint16_t ud_itab__171[] = { - /* 0 */ INVALID, INVALID, INVALID, 1542, -}; - -static const uint16_t ud_itab__172[] = { - /* 0 */ INVALID, INVALID, INVALID, 1540, -}; - -static const uint16_t ud_itab__173[] = { - /* 0 */ GROUP(174), INVALID, INVALID, GROUP(175), -}; - -static const uint16_t ud_itab__174[] = { - /* 0 */ 862, 863, 906, -}; - -static const uint16_t ud_itab__175[] = { - /* 0 */ 864, 866, 907, -}; - -static const uint16_t ud_itab__176[] = { - /* 0 */ 916, INVALID, 1518, 1513, -}; - -static const uint16_t ud_itab__177[] = { - /* 0 */ 1130, 1532, 1530, 1534, -}; - -static const uint16_t ud_itab__178[] = { - /* 0 */ INVALID, INVALID, GROUP(179), INVALID, - /* 4 */ GROUP(180), INVALID, GROUP(181), INVALID, -}; - -static const uint16_t ud_itab__179[] = { - /* 0 */ 1155, INVALID, INVALID, 1159, -}; - -static const uint16_t ud_itab__180[] = { - /* 0 */ 1148, INVALID, INVALID, 1146, -}; - -static const uint16_t ud_itab__181[] = { - /* 0 */ 1134, INVALID, INVALID, 1133, -}; - -static const uint16_t ud_itab__182[] = { - /* 0 */ INVALID, INVALID, GROUP(183), INVALID, - /* 4 */ GROUP(184), INVALID, GROUP(185), INVALID, -}; - -static const uint16_t ud_itab__183[] = { - /* 0 */ 1161, INVALID, INVALID, 1165, -}; - -static const uint16_t ud_itab__184[] = { - /* 0 */ 1149, INVALID, INVALID, 1153, -}; - -static const uint16_t ud_itab__185[] = { - /* 0 */ 1138, INVALID, INVALID, 1137, -}; - -static const uint16_t ud_itab__186[] = { - /* 0 */ INVALID, INVALID, GROUP(187), GROUP(188), - /* 4 */ INVALID, INVALID, GROUP(189), GROUP(190), -}; - -static const uint16_t ud_itab__187[] = { - /* 0 */ 1167, INVALID, INVALID, 1171, -}; - -static const uint16_t ud_itab__188[] = { - /* 0 */ INVALID, INVALID, INVALID, 1538, -}; - -static const uint16_t ud_itab__189[] = { - /* 0 */ 1142, INVALID, INVALID, 1141, -}; - -static const uint16_t ud_itab__190[] = { - /* 0 */ INVALID, INVALID, INVALID, 1536, -}; - -static const uint16_t ud_itab__191[] = { - /* 0 */ 1023, INVALID, INVALID, 1024, -}; - -static const uint16_t ud_itab__192[] = { - /* 0 */ 1026, INVALID, INVALID, 1027, -}; - -static const uint16_t ud_itab__193[] = { - /* 0 */ 1029, INVALID, INVALID, 1030, -}; - -static const uint16_t ud_itab__194[] = { - /* 0 */ INVALID, 1460, INVALID, -}; - -static const uint16_t ud_itab__195[] = { - /* 0 */ INVALID, 1461, INVALID, -}; - -static const uint16_t ud_itab__196[] = { - /* 0 */ INVALID, 1546, INVALID, 1544, -}; - -static const uint16_t ud_itab__197[] = { - /* 0 */ INVALID, 1550, INVALID, 1548, -}; - -static const uint16_t ud_itab__198[] = { - /* 0 */ GROUP(199), INVALID, 912, GROUP(200), -}; - -static const uint16_t ud_itab__199[] = { - /* 0 */ 868, 869, 909, -}; - -static const uint16_t ud_itab__200[] = { - /* 0 */ 870, 872, 910, -}; - -static const uint16_t ud_itab__201[] = { - /* 0 */ 917, INVALID, 1520, 1511, -}; - -static const uint16_t ud_itab__202[] = { - /* 0 */ INVALID, GROUP(203), -}; - -static const uint16_t ud_itab__203[] = { - /* 0 */ GROUP(204), GROUP(205), GROUP(206), INVALID, - /* 4 */ INVALID, INVALID, INVALID, INVALID, -}; - -static const uint16_t ud_itab__204[] = { - /* 0 */ 821, INVALID, INVALID, INVALID, - /* 4 */ INVALID, INVALID, INVALID, INVALID, -}; - -static const uint16_t ud_itab__205[] = { - /* 0 */ 1505, INVALID, INVALID, INVALID, - /* 4 */ INVALID, INVALID, INVALID, INVALID, -}; - -static const uint16_t ud_itab__206[] = { - /* 0 */ 1506, INVALID, INVALID, INVALID, - /* 4 */ INVALID, INVALID, INVALID, INVALID, -}; - -static const uint16_t ud_itab__207[] = { - /* 0 */ INVALID, GROUP(208), -}; - -static const uint16_t ud_itab__208[] = { - /* 0 */ GROUP(209), GROUP(210), GROUP(211), GROUP(212), - /* 4 */ GROUP(213), GROUP(214), INVALID, INVALID, -}; - -static const uint16_t ud_itab__209[] = { - /* 0 */ 1507, INVALID, INVALID, INVALID, - /* 4 */ INVALID, INVALID, INVALID, INVALID, -}; - -static const uint16_t ud_itab__210[] = { - /* 0 */ 1497, INVALID, INVALID, INVALID, - /* 4 */ INVALID, INVALID, INVALID, INVALID, -}; - -static const uint16_t ud_itab__211[] = { - /* 0 */ 1498, INVALID, INVALID, INVALID, - /* 4 */ INVALID, INVALID, INVALID, INVALID, -}; - -static const uint16_t ud_itab__212[] = { - /* 0 */ 1499, INVALID, INVALID, INVALID, - /* 4 */ INVALID, INVALID, INVALID, INVALID, -}; - -static const uint16_t ud_itab__213[] = { - /* 0 */ 1500, INVALID, INVALID, INVALID, - /* 4 */ INVALID, INVALID, INVALID, INVALID, -}; - -static const uint16_t ud_itab__214[] = { - /* 0 */ 1501, INVALID, INVALID, INVALID, - /* 4 */ INVALID, INVALID, INVALID, INVALID, -}; - -static const uint16_t ud_itab__215[] = { - /* 0 */ GROUP(216), GROUP(217), -}; - -static const uint16_t ud_itab__216[] = { - /* 0 */ 679, 678, 764, 1396, - /* 4 */ 1503, 1502, INVALID, 79, -}; - -static const uint16_t ud_itab__217[] = { - /* 0 */ INVALID, INVALID, INVALID, INVALID, - /* 4 */ INVALID, GROUP(218), GROUP(219), GROUP(220), -}; - -static const uint16_t ud_itab__218[] = { - /* 0 */ 773, 774, 775, 776, - /* 4 */ 777, 778, 779, 780, -}; - -static const uint16_t ud_itab__219[] = { - /* 0 */ 804, 805, 806, 807, - /* 4 */ 808, 809, 810, 811, -}; - -static const uint16_t ud_itab__220[] = { - /* 0 */ 1362, 1363, 1364, 1365, - /* 4 */ 1366, 1367, 1368, 1369, -}; - -static const uint16_t ud_itab__221[] = { - /* 0 */ INVALID, INVALID, 1705, INVALID, -}; - -static const uint16_t ud_itab__222[] = { - /* 0 */ INVALID, INVALID, INVALID, INVALID, - /* 4 */ 1664, 1671, 1669, 1667, -}; - -static const uint16_t ud_itab__223[] = { - /* 0 */ 112, 117, 120, 110, -}; - -static const uint16_t ud_itab__224[] = { - /* 0 */ 1055, INVALID, INVALID, 1056, -}; - -static const uint16_t ud_itab__225[] = { - /* 0 */ 1051, INVALID, INVALID, 1049, -}; - -static const uint16_t ud_itab__226[] = { - /* 0 */ 1377, INVALID, INVALID, 1375, -}; - -static const uint16_t ud_itab__227[] = { - /* 0 */ GROUP(228), GROUP(235), -}; - -static const uint16_t ud_itab__228[] = { - /* 0 */ INVALID, GROUP(229), INVALID, INVALID, - /* 4 */ INVALID, INVALID, GROUP(230), GROUP(234), -}; - -static const uint16_t ud_itab__229[] = { - /* 0 */ 124, 125, 126, -}; - -static const uint16_t ud_itab__230[] = { - /* 0 */ GROUP(231), INVALID, GROUP(232), GROUP(233), -}; - -static const uint16_t ud_itab__231[] = { - /* 0 */ INVALID, 1455, INVALID, -}; - -static const uint16_t ud_itab__232[] = { - /* 0 */ INVALID, 1454, INVALID, -}; - -static const uint16_t ud_itab__233[] = { - /* 0 */ INVALID, 1453, INVALID, -}; - -static const uint16_t ud_itab__234[] = { - /* 0 */ INVALID, 1456, INVALID, -}; - -static const uint16_t ud_itab__235[] = { - /* 0 */ INVALID, INVALID, INVALID, INVALID, - /* 4 */ INVALID, INVALID, 1452, INVALID, -}; - -static const uint16_t ud_itab__236[] = { - /* 0 */ INVALID, 35, INVALID, 33, -}; - -static const uint16_t ud_itab__237[] = { - /* 0 */ 1156, INVALID, INVALID, 1157, -}; - -static const uint16_t ud_itab__238[] = { - /* 0 */ 1162, INVALID, INVALID, 1163, -}; - -static const uint16_t ud_itab__239[] = { - /* 0 */ 1168, INVALID, INVALID, 1169, -}; - -static const uint16_t ud_itab__240[] = { - /* 0 */ 1522, INVALID, INVALID, 1523, -}; - -static const uint16_t ud_itab__241[] = { - /* 0 */ 1089, INVALID, INVALID, 1090, -}; - -static const uint16_t ud_itab__242[] = { - /* 0 */ INVALID, 1517, 1521, 914, -}; - -static const uint16_t ud_itab__243[] = { - /* 0 */ 1082, INVALID, INVALID, 1080, -}; - -static const uint16_t ud_itab__244[] = { - /* 0 */ 1188, INVALID, INVALID, 1189, -}; - -static const uint16_t ud_itab__245[] = { - /* 0 */ 1191, INVALID, INVALID, 1192, -}; - -static const uint16_t ud_itab__246[] = { - /* 0 */ 1079, INVALID, INVALID, 1077, -}; - -static const uint16_t ud_itab__247[] = { - /* 0 */ 1013, INVALID, INVALID, 1011, -}; - -static const uint16_t ud_itab__248[] = { - /* 0 */ 1005, INVALID, INVALID, 1006, -}; - -static const uint16_t ud_itab__249[] = { - /* 0 */ 1008, INVALID, INVALID, 1009, -}; - -static const uint16_t ud_itab__250[] = { - /* 0 */ 1071, INVALID, INVALID, 1072, -}; - -static const uint16_t ud_itab__251[] = { - /* 0 */ 1016, INVALID, INVALID, 1014, -}; - -static const uint16_t ud_itab__252[] = { - /* 0 */ 1019, INVALID, INVALID, 1017, -}; - -static const uint16_t ud_itab__253[] = { - /* 0 */ 1143, INVALID, INVALID, 1144, -}; - -static const uint16_t ud_itab__254[] = { - /* 0 */ 1152, INVALID, INVALID, 1150, -}; - -static const uint16_t ud_itab__255[] = { - /* 0 */ 1022, INVALID, INVALID, 1020, -}; - -static const uint16_t ud_itab__256[] = { - /* 0 */ 1083, INVALID, INVALID, 1084, -}; - -static const uint16_t ud_itab__257[] = { - /* 0 */ 1088, INVALID, INVALID, 1086, -}; - -static const uint16_t ud_itab__258[] = { - /* 0 */ INVALID, 136, 132, 160, -}; - -static const uint16_t ud_itab__259[] = { - /* 0 */ 905, INVALID, INVALID, 898, -}; - -static const uint16_t ud_itab__260[] = { - /* 0 */ 1182, INVALID, INVALID, 1183, -}; - -static const uint16_t ud_itab__261[] = { - /* 0 */ 1185, INVALID, INVALID, 1186, -}; - -static const uint16_t ud_itab__262[] = { - /* 0 */ 1076, INVALID, INVALID, 1074, -}; - -static const uint16_t ud_itab__263[] = { - /* 0 */ 1114, INVALID, INVALID, 1112, -}; - -static const uint16_t ud_itab__264[] = { - /* 0 */ 999, INVALID, INVALID, 1000, -}; - -static const uint16_t ud_itab__265[] = { - /* 0 */ 1002, INVALID, INVALID, 1003, -}; - -static const uint16_t ud_itab__266[] = { - /* 0 */ 1070, INVALID, INVALID, 1068, -}; - -static const uint16_t ud_itab__267[] = { - /* 0 */ 1262, INVALID, INVALID, 1260, -}; - -static const uint16_t ud_itab__268[] = { - /* 0 */ INVALID, 1554, INVALID, INVALID, -}; - -static const uint16_t ud_itab__269[] = { - /* 0 */ 1132, INVALID, INVALID, 1131, -}; - -static const uint16_t ud_itab__270[] = { - /* 0 */ 1136, INVALID, INVALID, 1135, -}; - -static const uint16_t ud_itab__271[] = { - /* 0 */ 1140, INVALID, INVALID, 1139, -}; - -static const uint16_t ud_itab__272[] = { - /* 0 */ 1528, INVALID, INVALID, 1529, -}; - -static const uint16_t ud_itab__273[] = { - /* 0 */ 1065, INVALID, INVALID, 1066, -}; - -static const uint16_t ud_itab__274[] = { - /* 0 */ 1129, INVALID, INVALID, 1127, -}; - -static const uint16_t ud_itab__275[] = { - /* 0 */ INVALID, GROUP(276), -}; - -static const uint16_t ud_itab__276[] = { - /* 0 */ 795, INVALID, INVALID, 1515, -}; - -static const uint16_t ud_itab__277[] = { - /* 0 */ 1175, INVALID, INVALID, 1173, -}; - -static const uint16_t ud_itab__278[] = { - /* 0 */ 1178, INVALID, INVALID, 1176, -}; - -static const uint16_t ud_itab__279[] = { - /* 0 */ 1179, INVALID, INVALID, 1180, -}; - -static const uint16_t ud_itab__280[] = { - /* 0 */ 1527, INVALID, INVALID, 1525, -}; - -static const uint16_t ud_itab__281[] = { - /* 0 */ 992, INVALID, INVALID, 990, -}; - -static const uint16_t ud_itab__282[] = { - /* 0 */ 993, INVALID, INVALID, 994, -}; - -static const uint16_t ud_itab__283[] = { - /* 0 */ 996, INVALID, INVALID, 997, -}; - -static const uint16_t ud_itab__284[] = { - /* 0 */ 1238, INVALID, -}; - -static const uint16_t ud_itab__285[] = { - /* 0 */ 1093, INVALID, -}; - -static const uint16_t ud_itab__286[] = { - /* 0 */ 1239, INVALID, -}; - -static const uint16_t ud_itab__287[] = { - /* 0 */ 1094, INVALID, -}; - -static const uint16_t ud_itab__288[] = { - /* 0 */ 173, INVALID, -}; - -static const uint16_t ud_itab__289[] = { - /* 0 */ 174, INVALID, -}; - -static const uint16_t ud_itab__290[] = { - /* 0 */ 1, INVALID, -}; - -static const uint16_t ud_itab__291[] = { - /* 0 */ 4, INVALID, -}; - -static const uint16_t ud_itab__292[] = { - /* 0 */ GROUP(293), GROUP(294), INVALID, -}; - -static const uint16_t ud_itab__293[] = { - /* 0 */ 1253, INVALID, -}; - -static const uint16_t ud_itab__294[] = { - /* 0 */ 1254, INVALID, -}; - -static const uint16_t ud_itab__295[] = { - /* 0 */ GROUP(296), GROUP(297), INVALID, -}; - -static const uint16_t ud_itab__296[] = { - /* 0 */ 1106, INVALID, -}; - -static const uint16_t ud_itab__297[] = { - /* 0 */ 1107, INVALID, -}; - -static const uint16_t ud_itab__298[] = { - /* 0 */ 1653, INVALID, -}; - -static const uint16_t ud_itab__299[] = { - /* 0 */ 67, 68, -}; - -static const uint16_t ud_itab__300[] = { - /* 0 */ 706, 707, INVALID, -}; - -static const uint16_t ud_itab__301[] = { - /* 0 */ 979, 980, INVALID, -}; - -static const uint16_t ud_itab__302[] = { - /* 0 */ 21, 966, 11, 1338, - /* 4 */ 55, 1409, 1489, 106, -}; - -static const uint16_t ud_itab__303[] = { - /* 0 */ 23, 967, 13, 1339, - /* 4 */ 57, 1410, 1490, 108, -}; - -static const uint16_t ud_itab__304[] = { - /* 0 */ GROUP(305), GROUP(306), GROUP(307), GROUP(308), - /* 4 */ GROUP(309), GROUP(310), GROUP(311), GROUP(312), -}; - -static const uint16_t ud_itab__305[] = { - /* 0 */ 22, INVALID, -}; - -static const uint16_t ud_itab__306[] = { - /* 0 */ 968, INVALID, -}; - -static const uint16_t ud_itab__307[] = { - /* 0 */ 12, INVALID, -}; - -static const uint16_t ud_itab__308[] = { - /* 0 */ 1340, INVALID, -}; - -static const uint16_t ud_itab__309[] = { - /* 0 */ 56, INVALID, -}; - -static const uint16_t ud_itab__310[] = { - /* 0 */ 1411, INVALID, -}; - -static const uint16_t ud_itab__311[] = { - /* 0 */ 1491, INVALID, -}; - -static const uint16_t ud_itab__312[] = { - /* 0 */ 107, INVALID, -}; - -static const uint16_t ud_itab__313[] = { - /* 0 */ 24, 969, 14, 1341, - /* 4 */ 58, 1412, 1492, 109, -}; - -static const uint16_t ud_itab__314[] = { - /* 0 */ 1105, INVALID, INVALID, INVALID, - /* 4 */ INVALID, INVALID, INVALID, INVALID, -}; - -static const uint16_t ud_itab__315[] = { - /* 0 */ 74, 75, 76, -}; - -static const uint16_t ud_itab__316[] = { - /* 0 */ 170, 171, 172, -}; - -static const uint16_t ud_itab__317[] = { - /* 0 */ 73, INVALID, -}; - -static const uint16_t ud_itab__318[] = { - /* 0 */ GROUP(319), GROUP(320), GROUP(321), -}; - -static const uint16_t ud_itab__319[] = { - /* 0 */ 1255, 1256, -}; - -static const uint16_t ud_itab__320[] = { - /* 0 */ 1257, 1258, -}; - -static const uint16_t ud_itab__321[] = { - /* 0 */ INVALID, 1259, -}; - -static const uint16_t ud_itab__322[] = { - /* 0 */ GROUP(323), GROUP(324), GROUP(325), -}; - -static const uint16_t ud_itab__323[] = { - /* 0 */ 1108, INVALID, -}; - -static const uint16_t ud_itab__324[] = { - /* 0 */ 1109, 1110, -}; - -static const uint16_t ud_itab__325[] = { - /* 0 */ INVALID, 1111, -}; - -static const uint16_t ud_itab__326[] = { - /* 0 */ 919, 920, 923, -}; - -static const uint16_t ud_itab__327[] = { - /* 0 */ 115, 116, 119, -}; - -static const uint16_t ud_itab__328[] = { - /* 0 */ 1399, 1400, 1401, -}; - -static const uint16_t ud_itab__329[] = { - /* 0 */ 787, 788, 789, -}; - -static const uint16_t ud_itab__330[] = { - /* 0 */ 1343, 1344, 1345, -}; - -static const uint16_t ud_itab__331[] = { - /* 0 */ 1275, 1282, 1263, 1271, - /* 4 */ 1323, 1330, 1314, 1309, -}; - -static const uint16_t ud_itab__332[] = { - /* 0 */ 1280, 1283, 1264, 1270, - /* 4 */ 1319, 1326, 1315, 1311, -}; - -static const uint16_t ud_itab__333[] = { - /* 0 */ GROUP(334), GROUP(335), INVALID, INVALID, - /* 4 */ INVALID, GROUP(341), GROUP(357), GROUP(369), - /* 8 */ INVALID, GROUP(394), INVALID, INVALID, - /* c */ INVALID, GROUP(399), INVALID, INVALID, -}; - -static const uint16_t ud_itab__334[] = { - /* 0 */ 767, INVALID, -}; - -static const uint16_t ud_itab__335[] = { - /* 0 */ INVALID, INVALID, INVALID, INVALID, - /* 4 */ INVALID, INVALID, INVALID, INVALID, - /* 8 */ INVALID, INVALID, INVALID, INVALID, - /* c */ INVALID, INVALID, INVALID, INVALID, - /* 10 */ 933, 935, GROUP(336), 891, - /* 14 */ 1446, 1444, GROUP(337), 881, - /* 18 */ INVALID, INVALID, INVALID, INVALID, - /* 1c */ INVALID, INVALID, INVALID, INVALID, - /* 20 */ INVALID, INVALID, INVALID, INVALID, - /* 24 */ INVALID, INVALID, INVALID, INVALID, - /* 28 */ 859, 861, INVALID, 904, - /* 2c */ INVALID, INVALID, 1439, 130, - /* 30 */ INVALID, INVALID, INVALID, INVALID, - /* 34 */ INVALID, INVALID, INVALID, INVALID, - /* 38 */ INVALID, INVALID, INVALID, INVALID, - /* 3c */ INVALID, INVALID, INVALID, INVALID, - /* 40 */ INVALID, INVALID, INVALID, INVALID, - /* 44 */ INVALID, INVALID, INVALID, INVALID, - /* 48 */ INVALID, INVALID, INVALID, INVALID, - /* 4c */ INVALID, INVALID, INVALID, INVALID, - /* 50 */ 897, 1384, 1303, 1288, - /* 54 */ 62, 66, 973, 1496, - /* 58 */ 28, 943, 146, 135, - /* 5c */ 1416, 815, 190, 799, - /* 60 */ INVALID, INVALID, INVALID, INVALID, - /* 64 */ INVALID, INVALID, INVALID, INVALID, - /* 68 */ INVALID, INVALID, INVALID, INVALID, - /* 6c */ INVALID, INVALID, INVALID, INVALID, - /* 70 */ INVALID, INVALID, INVALID, INVALID, - /* 74 */ INVALID, INVALID, INVALID, GROUP(340), - /* 78 */ INVALID, INVALID, INVALID, INVALID, - /* 7c */ INVALID, INVALID, INVALID, INVALID, - /* 80 */ INVALID, INVALID, INVALID, INVALID, - /* 84 */ INVALID, INVALID, INVALID, INVALID, - /* 88 */ INVALID, INVALID, INVALID, INVALID, - /* 8c */ INVALID, INVALID, INVALID, INVALID, - /* 90 */ INVALID, INVALID, INVALID, INVALID, - /* 94 */ INVALID, INVALID, INVALID, INVALID, - /* 98 */ INVALID, INVALID, INVALID, INVALID, - /* 9c */ INVALID, INVALID, INVALID, INVALID, - /* a0 */ INVALID, INVALID, INVALID, INVALID, - /* a4 */ INVALID, INVALID, INVALID, INVALID, - /* a8 */ INVALID, INVALID, INVALID, INVALID, - /* ac */ INVALID, INVALID, GROUP(338), INVALID, - /* b0 */ INVALID, INVALID, INVALID, INVALID, - /* b4 */ INVALID, INVALID, INVALID, INVALID, - /* b8 */ INVALID, INVALID, INVALID, INVALID, - /* bc */ INVALID, INVALID, INVALID, INVALID, - /* c0 */ INVALID, INVALID, 113, INVALID, - /* c4 */ INVALID, INVALID, 1378, INVALID, - /* c8 */ INVALID, INVALID, INVALID, INVALID, - /* cc */ INVALID, INVALID, INVALID, INVALID, - /* d0 */ INVALID, INVALID, INVALID, INVALID, - /* d4 */ INVALID, INVALID, INVALID, INVALID, - /* d8 */ INVALID, INVALID, INVALID, INVALID, - /* dc */ INVALID, INVALID, INVALID, INVALID, - /* e0 */ INVALID, INVALID, INVALID, INVALID, - /* e4 */ INVALID, INVALID, INVALID, INVALID, - /* e8 */ INVALID, INVALID, INVALID, INVALID, - /* ec */ INVALID, INVALID, INVALID, INVALID, - /* f0 */ INVALID, INVALID, INVALID, INVALID, - /* f4 */ INVALID, INVALID, INVALID, INVALID, - /* f8 */ INVALID, INVALID, INVALID, INVALID, - /* fc */ INVALID, INVALID, INVALID, INVALID, -}; - -static const uint16_t ud_itab__336[] = { - /* 0 */ 889, 893, -}; - -static const uint16_t ud_itab__337[] = { - /* 0 */ 879, 883, -}; - -static const uint16_t ud_itab__338[] = { - /* 0 */ GROUP(339), INVALID, -}; - -static const uint16_t ud_itab__339[] = { - /* 0 */ INVALID, INVALID, INVALID, 1397, - /* 4 */ INVALID, INVALID, INVALID, INVALID, -}; - -static const uint16_t ud_itab__340[] = { - /* 0 */ 1737, 1738, -}; - -static const uint16_t ud_itab__341[] = { - /* 0 */ INVALID, INVALID, INVALID, INVALID, - /* 4 */ INVALID, INVALID, INVALID, INVALID, - /* 8 */ INVALID, INVALID, INVALID, INVALID, - /* c */ INVALID, INVALID, INVALID, INVALID, - /* 10 */ 929, 931, GROUP(342), 887, - /* 14 */ 1448, 1442, GROUP(343), 877, - /* 18 */ INVALID, INVALID, INVALID, INVALID, - /* 1c */ INVALID, INVALID, INVALID, INVALID, - /* 20 */ INVALID, INVALID, INVALID, INVALID, - /* 24 */ INVALID, INVALID, INVALID, INVALID, - /* 28 */ 855, 857, INVALID, 902, - /* 2c */ INVALID, INVALID, 1437, 128, - /* 30 */ INVALID, INVALID, INVALID, INVALID, - /* 34 */ INVALID, INVALID, INVALID, INVALID, - /* 38 */ INVALID, INVALID, INVALID, INVALID, - /* 3c */ INVALID, INVALID, INVALID, INVALID, - /* 40 */ INVALID, INVALID, INVALID, INVALID, - /* 44 */ INVALID, INVALID, INVALID, INVALID, - /* 48 */ INVALID, INVALID, INVALID, INVALID, - /* 4c */ INVALID, INVALID, INVALID, INVALID, - /* 50 */ 895, 1386, INVALID, INVALID, - /* 54 */ 60, 64, 971, 1494, - /* 58 */ 26, 941, 140, 144, - /* 5c */ 1414, 813, 188, 797, - /* 60 */ 1204, 1207, 1210, 982, - /* 64 */ 1033, 1036, 1039, 988, - /* 68 */ 1195, 1198, 1201, 985, - /* 6c */ 1543, 1541, GROUP(344), 1514, - /* 70 */ 1535, GROUP(345), GROUP(347), GROUP(349), - /* 74 */ 1025, 1028, 1031, INVALID, - /* 78 */ INVALID, INVALID, INVALID, INVALID, - /* 7c */ 1545, 1549, GROUP(351), 1512, - /* 80 */ INVALID, INVALID, INVALID, INVALID, - /* 84 */ INVALID, INVALID, INVALID, INVALID, - /* 88 */ INVALID, INVALID, INVALID, INVALID, - /* 8c */ INVALID, INVALID, INVALID, INVALID, - /* 90 */ INVALID, INVALID, INVALID, INVALID, - /* 94 */ INVALID, INVALID, INVALID, INVALID, - /* 98 */ INVALID, INVALID, INVALID, INVALID, - /* 9c */ INVALID, INVALID, INVALID, INVALID, - /* a0 */ INVALID, INVALID, INVALID, INVALID, - /* a4 */ INVALID, INVALID, INVALID, INVALID, - /* a8 */ INVALID, INVALID, INVALID, INVALID, - /* ac */ INVALID, INVALID, INVALID, INVALID, - /* b0 */ INVALID, INVALID, INVALID, INVALID, - /* b4 */ INVALID, INVALID, INVALID, INVALID, - /* b8 */ INVALID, INVALID, INVALID, INVALID, - /* bc */ INVALID, INVALID, INVALID, INVALID, - /* c0 */ INVALID, INVALID, 111, INVALID, - /* c4 */ 1057, 1050, 1376, INVALID, - /* c8 */ INVALID, INVALID, INVALID, INVALID, - /* cc */ INVALID, INVALID, INVALID, INVALID, - /* d0 */ 34, 1158, 1164, 1170, - /* d4 */ 1524, 1091, 915, GROUP(352), - /* d8 */ 1190, 1193, 1078, 1012, - /* dc */ 1007, 1010, 1073, 1015, - /* e0 */ 1018, 1145, 1151, 1021, - /* e4 */ 1085, 1087, 161, 899, - /* e8 */ 1184, 1187, 1075, 1113, - /* ec */ 1001, 1004, 1069, 1261, - /* f0 */ INVALID, GROUP(353), GROUP(354), GROUP(355), - /* f4 */ INVALID, 1067, 1128, GROUP(356), - /* f8 */ 1174, 1177, 1181, 1526, - /* fc */ 991, 995, 998, INVALID, -}; - -static const uint16_t ud_itab__342[] = { - /* 0 */ 885, INVALID, -}; - -static const uint16_t ud_itab__343[] = { - /* 0 */ 875, INVALID, -}; - -static const uint16_t ud_itab__344[] = { - /* 0 */ 865, 867, 908, -}; - -static const uint16_t ud_itab__345[] = { - /* 0 */ INVALID, INVALID, 1160, INVALID, - /* 4 */ 1147, INVALID, GROUP(346), INVALID, -}; - -static const uint16_t ud_itab__346[] = { - /* 0 */ 1751, INVALID, -}; - -static const uint16_t ud_itab__347[] = { - /* 0 */ INVALID, INVALID, 1166, INVALID, - /* 4 */ 1154, INVALID, GROUP(348), INVALID, -}; - -static const uint16_t ud_itab__348[] = { - /* 0 */ 1753, INVALID, -}; - -static const uint16_t ud_itab__349[] = { - /* 0 */ INVALID, INVALID, 1172, 1539, - /* 4 */ INVALID, INVALID, GROUP(350), 1537, -}; - -static const uint16_t ud_itab__350[] = { - /* 0 */ 1755, INVALID, -}; - -static const uint16_t ud_itab__351[] = { - /* 0 */ 871, 873, 911, -}; - -static const uint16_t ud_itab__352[] = { - /* 0 */ 1081, INVALID, -}; - -static const uint16_t ud_itab__353[] = { - /* 0 */ 1750, INVALID, -}; - -static const uint16_t ud_itab__354[] = { - /* 0 */ 1752, INVALID, -}; - -static const uint16_t ud_itab__355[] = { - /* 0 */ 1754, INVALID, -}; - -static const uint16_t ud_itab__356[] = { - /* 0 */ INVALID, 1516, -}; - -static const uint16_t ud_itab__357[] = { - /* 0 */ 1579, 1582, 1585, 1588, - /* 4 */ 1591, 1594, 1597, 1600, - /* 8 */ 1603, 1609, 1606, 1612, - /* c */ GROUP(358), GROUP(359), GROUP(360), GROUP(361), - /* 10 */ INVALID, INVALID, INVALID, INVALID, - /* 14 */ INVALID, INVALID, INVALID, 1707, - /* 18 */ GROUP(362), GROUP(363), INVALID, INVALID, - /* 1c */ 1570, 1573, 1576, INVALID, - /* 20 */ 1681, 1683, 1685, 1687, - /* 24 */ 1689, INVALID, INVALID, INVALID, - /* 28 */ 1618, 1704, 1677, 1679, - /* 2c */ GROUP(365), GROUP(366), GROUP(367), GROUP(368), - /* 30 */ 1692, 1694, 1696, 1698, - /* 34 */ 1700, 1702, INVALID, 1713, - /* 38 */ 1620, 1622, 1624, 1626, - /* 3c */ 1628, 1630, 1634, 1632, - /* 40 */ 1636, 1638, INVALID, INVALID, - /* 44 */ INVALID, INVALID, INVALID, INVALID, - /* 48 */ INVALID, INVALID, INVALID, INVALID, - /* 4c */ INVALID, INVALID, INVALID, INVALID, - /* 50 */ INVALID, INVALID, INVALID, INVALID, - /* 54 */ INVALID, INVALID, INVALID, INVALID, - /* 58 */ INVALID, INVALID, INVALID, INVALID, - /* 5c */ INVALID, INVALID, INVALID, INVALID, - /* 60 */ INVALID, INVALID, INVALID, INVALID, - /* 64 */ INVALID, INVALID, INVALID, INVALID, - /* 68 */ INVALID, INVALID, INVALID, INVALID, - /* 6c */ INVALID, INVALID, INVALID, INVALID, - /* 70 */ INVALID, INVALID, INVALID, INVALID, - /* 74 */ INVALID, INVALID, INVALID, INVALID, - /* 78 */ INVALID, INVALID, INVALID, INVALID, - /* 7c */ INVALID, INVALID, INVALID, INVALID, - /* 80 */ INVALID, INVALID, INVALID, INVALID, - /* 84 */ INVALID, INVALID, INVALID, INVALID, - /* 88 */ INVALID, INVALID, INVALID, INVALID, - /* 8c */ INVALID, INVALID, INVALID, INVALID, - /* 90 */ INVALID, INVALID, INVALID, INVALID, - /* 94 */ INVALID, INVALID, INVALID, INVALID, - /* 98 */ INVALID, INVALID, INVALID, INVALID, - /* 9c */ INVALID, INVALID, INVALID, INVALID, - /* a0 */ INVALID, INVALID, INVALID, INVALID, - /* a4 */ INVALID, INVALID, INVALID, INVALID, - /* a8 */ INVALID, INVALID, INVALID, INVALID, - /* ac */ INVALID, INVALID, INVALID, INVALID, - /* b0 */ INVALID, INVALID, INVALID, INVALID, - /* b4 */ INVALID, INVALID, INVALID, INVALID, - /* b8 */ INVALID, INVALID, INVALID, INVALID, - /* bc */ INVALID, INVALID, INVALID, INVALID, - /* c0 */ INVALID, INVALID, INVALID, INVALID, - /* c4 */ INVALID, INVALID, INVALID, INVALID, - /* c8 */ INVALID, INVALID, INVALID, INVALID, - /* cc */ INVALID, INVALID, INVALID, INVALID, - /* d0 */ INVALID, INVALID, INVALID, INVALID, - /* d4 */ INVALID, INVALID, INVALID, INVALID, - /* d8 */ INVALID, INVALID, INVALID, 46, - /* dc */ 42, 44, 38, 40, - /* e0 */ INVALID, INVALID, INVALID, INVALID, - /* e4 */ INVALID, INVALID, INVALID, INVALID, - /* e8 */ INVALID, INVALID, INVALID, INVALID, - /* ec */ INVALID, INVALID, INVALID, INVALID, - /* f0 */ INVALID, INVALID, INVALID, INVALID, - /* f4 */ INVALID, INVALID, INVALID, INVALID, - /* f8 */ INVALID, INVALID, INVALID, INVALID, - /* fc */ INVALID, INVALID, INVALID, INVALID, -}; - -static const uint16_t ud_itab__358[] = { - /* 0 */ 1732, INVALID, -}; - -static const uint16_t ud_itab__359[] = { - /* 0 */ 1730, INVALID, -}; - -static const uint16_t ud_itab__360[] = { - /* 0 */ 1735, INVALID, -}; - -static const uint16_t ud_itab__361[] = { - /* 0 */ 1736, INVALID, -}; - -static const uint16_t ud_itab__362[] = { - /* 0 */ 1722, INVALID, -}; - -static const uint16_t ud_itab__363[] = { - /* 0 */ GROUP(364), INVALID, -}; - -static const uint16_t ud_itab__364[] = { - /* 0 */ INVALID, 1723, -}; - -static const uint16_t ud_itab__365[] = { - /* 0 */ 1726, INVALID, -}; - -static const uint16_t ud_itab__366[] = { - /* 0 */ 1728, INVALID, -}; - -static const uint16_t ud_itab__367[] = { - /* 0 */ 1727, INVALID, -}; - -static const uint16_t ud_itab__368[] = { - /* 0 */ 1729, INVALID, -}; - -static const uint16_t ud_itab__369[] = { - /* 0 */ INVALID, INVALID, INVALID, INVALID, - /* 4 */ GROUP(370), GROUP(371), GROUP(372), INVALID, - /* 8 */ 1640, 1642, 1644, 1646, - /* c */ 1650, 1648, 1673, 1615, - /* 10 */ INVALID, INVALID, INVALID, INVALID, - /* 14 */ GROUP(374), 1053, GROUP(375), 202, - /* 18 */ GROUP(379), GROUP(381), INVALID, INVALID, - /* 1c */ INVALID, INVALID, INVALID, INVALID, - /* 20 */ GROUP(383), 1553, GROUP(385), INVALID, - /* 24 */ INVALID, INVALID, INVALID, INVALID, - /* 28 */ INVALID, INVALID, INVALID, INVALID, - /* 2c */ INVALID, INVALID, INVALID, INVALID, - /* 30 */ INVALID, INVALID, INVALID, INVALID, - /* 34 */ INVALID, INVALID, INVALID, INVALID, - /* 38 */ INVALID, INVALID, INVALID, INVALID, - /* 3c */ INVALID, INVALID, INVALID, INVALID, - /* 40 */ 198, 196, 1675, INVALID, - /* 44 */ 1509, INVALID, INVALID, INVALID, - /* 48 */ INVALID, INVALID, GROUP(391), GROUP(392), - /* 4c */ GROUP(393), INVALID, INVALID, INVALID, - /* 50 */ INVALID, INVALID, INVALID, INVALID, - /* 54 */ INVALID, INVALID, INVALID, INVALID, - /* 58 */ INVALID, INVALID, INVALID, INVALID, - /* 5c */ INVALID, INVALID, INVALID, INVALID, - /* 60 */ 1711, 1709, 1717, 1715, - /* 64 */ INVALID, INVALID, INVALID, INVALID, - /* 68 */ INVALID, INVALID, INVALID, INVALID, - /* 6c */ INVALID, INVALID, INVALID, INVALID, - /* 70 */ INVALID, INVALID, INVALID, INVALID, - /* 74 */ INVALID, INVALID, INVALID, INVALID, - /* 78 */ INVALID, INVALID, INVALID, INVALID, - /* 7c */ INVALID, INVALID, INVALID, INVALID, - /* 80 */ INVALID, INVALID, INVALID, INVALID, - /* 84 */ INVALID, INVALID, INVALID, INVALID, - /* 88 */ INVALID, INVALID, INVALID, INVALID, - /* 8c */ INVALID, INVALID, INVALID, INVALID, - /* 90 */ INVALID, INVALID, INVALID, INVALID, - /* 94 */ INVALID, INVALID, INVALID, INVALID, - /* 98 */ INVALID, INVALID, INVALID, INVALID, - /* 9c */ INVALID, INVALID, INVALID, INVALID, - /* a0 */ INVALID, INVALID, INVALID, INVALID, - /* a4 */ INVALID, INVALID, INVALID, INVALID, - /* a8 */ INVALID, INVALID, INVALID, INVALID, - /* ac */ INVALID, INVALID, INVALID, INVALID, - /* b0 */ INVALID, INVALID, INVALID, INVALID, - /* b4 */ INVALID, INVALID, INVALID, INVALID, - /* b8 */ INVALID, INVALID, INVALID, INVALID, - /* bc */ INVALID, INVALID, INVALID, INVALID, - /* c0 */ INVALID, INVALID, INVALID, INVALID, - /* c4 */ INVALID, INVALID, INVALID, INVALID, - /* c8 */ INVALID, INVALID, INVALID, INVALID, - /* cc */ INVALID, INVALID, INVALID, INVALID, - /* d0 */ INVALID, INVALID, INVALID, INVALID, - /* d4 */ INVALID, INVALID, INVALID, INVALID, - /* d8 */ INVALID, INVALID, INVALID, INVALID, - /* dc */ INVALID, INVALID, INVALID, 48, - /* e0 */ INVALID, INVALID, INVALID, INVALID, - /* e4 */ INVALID, INVALID, INVALID, INVALID, - /* e8 */ INVALID, INVALID, INVALID, INVALID, - /* ec */ INVALID, INVALID, INVALID, INVALID, - /* f0 */ INVALID, INVALID, INVALID, INVALID, - /* f4 */ INVALID, INVALID, INVALID, INVALID, - /* f8 */ INVALID, INVALID, INVALID, INVALID, - /* fc */ INVALID, INVALID, INVALID, INVALID, -}; - -static const uint16_t ud_itab__370[] = { - /* 0 */ 1733, INVALID, -}; - -static const uint16_t ud_itab__371[] = { - /* 0 */ 1731, INVALID, -}; - -static const uint16_t ud_itab__372[] = { - /* 0 */ GROUP(373), INVALID, -}; - -static const uint16_t ud_itab__373[] = { - /* 0 */ INVALID, 1734, -}; - -static const uint16_t ud_itab__374[] = { - /* 0 */ 1042, INVALID, -}; - -static const uint16_t ud_itab__375[] = { - /* 0 */ GROUP(376), GROUP(377), GROUP(378), -}; - -static const uint16_t ud_itab__376[] = { - /* 0 */ 1044, INVALID, -}; - -static const uint16_t ud_itab__377[] = { - /* 0 */ 1046, INVALID, -}; - -static const uint16_t ud_itab__378[] = { - /* 0 */ INVALID, 1048, -}; - -static const uint16_t ud_itab__379[] = { - /* 0 */ GROUP(380), INVALID, -}; - -static const uint16_t ud_itab__380[] = { - /* 0 */ INVALID, 1725, -}; - -static const uint16_t ud_itab__381[] = { - /* 0 */ GROUP(382), INVALID, -}; - -static const uint16_t ud_itab__382[] = { - /* 0 */ INVALID, 1724, -}; - -static const uint16_t ud_itab__383[] = { - /* 0 */ GROUP(384), INVALID, -}; - -static const uint16_t ud_itab__384[] = { - /* 0 */ 1061, INVALID, -}; - -static const uint16_t ud_itab__385[] = { - /* 0 */ GROUP(386), GROUP(388), -}; - -static const uint16_t ud_itab__386[] = { - /* 0 */ GROUP(387), INVALID, -}; - -static const uint16_t ud_itab__387[] = { - /* 0 */ 1062, INVALID, -}; - -static const uint16_t ud_itab__388[] = { - /* 0 */ GROUP(389), GROUP(390), -}; - -static const uint16_t ud_itab__389[] = { - /* 0 */ 1063, INVALID, -}; - -static const uint16_t ud_itab__390[] = { - /* 0 */ 1064, INVALID, -}; - -static const uint16_t ud_itab__391[] = { - /* 0 */ 1740, INVALID, -}; - -static const uint16_t ud_itab__392[] = { - /* 0 */ 1739, INVALID, -}; - -static const uint16_t ud_itab__393[] = { - /* 0 */ 1749, INVALID, -}; - -static const uint16_t ud_itab__394[] = { - /* 0 */ INVALID, INVALID, INVALID, INVALID, - /* 4 */ INVALID, INVALID, INVALID, INVALID, - /* 8 */ INVALID, INVALID, INVALID, INVALID, - /* c */ INVALID, INVALID, INVALID, INVALID, - /* 10 */ GROUP(395), GROUP(396), GROUP(397), INVALID, - /* 14 */ INVALID, INVALID, GROUP(398), INVALID, - /* 18 */ INVALID, INVALID, INVALID, INVALID, - /* 1c */ INVALID, INVALID, INVALID, INVALID, - /* 20 */ INVALID, INVALID, INVALID, INVALID, - /* 24 */ INVALID, INVALID, INVALID, INVALID, - /* 28 */ INVALID, INVALID, 155, INVALID, - /* 2c */ 169, 159, INVALID, INVALID, - /* 30 */ INVALID, INVALID, INVALID, INVALID, - /* 34 */ INVALID, INVALID, INVALID, INVALID, - /* 38 */ INVALID, INVALID, INVALID, INVALID, - /* 3c */ INVALID, INVALID, INVALID, INVALID, - /* 40 */ INVALID, INVALID, INVALID, INVALID, - /* 44 */ INVALID, INVALID, INVALID, INVALID, - /* 48 */ INVALID, INVALID, INVALID, INVALID, - /* 4c */ INVALID, INVALID, INVALID, INVALID, - /* 50 */ INVALID, 1390, 1305, 1290, - /* 54 */ INVALID, INVALID, INVALID, INVALID, - /* 58 */ 32, 947, 157, 164, - /* 5c */ 1420, 819, 194, 803, - /* 60 */ INVALID, INVALID, INVALID, INVALID, - /* 64 */ INVALID, INVALID, INVALID, INVALID, - /* 68 */ INVALID, INVALID, INVALID, INVALID, - /* 6c */ INVALID, INVALID, INVALID, 1519, - /* 70 */ 1531, INVALID, INVALID, INVALID, - /* 74 */ INVALID, INVALID, INVALID, INVALID, - /* 78 */ INVALID, INVALID, INVALID, INVALID, - /* 7c */ INVALID, INVALID, 913, INVALID, - /* 80 */ INVALID, INVALID, INVALID, INVALID, - /* 84 */ INVALID, INVALID, INVALID, INVALID, - /* 88 */ INVALID, INVALID, INVALID, INVALID, - /* 8c */ INVALID, INVALID, INVALID, INVALID, - /* 90 */ INVALID, INVALID, INVALID, INVALID, - /* 94 */ INVALID, INVALID, INVALID, INVALID, - /* 98 */ INVALID, INVALID, INVALID, INVALID, - /* 9c */ INVALID, INVALID, INVALID, INVALID, - /* a0 */ INVALID, INVALID, INVALID, INVALID, - /* a4 */ INVALID, INVALID, INVALID, INVALID, - /* a8 */ INVALID, INVALID, INVALID, INVALID, - /* ac */ INVALID, INVALID, INVALID, INVALID, - /* b0 */ INVALID, INVALID, INVALID, INVALID, - /* b4 */ INVALID, INVALID, INVALID, INVALID, - /* b8 */ INVALID, INVALID, INVALID, INVALID, - /* bc */ INVALID, INVALID, INVALID, INVALID, - /* c0 */ INVALID, INVALID, 121, INVALID, - /* c4 */ INVALID, INVALID, INVALID, INVALID, - /* c8 */ INVALID, INVALID, INVALID, INVALID, - /* cc */ INVALID, INVALID, INVALID, INVALID, - /* d0 */ INVALID, INVALID, INVALID, INVALID, - /* d4 */ INVALID, INVALID, INVALID, INVALID, - /* d8 */ INVALID, INVALID, INVALID, INVALID, - /* dc */ INVALID, INVALID, INVALID, INVALID, - /* e0 */ INVALID, INVALID, INVALID, INVALID, - /* e4 */ INVALID, INVALID, 133, INVALID, - /* e8 */ INVALID, INVALID, INVALID, INVALID, - /* ec */ INVALID, INVALID, INVALID, INVALID, - /* f0 */ INVALID, INVALID, INVALID, INVALID, - /* f4 */ INVALID, INVALID, INVALID, INVALID, - /* f8 */ INVALID, INVALID, INVALID, INVALID, - /* fc */ INVALID, INVALID, INVALID, INVALID, -}; - -static const uint16_t ud_itab__395[] = { - /* 0 */ 1746, 1745, -}; - -static const uint16_t ud_itab__396[] = { - /* 0 */ 1748, 1747, -}; - -static const uint16_t ud_itab__397[] = { - /* 0 */ 1567, 1565, -}; - -static const uint16_t ud_itab__398[] = { - /* 0 */ 1563, 1561, -}; - -static const uint16_t ud_itab__399[] = { - /* 0 */ INVALID, INVALID, INVALID, INVALID, - /* 4 */ INVALID, INVALID, INVALID, INVALID, - /* 8 */ INVALID, INVALID, INVALID, INVALID, - /* c */ INVALID, INVALID, INVALID, INVALID, - /* 10 */ GROUP(402), GROUP(400), GROUP(401), INVALID, - /* 14 */ INVALID, INVALID, INVALID, INVALID, - /* 18 */ INVALID, INVALID, INVALID, INVALID, - /* 1c */ INVALID, INVALID, INVALID, INVALID, - /* 20 */ INVALID, INVALID, INVALID, INVALID, - /* 24 */ INVALID, INVALID, INVALID, INVALID, - /* 28 */ INVALID, INVALID, 153, INVALID, - /* 2c */ 167, 149, INVALID, INVALID, - /* 30 */ INVALID, INVALID, INVALID, INVALID, - /* 34 */ INVALID, INVALID, INVALID, INVALID, - /* 38 */ INVALID, INVALID, INVALID, INVALID, - /* 3c */ INVALID, INVALID, INVALID, INVALID, - /* 40 */ INVALID, INVALID, INVALID, INVALID, - /* 44 */ INVALID, INVALID, INVALID, INVALID, - /* 48 */ INVALID, INVALID, INVALID, INVALID, - /* 4c */ INVALID, INVALID, INVALID, INVALID, - /* 50 */ INVALID, 1388, INVALID, INVALID, - /* 54 */ INVALID, INVALID, INVALID, INVALID, - /* 58 */ 30, 945, 151, INVALID, - /* 5c */ 1418, 817, 192, 801, - /* 60 */ INVALID, INVALID, INVALID, INVALID, - /* 64 */ INVALID, INVALID, INVALID, INVALID, - /* 68 */ INVALID, INVALID, INVALID, INVALID, - /* 6c */ INVALID, INVALID, INVALID, INVALID, - /* 70 */ 1533, INVALID, INVALID, INVALID, - /* 74 */ INVALID, INVALID, INVALID, INVALID, - /* 78 */ INVALID, INVALID, INVALID, INVALID, - /* 7c */ 1547, 1551, INVALID, INVALID, - /* 80 */ INVALID, INVALID, INVALID, INVALID, - /* 84 */ INVALID, INVALID, INVALID, INVALID, - /* 88 */ INVALID, INVALID, INVALID, INVALID, - /* 8c */ INVALID, INVALID, INVALID, INVALID, - /* 90 */ INVALID, INVALID, INVALID, INVALID, - /* 94 */ INVALID, INVALID, INVALID, INVALID, - /* 98 */ INVALID, INVALID, INVALID, INVALID, - /* 9c */ INVALID, INVALID, INVALID, INVALID, - /* a0 */ INVALID, INVALID, INVALID, INVALID, - /* a4 */ INVALID, INVALID, INVALID, INVALID, - /* a8 */ INVALID, INVALID, INVALID, INVALID, - /* ac */ INVALID, INVALID, INVALID, INVALID, - /* b0 */ INVALID, INVALID, INVALID, INVALID, - /* b4 */ INVALID, INVALID, INVALID, INVALID, - /* b8 */ INVALID, INVALID, INVALID, INVALID, - /* bc */ INVALID, INVALID, INVALID, INVALID, - /* c0 */ INVALID, INVALID, 118, INVALID, - /* c4 */ INVALID, INVALID, INVALID, INVALID, - /* c8 */ INVALID, INVALID, INVALID, INVALID, - /* cc */ INVALID, INVALID, INVALID, INVALID, - /* d0 */ 36, INVALID, INVALID, INVALID, - /* d4 */ INVALID, INVALID, INVALID, INVALID, - /* d8 */ INVALID, INVALID, INVALID, INVALID, - /* dc */ INVALID, INVALID, INVALID, INVALID, - /* e0 */ INVALID, INVALID, INVALID, INVALID, - /* e4 */ INVALID, INVALID, 137, INVALID, - /* e8 */ INVALID, INVALID, INVALID, INVALID, - /* ec */ INVALID, INVALID, INVALID, INVALID, - /* f0 */ 1555, INVALID, INVALID, INVALID, - /* f4 */ INVALID, INVALID, INVALID, INVALID, - /* f8 */ INVALID, INVALID, INVALID, INVALID, - /* fc */ INVALID, INVALID, INVALID, INVALID, -}; - -static const uint16_t ud_itab__400[] = { - /* 0 */ 1744, 1743, -}; - -static const uint16_t ud_itab__401[] = { - /* 0 */ 1559, 1557, -}; - -static const uint16_t ud_itab__402[] = { - /* 0 */ 1742, 1741, -}; - -static const uint16_t ud_itab__403[] = { - /* 0 */ GROUP(404), GROUP(335), INVALID, INVALID, - /* 4 */ INVALID, GROUP(341), GROUP(357), GROUP(369), - /* 8 */ INVALID, GROUP(394), INVALID, INVALID, - /* c */ INVALID, GROUP(399), INVALID, INVALID, -}; - -static const uint16_t ud_itab__404[] = { - /* 0 */ 765, INVALID, -}; - -static const uint16_t ud_itab__405[] = { - /* 0 */ 822, INVALID, INVALID, INVALID, - /* 4 */ INVALID, INVALID, INVALID, INVALID, -}; - -static const uint16_t ud_itab__406[] = { - /* 0 */ 823, INVALID, INVALID, INVALID, - /* 4 */ INVALID, INVALID, INVALID, INVALID, -}; - -static const uint16_t ud_itab__407[] = { - /* 0 */ 711, INVALID, -}; - -static const uint16_t ud_itab__408[] = { - /* 0 */ 719, 720, 721, -}; - -static const uint16_t ud_itab__409[] = { - /* 0 */ 1276, 1281, 1265, 1269, - /* 4 */ 1322, 1329, 1316, 1310, -}; - -static const uint16_t ud_itab__410[] = { - /* 0 */ 1277, 1284, 1268, 1272, - /* 4 */ 1321, 1328, 1325, 1308, -}; - -static const uint16_t ud_itab__411[] = { - /* 0 */ 1278, 1285, 1266, 1273, - /* 4 */ 1320, 1327, 1317, 1312, -}; - -static const uint16_t ud_itab__412[] = { - /* 0 */ 1279, 1286, 1267, 1274, - /* 4 */ 1324, 1331, 1318, 1313, -}; - -static const uint16_t ud_itab__413[] = { - /* 0 */ 3, INVALID, -}; - -static const uint16_t ud_itab__414[] = { - /* 0 */ 2, INVALID, -}; - -static const uint16_t ud_itab__415[] = { - /* 0 */ 1307, INVALID, -}; - -static const uint16_t ud_itab__416[] = { - /* 0 */ GROUP(417), GROUP(418), -}; - -static const uint16_t ud_itab__417[] = { - /* 0 */ 206, 503, 307, 357, - /* 4 */ 583, 626, 387, 413, -}; - -static const uint16_t ud_itab__418[] = { - /* 0 */ 215, 216, 217, 218, - /* 4 */ 219, 220, 221, 222, - /* 8 */ 504, 505, 506, 507, - /* c */ 508, 509, 510, 511, - /* 10 */ 309, 310, 311, 312, - /* 14 */ 313, 314, 315, 316, - /* 18 */ 359, 360, 361, 362, - /* 1c */ 363, 364, 365, 366, - /* 20 */ 585, 586, 587, 588, - /* 24 */ 589, 590, 591, 592, - /* 28 */ 610, 611, 612, 613, - /* 2c */ 614, 615, 616, 617, - /* 30 */ 388, 389, 390, 391, - /* 34 */ 392, 393, 394, 395, - /* 38 */ 414, 415, 416, 417, - /* 3c */ 418, 419, 420, 421, -}; - -static const uint16_t ud_itab__419[] = { - /* 0 */ GROUP(420), GROUP(421), -}; - -static const uint16_t ud_itab__420[] = { - /* 0 */ 476, INVALID, 569, 536, - /* 4 */ 493, 492, 580, 579, -}; - -static const uint16_t ud_itab__421[] = { - /* 0 */ 477, 478, 479, 480, - /* 4 */ 481, 482, 483, 484, - /* 8 */ 654, 655, 656, 657, - /* c */ 658, 659, 660, 661, - /* 10 */ 522, INVALID, INVALID, INVALID, - /* 14 */ INVALID, INVALID, INVALID, INVALID, - /* 18 */ 545, 546, 547, 548, - /* 1c */ 549, 550, 551, 552, - /* 20 */ 233, 204, INVALID, INVALID, - /* 24 */ 635, 653, INVALID, INVALID, - /* 28 */ 485, 486, 487, 488, - /* 2c */ 489, 490, 491, INVALID, - /* 30 */ 203, 681, 526, 523, - /* 34 */ 680, 525, 377, 454, - /* 38 */ 524, 682, 533, 532, - /* 3c */ 527, 530, 531, 376, -}; - -static const uint16_t ud_itab__422[] = { - /* 0 */ GROUP(423), GROUP(424), -}; - -static const uint16_t ud_itab__423[] = { - /* 0 */ 456, 520, 448, 450, - /* 4 */ 462, 464, 460, 458, -}; - -static const uint16_t ud_itab__424[] = { - /* 0 */ 235, 236, 237, 238, - /* 4 */ 239, 240, 241, 242, - /* 8 */ 243, 244, 245, 246, - /* c */ 247, 248, 249, 250, - /* 10 */ 251, 252, 253, 254, - /* 14 */ 255, 256, 257, 258, - /* 18 */ 259, 260, 261, 262, - /* 1c */ 263, 264, 265, 266, - /* 20 */ INVALID, INVALID, INVALID, INVALID, - /* 24 */ INVALID, INVALID, INVALID, INVALID, - /* 28 */ INVALID, 652, INVALID, INVALID, - /* 2c */ INVALID, INVALID, INVALID, INVALID, - /* 30 */ INVALID, INVALID, INVALID, INVALID, - /* 34 */ INVALID, INVALID, INVALID, INVALID, - /* 38 */ INVALID, INVALID, INVALID, INVALID, - /* 3c */ INVALID, INVALID, INVALID, INVALID, -}; - -static const uint16_t ud_itab__425[] = { - /* 0 */ GROUP(426), GROUP(427), -}; - -static const uint16_t ud_itab__426[] = { - /* 0 */ 453, 471, 467, 470, - /* 4 */ INVALID, 474, INVALID, 534, -}; - -static const uint16_t ud_itab__427[] = { - /* 0 */ 267, 268, 269, 270, - /* 4 */ 271, 272, 273, 274, - /* 8 */ 275, 276, 277, 278, - /* c */ 279, 280, 281, 282, - /* 10 */ 283, 284, 285, 286, - /* 14 */ 287, 288, 289, 290, - /* 18 */ 291, 292, 293, 294, - /* 1c */ 295, 296, 297, 298, - /* 20 */ INVALID, INVALID, 234, 455, - /* 24 */ INVALID, INVALID, INVALID, INVALID, - /* 28 */ 299, 300, 301, 302, - /* 2c */ 303, 304, 305, 306, - /* 30 */ 333, 334, 335, 336, - /* 34 */ 337, 338, 339, 340, - /* 38 */ INVALID, INVALID, INVALID, INVALID, - /* 3c */ INVALID, INVALID, INVALID, INVALID, -}; - -static const uint16_t ud_itab__428[] = { - /* 0 */ GROUP(429), GROUP(430), -}; - -static const uint16_t ud_itab__429[] = { - /* 0 */ 205, 494, 308, 358, - /* 4 */ 584, 609, 378, 404, -}; - -static const uint16_t ud_itab__430[] = { - /* 0 */ 207, 208, 209, 210, - /* 4 */ 211, 212, 213, 214, - /* 8 */ 495, 496, 497, 498, - /* c */ 499, 500, 501, 502, - /* 10 */ 317, 318, 319, 320, - /* 14 */ 321, 322, 323, 324, - /* 18 */ 325, 326, 327, 328, - /* 1c */ 329, 330, 331, 332, - /* 20 */ 618, 619, 620, 621, - /* 24 */ 622, 623, 624, 625, - /* 28 */ 593, 594, 595, 596, - /* 2c */ 597, 598, 599, 600, - /* 30 */ 405, 406, 407, 408, - /* 34 */ 409, 410, 411, 412, - /* 38 */ 379, 380, 381, 382, - /* 3c */ 383, 384, 385, 386, -}; - -static const uint16_t ud_itab__431[] = { - /* 0 */ GROUP(432), GROUP(433), -}; - -static const uint16_t ud_itab__432[] = { - /* 0 */ 475, 472, 570, 535, - /* 4 */ 528, INVALID, 529, 581, -}; - -static const uint16_t ud_itab__433[] = { - /* 0 */ 431, 432, 433, 434, - /* 4 */ 435, 436, 437, 438, - /* 8 */ 662, 663, 664, 665, - /* c */ 666, 667, 668, 669, - /* 10 */ 571, 572, 573, 574, - /* 14 */ 575, 576, 577, 578, - /* 18 */ 537, 538, 539, 540, - /* 1c */ 541, 542, 543, 544, - /* 20 */ 636, 637, 638, 639, - /* 24 */ 640, 641, 642, 643, - /* 28 */ 644, 645, 646, 647, - /* 2c */ 648, 649, 650, 651, - /* 30 */ INVALID, INVALID, INVALID, INVALID, - /* 34 */ INVALID, INVALID, INVALID, INVALID, - /* 38 */ INVALID, INVALID, INVALID, INVALID, - /* 3c */ INVALID, INVALID, INVALID, INVALID, -}; - -static const uint16_t ud_itab__434[] = { - /* 0 */ GROUP(435), GROUP(436), -}; - -static const uint16_t ud_itab__435[] = { - /* 0 */ 457, 521, 447, 449, - /* 4 */ 463, 465, 461, 459, -}; - -static const uint16_t ud_itab__436[] = { - /* 0 */ 223, 224, 225, 226, - /* 4 */ 227, 228, 229, 230, - /* 8 */ 512, 513, 514, 515, - /* c */ 516, 517, 518, 519, - /* 10 */ 367, 368, 369, 370, - /* 14 */ 371, 372, 373, 374, - /* 18 */ INVALID, 375, INVALID, INVALID, - /* 1c */ INVALID, INVALID, INVALID, INVALID, - /* 20 */ 627, 628, 629, 630, - /* 24 */ 631, 632, 633, 634, - /* 28 */ 601, 602, 603, 604, - /* 2c */ 605, 606, 607, 608, - /* 30 */ 422, 423, 424, 425, - /* 34 */ 426, 427, 428, 429, - /* 38 */ 396, 397, 398, 399, - /* 3c */ 400, 401, 402, 403, -}; - -static const uint16_t ud_itab__437[] = { - /* 0 */ GROUP(438), GROUP(439), -}; - -static const uint16_t ud_itab__438[] = { - /* 0 */ 451, 473, 466, 468, - /* 4 */ 231, 452, 232, 469, -}; - -static const uint16_t ud_itab__439[] = { - /* 0 */ 439, 440, 441, 442, - /* 4 */ 443, 444, 445, 446, - /* 8 */ 670, 671, 672, 673, - /* c */ 674, 675, 676, 677, - /* 10 */ 553, 554, 555, 556, - /* 14 */ 557, 558, 559, 560, - /* 18 */ 561, 562, 563, 564, - /* 1c */ 565, 566, 567, 568, - /* 20 */ 582, INVALID, INVALID, INVALID, - /* 24 */ INVALID, INVALID, INVALID, INVALID, - /* 28 */ 341, 342, 343, 344, - /* 2c */ 345, 346, 347, 348, - /* 30 */ 349, 350, 351, 352, - /* 34 */ 353, 354, 355, 356, - /* 38 */ INVALID, INVALID, INVALID, INVALID, - /* 3c */ INVALID, INVALID, INVALID, INVALID, -}; - -static const uint16_t ud_itab__440[] = { - /* 0 */ 754, 755, 756, -}; - -static const uint16_t ud_itab__441[] = { - /* 0 */ 760, INVALID, -}; - -static const uint16_t ud_itab__442[] = { - /* 0 */ 1428, 1433, 958, 949, - /* 4 */ 938, 691, 186, 685, -}; - -static const uint16_t ud_itab__443[] = { - /* 0 */ 1434, 1435, 959, 950, - /* 4 */ 939, 692, 185, 684, -}; - -static const uint16_t ud_itab__444[] = { - /* 0 */ 704, 183, INVALID, INVALID, - /* 4 */ INVALID, INVALID, INVALID, INVALID, -}; - -static const uint16_t ud_itab__445[] = { - /* 0 */ 703, 184, GROUP(446), 71, - /* 4 */ 757, 758, 1251, INVALID, -}; - -static const uint16_t ud_itab__446[] = { - /* 0 */ 69, 70, -}; - - -struct ud_lookup_table_list_entry ud_lookup_table_list[] = { - /* 000 */ { ud_itab__0, UD_TAB__OPC_TABLE, "opctbl" }, - /* 001 */ { ud_itab__1, UD_TAB__OPC_MODE, "/m" }, - /* 002 */ { ud_itab__2, UD_TAB__OPC_MODE, "/m" }, - /* 003 */ { ud_itab__3, UD_TAB__OPC_MODE, "/m" }, - /* 004 */ { ud_itab__4, UD_TAB__OPC_TABLE, "opctbl" }, - /* 005 */ { ud_itab__5, UD_TAB__OPC_REG, "/reg" }, - /* 006 */ { ud_itab__6, UD_TAB__OPC_MOD, "/mod" }, - /* 007 */ { ud_itab__7, UD_TAB__OPC_REG, "/reg" }, - /* 008 */ { ud_itab__8, UD_TAB__OPC_REG, "/reg" }, - /* 009 */ { ud_itab__9, UD_TAB__OPC_RM, "/rm" }, - /* 010 */ { ud_itab__10, UD_TAB__OPC_VENDOR, "/vendor" }, - /* 011 */ { ud_itab__11, UD_TAB__OPC_VENDOR, "/vendor" }, - /* 012 */ { ud_itab__12, UD_TAB__OPC_VENDOR, "/vendor" }, - /* 013 */ { ud_itab__13, UD_TAB__OPC_VENDOR, "/vendor" }, - /* 014 */ { ud_itab__14, UD_TAB__OPC_RM, "/rm" }, - /* 015 */ { ud_itab__15, UD_TAB__OPC_RM, "/rm" }, - /* 016 */ { ud_itab__16, UD_TAB__OPC_RM, "/rm" }, - /* 017 */ { ud_itab__17, UD_TAB__OPC_VENDOR, "/vendor" }, - /* 018 */ { ud_itab__18, UD_TAB__OPC_VENDOR, "/vendor" }, - /* 019 */ { ud_itab__19, UD_TAB__OPC_VENDOR, "/vendor" }, - /* 020 */ { ud_itab__20, UD_TAB__OPC_VENDOR, "/vendor" }, - /* 021 */ { ud_itab__21, UD_TAB__OPC_VENDOR, "/vendor" }, - /* 022 */ { ud_itab__22, UD_TAB__OPC_VENDOR, "/vendor" }, - /* 023 */ { ud_itab__23, UD_TAB__OPC_VENDOR, "/vendor" }, - /* 024 */ { ud_itab__24, UD_TAB__OPC_VENDOR, "/vendor" }, - /* 025 */ { ud_itab__25, UD_TAB__OPC_RM, "/rm" }, - /* 026 */ { ud_itab__26, UD_TAB__OPC_VENDOR, "/vendor" }, - /* 027 */ { ud_itab__27, UD_TAB__OPC_REG, "/reg" }, - /* 028 */ { ud_itab__28, UD_TAB__OPC_3DNOW, "/3dnow" }, - /* 029 */ { ud_itab__29, UD_TAB__OPC_SSE, "/sse" }, - /* 030 */ { ud_itab__30, UD_TAB__OPC_SSE, "/sse" }, - /* 031 */ { ud_itab__31, UD_TAB__OPC_MOD, "/mod" }, - /* 032 */ { ud_itab__32, UD_TAB__OPC_SSE, "/sse" }, - /* 033 */ { ud_itab__33, UD_TAB__OPC_SSE, "/sse" }, - /* 034 */ { ud_itab__34, UD_TAB__OPC_SSE, "/sse" }, - /* 035 */ { ud_itab__35, UD_TAB__OPC_SSE, "/sse" }, - /* 036 */ { ud_itab__36, UD_TAB__OPC_SSE, "/sse" }, - /* 037 */ { ud_itab__37, UD_TAB__OPC_MOD, "/mod" }, - /* 038 */ { ud_itab__38, UD_TAB__OPC_SSE, "/sse" }, - /* 039 */ { ud_itab__39, UD_TAB__OPC_SSE, "/sse" }, - /* 040 */ { ud_itab__40, UD_TAB__OPC_SSE, "/sse" }, - /* 041 */ { ud_itab__41, UD_TAB__OPC_REG, "/reg" }, - /* 042 */ { ud_itab__42, UD_TAB__OPC_SSE, "/sse" }, - /* 043 */ { ud_itab__43, UD_TAB__OPC_SSE, "/sse" }, - /* 044 */ { ud_itab__44, UD_TAB__OPC_SSE, "/sse" }, - /* 045 */ { ud_itab__45, UD_TAB__OPC_SSE, "/sse" }, - /* 046 */ { ud_itab__46, UD_TAB__OPC_SSE, "/sse" }, - /* 047 */ { ud_itab__47, UD_TAB__OPC_SSE, "/sse" }, - /* 048 */ { ud_itab__48, UD_TAB__OPC_SSE, "/sse" }, - /* 049 */ { ud_itab__49, UD_TAB__OPC_SSE, "/sse" }, - /* 050 */ { ud_itab__50, UD_TAB__OPC_MODE, "/m" }, - /* 051 */ { ud_itab__51, UD_TAB__OPC_VENDOR, "/vendor" }, - /* 052 */ { ud_itab__52, UD_TAB__OPC_MODE, "/m" }, - /* 053 */ { ud_itab__53, UD_TAB__OPC_VENDOR, "/vendor" }, - /* 054 */ { ud_itab__54, UD_TAB__OPC_TABLE, "opctbl" }, - /* 055 */ { ud_itab__55, UD_TAB__OPC_SSE, "/sse" }, - /* 056 */ { ud_itab__56, UD_TAB__OPC_MODE, "/m" }, - /* 057 */ { ud_itab__57, UD_TAB__OPC_VENDOR, "/vendor" }, - /* 058 */ { ud_itab__58, UD_TAB__OPC_VENDOR, "/vendor" }, - /* 059 */ { ud_itab__59, UD_TAB__OPC_SSE, "/sse" }, - /* 060 */ { ud_itab__60, UD_TAB__OPC_MODE, "/m" }, - /* 061 */ { ud_itab__61, UD_TAB__OPC_VENDOR, "/vendor" }, - /* 062 */ { ud_itab__62, UD_TAB__OPC_VENDOR, "/vendor" }, - /* 063 */ { ud_itab__63, UD_TAB__OPC_SSE, "/sse" }, - /* 064 */ { ud_itab__64, UD_TAB__OPC_SSE, "/sse" }, - /* 065 */ { ud_itab__65, UD_TAB__OPC_SSE, "/sse" }, - /* 066 */ { ud_itab__66, UD_TAB__OPC_SSE, "/sse" }, - /* 067 */ { ud_itab__67, UD_TAB__OPC_SSE, "/sse" }, - /* 068 */ { ud_itab__68, UD_TAB__OPC_SSE, "/sse" }, - /* 069 */ { ud_itab__69, UD_TAB__OPC_SSE, "/sse" }, - /* 070 */ { ud_itab__70, UD_TAB__OPC_SSE, "/sse" }, - /* 071 */ { ud_itab__71, UD_TAB__OPC_SSE, "/sse" }, - /* 072 */ { ud_itab__72, UD_TAB__OPC_SSE, "/sse" }, - /* 073 */ { ud_itab__73, UD_TAB__OPC_SSE, "/sse" }, - /* 074 */ { ud_itab__74, UD_TAB__OPC_SSE, "/sse" }, - /* 075 */ { ud_itab__75, UD_TAB__OPC_SSE, "/sse" }, - /* 076 */ { ud_itab__76, UD_TAB__OPC_SSE, "/sse" }, - /* 077 */ { ud_itab__77, UD_TAB__OPC_SSE, "/sse" }, - /* 078 */ { ud_itab__78, UD_TAB__OPC_SSE, "/sse" }, - /* 079 */ { ud_itab__79, UD_TAB__OPC_SSE, "/sse" }, - /* 080 */ { ud_itab__80, UD_TAB__OPC_SSE, "/sse" }, - /* 081 */ { ud_itab__81, UD_TAB__OPC_SSE, "/sse" }, - /* 082 */ { ud_itab__82, UD_TAB__OPC_SSE, "/sse" }, - /* 083 */ { ud_itab__83, UD_TAB__OPC_SSE, "/sse" }, - /* 084 */ { ud_itab__84, UD_TAB__OPC_SSE, "/sse" }, - /* 085 */ { ud_itab__85, UD_TAB__OPC_SSE, "/sse" }, - /* 086 */ { ud_itab__86, UD_TAB__OPC_SSE, "/sse" }, - /* 087 */ { ud_itab__87, UD_TAB__OPC_SSE, "/sse" }, - /* 088 */ { ud_itab__88, UD_TAB__OPC_SSE, "/sse" }, - /* 089 */ { ud_itab__89, UD_TAB__OPC_SSE, "/sse" }, - /* 090 */ { ud_itab__90, UD_TAB__OPC_SSE, "/sse" }, - /* 091 */ { ud_itab__91, UD_TAB__OPC_SSE, "/sse" }, - /* 092 */ { ud_itab__92, UD_TAB__OPC_SSE, "/sse" }, - /* 093 */ { ud_itab__93, UD_TAB__OPC_SSE, "/sse" }, - /* 094 */ { ud_itab__94, UD_TAB__OPC_SSE, "/sse" }, - /* 095 */ { ud_itab__95, UD_TAB__OPC_SSE, "/sse" }, - /* 096 */ { ud_itab__96, UD_TAB__OPC_SSE, "/sse" }, - /* 097 */ { ud_itab__97, UD_TAB__OPC_SSE, "/sse" }, - /* 098 */ { ud_itab__98, UD_TAB__OPC_SSE, "/sse" }, - /* 099 */ { ud_itab__99, UD_TAB__OPC_SSE, "/sse" }, - /* 100 */ { ud_itab__100, UD_TAB__OPC_SSE, "/sse" }, - /* 101 */ { ud_itab__101, UD_TAB__OPC_SSE, "/sse" }, - /* 102 */ { ud_itab__102, UD_TAB__OPC_SSE, "/sse" }, - /* 103 */ { ud_itab__103, UD_TAB__OPC_SSE, "/sse" }, - /* 104 */ { ud_itab__104, UD_TAB__OPC_SSE, "/sse" }, - /* 105 */ { ud_itab__105, UD_TAB__OPC_SSE, "/sse" }, - /* 106 */ { ud_itab__106, UD_TAB__OPC_SSE, "/sse" }, - /* 107 */ { ud_itab__107, UD_TAB__OPC_SSE, "/sse" }, - /* 108 */ { ud_itab__108, UD_TAB__OPC_SSE, "/sse" }, - /* 109 */ { ud_itab__109, UD_TAB__OPC_SSE, "/sse" }, - /* 110 */ { ud_itab__110, UD_TAB__OPC_SSE, "/sse" }, - /* 111 */ { ud_itab__111, UD_TAB__OPC_SSE, "/sse" }, - /* 112 */ { ud_itab__112, UD_TAB__OPC_SSE, "/sse" }, - /* 113 */ { ud_itab__113, UD_TAB__OPC_SSE, "/sse" }, - /* 114 */ { ud_itab__114, UD_TAB__OPC_SSE, "/sse" }, - /* 115 */ { ud_itab__115, UD_TAB__OPC_SSE, "/sse" }, - /* 116 */ { ud_itab__116, UD_TAB__OPC_TABLE, "opctbl" }, - /* 117 */ { ud_itab__117, UD_TAB__OPC_SSE, "/sse" }, - /* 118 */ { ud_itab__118, UD_TAB__OPC_SSE, "/sse" }, - /* 119 */ { ud_itab__119, UD_TAB__OPC_SSE, "/sse" }, - /* 120 */ { ud_itab__120, UD_TAB__OPC_SSE, "/sse" }, - /* 121 */ { ud_itab__121, UD_TAB__OPC_SSE, "/sse" }, - /* 122 */ { ud_itab__122, UD_TAB__OPC_SSE, "/sse" }, - /* 123 */ { ud_itab__123, UD_TAB__OPC_SSE, "/sse" }, - /* 124 */ { ud_itab__124, UD_TAB__OPC_SSE, "/sse" }, - /* 125 */ { ud_itab__125, UD_TAB__OPC_SSE, "/sse" }, - /* 126 */ { ud_itab__126, UD_TAB__OPC_SSE, "/sse" }, - /* 127 */ { ud_itab__127, UD_TAB__OPC_SSE, "/sse" }, - /* 128 */ { ud_itab__128, UD_TAB__OPC_OSIZE, "/o" }, - /* 129 */ { ud_itab__129, UD_TAB__OPC_SSE, "/sse" }, - /* 130 */ { ud_itab__130, UD_TAB__OPC_SSE, "/sse" }, - /* 131 */ { ud_itab__131, UD_TAB__OPC_SSE, "/sse" }, - /* 132 */ { ud_itab__132, UD_TAB__OPC_SSE, "/sse" }, - /* 133 */ { ud_itab__133, UD_TAB__OPC_OSIZE, "/o" }, - /* 134 */ { ud_itab__134, UD_TAB__OPC_SSE, "/sse" }, - /* 135 */ { ud_itab__135, UD_TAB__OPC_SSE, "/sse" }, - /* 136 */ { ud_itab__136, UD_TAB__OPC_SSE, "/sse" }, - /* 137 */ { ud_itab__137, UD_TAB__OPC_SSE, "/sse" }, - /* 138 */ { ud_itab__138, UD_TAB__OPC_SSE, "/sse" }, - /* 139 */ { ud_itab__139, UD_TAB__OPC_SSE, "/sse" }, - /* 140 */ { ud_itab__140, UD_TAB__OPC_SSE, "/sse" }, - /* 141 */ { ud_itab__141, UD_TAB__OPC_SSE, "/sse" }, - /* 142 */ { ud_itab__142, UD_TAB__OPC_SSE, "/sse" }, - /* 143 */ { ud_itab__143, UD_TAB__OPC_SSE, "/sse" }, - /* 144 */ { ud_itab__144, UD_TAB__OPC_SSE, "/sse" }, - /* 145 */ { ud_itab__145, UD_TAB__OPC_SSE, "/sse" }, - /* 146 */ { ud_itab__146, UD_TAB__OPC_SSE, "/sse" }, - /* 147 */ { ud_itab__147, UD_TAB__OPC_SSE, "/sse" }, - /* 148 */ { ud_itab__148, UD_TAB__OPC_SSE, "/sse" }, - /* 149 */ { ud_itab__149, UD_TAB__OPC_SSE, "/sse" }, - /* 150 */ { ud_itab__150, UD_TAB__OPC_SSE, "/sse" }, - /* 151 */ { ud_itab__151, UD_TAB__OPC_SSE, "/sse" }, - /* 152 */ { ud_itab__152, UD_TAB__OPC_SSE, "/sse" }, - /* 153 */ { ud_itab__153, UD_TAB__OPC_SSE, "/sse" }, - /* 154 */ { ud_itab__154, UD_TAB__OPC_SSE, "/sse" }, - /* 155 */ { ud_itab__155, UD_TAB__OPC_SSE, "/sse" }, - /* 156 */ { ud_itab__156, UD_TAB__OPC_SSE, "/sse" }, - /* 157 */ { ud_itab__157, UD_TAB__OPC_SSE, "/sse" }, - /* 158 */ { ud_itab__158, UD_TAB__OPC_SSE, "/sse" }, - /* 159 */ { ud_itab__159, UD_TAB__OPC_SSE, "/sse" }, - /* 160 */ { ud_itab__160, UD_TAB__OPC_SSE, "/sse" }, - /* 161 */ { ud_itab__161, UD_TAB__OPC_SSE, "/sse" }, - /* 162 */ { ud_itab__162, UD_TAB__OPC_SSE, "/sse" }, - /* 163 */ { ud_itab__163, UD_TAB__OPC_SSE, "/sse" }, - /* 164 */ { ud_itab__164, UD_TAB__OPC_SSE, "/sse" }, - /* 165 */ { ud_itab__165, UD_TAB__OPC_SSE, "/sse" }, - /* 166 */ { ud_itab__166, UD_TAB__OPC_SSE, "/sse" }, - /* 167 */ { ud_itab__167, UD_TAB__OPC_SSE, "/sse" }, - /* 168 */ { ud_itab__168, UD_TAB__OPC_SSE, "/sse" }, - /* 169 */ { ud_itab__169, UD_TAB__OPC_SSE, "/sse" }, - /* 170 */ { ud_itab__170, UD_TAB__OPC_SSE, "/sse" }, - /* 171 */ { ud_itab__171, UD_TAB__OPC_SSE, "/sse" }, - /* 172 */ { ud_itab__172, UD_TAB__OPC_SSE, "/sse" }, - /* 173 */ { ud_itab__173, UD_TAB__OPC_SSE, "/sse" }, - /* 174 */ { ud_itab__174, UD_TAB__OPC_OSIZE, "/o" }, - /* 175 */ { ud_itab__175, UD_TAB__OPC_OSIZE, "/o" }, - /* 176 */ { ud_itab__176, UD_TAB__OPC_SSE, "/sse" }, - /* 177 */ { ud_itab__177, UD_TAB__OPC_SSE, "/sse" }, - /* 178 */ { ud_itab__178, UD_TAB__OPC_REG, "/reg" }, - /* 179 */ { ud_itab__179, UD_TAB__OPC_SSE, "/sse" }, - /* 180 */ { ud_itab__180, UD_TAB__OPC_SSE, "/sse" }, - /* 181 */ { ud_itab__181, UD_TAB__OPC_SSE, "/sse" }, - /* 182 */ { ud_itab__182, UD_TAB__OPC_REG, "/reg" }, - /* 183 */ { ud_itab__183, UD_TAB__OPC_SSE, "/sse" }, - /* 184 */ { ud_itab__184, UD_TAB__OPC_SSE, "/sse" }, - /* 185 */ { ud_itab__185, UD_TAB__OPC_SSE, "/sse" }, - /* 186 */ { ud_itab__186, UD_TAB__OPC_REG, "/reg" }, - /* 187 */ { ud_itab__187, UD_TAB__OPC_SSE, "/sse" }, - /* 188 */ { ud_itab__188, UD_TAB__OPC_SSE, "/sse" }, - /* 189 */ { ud_itab__189, UD_TAB__OPC_SSE, "/sse" }, - /* 190 */ { ud_itab__190, UD_TAB__OPC_SSE, "/sse" }, - /* 191 */ { ud_itab__191, UD_TAB__OPC_SSE, "/sse" }, - /* 192 */ { ud_itab__192, UD_TAB__OPC_SSE, "/sse" }, - /* 193 */ { ud_itab__193, UD_TAB__OPC_SSE, "/sse" }, - /* 194 */ { ud_itab__194, UD_TAB__OPC_VENDOR, "/vendor" }, - /* 195 */ { ud_itab__195, UD_TAB__OPC_VENDOR, "/vendor" }, - /* 196 */ { ud_itab__196, UD_TAB__OPC_SSE, "/sse" }, - /* 197 */ { ud_itab__197, UD_TAB__OPC_SSE, "/sse" }, - /* 198 */ { ud_itab__198, UD_TAB__OPC_SSE, "/sse" }, - /* 199 */ { ud_itab__199, UD_TAB__OPC_OSIZE, "/o" }, - /* 200 */ { ud_itab__200, UD_TAB__OPC_OSIZE, "/o" }, - /* 201 */ { ud_itab__201, UD_TAB__OPC_SSE, "/sse" }, - /* 202 */ { ud_itab__202, UD_TAB__OPC_MOD, "/mod" }, - /* 203 */ { ud_itab__203, UD_TAB__OPC_REG, "/reg" }, - /* 204 */ { ud_itab__204, UD_TAB__OPC_RM, "/rm" }, - /* 205 */ { ud_itab__205, UD_TAB__OPC_RM, "/rm" }, - /* 206 */ { ud_itab__206, UD_TAB__OPC_RM, "/rm" }, - /* 207 */ { ud_itab__207, UD_TAB__OPC_MOD, "/mod" }, - /* 208 */ { ud_itab__208, UD_TAB__OPC_REG, "/reg" }, - /* 209 */ { ud_itab__209, UD_TAB__OPC_RM, "/rm" }, - /* 210 */ { ud_itab__210, UD_TAB__OPC_RM, "/rm" }, - /* 211 */ { ud_itab__211, UD_TAB__OPC_RM, "/rm" }, - /* 212 */ { ud_itab__212, UD_TAB__OPC_RM, "/rm" }, - /* 213 */ { ud_itab__213, UD_TAB__OPC_RM, "/rm" }, - /* 214 */ { ud_itab__214, UD_TAB__OPC_RM, "/rm" }, - /* 215 */ { ud_itab__215, UD_TAB__OPC_MOD, "/mod" }, - /* 216 */ { ud_itab__216, UD_TAB__OPC_REG, "/reg" }, - /* 217 */ { ud_itab__217, UD_TAB__OPC_REG, "/reg" }, - /* 218 */ { ud_itab__218, UD_TAB__OPC_RM, "/rm" }, - /* 219 */ { ud_itab__219, UD_TAB__OPC_RM, "/rm" }, - /* 220 */ { ud_itab__220, UD_TAB__OPC_RM, "/rm" }, - /* 221 */ { ud_itab__221, UD_TAB__OPC_SSE, "/sse" }, - /* 222 */ { ud_itab__222, UD_TAB__OPC_REG, "/reg" }, - /* 223 */ { ud_itab__223, UD_TAB__OPC_SSE, "/sse" }, - /* 224 */ { ud_itab__224, UD_TAB__OPC_SSE, "/sse" }, - /* 225 */ { ud_itab__225, UD_TAB__OPC_SSE, "/sse" }, - /* 226 */ { ud_itab__226, UD_TAB__OPC_SSE, "/sse" }, - /* 227 */ { ud_itab__227, UD_TAB__OPC_MOD, "/mod" }, - /* 228 */ { ud_itab__228, UD_TAB__OPC_REG, "/reg" }, - /* 229 */ { ud_itab__229, UD_TAB__OPC_OSIZE, "/o" }, - /* 230 */ { ud_itab__230, UD_TAB__OPC_SSE, "/sse" }, - /* 231 */ { ud_itab__231, UD_TAB__OPC_VENDOR, "/vendor" }, - /* 232 */ { ud_itab__232, UD_TAB__OPC_VENDOR, "/vendor" }, - /* 233 */ { ud_itab__233, UD_TAB__OPC_VENDOR, "/vendor" }, - /* 234 */ { ud_itab__234, UD_TAB__OPC_VENDOR, "/vendor" }, - /* 235 */ { ud_itab__235, UD_TAB__OPC_REG, "/reg" }, - /* 236 */ { ud_itab__236, UD_TAB__OPC_SSE, "/sse" }, - /* 237 */ { ud_itab__237, UD_TAB__OPC_SSE, "/sse" }, - /* 238 */ { ud_itab__238, UD_TAB__OPC_SSE, "/sse" }, - /* 239 */ { ud_itab__239, UD_TAB__OPC_SSE, "/sse" }, - /* 240 */ { ud_itab__240, UD_TAB__OPC_SSE, "/sse" }, - /* 241 */ { ud_itab__241, UD_TAB__OPC_SSE, "/sse" }, - /* 242 */ { ud_itab__242, UD_TAB__OPC_SSE, "/sse" }, - /* 243 */ { ud_itab__243, UD_TAB__OPC_SSE, "/sse" }, - /* 244 */ { ud_itab__244, UD_TAB__OPC_SSE, "/sse" }, - /* 245 */ { ud_itab__245, UD_TAB__OPC_SSE, "/sse" }, - /* 246 */ { ud_itab__246, UD_TAB__OPC_SSE, "/sse" }, - /* 247 */ { ud_itab__247, UD_TAB__OPC_SSE, "/sse" }, - /* 248 */ { ud_itab__248, UD_TAB__OPC_SSE, "/sse" }, - /* 249 */ { ud_itab__249, UD_TAB__OPC_SSE, "/sse" }, - /* 250 */ { ud_itab__250, UD_TAB__OPC_SSE, "/sse" }, - /* 251 */ { ud_itab__251, UD_TAB__OPC_SSE, "/sse" }, - /* 252 */ { ud_itab__252, UD_TAB__OPC_SSE, "/sse" }, - /* 253 */ { ud_itab__253, UD_TAB__OPC_SSE, "/sse" }, - /* 254 */ { ud_itab__254, UD_TAB__OPC_SSE, "/sse" }, - /* 255 */ { ud_itab__255, UD_TAB__OPC_SSE, "/sse" }, - /* 256 */ { ud_itab__256, UD_TAB__OPC_SSE, "/sse" }, - /* 257 */ { ud_itab__257, UD_TAB__OPC_SSE, "/sse" }, - /* 258 */ { ud_itab__258, UD_TAB__OPC_SSE, "/sse" }, - /* 259 */ { ud_itab__259, UD_TAB__OPC_SSE, "/sse" }, - /* 260 */ { ud_itab__260, UD_TAB__OPC_SSE, "/sse" }, - /* 261 */ { ud_itab__261, UD_TAB__OPC_SSE, "/sse" }, - /* 262 */ { ud_itab__262, UD_TAB__OPC_SSE, "/sse" }, - /* 263 */ { ud_itab__263, UD_TAB__OPC_SSE, "/sse" }, - /* 264 */ { ud_itab__264, UD_TAB__OPC_SSE, "/sse" }, - /* 265 */ { ud_itab__265, UD_TAB__OPC_SSE, "/sse" }, - /* 266 */ { ud_itab__266, UD_TAB__OPC_SSE, "/sse" }, - /* 267 */ { ud_itab__267, UD_TAB__OPC_SSE, "/sse" }, - /* 268 */ { ud_itab__268, UD_TAB__OPC_SSE, "/sse" }, - /* 269 */ { ud_itab__269, UD_TAB__OPC_SSE, "/sse" }, - /* 270 */ { ud_itab__270, UD_TAB__OPC_SSE, "/sse" }, - /* 271 */ { ud_itab__271, UD_TAB__OPC_SSE, "/sse" }, - /* 272 */ { ud_itab__272, UD_TAB__OPC_SSE, "/sse" }, - /* 273 */ { ud_itab__273, UD_TAB__OPC_SSE, "/sse" }, - /* 274 */ { ud_itab__274, UD_TAB__OPC_SSE, "/sse" }, - /* 275 */ { ud_itab__275, UD_TAB__OPC_MOD, "/mod" }, - /* 276 */ { ud_itab__276, UD_TAB__OPC_SSE, "/sse" }, - /* 277 */ { ud_itab__277, UD_TAB__OPC_SSE, "/sse" }, - /* 278 */ { ud_itab__278, UD_TAB__OPC_SSE, "/sse" }, - /* 279 */ { ud_itab__279, UD_TAB__OPC_SSE, "/sse" }, - /* 280 */ { ud_itab__280, UD_TAB__OPC_SSE, "/sse" }, - /* 281 */ { ud_itab__281, UD_TAB__OPC_SSE, "/sse" }, - /* 282 */ { ud_itab__282, UD_TAB__OPC_SSE, "/sse" }, - /* 283 */ { ud_itab__283, UD_TAB__OPC_SSE, "/sse" }, - /* 284 */ { ud_itab__284, UD_TAB__OPC_MODE, "/m" }, - /* 285 */ { ud_itab__285, UD_TAB__OPC_MODE, "/m" }, - /* 286 */ { ud_itab__286, UD_TAB__OPC_MODE, "/m" }, - /* 287 */ { ud_itab__287, UD_TAB__OPC_MODE, "/m" }, - /* 288 */ { ud_itab__288, UD_TAB__OPC_MODE, "/m" }, - /* 289 */ { ud_itab__289, UD_TAB__OPC_MODE, "/m" }, - /* 290 */ { ud_itab__290, UD_TAB__OPC_MODE, "/m" }, - /* 291 */ { ud_itab__291, UD_TAB__OPC_MODE, "/m" }, - /* 292 */ { ud_itab__292, UD_TAB__OPC_OSIZE, "/o" }, - /* 293 */ { ud_itab__293, UD_TAB__OPC_MODE, "/m" }, - /* 294 */ { ud_itab__294, UD_TAB__OPC_MODE, "/m" }, - /* 295 */ { ud_itab__295, UD_TAB__OPC_OSIZE, "/o" }, - /* 296 */ { ud_itab__296, UD_TAB__OPC_MODE, "/m" }, - /* 297 */ { ud_itab__297, UD_TAB__OPC_MODE, "/m" }, - /* 298 */ { ud_itab__298, UD_TAB__OPC_MODE, "/m" }, - /* 299 */ { ud_itab__299, UD_TAB__OPC_MODE, "/m" }, - /* 300 */ { ud_itab__300, UD_TAB__OPC_OSIZE, "/o" }, - /* 301 */ { ud_itab__301, UD_TAB__OPC_OSIZE, "/o" }, - /* 302 */ { ud_itab__302, UD_TAB__OPC_REG, "/reg" }, - /* 303 */ { ud_itab__303, UD_TAB__OPC_REG, "/reg" }, - /* 304 */ { ud_itab__304, UD_TAB__OPC_REG, "/reg" }, - /* 305 */ { ud_itab__305, UD_TAB__OPC_MODE, "/m" }, - /* 306 */ { ud_itab__306, UD_TAB__OPC_MODE, "/m" }, - /* 307 */ { ud_itab__307, UD_TAB__OPC_MODE, "/m" }, - /* 308 */ { ud_itab__308, UD_TAB__OPC_MODE, "/m" }, - /* 309 */ { ud_itab__309, UD_TAB__OPC_MODE, "/m" }, - /* 310 */ { ud_itab__310, UD_TAB__OPC_MODE, "/m" }, - /* 311 */ { ud_itab__311, UD_TAB__OPC_MODE, "/m" }, - /* 312 */ { ud_itab__312, UD_TAB__OPC_MODE, "/m" }, - /* 313 */ { ud_itab__313, UD_TAB__OPC_REG, "/reg" }, - /* 314 */ { ud_itab__314, UD_TAB__OPC_REG, "/reg" }, - /* 315 */ { ud_itab__315, UD_TAB__OPC_OSIZE, "/o" }, - /* 316 */ { ud_itab__316, UD_TAB__OPC_OSIZE, "/o" }, - /* 317 */ { ud_itab__317, UD_TAB__OPC_MODE, "/m" }, - /* 318 */ { ud_itab__318, UD_TAB__OPC_OSIZE, "/o" }, - /* 319 */ { ud_itab__319, UD_TAB__OPC_MODE, "/m" }, - /* 320 */ { ud_itab__320, UD_TAB__OPC_MODE, "/m" }, - /* 321 */ { ud_itab__321, UD_TAB__OPC_MODE, "/m" }, - /* 322 */ { ud_itab__322, UD_TAB__OPC_OSIZE, "/o" }, - /* 323 */ { ud_itab__323, UD_TAB__OPC_MODE, "/m" }, - /* 324 */ { ud_itab__324, UD_TAB__OPC_MODE, "/m" }, - /* 325 */ { ud_itab__325, UD_TAB__OPC_MODE, "/m" }, - /* 326 */ { ud_itab__326, UD_TAB__OPC_OSIZE, "/o" }, - /* 327 */ { ud_itab__327, UD_TAB__OPC_OSIZE, "/o" }, - /* 328 */ { ud_itab__328, UD_TAB__OPC_OSIZE, "/o" }, - /* 329 */ { ud_itab__329, UD_TAB__OPC_OSIZE, "/o" }, - /* 330 */ { ud_itab__330, UD_TAB__OPC_OSIZE, "/o" }, - /* 331 */ { ud_itab__331, UD_TAB__OPC_REG, "/reg" }, - /* 332 */ { ud_itab__332, UD_TAB__OPC_REG, "/reg" }, - /* 333 */ { ud_itab__333, UD_TAB__OPC_VEX, "/vex" }, - /* 334 */ { ud_itab__334, UD_TAB__OPC_MODE, "/m" }, - /* 335 */ { ud_itab__335, UD_TAB__OPC_TABLE, "opctbl" }, - /* 336 */ { ud_itab__336, UD_TAB__OPC_MOD, "/mod" }, - /* 337 */ { ud_itab__337, UD_TAB__OPC_MOD, "/mod" }, - /* 338 */ { ud_itab__338, UD_TAB__OPC_MOD, "/mod" }, - /* 339 */ { ud_itab__339, UD_TAB__OPC_REG, "/reg" }, - /* 340 */ { ud_itab__340, UD_TAB__OPC_VEX_L, "/vexl" }, - /* 341 */ { ud_itab__341, UD_TAB__OPC_TABLE, "opctbl" }, - /* 342 */ { ud_itab__342, UD_TAB__OPC_MOD, "/mod" }, - /* 343 */ { ud_itab__343, UD_TAB__OPC_MOD, "/mod" }, - /* 344 */ { ud_itab__344, UD_TAB__OPC_OSIZE, "/o" }, - /* 345 */ { ud_itab__345, UD_TAB__OPC_REG, "/reg" }, - /* 346 */ { ud_itab__346, UD_TAB__OPC_VEX_L, "/vexl" }, - /* 347 */ { ud_itab__347, UD_TAB__OPC_REG, "/reg" }, - /* 348 */ { ud_itab__348, UD_TAB__OPC_VEX_L, "/vexl" }, - /* 349 */ { ud_itab__349, UD_TAB__OPC_REG, "/reg" }, - /* 350 */ { ud_itab__350, UD_TAB__OPC_VEX_L, "/vexl" }, - /* 351 */ { ud_itab__351, UD_TAB__OPC_OSIZE, "/o" }, - /* 352 */ { ud_itab__352, UD_TAB__OPC_VEX_L, "/vexl" }, - /* 353 */ { ud_itab__353, UD_TAB__OPC_VEX_L, "/vexl" }, - /* 354 */ { ud_itab__354, UD_TAB__OPC_VEX_L, "/vexl" }, - /* 355 */ { ud_itab__355, UD_TAB__OPC_VEX_L, "/vexl" }, - /* 356 */ { ud_itab__356, UD_TAB__OPC_MOD, "/mod" }, - /* 357 */ { ud_itab__357, UD_TAB__OPC_TABLE, "opctbl" }, - /* 358 */ { ud_itab__358, UD_TAB__OPC_VEX_W, "/vexw" }, - /* 359 */ { ud_itab__359, UD_TAB__OPC_VEX_W, "/vexw" }, - /* 360 */ { ud_itab__360, UD_TAB__OPC_VEX_W, "/vexw" }, - /* 361 */ { ud_itab__361, UD_TAB__OPC_VEX_W, "/vexw" }, - /* 362 */ { ud_itab__362, UD_TAB__OPC_VEX_W, "/vexw" }, - /* 363 */ { ud_itab__363, UD_TAB__OPC_VEX_W, "/vexw" }, - /* 364 */ { ud_itab__364, UD_TAB__OPC_VEX_L, "/vexl" }, - /* 365 */ { ud_itab__365, UD_TAB__OPC_VEX_W, "/vexw" }, - /* 366 */ { ud_itab__366, UD_TAB__OPC_VEX_W, "/vexw" }, - /* 367 */ { ud_itab__367, UD_TAB__OPC_VEX_W, "/vexw" }, - /* 368 */ { ud_itab__368, UD_TAB__OPC_VEX_W, "/vexw" }, - /* 369 */ { ud_itab__369, UD_TAB__OPC_TABLE, "opctbl" }, - /* 370 */ { ud_itab__370, UD_TAB__OPC_VEX_W, "/vexw" }, - /* 371 */ { ud_itab__371, UD_TAB__OPC_VEX_W, "/vexw" }, - /* 372 */ { ud_itab__372, UD_TAB__OPC_VEX_W, "/vexw" }, - /* 373 */ { ud_itab__373, UD_TAB__OPC_VEX_L, "/vexl" }, - /* 374 */ { ud_itab__374, UD_TAB__OPC_VEX_W, "/vexw" }, - /* 375 */ { ud_itab__375, UD_TAB__OPC_OSIZE, "/o" }, - /* 376 */ { ud_itab__376, UD_TAB__OPC_VEX_W, "/vexw" }, - /* 377 */ { ud_itab__377, UD_TAB__OPC_VEX_W, "/vexw" }, - /* 378 */ { ud_itab__378, UD_TAB__OPC_VEX_W, "/vexw" }, - /* 379 */ { ud_itab__379, UD_TAB__OPC_VEX_W, "/vexw" }, - /* 380 */ { ud_itab__380, UD_TAB__OPC_VEX_L, "/vexl" }, - /* 381 */ { ud_itab__381, UD_TAB__OPC_VEX_W, "/vexw" }, - /* 382 */ { ud_itab__382, UD_TAB__OPC_VEX_L, "/vexl" }, - /* 383 */ { ud_itab__383, UD_TAB__OPC_VEX_W, "/vexw" }, - /* 384 */ { ud_itab__384, UD_TAB__OPC_VEX_L, "/vexl" }, - /* 385 */ { ud_itab__385, UD_TAB__OPC_MODE, "/m" }, - /* 386 */ { ud_itab__386, UD_TAB__OPC_VEX_W, "/vexw" }, - /* 387 */ { ud_itab__387, UD_TAB__OPC_VEX_L, "/vexl" }, - /* 388 */ { ud_itab__388, UD_TAB__OPC_VEX_W, "/vexw" }, - /* 389 */ { ud_itab__389, UD_TAB__OPC_VEX_L, "/vexl" }, - /* 390 */ { ud_itab__390, UD_TAB__OPC_VEX_L, "/vexl" }, - /* 391 */ { ud_itab__391, UD_TAB__OPC_VEX_W, "/vexw" }, - /* 392 */ { ud_itab__392, UD_TAB__OPC_VEX_W, "/vexw" }, - /* 393 */ { ud_itab__393, UD_TAB__OPC_VEX_W, "/vexw" }, - /* 394 */ { ud_itab__394, UD_TAB__OPC_TABLE, "opctbl" }, - /* 395 */ { ud_itab__395, UD_TAB__OPC_MOD, "/mod" }, - /* 396 */ { ud_itab__396, UD_TAB__OPC_MOD, "/mod" }, - /* 397 */ { ud_itab__397, UD_TAB__OPC_MOD, "/mod" }, - /* 398 */ { ud_itab__398, UD_TAB__OPC_MOD, "/mod" }, - /* 399 */ { ud_itab__399, UD_TAB__OPC_TABLE, "opctbl" }, - /* 400 */ { ud_itab__400, UD_TAB__OPC_MOD, "/mod" }, - /* 401 */ { ud_itab__401, UD_TAB__OPC_MOD, "/mod" }, - /* 402 */ { ud_itab__402, UD_TAB__OPC_MOD, "/mod" }, - /* 403 */ { ud_itab__403, UD_TAB__OPC_VEX, "/vex" }, - /* 404 */ { ud_itab__404, UD_TAB__OPC_MODE, "/m" }, - /* 405 */ { ud_itab__405, UD_TAB__OPC_REG, "/reg" }, - /* 406 */ { ud_itab__406, UD_TAB__OPC_REG, "/reg" }, - /* 407 */ { ud_itab__407, UD_TAB__OPC_MODE, "/m" }, - /* 408 */ { ud_itab__408, UD_TAB__OPC_OSIZE, "/o" }, - /* 409 */ { ud_itab__409, UD_TAB__OPC_REG, "/reg" }, - /* 410 */ { ud_itab__410, UD_TAB__OPC_REG, "/reg" }, - /* 411 */ { ud_itab__411, UD_TAB__OPC_REG, "/reg" }, - /* 412 */ { ud_itab__412, UD_TAB__OPC_REG, "/reg" }, - /* 413 */ { ud_itab__413, UD_TAB__OPC_MODE, "/m" }, - /* 414 */ { ud_itab__414, UD_TAB__OPC_MODE, "/m" }, - /* 415 */ { ud_itab__415, UD_TAB__OPC_MODE, "/m" }, - /* 416 */ { ud_itab__416, UD_TAB__OPC_MOD, "/mod" }, - /* 417 */ { ud_itab__417, UD_TAB__OPC_REG, "/reg" }, - /* 418 */ { ud_itab__418, UD_TAB__OPC_X87, "/x87" }, - /* 419 */ { ud_itab__419, UD_TAB__OPC_MOD, "/mod" }, - /* 420 */ { ud_itab__420, UD_TAB__OPC_REG, "/reg" }, - /* 421 */ { ud_itab__421, UD_TAB__OPC_X87, "/x87" }, - /* 422 */ { ud_itab__422, UD_TAB__OPC_MOD, "/mod" }, - /* 423 */ { ud_itab__423, UD_TAB__OPC_REG, "/reg" }, - /* 424 */ { ud_itab__424, UD_TAB__OPC_X87, "/x87" }, - /* 425 */ { ud_itab__425, UD_TAB__OPC_MOD, "/mod" }, - /* 426 */ { ud_itab__426, UD_TAB__OPC_REG, "/reg" }, - /* 427 */ { ud_itab__427, UD_TAB__OPC_X87, "/x87" }, - /* 428 */ { ud_itab__428, UD_TAB__OPC_MOD, "/mod" }, - /* 429 */ { ud_itab__429, UD_TAB__OPC_REG, "/reg" }, - /* 430 */ { ud_itab__430, UD_TAB__OPC_X87, "/x87" }, - /* 431 */ { ud_itab__431, UD_TAB__OPC_MOD, "/mod" }, - /* 432 */ { ud_itab__432, UD_TAB__OPC_REG, "/reg" }, - /* 433 */ { ud_itab__433, UD_TAB__OPC_X87, "/x87" }, - /* 434 */ { ud_itab__434, UD_TAB__OPC_MOD, "/mod" }, - /* 435 */ { ud_itab__435, UD_TAB__OPC_REG, "/reg" }, - /* 436 */ { ud_itab__436, UD_TAB__OPC_X87, "/x87" }, - /* 437 */ { ud_itab__437, UD_TAB__OPC_MOD, "/mod" }, - /* 438 */ { ud_itab__438, UD_TAB__OPC_REG, "/reg" }, - /* 439 */ { ud_itab__439, UD_TAB__OPC_X87, "/x87" }, - /* 440 */ { ud_itab__440, UD_TAB__OPC_ASIZE, "/a" }, - /* 441 */ { ud_itab__441, UD_TAB__OPC_MODE, "/m" }, - /* 442 */ { ud_itab__442, UD_TAB__OPC_REG, "/reg" }, - /* 443 */ { ud_itab__443, UD_TAB__OPC_REG, "/reg" }, - /* 444 */ { ud_itab__444, UD_TAB__OPC_REG, "/reg" }, - /* 445 */ { ud_itab__445, UD_TAB__OPC_REG, "/reg" }, - /* 446 */ { ud_itab__446, UD_TAB__OPC_MODE, "/m" }, -}; - -/* itab entry operand definitions (for readability) */ -#define O_AL { OP_AL, SZ_B } -#define O_AX { OP_AX, SZ_W } -#define O_Av { OP_A, SZ_V } -#define O_C { OP_C, SZ_NA } -#define O_CL { OP_CL, SZ_B } -#define O_CS { OP_CS, SZ_NA } -#define O_CX { OP_CX, SZ_W } -#define O_D { OP_D, SZ_NA } -#define O_DL { OP_DL, SZ_B } -#define O_DS { OP_DS, SZ_NA } -#define O_DX { OP_DX, SZ_W } -#define O_E { OP_E, SZ_NA } -#define O_ES { OP_ES, SZ_NA } -#define O_Eb { OP_E, SZ_B } -#define O_Ed { OP_E, SZ_D } -#define O_Eq { OP_E, SZ_Q } -#define O_Ev { OP_E, SZ_V } -#define O_Ew { OP_E, SZ_W } -#define O_Ey { OP_E, SZ_Y } -#define O_Ez { OP_E, SZ_Z } -#define O_FS { OP_FS, SZ_NA } -#define O_Fv { OP_F, SZ_V } -#define O_G { OP_G, SZ_NA } -#define O_GS { OP_GS, SZ_NA } -#define O_Gb { OP_G, SZ_B } -#define O_Gd { OP_G, SZ_D } -#define O_Gq { OP_G, SZ_Q } -#define O_Gv { OP_G, SZ_V } -#define O_Gw { OP_G, SZ_W } -#define O_Gy { OP_G, SZ_Y } -#define O_Gz { OP_G, SZ_Z } -#define O_H { OP_H, SZ_X } -#define O_Hqq { OP_H, SZ_QQ } -#define O_Hx { OP_H, SZ_X } -#define O_I1 { OP_I1, SZ_NA } -#define O_I3 { OP_I3, SZ_NA } -#define O_Ib { OP_I, SZ_B } -#define O_Iv { OP_I, SZ_V } -#define O_Iw { OP_I, SZ_W } -#define O_Iz { OP_I, SZ_Z } -#define O_Jb { OP_J, SZ_B } -#define O_Jv { OP_J, SZ_V } -#define O_Jz { OP_J, SZ_Z } -#define O_L { OP_L, SZ_O } -#define O_Lx { OP_L, SZ_X } -#define O_M { OP_M, SZ_NA } -#define O_Mb { OP_M, SZ_B } -#define O_MbRd { OP_MR, SZ_BD } -#define O_MbRv { OP_MR, SZ_BV } -#define O_Md { OP_M, SZ_D } -#define O_MdRy { OP_MR, SZ_DY } -#define O_MdU { OP_MU, SZ_DO } -#define O_Mdq { OP_M, SZ_DQ } -#define O_Mo { OP_M, SZ_O } -#define O_Mq { OP_M, SZ_Q } -#define O_MqU { OP_MU, SZ_QO } -#define O_Ms { OP_M, SZ_W } -#define O_Mt { OP_M, SZ_T } -#define O_Mv { OP_M, SZ_V } -#define O_Mw { OP_M, SZ_W } -#define O_MwRd { OP_MR, SZ_WD } -#define O_MwRv { OP_MR, SZ_WV } -#define O_MwRy { OP_MR, SZ_WY } -#define O_MwU { OP_MU, SZ_WO } -#define O_N { OP_N, SZ_Q } -#define O_NONE { OP_NONE, SZ_NA } -#define O_Ob { OP_O, SZ_B } -#define O_Ov { OP_O, SZ_V } -#define O_Ow { OP_O, SZ_W } -#define O_P { OP_P, SZ_Q } -#define O_Q { OP_Q, SZ_Q } -#define O_R { OP_R, SZ_RDQ } -#define O_R0b { OP_R0, SZ_B } -#define O_R0v { OP_R0, SZ_V } -#define O_R0w { OP_R0, SZ_W } -#define O_R0y { OP_R0, SZ_Y } -#define O_R0z { OP_R0, SZ_Z } -#define O_R1b { OP_R1, SZ_B } -#define O_R1v { OP_R1, SZ_V } -#define O_R1w { OP_R1, SZ_W } -#define O_R1y { OP_R1, SZ_Y } -#define O_R1z { OP_R1, SZ_Z } -#define O_R2b { OP_R2, SZ_B } -#define O_R2v { OP_R2, SZ_V } -#define O_R2w { OP_R2, SZ_W } -#define O_R2y { OP_R2, SZ_Y } -#define O_R2z { OP_R2, SZ_Z } -#define O_R3b { OP_R3, SZ_B } -#define O_R3v { OP_R3, SZ_V } -#define O_R3w { OP_R3, SZ_W } -#define O_R3y { OP_R3, SZ_Y } -#define O_R3z { OP_R3, SZ_Z } -#define O_R4b { OP_R4, SZ_B } -#define O_R4v { OP_R4, SZ_V } -#define O_R4w { OP_R4, SZ_W } -#define O_R4y { OP_R4, SZ_Y } -#define O_R4z { OP_R4, SZ_Z } -#define O_R5b { OP_R5, SZ_B } -#define O_R5v { OP_R5, SZ_V } -#define O_R5w { OP_R5, SZ_W } -#define O_R5y { OP_R5, SZ_Y } -#define O_R5z { OP_R5, SZ_Z } -#define O_R6b { OP_R6, SZ_B } -#define O_R6v { OP_R6, SZ_V } -#define O_R6w { OP_R6, SZ_W } -#define O_R6y { OP_R6, SZ_Y } -#define O_R6z { OP_R6, SZ_Z } -#define O_R7b { OP_R7, SZ_B } -#define O_R7v { OP_R7, SZ_V } -#define O_R7w { OP_R7, SZ_W } -#define O_R7y { OP_R7, SZ_Y } -#define O_R7z { OP_R7, SZ_Z } -#define O_S { OP_S, SZ_W } -#define O_SS { OP_SS, SZ_NA } -#define O_ST0 { OP_ST0, SZ_NA } -#define O_ST1 { OP_ST1, SZ_NA } -#define O_ST2 { OP_ST2, SZ_NA } -#define O_ST3 { OP_ST3, SZ_NA } -#define O_ST4 { OP_ST4, SZ_NA } -#define O_ST5 { OP_ST5, SZ_NA } -#define O_ST6 { OP_ST6, SZ_NA } -#define O_ST7 { OP_ST7, SZ_NA } -#define O_U { OP_U, SZ_O } -#define O_Ux { OP_U, SZ_X } -#define O_V { OP_V, SZ_DQ } -#define O_Vdq { OP_V, SZ_DQ } -#define O_Vqq { OP_V, SZ_QQ } -#define O_Vsd { OP_V, SZ_Q } -#define O_Vx { OP_V, SZ_X } -#define O_W { OP_W, SZ_DQ } -#define O_Wdq { OP_W, SZ_DQ } -#define O_Wqq { OP_W, SZ_QQ } -#define O_Wsd { OP_W, SZ_Q } -#define O_Wx { OP_W, SZ_X } -#define O_eAX { OP_eAX, SZ_Z } -#define O_eCX { OP_eCX, SZ_Z } -#define O_eDX { OP_eDX, SZ_Z } -#define O_rAX { OP_rAX, SZ_V } -#define O_rCX { OP_rCX, SZ_V } -#define O_rDX { OP_rDX, SZ_V } -#define O_sIb { OP_sI, SZ_B } -#define O_sIv { OP_sI, SZ_V } -#define O_sIz { OP_sI, SZ_Z } - -struct ud_itab_entry ud_itab[] = { - /* 0000 */ { UD_Iinvalid, O_NONE, O_NONE, O_NONE, O_NONE, P_none }, - /* 0001 */ { UD_Iaaa, O_NONE, O_NONE, O_NONE, O_NONE, P_none }, - /* 0002 */ { UD_Iaad, O_Ib, O_NONE, O_NONE, O_NONE, P_none }, - /* 0003 */ { UD_Iaam, O_Ib, O_NONE, O_NONE, O_NONE, P_none }, - /* 0004 */ { UD_Iaas, O_NONE, O_NONE, O_NONE, O_NONE, P_none }, - /* 0005 */ { UD_Iadc, O_Eb, O_Gb, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0006 */ { UD_Iadc, O_Ev, O_Gv, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 0007 */ { UD_Iadc, O_Gb, O_Eb, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0008 */ { UD_Iadc, O_Gv, O_Ev, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 0009 */ { UD_Iadc, O_AL, O_Ib, O_NONE, O_NONE, P_none }, - /* 0010 */ { UD_Iadc, O_rAX, O_sIz, O_NONE, O_NONE, P_oso|P_rexw }, - /* 0011 */ { UD_Iadc, O_Eb, O_Ib, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0012 */ { UD_Iadc, O_Eb, O_Ib, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb|P_inv64 }, - /* 0013 */ { UD_Iadc, O_Ev, O_sIz, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 0014 */ { UD_Iadc, O_Ev, O_sIb, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 0015 */ { UD_Iadd, O_Eb, O_Gb, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0016 */ { UD_Iadd, O_Ev, O_Gv, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 0017 */ { UD_Iadd, O_Gb, O_Eb, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0018 */ { UD_Iadd, O_Gv, O_Ev, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 0019 */ { UD_Iadd, O_AL, O_Ib, O_NONE, O_NONE, P_none }, - /* 0020 */ { UD_Iadd, O_rAX, O_sIz, O_NONE, O_NONE, P_oso|P_rexw }, - /* 0021 */ { UD_Iadd, O_Eb, O_Ib, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0022 */ { UD_Iadd, O_Eb, O_Ib, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb|P_inv64 }, - /* 0023 */ { UD_Iadd, O_Ev, O_sIz, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 0024 */ { UD_Iadd, O_Ev, O_sIb, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 0025 */ { UD_Iaddpd, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0026 */ { UD_Ivaddpd, O_Vx, O_Hx, O_Wx, O_NONE, P_aso|P_rexr|P_rexx|P_rexb|P_vexl }, - /* 0027 */ { UD_Iaddps, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0028 */ { UD_Ivaddps, O_Vx, O_Hx, O_Wx, O_NONE, P_aso|P_rexr|P_rexx|P_rexb|P_vexl }, - /* 0029 */ { UD_Iaddsd, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0030 */ { UD_Ivaddsd, O_Vx, O_Hx, O_Wx, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0031 */ { UD_Iaddss, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0032 */ { UD_Ivaddss, O_Vx, O_Hx, O_Wx, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0033 */ { UD_Iaddsubpd, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0034 */ { UD_Ivaddsubpd, O_Vx, O_Hx, O_Wx, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0035 */ { UD_Iaddsubps, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0036 */ { UD_Ivaddsubps, O_Vx, O_Hx, O_Wx, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0037 */ { UD_Iaesdec, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0038 */ { UD_Ivaesdec, O_Vx, O_Hx, O_Wx, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0039 */ { UD_Iaesdeclast, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0040 */ { UD_Ivaesdeclast, O_Vx, O_Wx, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0041 */ { UD_Iaesenc, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0042 */ { UD_Ivaesenc, O_Vx, O_Wx, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0043 */ { UD_Iaesenclast, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0044 */ { UD_Ivaesenclast, O_Vx, O_Hx, O_Wx, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0045 */ { UD_Iaesimc, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0046 */ { UD_Ivaesimc, O_Vx, O_Wx, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0047 */ { UD_Iaeskeygenassist, O_V, O_W, O_Ib, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0048 */ { UD_Ivaeskeygenassist, O_Vx, O_Wx, O_Ib, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0049 */ { UD_Iand, O_Eb, O_Gb, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0050 */ { UD_Iand, O_Ev, O_Gv, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 0051 */ { UD_Iand, O_Gb, O_Eb, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0052 */ { UD_Iand, O_Gv, O_Ev, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 0053 */ { UD_Iand, O_AL, O_Ib, O_NONE, O_NONE, P_none }, - /* 0054 */ { UD_Iand, O_rAX, O_sIz, O_NONE, O_NONE, P_oso|P_rexw }, - /* 0055 */ { UD_Iand, O_Eb, O_Ib, O_NONE, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 0056 */ { UD_Iand, O_Eb, O_Ib, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb|P_inv64 }, - /* 0057 */ { UD_Iand, O_Ev, O_sIz, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 0058 */ { UD_Iand, O_Ev, O_sIb, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 0059 */ { UD_Iandpd, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0060 */ { UD_Ivandpd, O_Vx, O_Hx, O_Wx, O_NONE, P_aso|P_rexr|P_rexx|P_rexb|P_vexl }, - /* 0061 */ { UD_Iandps, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0062 */ { UD_Ivandps, O_Vx, O_Hx, O_Wx, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0063 */ { UD_Iandnpd, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0064 */ { UD_Ivandnpd, O_Vx, O_Hx, O_Wx, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0065 */ { UD_Iandnps, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0066 */ { UD_Ivandnps, O_Vx, O_Hx, O_Wx, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0067 */ { UD_Iarpl, O_Ew, O_Gw, O_NONE, O_NONE, P_aso }, - /* 0068 */ { UD_Imovsxd, O_Gq, O_Ed, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexx|P_rexr|P_rexb }, - /* 0069 */ { UD_Icall, O_Ev, O_NONE, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 0070 */ { UD_Icall, O_Eq, O_NONE, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb|P_def64 }, - /* 0071 */ { UD_Icall, O_Fv, O_NONE, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 0072 */ { UD_Icall, O_Jz, O_NONE, O_NONE, O_NONE, P_oso|P_def64 }, - /* 0073 */ { UD_Icall, O_Av, O_NONE, O_NONE, O_NONE, P_oso }, - /* 0074 */ { UD_Icbw, O_NONE, O_NONE, O_NONE, O_NONE, P_oso|P_rexw }, - /* 0075 */ { UD_Icwde, O_NONE, O_NONE, O_NONE, O_NONE, P_oso|P_rexw }, - /* 0076 */ { UD_Icdqe, O_NONE, O_NONE, O_NONE, O_NONE, P_oso|P_rexw }, - /* 0077 */ { UD_Iclc, O_NONE, O_NONE, O_NONE, O_NONE, P_none }, - /* 0078 */ { UD_Icld, O_NONE, O_NONE, O_NONE, O_NONE, P_none }, - /* 0079 */ { UD_Iclflush, O_M, O_NONE, O_NONE, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 0080 */ { UD_Iclgi, O_NONE, O_NONE, O_NONE, O_NONE, P_none }, - /* 0081 */ { UD_Icli, O_NONE, O_NONE, O_NONE, O_NONE, P_none }, - /* 0082 */ { UD_Iclts, O_NONE, O_NONE, O_NONE, O_NONE, P_none }, - /* 0083 */ { UD_Icmc, O_NONE, O_NONE, O_NONE, O_NONE, P_none }, - /* 0084 */ { UD_Icmovo, O_Gv, O_Ev, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 0085 */ { UD_Icmovno, O_Gv, O_Ev, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 0086 */ { UD_Icmovb, O_Gv, O_Ev, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 0087 */ { UD_Icmovae, O_Gv, O_Ev, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 0088 */ { UD_Icmovz, O_Gv, O_Ev, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 0089 */ { UD_Icmovnz, O_Gv, O_Ev, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 0090 */ { UD_Icmovbe, O_Gv, O_Ev, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 0091 */ { UD_Icmova, O_Gv, O_Ev, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 0092 */ { UD_Icmovs, O_Gv, O_Ev, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 0093 */ { UD_Icmovns, O_Gv, O_Ev, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 0094 */ { UD_Icmovp, O_Gv, O_Ev, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 0095 */ { UD_Icmovnp, O_Gv, O_Ev, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 0096 */ { UD_Icmovl, O_Gv, O_Ev, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 0097 */ { UD_Icmovge, O_Gv, O_Ev, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 0098 */ { UD_Icmovle, O_Gv, O_Ev, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 0099 */ { UD_Icmovg, O_Gv, O_Ev, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 0100 */ { UD_Icmp, O_Eb, O_Gb, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0101 */ { UD_Icmp, O_Ev, O_Gv, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 0102 */ { UD_Icmp, O_Gb, O_Eb, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0103 */ { UD_Icmp, O_Gv, O_Ev, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 0104 */ { UD_Icmp, O_AL, O_Ib, O_NONE, O_NONE, P_none }, - /* 0105 */ { UD_Icmp, O_rAX, O_sIz, O_NONE, O_NONE, P_oso|P_rexw }, - /* 0106 */ { UD_Icmp, O_Eb, O_Ib, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0107 */ { UD_Icmp, O_Eb, O_Ib, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb|P_inv64 }, - /* 0108 */ { UD_Icmp, O_Ev, O_sIz, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 0109 */ { UD_Icmp, O_Ev, O_sIb, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 0110 */ { UD_Icmppd, O_V, O_W, O_Ib, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0111 */ { UD_Ivcmppd, O_Vx, O_Hx, O_Wx, O_Ib, P_aso|P_rexr|P_rexx|P_rexb|P_vexl }, - /* 0112 */ { UD_Icmpps, O_V, O_W, O_Ib, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0113 */ { UD_Ivcmpps, O_Vx, O_Hx, O_Wx, O_Ib, P_aso|P_rexr|P_rexx|P_rexb|P_vexl }, - /* 0114 */ { UD_Icmpsb, O_NONE, O_NONE, O_NONE, O_NONE, P_strz|P_seg }, - /* 0115 */ { UD_Icmpsw, O_NONE, O_NONE, O_NONE, O_NONE, P_strz|P_oso|P_rexw|P_seg }, - /* 0116 */ { UD_Icmpsd, O_NONE, O_NONE, O_NONE, O_NONE, P_strz|P_oso|P_rexw|P_seg }, - /* 0117 */ { UD_Icmpsd, O_V, O_W, O_Ib, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0118 */ { UD_Ivcmpsd, O_Vx, O_Hx, O_Wx, O_Ib, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0119 */ { UD_Icmpsq, O_NONE, O_NONE, O_NONE, O_NONE, P_strz|P_oso|P_rexw|P_seg }, - /* 0120 */ { UD_Icmpss, O_V, O_W, O_Ib, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0121 */ { UD_Ivcmpss, O_Vx, O_Hx, O_Wx, O_Ib, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0122 */ { UD_Icmpxchg, O_Eb, O_Gb, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0123 */ { UD_Icmpxchg, O_Ev, O_Gv, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 0124 */ { UD_Icmpxchg8b, O_M, O_NONE, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0125 */ { UD_Icmpxchg8b, O_M, O_NONE, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0126 */ { UD_Icmpxchg16b, O_M, O_NONE, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0127 */ { UD_Icomisd, O_Vsd, O_Wsd, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0128 */ { UD_Ivcomisd, O_Vsd, O_Wsd, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0129 */ { UD_Icomiss, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0130 */ { UD_Ivcomiss, O_Vx, O_Wx, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0131 */ { UD_Icpuid, O_NONE, O_NONE, O_NONE, O_NONE, P_none }, - /* 0132 */ { UD_Icvtdq2pd, O_V, O_Wdq, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0133 */ { UD_Ivcvtdq2pd, O_Vx, O_Wdq, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb|P_vexl }, - /* 0134 */ { UD_Icvtdq2ps, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0135 */ { UD_Ivcvtdq2ps, O_Vx, O_Wx, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0136 */ { UD_Icvtpd2dq, O_Vdq, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0137 */ { UD_Ivcvtpd2dq, O_Vdq, O_Wx, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb|P_vexl }, - /* 0138 */ { UD_Icvtpd2pi, O_P, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0139 */ { UD_Icvtpd2ps, O_Vdq, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0140 */ { UD_Ivcvtpd2ps, O_Vdq, O_Wx, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb|P_vexl }, - /* 0141 */ { UD_Icvtpi2ps, O_V, O_Q, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0142 */ { UD_Icvtpi2pd, O_V, O_Q, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0143 */ { UD_Icvtps2dq, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0144 */ { UD_Ivcvtps2dq, O_Vx, O_Wx, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb|P_vexl }, - /* 0145 */ { UD_Icvtps2pd, O_V, O_Wdq, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0146 */ { UD_Ivcvtps2pd, O_Vx, O_Wdq, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb|P_vexl }, - /* 0147 */ { UD_Icvtps2pi, O_P, O_MqU, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0148 */ { UD_Icvtsd2si, O_Gy, O_MqU, O_NONE, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 0149 */ { UD_Ivcvtsd2si, O_Gy, O_MqU, O_NONE, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 0150 */ { UD_Icvtsd2ss, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0151 */ { UD_Ivcvtsd2ss, O_Vx, O_Hx, O_Wx, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0152 */ { UD_Icvtsi2sd, O_V, O_Ey, O_NONE, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 0153 */ { UD_Ivcvtsi2sd, O_Vx, O_Hx, O_Ey, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 0154 */ { UD_Icvtsi2ss, O_V, O_Ey, O_NONE, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 0155 */ { UD_Ivcvtsi2ss, O_Vx, O_Hx, O_Ey, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 0156 */ { UD_Icvtss2sd, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0157 */ { UD_Ivcvtss2sd, O_Vx, O_Hx, O_Wx, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0158 */ { UD_Icvtss2si, O_Gy, O_MdU, O_NONE, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 0159 */ { UD_Ivcvtss2si, O_Gy, O_MdU, O_NONE, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 0160 */ { UD_Icvttpd2dq, O_Vdq, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0161 */ { UD_Ivcvttpd2dq, O_Vdq, O_Wx, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb|P_vexl }, - /* 0162 */ { UD_Icvttpd2pi, O_P, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0163 */ { UD_Icvttps2dq, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0164 */ { UD_Ivcvttps2dq, O_Vx, O_Wx, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb|P_vexl }, - /* 0165 */ { UD_Icvttps2pi, O_P, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0166 */ { UD_Icvttsd2si, O_Gy, O_MqU, O_NONE, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 0167 */ { UD_Ivcvttsd2si, O_Gy, O_MqU, O_NONE, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 0168 */ { UD_Icvttss2si, O_Gy, O_MdU, O_NONE, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 0169 */ { UD_Ivcvttss2si, O_Gy, O_MdU, O_NONE, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 0170 */ { UD_Icwd, O_NONE, O_NONE, O_NONE, O_NONE, P_oso|P_rexw }, - /* 0171 */ { UD_Icdq, O_NONE, O_NONE, O_NONE, O_NONE, P_oso|P_rexw }, - /* 0172 */ { UD_Icqo, O_NONE, O_NONE, O_NONE, O_NONE, P_oso|P_rexw }, - /* 0173 */ { UD_Idaa, O_NONE, O_NONE, O_NONE, O_NONE, P_inv64 }, - /* 0174 */ { UD_Idas, O_NONE, O_NONE, O_NONE, O_NONE, P_inv64 }, - /* 0175 */ { UD_Idec, O_R0z, O_NONE, O_NONE, O_NONE, P_oso }, - /* 0176 */ { UD_Idec, O_R1z, O_NONE, O_NONE, O_NONE, P_oso }, - /* 0177 */ { UD_Idec, O_R2z, O_NONE, O_NONE, O_NONE, P_oso }, - /* 0178 */ { UD_Idec, O_R3z, O_NONE, O_NONE, O_NONE, P_oso }, - /* 0179 */ { UD_Idec, O_R4z, O_NONE, O_NONE, O_NONE, P_oso }, - /* 0180 */ { UD_Idec, O_R5z, O_NONE, O_NONE, O_NONE, P_oso }, - /* 0181 */ { UD_Idec, O_R6z, O_NONE, O_NONE, O_NONE, P_oso }, - /* 0182 */ { UD_Idec, O_R7z, O_NONE, O_NONE, O_NONE, P_oso }, - /* 0183 */ { UD_Idec, O_Eb, O_NONE, O_NONE, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 0184 */ { UD_Idec, O_Ev, O_NONE, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 0185 */ { UD_Idiv, O_Ev, O_NONE, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 0186 */ { UD_Idiv, O_Eb, O_NONE, O_NONE, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 0187 */ { UD_Idivpd, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0188 */ { UD_Ivdivpd, O_Vx, O_Hx, O_Wx, O_NONE, P_aso|P_rexr|P_rexx|P_rexb|P_vexl }, - /* 0189 */ { UD_Idivps, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0190 */ { UD_Ivdivps, O_Vx, O_Hx, O_Wx, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0191 */ { UD_Idivsd, O_V, O_MqU, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0192 */ { UD_Ivdivsd, O_Vx, O_Hx, O_MqU, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0193 */ { UD_Idivss, O_V, O_MdU, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0194 */ { UD_Ivdivss, O_Vx, O_Hx, O_MdU, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0195 */ { UD_Idppd, O_V, O_W, O_Ib, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0196 */ { UD_Ivdppd, O_Vx, O_Hx, O_Wx, O_Ib, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0197 */ { UD_Idpps, O_V, O_W, O_Ib, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0198 */ { UD_Ivdpps, O_Vx, O_Hx, O_Wx, O_Ib, P_aso|P_rexr|P_rexx|P_rexb|P_vexl }, - /* 0199 */ { UD_Iemms, O_NONE, O_NONE, O_NONE, O_NONE, P_none }, - /* 0200 */ { UD_Ienter, O_Iw, O_Ib, O_NONE, O_NONE, P_def64 }, - /* 0201 */ { UD_Iextractps, O_MdRy, O_V, O_Ib, O_NONE, P_aso|P_rexr|P_rexw|P_rexx|P_rexb }, - /* 0202 */ { UD_Ivextractps, O_MdRy, O_Vx, O_Ib, O_NONE, P_aso|P_rexr|P_rexw|P_rexx|P_rexb }, - /* 0203 */ { UD_If2xm1, O_NONE, O_NONE, O_NONE, O_NONE, P_none }, - /* 0204 */ { UD_Ifabs, O_NONE, O_NONE, O_NONE, O_NONE, P_none }, - /* 0205 */ { UD_Ifadd, O_Mq, O_NONE, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0206 */ { UD_Ifadd, O_Md, O_NONE, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0207 */ { UD_Ifadd, O_ST0, O_ST0, O_NONE, O_NONE, P_none }, - /* 0208 */ { UD_Ifadd, O_ST1, O_ST0, O_NONE, O_NONE, P_none }, - /* 0209 */ { UD_Ifadd, O_ST2, O_ST0, O_NONE, O_NONE, P_none }, - /* 0210 */ { UD_Ifadd, O_ST3, O_ST0, O_NONE, O_NONE, P_none }, - /* 0211 */ { UD_Ifadd, O_ST4, O_ST0, O_NONE, O_NONE, P_none }, - /* 0212 */ { UD_Ifadd, O_ST5, O_ST0, O_NONE, O_NONE, P_none }, - /* 0213 */ { UD_Ifadd, O_ST6, O_ST0, O_NONE, O_NONE, P_none }, - /* 0214 */ { UD_Ifadd, O_ST7, O_ST0, O_NONE, O_NONE, P_none }, - /* 0215 */ { UD_Ifadd, O_ST0, O_ST0, O_NONE, O_NONE, P_none }, - /* 0216 */ { UD_Ifadd, O_ST0, O_ST1, O_NONE, O_NONE, P_none }, - /* 0217 */ { UD_Ifadd, O_ST0, O_ST2, O_NONE, O_NONE, P_none }, - /* 0218 */ { UD_Ifadd, O_ST0, O_ST3, O_NONE, O_NONE, P_none }, - /* 0219 */ { UD_Ifadd, O_ST0, O_ST4, O_NONE, O_NONE, P_none }, - /* 0220 */ { UD_Ifadd, O_ST0, O_ST5, O_NONE, O_NONE, P_none }, - /* 0221 */ { UD_Ifadd, O_ST0, O_ST6, O_NONE, O_NONE, P_none }, - /* 0222 */ { UD_Ifadd, O_ST0, O_ST7, O_NONE, O_NONE, P_none }, - /* 0223 */ { UD_Ifaddp, O_ST0, O_ST0, O_NONE, O_NONE, P_none }, - /* 0224 */ { UD_Ifaddp, O_ST1, O_ST0, O_NONE, O_NONE, P_none }, - /* 0225 */ { UD_Ifaddp, O_ST2, O_ST0, O_NONE, O_NONE, P_none }, - /* 0226 */ { UD_Ifaddp, O_ST3, O_ST0, O_NONE, O_NONE, P_none }, - /* 0227 */ { UD_Ifaddp, O_ST4, O_ST0, O_NONE, O_NONE, P_none }, - /* 0228 */ { UD_Ifaddp, O_ST5, O_ST0, O_NONE, O_NONE, P_none }, - /* 0229 */ { UD_Ifaddp, O_ST6, O_ST0, O_NONE, O_NONE, P_none }, - /* 0230 */ { UD_Ifaddp, O_ST7, O_ST0, O_NONE, O_NONE, P_none }, - /* 0231 */ { UD_Ifbld, O_Mt, O_NONE, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0232 */ { UD_Ifbstp, O_Mt, O_NONE, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0233 */ { UD_Ifchs, O_NONE, O_NONE, O_NONE, O_NONE, P_none }, - /* 0234 */ { UD_Ifclex, O_NONE, O_NONE, O_NONE, O_NONE, P_none }, - /* 0235 */ { UD_Ifcmovb, O_ST0, O_ST0, O_NONE, O_NONE, P_none }, - /* 0236 */ { UD_Ifcmovb, O_ST0, O_ST1, O_NONE, O_NONE, P_none }, - /* 0237 */ { UD_Ifcmovb, O_ST0, O_ST2, O_NONE, O_NONE, P_none }, - /* 0238 */ { UD_Ifcmovb, O_ST0, O_ST3, O_NONE, O_NONE, P_none }, - /* 0239 */ { UD_Ifcmovb, O_ST0, O_ST4, O_NONE, O_NONE, P_none }, - /* 0240 */ { UD_Ifcmovb, O_ST0, O_ST5, O_NONE, O_NONE, P_none }, - /* 0241 */ { UD_Ifcmovb, O_ST0, O_ST6, O_NONE, O_NONE, P_none }, - /* 0242 */ { UD_Ifcmovb, O_ST0, O_ST7, O_NONE, O_NONE, P_none }, - /* 0243 */ { UD_Ifcmove, O_ST0, O_ST0, O_NONE, O_NONE, P_none }, - /* 0244 */ { UD_Ifcmove, O_ST0, O_ST1, O_NONE, O_NONE, P_none }, - /* 0245 */ { UD_Ifcmove, O_ST0, O_ST2, O_NONE, O_NONE, P_none }, - /* 0246 */ { UD_Ifcmove, O_ST0, O_ST3, O_NONE, O_NONE, P_none }, - /* 0247 */ { UD_Ifcmove, O_ST0, O_ST4, O_NONE, O_NONE, P_none }, - /* 0248 */ { UD_Ifcmove, O_ST0, O_ST5, O_NONE, O_NONE, P_none }, - /* 0249 */ { UD_Ifcmove, O_ST0, O_ST6, O_NONE, O_NONE, P_none }, - /* 0250 */ { UD_Ifcmove, O_ST0, O_ST7, O_NONE, O_NONE, P_none }, - /* 0251 */ { UD_Ifcmovbe, O_ST0, O_ST0, O_NONE, O_NONE, P_none }, - /* 0252 */ { UD_Ifcmovbe, O_ST0, O_ST1, O_NONE, O_NONE, P_none }, - /* 0253 */ { UD_Ifcmovbe, O_ST0, O_ST2, O_NONE, O_NONE, P_none }, - /* 0254 */ { UD_Ifcmovbe, O_ST0, O_ST3, O_NONE, O_NONE, P_none }, - /* 0255 */ { UD_Ifcmovbe, O_ST0, O_ST4, O_NONE, O_NONE, P_none }, - /* 0256 */ { UD_Ifcmovbe, O_ST0, O_ST5, O_NONE, O_NONE, P_none }, - /* 0257 */ { UD_Ifcmovbe, O_ST0, O_ST6, O_NONE, O_NONE, P_none }, - /* 0258 */ { UD_Ifcmovbe, O_ST0, O_ST7, O_NONE, O_NONE, P_none }, - /* 0259 */ { UD_Ifcmovu, O_ST0, O_ST0, O_NONE, O_NONE, P_none }, - /* 0260 */ { UD_Ifcmovu, O_ST0, O_ST1, O_NONE, O_NONE, P_none }, - /* 0261 */ { UD_Ifcmovu, O_ST0, O_ST2, O_NONE, O_NONE, P_none }, - /* 0262 */ { UD_Ifcmovu, O_ST0, O_ST3, O_NONE, O_NONE, P_none }, - /* 0263 */ { UD_Ifcmovu, O_ST0, O_ST4, O_NONE, O_NONE, P_none }, - /* 0264 */ { UD_Ifcmovu, O_ST0, O_ST5, O_NONE, O_NONE, P_none }, - /* 0265 */ { UD_Ifcmovu, O_ST0, O_ST6, O_NONE, O_NONE, P_none }, - /* 0266 */ { UD_Ifcmovu, O_ST0, O_ST7, O_NONE, O_NONE, P_none }, - /* 0267 */ { UD_Ifcmovnb, O_ST0, O_ST0, O_NONE, O_NONE, P_none }, - /* 0268 */ { UD_Ifcmovnb, O_ST0, O_ST1, O_NONE, O_NONE, P_none }, - /* 0269 */ { UD_Ifcmovnb, O_ST0, O_ST2, O_NONE, O_NONE, P_none }, - /* 0270 */ { UD_Ifcmovnb, O_ST0, O_ST3, O_NONE, O_NONE, P_none }, - /* 0271 */ { UD_Ifcmovnb, O_ST0, O_ST4, O_NONE, O_NONE, P_none }, - /* 0272 */ { UD_Ifcmovnb, O_ST0, O_ST5, O_NONE, O_NONE, P_none }, - /* 0273 */ { UD_Ifcmovnb, O_ST0, O_ST6, O_NONE, O_NONE, P_none }, - /* 0274 */ { UD_Ifcmovnb, O_ST0, O_ST7, O_NONE, O_NONE, P_none }, - /* 0275 */ { UD_Ifcmovne, O_ST0, O_ST0, O_NONE, O_NONE, P_none }, - /* 0276 */ { UD_Ifcmovne, O_ST0, O_ST1, O_NONE, O_NONE, P_none }, - /* 0277 */ { UD_Ifcmovne, O_ST0, O_ST2, O_NONE, O_NONE, P_none }, - /* 0278 */ { UD_Ifcmovne, O_ST0, O_ST3, O_NONE, O_NONE, P_none }, - /* 0279 */ { UD_Ifcmovne, O_ST0, O_ST4, O_NONE, O_NONE, P_none }, - /* 0280 */ { UD_Ifcmovne, O_ST0, O_ST5, O_NONE, O_NONE, P_none }, - /* 0281 */ { UD_Ifcmovne, O_ST0, O_ST6, O_NONE, O_NONE, P_none }, - /* 0282 */ { UD_Ifcmovne, O_ST0, O_ST7, O_NONE, O_NONE, P_none }, - /* 0283 */ { UD_Ifcmovnbe, O_ST0, O_ST0, O_NONE, O_NONE, P_none }, - /* 0284 */ { UD_Ifcmovnbe, O_ST0, O_ST1, O_NONE, O_NONE, P_none }, - /* 0285 */ { UD_Ifcmovnbe, O_ST0, O_ST2, O_NONE, O_NONE, P_none }, - /* 0286 */ { UD_Ifcmovnbe, O_ST0, O_ST3, O_NONE, O_NONE, P_none }, - /* 0287 */ { UD_Ifcmovnbe, O_ST0, O_ST4, O_NONE, O_NONE, P_none }, - /* 0288 */ { UD_Ifcmovnbe, O_ST0, O_ST5, O_NONE, O_NONE, P_none }, - /* 0289 */ { UD_Ifcmovnbe, O_ST0, O_ST6, O_NONE, O_NONE, P_none }, - /* 0290 */ { UD_Ifcmovnbe, O_ST0, O_ST7, O_NONE, O_NONE, P_none }, - /* 0291 */ { UD_Ifcmovnu, O_ST0, O_ST0, O_NONE, O_NONE, P_none }, - /* 0292 */ { UD_Ifcmovnu, O_ST0, O_ST1, O_NONE, O_NONE, P_none }, - /* 0293 */ { UD_Ifcmovnu, O_ST0, O_ST2, O_NONE, O_NONE, P_none }, - /* 0294 */ { UD_Ifcmovnu, O_ST0, O_ST3, O_NONE, O_NONE, P_none }, - /* 0295 */ { UD_Ifcmovnu, O_ST0, O_ST4, O_NONE, O_NONE, P_none }, - /* 0296 */ { UD_Ifcmovnu, O_ST0, O_ST5, O_NONE, O_NONE, P_none }, - /* 0297 */ { UD_Ifcmovnu, O_ST0, O_ST6, O_NONE, O_NONE, P_none }, - /* 0298 */ { UD_Ifcmovnu, O_ST0, O_ST7, O_NONE, O_NONE, P_none }, - /* 0299 */ { UD_Ifucomi, O_ST0, O_ST0, O_NONE, O_NONE, P_none }, - /* 0300 */ { UD_Ifucomi, O_ST0, O_ST1, O_NONE, O_NONE, P_none }, - /* 0301 */ { UD_Ifucomi, O_ST0, O_ST2, O_NONE, O_NONE, P_none }, - /* 0302 */ { UD_Ifucomi, O_ST0, O_ST3, O_NONE, O_NONE, P_none }, - /* 0303 */ { UD_Ifucomi, O_ST0, O_ST4, O_NONE, O_NONE, P_none }, - /* 0304 */ { UD_Ifucomi, O_ST0, O_ST5, O_NONE, O_NONE, P_none }, - /* 0305 */ { UD_Ifucomi, O_ST0, O_ST6, O_NONE, O_NONE, P_none }, - /* 0306 */ { UD_Ifucomi, O_ST0, O_ST7, O_NONE, O_NONE, P_none }, - /* 0307 */ { UD_Ifcom, O_Md, O_NONE, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0308 */ { UD_Ifcom, O_Mq, O_NONE, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0309 */ { UD_Ifcom, O_ST0, O_ST0, O_NONE, O_NONE, P_none }, - /* 0310 */ { UD_Ifcom, O_ST0, O_ST1, O_NONE, O_NONE, P_none }, - /* 0311 */ { UD_Ifcom, O_ST0, O_ST2, O_NONE, O_NONE, P_none }, - /* 0312 */ { UD_Ifcom, O_ST0, O_ST3, O_NONE, O_NONE, P_none }, - /* 0313 */ { UD_Ifcom, O_ST0, O_ST4, O_NONE, O_NONE, P_none }, - /* 0314 */ { UD_Ifcom, O_ST0, O_ST5, O_NONE, O_NONE, P_none }, - /* 0315 */ { UD_Ifcom, O_ST0, O_ST6, O_NONE, O_NONE, P_none }, - /* 0316 */ { UD_Ifcom, O_ST0, O_ST7, O_NONE, O_NONE, P_none }, - /* 0317 */ { UD_Ifcom2, O_ST0, O_NONE, O_NONE, O_NONE, P_none }, - /* 0318 */ { UD_Ifcom2, O_ST1, O_NONE, O_NONE, O_NONE, P_none }, - /* 0319 */ { UD_Ifcom2, O_ST2, O_NONE, O_NONE, O_NONE, P_none }, - /* 0320 */ { UD_Ifcom2, O_ST3, O_NONE, O_NONE, O_NONE, P_none }, - /* 0321 */ { UD_Ifcom2, O_ST4, O_NONE, O_NONE, O_NONE, P_none }, - /* 0322 */ { UD_Ifcom2, O_ST5, O_NONE, O_NONE, O_NONE, P_none }, - /* 0323 */ { UD_Ifcom2, O_ST6, O_NONE, O_NONE, O_NONE, P_none }, - /* 0324 */ { UD_Ifcom2, O_ST7, O_NONE, O_NONE, O_NONE, P_none }, - /* 0325 */ { UD_Ifcomp3, O_ST0, O_NONE, O_NONE, O_NONE, P_none }, - /* 0326 */ { UD_Ifcomp3, O_ST1, O_NONE, O_NONE, O_NONE, P_none }, - /* 0327 */ { UD_Ifcomp3, O_ST2, O_NONE, O_NONE, O_NONE, P_none }, - /* 0328 */ { UD_Ifcomp3, O_ST3, O_NONE, O_NONE, O_NONE, P_none }, - /* 0329 */ { UD_Ifcomp3, O_ST4, O_NONE, O_NONE, O_NONE, P_none }, - /* 0330 */ { UD_Ifcomp3, O_ST5, O_NONE, O_NONE, O_NONE, P_none }, - /* 0331 */ { UD_Ifcomp3, O_ST6, O_NONE, O_NONE, O_NONE, P_none }, - /* 0332 */ { UD_Ifcomp3, O_ST7, O_NONE, O_NONE, O_NONE, P_none }, - /* 0333 */ { UD_Ifcomi, O_ST0, O_ST0, O_NONE, O_NONE, P_none }, - /* 0334 */ { UD_Ifcomi, O_ST0, O_ST1, O_NONE, O_NONE, P_none }, - /* 0335 */ { UD_Ifcomi, O_ST0, O_ST2, O_NONE, O_NONE, P_none }, - /* 0336 */ { UD_Ifcomi, O_ST0, O_ST3, O_NONE, O_NONE, P_none }, - /* 0337 */ { UD_Ifcomi, O_ST0, O_ST4, O_NONE, O_NONE, P_none }, - /* 0338 */ { UD_Ifcomi, O_ST0, O_ST5, O_NONE, O_NONE, P_none }, - /* 0339 */ { UD_Ifcomi, O_ST0, O_ST6, O_NONE, O_NONE, P_none }, - /* 0340 */ { UD_Ifcomi, O_ST0, O_ST7, O_NONE, O_NONE, P_none }, - /* 0341 */ { UD_Ifucomip, O_ST0, O_ST0, O_NONE, O_NONE, P_none }, - /* 0342 */ { UD_Ifucomip, O_ST0, O_ST1, O_NONE, O_NONE, P_none }, - /* 0343 */ { UD_Ifucomip, O_ST0, O_ST2, O_NONE, O_NONE, P_none }, - /* 0344 */ { UD_Ifucomip, O_ST0, O_ST3, O_NONE, O_NONE, P_none }, - /* 0345 */ { UD_Ifucomip, O_ST0, O_ST4, O_NONE, O_NONE, P_none }, - /* 0346 */ { UD_Ifucomip, O_ST0, O_ST5, O_NONE, O_NONE, P_none }, - /* 0347 */ { UD_Ifucomip, O_ST0, O_ST6, O_NONE, O_NONE, P_none }, - /* 0348 */ { UD_Ifucomip, O_ST0, O_ST7, O_NONE, O_NONE, P_none }, - /* 0349 */ { UD_Ifcomip, O_ST0, O_ST0, O_NONE, O_NONE, P_none }, - /* 0350 */ { UD_Ifcomip, O_ST0, O_ST1, O_NONE, O_NONE, P_none }, - /* 0351 */ { UD_Ifcomip, O_ST0, O_ST2, O_NONE, O_NONE, P_none }, - /* 0352 */ { UD_Ifcomip, O_ST0, O_ST3, O_NONE, O_NONE, P_none }, - /* 0353 */ { UD_Ifcomip, O_ST0, O_ST4, O_NONE, O_NONE, P_none }, - /* 0354 */ { UD_Ifcomip, O_ST0, O_ST5, O_NONE, O_NONE, P_none }, - /* 0355 */ { UD_Ifcomip, O_ST0, O_ST6, O_NONE, O_NONE, P_none }, - /* 0356 */ { UD_Ifcomip, O_ST0, O_ST7, O_NONE, O_NONE, P_none }, - /* 0357 */ { UD_Ifcomp, O_Md, O_NONE, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0358 */ { UD_Ifcomp, O_Mq, O_NONE, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0359 */ { UD_Ifcomp, O_ST0, O_ST0, O_NONE, O_NONE, P_none }, - /* 0360 */ { UD_Ifcomp, O_ST0, O_ST1, O_NONE, O_NONE, P_none }, - /* 0361 */ { UD_Ifcomp, O_ST0, O_ST2, O_NONE, O_NONE, P_none }, - /* 0362 */ { UD_Ifcomp, O_ST0, O_ST3, O_NONE, O_NONE, P_none }, - /* 0363 */ { UD_Ifcomp, O_ST0, O_ST4, O_NONE, O_NONE, P_none }, - /* 0364 */ { UD_Ifcomp, O_ST0, O_ST5, O_NONE, O_NONE, P_none }, - /* 0365 */ { UD_Ifcomp, O_ST0, O_ST6, O_NONE, O_NONE, P_none }, - /* 0366 */ { UD_Ifcomp, O_ST0, O_ST7, O_NONE, O_NONE, P_none }, - /* 0367 */ { UD_Ifcomp5, O_ST0, O_NONE, O_NONE, O_NONE, P_none }, - /* 0368 */ { UD_Ifcomp5, O_ST1, O_NONE, O_NONE, O_NONE, P_none }, - /* 0369 */ { UD_Ifcomp5, O_ST2, O_NONE, O_NONE, O_NONE, P_none }, - /* 0370 */ { UD_Ifcomp5, O_ST3, O_NONE, O_NONE, O_NONE, P_none }, - /* 0371 */ { UD_Ifcomp5, O_ST4, O_NONE, O_NONE, O_NONE, P_none }, - /* 0372 */ { UD_Ifcomp5, O_ST5, O_NONE, O_NONE, O_NONE, P_none }, - /* 0373 */ { UD_Ifcomp5, O_ST6, O_NONE, O_NONE, O_NONE, P_none }, - /* 0374 */ { UD_Ifcomp5, O_ST7, O_NONE, O_NONE, O_NONE, P_none }, - /* 0375 */ { UD_Ifcompp, O_NONE, O_NONE, O_NONE, O_NONE, P_none }, - /* 0376 */ { UD_Ifcos, O_NONE, O_NONE, O_NONE, O_NONE, P_none }, - /* 0377 */ { UD_Ifdecstp, O_NONE, O_NONE, O_NONE, O_NONE, P_none }, - /* 0378 */ { UD_Ifdiv, O_Mq, O_NONE, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0379 */ { UD_Ifdiv, O_ST0, O_ST0, O_NONE, O_NONE, P_none }, - /* 0380 */ { UD_Ifdiv, O_ST1, O_ST0, O_NONE, O_NONE, P_none }, - /* 0381 */ { UD_Ifdiv, O_ST2, O_ST0, O_NONE, O_NONE, P_none }, - /* 0382 */ { UD_Ifdiv, O_ST3, O_ST0, O_NONE, O_NONE, P_none }, - /* 0383 */ { UD_Ifdiv, O_ST4, O_ST0, O_NONE, O_NONE, P_none }, - /* 0384 */ { UD_Ifdiv, O_ST5, O_ST0, O_NONE, O_NONE, P_none }, - /* 0385 */ { UD_Ifdiv, O_ST6, O_ST0, O_NONE, O_NONE, P_none }, - /* 0386 */ { UD_Ifdiv, O_ST7, O_ST0, O_NONE, O_NONE, P_none }, - /* 0387 */ { UD_Ifdiv, O_Md, O_NONE, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0388 */ { UD_Ifdiv, O_ST0, O_ST0, O_NONE, O_NONE, P_none }, - /* 0389 */ { UD_Ifdiv, O_ST0, O_ST1, O_NONE, O_NONE, P_none }, - /* 0390 */ { UD_Ifdiv, O_ST0, O_ST2, O_NONE, O_NONE, P_none }, - /* 0391 */ { UD_Ifdiv, O_ST0, O_ST3, O_NONE, O_NONE, P_none }, - /* 0392 */ { UD_Ifdiv, O_ST0, O_ST4, O_NONE, O_NONE, P_none }, - /* 0393 */ { UD_Ifdiv, O_ST0, O_ST5, O_NONE, O_NONE, P_none }, - /* 0394 */ { UD_Ifdiv, O_ST0, O_ST6, O_NONE, O_NONE, P_none }, - /* 0395 */ { UD_Ifdiv, O_ST0, O_ST7, O_NONE, O_NONE, P_none }, - /* 0396 */ { UD_Ifdivp, O_ST0, O_ST0, O_NONE, O_NONE, P_none }, - /* 0397 */ { UD_Ifdivp, O_ST1, O_ST0, O_NONE, O_NONE, P_none }, - /* 0398 */ { UD_Ifdivp, O_ST2, O_ST0, O_NONE, O_NONE, P_none }, - /* 0399 */ { UD_Ifdivp, O_ST3, O_ST0, O_NONE, O_NONE, P_none }, - /* 0400 */ { UD_Ifdivp, O_ST4, O_ST0, O_NONE, O_NONE, P_none }, - /* 0401 */ { UD_Ifdivp, O_ST5, O_ST0, O_NONE, O_NONE, P_none }, - /* 0402 */ { UD_Ifdivp, O_ST6, O_ST0, O_NONE, O_NONE, P_none }, - /* 0403 */ { UD_Ifdivp, O_ST7, O_ST0, O_NONE, O_NONE, P_none }, - /* 0404 */ { UD_Ifdivr, O_Mq, O_NONE, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0405 */ { UD_Ifdivr, O_ST0, O_ST0, O_NONE, O_NONE, P_none }, - /* 0406 */ { UD_Ifdivr, O_ST1, O_ST0, O_NONE, O_NONE, P_none }, - /* 0407 */ { UD_Ifdivr, O_ST2, O_ST0, O_NONE, O_NONE, P_none }, - /* 0408 */ { UD_Ifdivr, O_ST3, O_ST0, O_NONE, O_NONE, P_none }, - /* 0409 */ { UD_Ifdivr, O_ST4, O_ST0, O_NONE, O_NONE, P_none }, - /* 0410 */ { UD_Ifdivr, O_ST5, O_ST0, O_NONE, O_NONE, P_none }, - /* 0411 */ { UD_Ifdivr, O_ST6, O_ST0, O_NONE, O_NONE, P_none }, - /* 0412 */ { UD_Ifdivr, O_ST7, O_ST0, O_NONE, O_NONE, P_none }, - /* 0413 */ { UD_Ifdivr, O_Md, O_NONE, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0414 */ { UD_Ifdivr, O_ST0, O_ST0, O_NONE, O_NONE, P_none }, - /* 0415 */ { UD_Ifdivr, O_ST0, O_ST1, O_NONE, O_NONE, P_none }, - /* 0416 */ { UD_Ifdivr, O_ST0, O_ST2, O_NONE, O_NONE, P_none }, - /* 0417 */ { UD_Ifdivr, O_ST0, O_ST3, O_NONE, O_NONE, P_none }, - /* 0418 */ { UD_Ifdivr, O_ST0, O_ST4, O_NONE, O_NONE, P_none }, - /* 0419 */ { UD_Ifdivr, O_ST0, O_ST5, O_NONE, O_NONE, P_none }, - /* 0420 */ { UD_Ifdivr, O_ST0, O_ST6, O_NONE, O_NONE, P_none }, - /* 0421 */ { UD_Ifdivr, O_ST0, O_ST7, O_NONE, O_NONE, P_none }, - /* 0422 */ { UD_Ifdivrp, O_ST0, O_ST0, O_NONE, O_NONE, P_none }, - /* 0423 */ { UD_Ifdivrp, O_ST1, O_ST0, O_NONE, O_NONE, P_none }, - /* 0424 */ { UD_Ifdivrp, O_ST2, O_ST0, O_NONE, O_NONE, P_none }, - /* 0425 */ { UD_Ifdivrp, O_ST3, O_ST0, O_NONE, O_NONE, P_none }, - /* 0426 */ { UD_Ifdivrp, O_ST4, O_ST0, O_NONE, O_NONE, P_none }, - /* 0427 */ { UD_Ifdivrp, O_ST5, O_ST0, O_NONE, O_NONE, P_none }, - /* 0428 */ { UD_Ifdivrp, O_ST6, O_ST0, O_NONE, O_NONE, P_none }, - /* 0429 */ { UD_Ifdivrp, O_ST7, O_ST0, O_NONE, O_NONE, P_none }, - /* 0430 */ { UD_Ifemms, O_NONE, O_NONE, O_NONE, O_NONE, P_none }, - /* 0431 */ { UD_Iffree, O_ST0, O_NONE, O_NONE, O_NONE, P_none }, - /* 0432 */ { UD_Iffree, O_ST1, O_NONE, O_NONE, O_NONE, P_none }, - /* 0433 */ { UD_Iffree, O_ST2, O_NONE, O_NONE, O_NONE, P_none }, - /* 0434 */ { UD_Iffree, O_ST3, O_NONE, O_NONE, O_NONE, P_none }, - /* 0435 */ { UD_Iffree, O_ST4, O_NONE, O_NONE, O_NONE, P_none }, - /* 0436 */ { UD_Iffree, O_ST5, O_NONE, O_NONE, O_NONE, P_none }, - /* 0437 */ { UD_Iffree, O_ST6, O_NONE, O_NONE, O_NONE, P_none }, - /* 0438 */ { UD_Iffree, O_ST7, O_NONE, O_NONE, O_NONE, P_none }, - /* 0439 */ { UD_Iffreep, O_ST0, O_NONE, O_NONE, O_NONE, P_none }, - /* 0440 */ { UD_Iffreep, O_ST1, O_NONE, O_NONE, O_NONE, P_none }, - /* 0441 */ { UD_Iffreep, O_ST2, O_NONE, O_NONE, O_NONE, P_none }, - /* 0442 */ { UD_Iffreep, O_ST3, O_NONE, O_NONE, O_NONE, P_none }, - /* 0443 */ { UD_Iffreep, O_ST4, O_NONE, O_NONE, O_NONE, P_none }, - /* 0444 */ { UD_Iffreep, O_ST5, O_NONE, O_NONE, O_NONE, P_none }, - /* 0445 */ { UD_Iffreep, O_ST6, O_NONE, O_NONE, O_NONE, P_none }, - /* 0446 */ { UD_Iffreep, O_ST7, O_NONE, O_NONE, O_NONE, P_none }, - /* 0447 */ { UD_Ificom, O_Mw, O_NONE, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0448 */ { UD_Ificom, O_Md, O_NONE, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0449 */ { UD_Ificomp, O_Mw, O_NONE, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0450 */ { UD_Ificomp, O_Md, O_NONE, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0451 */ { UD_Ifild, O_Mw, O_NONE, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0452 */ { UD_Ifild, O_Mq, O_NONE, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0453 */ { UD_Ifild, O_Md, O_NONE, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0454 */ { UD_Ifincstp, O_NONE, O_NONE, O_NONE, O_NONE, P_none }, - /* 0455 */ { UD_Ifninit, O_NONE, O_NONE, O_NONE, O_NONE, P_none }, - /* 0456 */ { UD_Ifiadd, O_Md, O_NONE, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0457 */ { UD_Ifiadd, O_Mw, O_NONE, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0458 */ { UD_Ifidivr, O_Md, O_NONE, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0459 */ { UD_Ifidivr, O_Mw, O_NONE, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0460 */ { UD_Ifidiv, O_Md, O_NONE, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0461 */ { UD_Ifidiv, O_Mw, O_NONE, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0462 */ { UD_Ifisub, O_Md, O_NONE, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0463 */ { UD_Ifisub, O_Mw, O_NONE, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0464 */ { UD_Ifisubr, O_Md, O_NONE, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0465 */ { UD_Ifisubr, O_Mw, O_NONE, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0466 */ { UD_Ifist, O_Mw, O_NONE, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0467 */ { UD_Ifist, O_Md, O_NONE, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0468 */ { UD_Ifistp, O_Mw, O_NONE, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0469 */ { UD_Ifistp, O_Mq, O_NONE, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0470 */ { UD_Ifistp, O_Md, O_NONE, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0471 */ { UD_Ifisttp, O_Md, O_NONE, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0472 */ { UD_Ifisttp, O_Mq, O_NONE, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0473 */ { UD_Ifisttp, O_Mw, O_NONE, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0474 */ { UD_Ifld, O_Mt, O_NONE, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0475 */ { UD_Ifld, O_Mq, O_NONE, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0476 */ { UD_Ifld, O_Md, O_NONE, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0477 */ { UD_Ifld, O_ST0, O_NONE, O_NONE, O_NONE, P_none }, - /* 0478 */ { UD_Ifld, O_ST1, O_NONE, O_NONE, O_NONE, P_none }, - /* 0479 */ { UD_Ifld, O_ST2, O_NONE, O_NONE, O_NONE, P_none }, - /* 0480 */ { UD_Ifld, O_ST3, O_NONE, O_NONE, O_NONE, P_none }, - /* 0481 */ { UD_Ifld, O_ST4, O_NONE, O_NONE, O_NONE, P_none }, - /* 0482 */ { UD_Ifld, O_ST5, O_NONE, O_NONE, O_NONE, P_none }, - /* 0483 */ { UD_Ifld, O_ST6, O_NONE, O_NONE, O_NONE, P_none }, - /* 0484 */ { UD_Ifld, O_ST7, O_NONE, O_NONE, O_NONE, P_none }, - /* 0485 */ { UD_Ifld1, O_NONE, O_NONE, O_NONE, O_NONE, P_none }, - /* 0486 */ { UD_Ifldl2t, O_NONE, O_NONE, O_NONE, O_NONE, P_none }, - /* 0487 */ { UD_Ifldl2e, O_NONE, O_NONE, O_NONE, O_NONE, P_none }, - /* 0488 */ { UD_Ifldpi, O_NONE, O_NONE, O_NONE, O_NONE, P_none }, - /* 0489 */ { UD_Ifldlg2, O_NONE, O_NONE, O_NONE, O_NONE, P_none }, - /* 0490 */ { UD_Ifldln2, O_NONE, O_NONE, O_NONE, O_NONE, P_none }, - /* 0491 */ { UD_Ifldz, O_NONE, O_NONE, O_NONE, O_NONE, P_none }, - /* 0492 */ { UD_Ifldcw, O_Mw, O_NONE, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0493 */ { UD_Ifldenv, O_M, O_NONE, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0494 */ { UD_Ifmul, O_Mq, O_NONE, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0495 */ { UD_Ifmul, O_ST0, O_ST0, O_NONE, O_NONE, P_none }, - /* 0496 */ { UD_Ifmul, O_ST1, O_ST0, O_NONE, O_NONE, P_none }, - /* 0497 */ { UD_Ifmul, O_ST2, O_ST0, O_NONE, O_NONE, P_none }, - /* 0498 */ { UD_Ifmul, O_ST3, O_ST0, O_NONE, O_NONE, P_none }, - /* 0499 */ { UD_Ifmul, O_ST4, O_ST0, O_NONE, O_NONE, P_none }, - /* 0500 */ { UD_Ifmul, O_ST5, O_ST0, O_NONE, O_NONE, P_none }, - /* 0501 */ { UD_Ifmul, O_ST6, O_ST0, O_NONE, O_NONE, P_none }, - /* 0502 */ { UD_Ifmul, O_ST7, O_ST0, O_NONE, O_NONE, P_none }, - /* 0503 */ { UD_Ifmul, O_Md, O_NONE, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0504 */ { UD_Ifmul, O_ST0, O_ST0, O_NONE, O_NONE, P_none }, - /* 0505 */ { UD_Ifmul, O_ST0, O_ST1, O_NONE, O_NONE, P_none }, - /* 0506 */ { UD_Ifmul, O_ST0, O_ST2, O_NONE, O_NONE, P_none }, - /* 0507 */ { UD_Ifmul, O_ST0, O_ST3, O_NONE, O_NONE, P_none }, - /* 0508 */ { UD_Ifmul, O_ST0, O_ST4, O_NONE, O_NONE, P_none }, - /* 0509 */ { UD_Ifmul, O_ST0, O_ST5, O_NONE, O_NONE, P_none }, - /* 0510 */ { UD_Ifmul, O_ST0, O_ST6, O_NONE, O_NONE, P_none }, - /* 0511 */ { UD_Ifmul, O_ST0, O_ST7, O_NONE, O_NONE, P_none }, - /* 0512 */ { UD_Ifmulp, O_ST0, O_ST0, O_NONE, O_NONE, P_none }, - /* 0513 */ { UD_Ifmulp, O_ST1, O_ST0, O_NONE, O_NONE, P_none }, - /* 0514 */ { UD_Ifmulp, O_ST2, O_ST0, O_NONE, O_NONE, P_none }, - /* 0515 */ { UD_Ifmulp, O_ST3, O_ST0, O_NONE, O_NONE, P_none }, - /* 0516 */ { UD_Ifmulp, O_ST4, O_ST0, O_NONE, O_NONE, P_none }, - /* 0517 */ { UD_Ifmulp, O_ST5, O_ST0, O_NONE, O_NONE, P_none }, - /* 0518 */ { UD_Ifmulp, O_ST6, O_ST0, O_NONE, O_NONE, P_none }, - /* 0519 */ { UD_Ifmulp, O_ST7, O_ST0, O_NONE, O_NONE, P_none }, - /* 0520 */ { UD_Ifimul, O_Md, O_NONE, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0521 */ { UD_Ifimul, O_Mw, O_NONE, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0522 */ { UD_Ifnop, O_NONE, O_NONE, O_NONE, O_NONE, P_none }, - /* 0523 */ { UD_Ifpatan, O_NONE, O_NONE, O_NONE, O_NONE, P_none }, - /* 0524 */ { UD_Ifprem, O_NONE, O_NONE, O_NONE, O_NONE, P_none }, - /* 0525 */ { UD_Ifprem1, O_NONE, O_NONE, O_NONE, O_NONE, P_none }, - /* 0526 */ { UD_Ifptan, O_NONE, O_NONE, O_NONE, O_NONE, P_none }, - /* 0527 */ { UD_Ifrndint, O_NONE, O_NONE, O_NONE, O_NONE, P_none }, - /* 0528 */ { UD_Ifrstor, O_M, O_NONE, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0529 */ { UD_Ifnsave, O_M, O_NONE, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0530 */ { UD_Ifscale, O_NONE, O_NONE, O_NONE, O_NONE, P_none }, - /* 0531 */ { UD_Ifsin, O_NONE, O_NONE, O_NONE, O_NONE, P_none }, - /* 0532 */ { UD_Ifsincos, O_NONE, O_NONE, O_NONE, O_NONE, P_none }, - /* 0533 */ { UD_Ifsqrt, O_NONE, O_NONE, O_NONE, O_NONE, P_none }, - /* 0534 */ { UD_Ifstp, O_Mt, O_NONE, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0535 */ { UD_Ifstp, O_Mq, O_NONE, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0536 */ { UD_Ifstp, O_Md, O_NONE, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0537 */ { UD_Ifstp, O_ST0, O_NONE, O_NONE, O_NONE, P_none }, - /* 0538 */ { UD_Ifstp, O_ST1, O_NONE, O_NONE, O_NONE, P_none }, - /* 0539 */ { UD_Ifstp, O_ST2, O_NONE, O_NONE, O_NONE, P_none }, - /* 0540 */ { UD_Ifstp, O_ST3, O_NONE, O_NONE, O_NONE, P_none }, - /* 0541 */ { UD_Ifstp, O_ST4, O_NONE, O_NONE, O_NONE, P_none }, - /* 0542 */ { UD_Ifstp, O_ST5, O_NONE, O_NONE, O_NONE, P_none }, - /* 0543 */ { UD_Ifstp, O_ST6, O_NONE, O_NONE, O_NONE, P_none }, - /* 0544 */ { UD_Ifstp, O_ST7, O_NONE, O_NONE, O_NONE, P_none }, - /* 0545 */ { UD_Ifstp1, O_ST0, O_NONE, O_NONE, O_NONE, P_none }, - /* 0546 */ { UD_Ifstp1, O_ST1, O_NONE, O_NONE, O_NONE, P_none }, - /* 0547 */ { UD_Ifstp1, O_ST2, O_NONE, O_NONE, O_NONE, P_none }, - /* 0548 */ { UD_Ifstp1, O_ST3, O_NONE, O_NONE, O_NONE, P_none }, - /* 0549 */ { UD_Ifstp1, O_ST4, O_NONE, O_NONE, O_NONE, P_none }, - /* 0550 */ { UD_Ifstp1, O_ST5, O_NONE, O_NONE, O_NONE, P_none }, - /* 0551 */ { UD_Ifstp1, O_ST6, O_NONE, O_NONE, O_NONE, P_none }, - /* 0552 */ { UD_Ifstp1, O_ST7, O_NONE, O_NONE, O_NONE, P_none }, - /* 0553 */ { UD_Ifstp8, O_ST0, O_NONE, O_NONE, O_NONE, P_none }, - /* 0554 */ { UD_Ifstp8, O_ST1, O_NONE, O_NONE, O_NONE, P_none }, - /* 0555 */ { UD_Ifstp8, O_ST2, O_NONE, O_NONE, O_NONE, P_none }, - /* 0556 */ { UD_Ifstp8, O_ST3, O_NONE, O_NONE, O_NONE, P_none }, - /* 0557 */ { UD_Ifstp8, O_ST4, O_NONE, O_NONE, O_NONE, P_none }, - /* 0558 */ { UD_Ifstp8, O_ST5, O_NONE, O_NONE, O_NONE, P_none }, - /* 0559 */ { UD_Ifstp8, O_ST6, O_NONE, O_NONE, O_NONE, P_none }, - /* 0560 */ { UD_Ifstp8, O_ST7, O_NONE, O_NONE, O_NONE, P_none }, - /* 0561 */ { UD_Ifstp9, O_ST0, O_NONE, O_NONE, O_NONE, P_none }, - /* 0562 */ { UD_Ifstp9, O_ST1, O_NONE, O_NONE, O_NONE, P_none }, - /* 0563 */ { UD_Ifstp9, O_ST2, O_NONE, O_NONE, O_NONE, P_none }, - /* 0564 */ { UD_Ifstp9, O_ST3, O_NONE, O_NONE, O_NONE, P_none }, - /* 0565 */ { UD_Ifstp9, O_ST4, O_NONE, O_NONE, O_NONE, P_none }, - /* 0566 */ { UD_Ifstp9, O_ST5, O_NONE, O_NONE, O_NONE, P_none }, - /* 0567 */ { UD_Ifstp9, O_ST6, O_NONE, O_NONE, O_NONE, P_none }, - /* 0568 */ { UD_Ifstp9, O_ST7, O_NONE, O_NONE, O_NONE, P_none }, - /* 0569 */ { UD_Ifst, O_Md, O_NONE, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0570 */ { UD_Ifst, O_Mq, O_NONE, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0571 */ { UD_Ifst, O_ST0, O_NONE, O_NONE, O_NONE, P_none }, - /* 0572 */ { UD_Ifst, O_ST1, O_NONE, O_NONE, O_NONE, P_none }, - /* 0573 */ { UD_Ifst, O_ST2, O_NONE, O_NONE, O_NONE, P_none }, - /* 0574 */ { UD_Ifst, O_ST3, O_NONE, O_NONE, O_NONE, P_none }, - /* 0575 */ { UD_Ifst, O_ST4, O_NONE, O_NONE, O_NONE, P_none }, - /* 0576 */ { UD_Ifst, O_ST5, O_NONE, O_NONE, O_NONE, P_none }, - /* 0577 */ { UD_Ifst, O_ST6, O_NONE, O_NONE, O_NONE, P_none }, - /* 0578 */ { UD_Ifst, O_ST7, O_NONE, O_NONE, O_NONE, P_none }, - /* 0579 */ { UD_Ifnstcw, O_Mw, O_NONE, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0580 */ { UD_Ifnstenv, O_M, O_NONE, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0581 */ { UD_Ifnstsw, O_Mw, O_NONE, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0582 */ { UD_Ifnstsw, O_AX, O_NONE, O_NONE, O_NONE, P_none }, - /* 0583 */ { UD_Ifsub, O_Md, O_NONE, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0584 */ { UD_Ifsub, O_Mq, O_NONE, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0585 */ { UD_Ifsub, O_ST0, O_ST0, O_NONE, O_NONE, P_none }, - /* 0586 */ { UD_Ifsub, O_ST0, O_ST1, O_NONE, O_NONE, P_none }, - /* 0587 */ { UD_Ifsub, O_ST0, O_ST2, O_NONE, O_NONE, P_none }, - /* 0588 */ { UD_Ifsub, O_ST0, O_ST3, O_NONE, O_NONE, P_none }, - /* 0589 */ { UD_Ifsub, O_ST0, O_ST4, O_NONE, O_NONE, P_none }, - /* 0590 */ { UD_Ifsub, O_ST0, O_ST5, O_NONE, O_NONE, P_none }, - /* 0591 */ { UD_Ifsub, O_ST0, O_ST6, O_NONE, O_NONE, P_none }, - /* 0592 */ { UD_Ifsub, O_ST0, O_ST7, O_NONE, O_NONE, P_none }, - /* 0593 */ { UD_Ifsub, O_ST0, O_ST0, O_NONE, O_NONE, P_none }, - /* 0594 */ { UD_Ifsub, O_ST1, O_ST0, O_NONE, O_NONE, P_none }, - /* 0595 */ { UD_Ifsub, O_ST2, O_ST0, O_NONE, O_NONE, P_none }, - /* 0596 */ { UD_Ifsub, O_ST3, O_ST0, O_NONE, O_NONE, P_none }, - /* 0597 */ { UD_Ifsub, O_ST4, O_ST0, O_NONE, O_NONE, P_none }, - /* 0598 */ { UD_Ifsub, O_ST5, O_ST0, O_NONE, O_NONE, P_none }, - /* 0599 */ { UD_Ifsub, O_ST6, O_ST0, O_NONE, O_NONE, P_none }, - /* 0600 */ { UD_Ifsub, O_ST7, O_ST0, O_NONE, O_NONE, P_none }, - /* 0601 */ { UD_Ifsubp, O_ST0, O_ST0, O_NONE, O_NONE, P_none }, - /* 0602 */ { UD_Ifsubp, O_ST1, O_ST0, O_NONE, O_NONE, P_none }, - /* 0603 */ { UD_Ifsubp, O_ST2, O_ST0, O_NONE, O_NONE, P_none }, - /* 0604 */ { UD_Ifsubp, O_ST3, O_ST0, O_NONE, O_NONE, P_none }, - /* 0605 */ { UD_Ifsubp, O_ST4, O_ST0, O_NONE, O_NONE, P_none }, - /* 0606 */ { UD_Ifsubp, O_ST5, O_ST0, O_NONE, O_NONE, P_none }, - /* 0607 */ { UD_Ifsubp, O_ST6, O_ST0, O_NONE, O_NONE, P_none }, - /* 0608 */ { UD_Ifsubp, O_ST7, O_ST0, O_NONE, O_NONE, P_none }, - /* 0609 */ { UD_Ifsubr, O_Mq, O_NONE, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0610 */ { UD_Ifsubr, O_ST0, O_ST0, O_NONE, O_NONE, P_none }, - /* 0611 */ { UD_Ifsubr, O_ST0, O_ST1, O_NONE, O_NONE, P_none }, - /* 0612 */ { UD_Ifsubr, O_ST0, O_ST2, O_NONE, O_NONE, P_none }, - /* 0613 */ { UD_Ifsubr, O_ST0, O_ST3, O_NONE, O_NONE, P_none }, - /* 0614 */ { UD_Ifsubr, O_ST0, O_ST4, O_NONE, O_NONE, P_none }, - /* 0615 */ { UD_Ifsubr, O_ST0, O_ST5, O_NONE, O_NONE, P_none }, - /* 0616 */ { UD_Ifsubr, O_ST0, O_ST6, O_NONE, O_NONE, P_none }, - /* 0617 */ { UD_Ifsubr, O_ST0, O_ST7, O_NONE, O_NONE, P_none }, - /* 0618 */ { UD_Ifsubr, O_ST0, O_ST0, O_NONE, O_NONE, P_none }, - /* 0619 */ { UD_Ifsubr, O_ST1, O_ST0, O_NONE, O_NONE, P_none }, - /* 0620 */ { UD_Ifsubr, O_ST2, O_ST0, O_NONE, O_NONE, P_none }, - /* 0621 */ { UD_Ifsubr, O_ST3, O_ST0, O_NONE, O_NONE, P_none }, - /* 0622 */ { UD_Ifsubr, O_ST4, O_ST0, O_NONE, O_NONE, P_none }, - /* 0623 */ { UD_Ifsubr, O_ST5, O_ST0, O_NONE, O_NONE, P_none }, - /* 0624 */ { UD_Ifsubr, O_ST6, O_ST0, O_NONE, O_NONE, P_none }, - /* 0625 */ { UD_Ifsubr, O_ST7, O_ST0, O_NONE, O_NONE, P_none }, - /* 0626 */ { UD_Ifsubr, O_Md, O_NONE, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0627 */ { UD_Ifsubrp, O_ST0, O_ST0, O_NONE, O_NONE, P_none }, - /* 0628 */ { UD_Ifsubrp, O_ST1, O_ST0, O_NONE, O_NONE, P_none }, - /* 0629 */ { UD_Ifsubrp, O_ST2, O_ST0, O_NONE, O_NONE, P_none }, - /* 0630 */ { UD_Ifsubrp, O_ST3, O_ST0, O_NONE, O_NONE, P_none }, - /* 0631 */ { UD_Ifsubrp, O_ST4, O_ST0, O_NONE, O_NONE, P_none }, - /* 0632 */ { UD_Ifsubrp, O_ST5, O_ST0, O_NONE, O_NONE, P_none }, - /* 0633 */ { UD_Ifsubrp, O_ST6, O_ST0, O_NONE, O_NONE, P_none }, - /* 0634 */ { UD_Ifsubrp, O_ST7, O_ST0, O_NONE, O_NONE, P_none }, - /* 0635 */ { UD_Iftst, O_NONE, O_NONE, O_NONE, O_NONE, P_none }, - /* 0636 */ { UD_Ifucom, O_ST0, O_NONE, O_NONE, O_NONE, P_none }, - /* 0637 */ { UD_Ifucom, O_ST1, O_NONE, O_NONE, O_NONE, P_none }, - /* 0638 */ { UD_Ifucom, O_ST2, O_NONE, O_NONE, O_NONE, P_none }, - /* 0639 */ { UD_Ifucom, O_ST3, O_NONE, O_NONE, O_NONE, P_none }, - /* 0640 */ { UD_Ifucom, O_ST4, O_NONE, O_NONE, O_NONE, P_none }, - /* 0641 */ { UD_Ifucom, O_ST5, O_NONE, O_NONE, O_NONE, P_none }, - /* 0642 */ { UD_Ifucom, O_ST6, O_NONE, O_NONE, O_NONE, P_none }, - /* 0643 */ { UD_Ifucom, O_ST7, O_NONE, O_NONE, O_NONE, P_none }, - /* 0644 */ { UD_Ifucomp, O_ST0, O_NONE, O_NONE, O_NONE, P_none }, - /* 0645 */ { UD_Ifucomp, O_ST1, O_NONE, O_NONE, O_NONE, P_none }, - /* 0646 */ { UD_Ifucomp, O_ST2, O_NONE, O_NONE, O_NONE, P_none }, - /* 0647 */ { UD_Ifucomp, O_ST3, O_NONE, O_NONE, O_NONE, P_none }, - /* 0648 */ { UD_Ifucomp, O_ST4, O_NONE, O_NONE, O_NONE, P_none }, - /* 0649 */ { UD_Ifucomp, O_ST5, O_NONE, O_NONE, O_NONE, P_none }, - /* 0650 */ { UD_Ifucomp, O_ST6, O_NONE, O_NONE, O_NONE, P_none }, - /* 0651 */ { UD_Ifucomp, O_ST7, O_NONE, O_NONE, O_NONE, P_none }, - /* 0652 */ { UD_Ifucompp, O_NONE, O_NONE, O_NONE, O_NONE, P_none }, - /* 0653 */ { UD_Ifxam, O_NONE, O_NONE, O_NONE, O_NONE, P_none }, - /* 0654 */ { UD_Ifxch, O_ST0, O_ST0, O_NONE, O_NONE, P_none }, - /* 0655 */ { UD_Ifxch, O_ST0, O_ST1, O_NONE, O_NONE, P_none }, - /* 0656 */ { UD_Ifxch, O_ST0, O_ST2, O_NONE, O_NONE, P_none }, - /* 0657 */ { UD_Ifxch, O_ST0, O_ST3, O_NONE, O_NONE, P_none }, - /* 0658 */ { UD_Ifxch, O_ST0, O_ST4, O_NONE, O_NONE, P_none }, - /* 0659 */ { UD_Ifxch, O_ST0, O_ST5, O_NONE, O_NONE, P_none }, - /* 0660 */ { UD_Ifxch, O_ST0, O_ST6, O_NONE, O_NONE, P_none }, - /* 0661 */ { UD_Ifxch, O_ST0, O_ST7, O_NONE, O_NONE, P_none }, - /* 0662 */ { UD_Ifxch4, O_ST0, O_NONE, O_NONE, O_NONE, P_none }, - /* 0663 */ { UD_Ifxch4, O_ST1, O_NONE, O_NONE, O_NONE, P_none }, - /* 0664 */ { UD_Ifxch4, O_ST2, O_NONE, O_NONE, O_NONE, P_none }, - /* 0665 */ { UD_Ifxch4, O_ST3, O_NONE, O_NONE, O_NONE, P_none }, - /* 0666 */ { UD_Ifxch4, O_ST4, O_NONE, O_NONE, O_NONE, P_none }, - /* 0667 */ { UD_Ifxch4, O_ST5, O_NONE, O_NONE, O_NONE, P_none }, - /* 0668 */ { UD_Ifxch4, O_ST6, O_NONE, O_NONE, O_NONE, P_none }, - /* 0669 */ { UD_Ifxch4, O_ST7, O_NONE, O_NONE, O_NONE, P_none }, - /* 0670 */ { UD_Ifxch7, O_ST0, O_NONE, O_NONE, O_NONE, P_none }, - /* 0671 */ { UD_Ifxch7, O_ST1, O_NONE, O_NONE, O_NONE, P_none }, - /* 0672 */ { UD_Ifxch7, O_ST2, O_NONE, O_NONE, O_NONE, P_none }, - /* 0673 */ { UD_Ifxch7, O_ST3, O_NONE, O_NONE, O_NONE, P_none }, - /* 0674 */ { UD_Ifxch7, O_ST4, O_NONE, O_NONE, O_NONE, P_none }, - /* 0675 */ { UD_Ifxch7, O_ST5, O_NONE, O_NONE, O_NONE, P_none }, - /* 0676 */ { UD_Ifxch7, O_ST6, O_NONE, O_NONE, O_NONE, P_none }, - /* 0677 */ { UD_Ifxch7, O_ST7, O_NONE, O_NONE, O_NONE, P_none }, - /* 0678 */ { UD_Ifxrstor, O_M, O_NONE, O_NONE, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 0679 */ { UD_Ifxsave, O_M, O_NONE, O_NONE, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 0680 */ { UD_Ifxtract, O_NONE, O_NONE, O_NONE, O_NONE, P_none }, - /* 0681 */ { UD_Ifyl2x, O_NONE, O_NONE, O_NONE, O_NONE, P_none }, - /* 0682 */ { UD_Ifyl2xp1, O_NONE, O_NONE, O_NONE, O_NONE, P_none }, - /* 0683 */ { UD_Ihlt, O_NONE, O_NONE, O_NONE, O_NONE, P_none }, - /* 0684 */ { UD_Iidiv, O_Ev, O_NONE, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 0685 */ { UD_Iidiv, O_Eb, O_NONE, O_NONE, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 0686 */ { UD_Iin, O_AL, O_Ib, O_NONE, O_NONE, P_none }, - /* 0687 */ { UD_Iin, O_eAX, O_Ib, O_NONE, O_NONE, P_oso }, - /* 0688 */ { UD_Iin, O_AL, O_DX, O_NONE, O_NONE, P_none }, - /* 0689 */ { UD_Iin, O_eAX, O_DX, O_NONE, O_NONE, P_oso }, - /* 0690 */ { UD_Iimul, O_Gv, O_Ev, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 0691 */ { UD_Iimul, O_Eb, O_NONE, O_NONE, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 0692 */ { UD_Iimul, O_Ev, O_NONE, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 0693 */ { UD_Iimul, O_Gv, O_Ev, O_Iz, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 0694 */ { UD_Iimul, O_Gv, O_Ev, O_sIb, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 0695 */ { UD_Iinc, O_R0z, O_NONE, O_NONE, O_NONE, P_oso }, - /* 0696 */ { UD_Iinc, O_R1z, O_NONE, O_NONE, O_NONE, P_oso }, - /* 0697 */ { UD_Iinc, O_R2z, O_NONE, O_NONE, O_NONE, P_oso }, - /* 0698 */ { UD_Iinc, O_R3z, O_NONE, O_NONE, O_NONE, P_oso }, - /* 0699 */ { UD_Iinc, O_R4z, O_NONE, O_NONE, O_NONE, P_oso }, - /* 0700 */ { UD_Iinc, O_R5z, O_NONE, O_NONE, O_NONE, P_oso }, - /* 0701 */ { UD_Iinc, O_R6z, O_NONE, O_NONE, O_NONE, P_oso }, - /* 0702 */ { UD_Iinc, O_R7z, O_NONE, O_NONE, O_NONE, P_oso }, - /* 0703 */ { UD_Iinc, O_Ev, O_NONE, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 0704 */ { UD_Iinc, O_Eb, O_NONE, O_NONE, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 0705 */ { UD_Iinsb, O_NONE, O_NONE, O_NONE, O_NONE, P_str|P_seg }, - /* 0706 */ { UD_Iinsw, O_NONE, O_NONE, O_NONE, O_NONE, P_str|P_oso|P_seg }, - /* 0707 */ { UD_Iinsd, O_NONE, O_NONE, O_NONE, O_NONE, P_str|P_oso|P_seg }, - /* 0708 */ { UD_Iint1, O_NONE, O_NONE, O_NONE, O_NONE, P_none }, - /* 0709 */ { UD_Iint3, O_NONE, O_NONE, O_NONE, O_NONE, P_none }, - /* 0710 */ { UD_Iint, O_Ib, O_NONE, O_NONE, O_NONE, P_none }, - /* 0711 */ { UD_Iinto, O_NONE, O_NONE, O_NONE, O_NONE, P_inv64 }, - /* 0712 */ { UD_Iinvd, O_NONE, O_NONE, O_NONE, O_NONE, P_none }, - /* 0713 */ { UD_Iinvept, O_Gd, O_Mo, O_NONE, O_NONE, P_none }, - /* 0714 */ { UD_Iinvept, O_Gq, O_Mo, O_NONE, O_NONE, P_none }, - /* 0715 */ { UD_Iinvlpg, O_M, O_NONE, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0716 */ { UD_Iinvlpga, O_NONE, O_NONE, O_NONE, O_NONE, P_none }, - /* 0717 */ { UD_Iinvvpid, O_Gd, O_Mo, O_NONE, O_NONE, P_none }, - /* 0718 */ { UD_Iinvvpid, O_Gq, O_Mo, O_NONE, O_NONE, P_none }, - /* 0719 */ { UD_Iiretw, O_NONE, O_NONE, O_NONE, O_NONE, P_oso|P_rexw }, - /* 0720 */ { UD_Iiretd, O_NONE, O_NONE, O_NONE, O_NONE, P_oso|P_rexw }, - /* 0721 */ { UD_Iiretq, O_NONE, O_NONE, O_NONE, O_NONE, P_oso|P_rexw }, - /* 0722 */ { UD_Ijo, O_Jb, O_NONE, O_NONE, O_NONE, P_none }, - /* 0723 */ { UD_Ijo, O_Jz, O_NONE, O_NONE, O_NONE, P_oso|P_def64 }, - /* 0724 */ { UD_Ijno, O_Jb, O_NONE, O_NONE, O_NONE, P_none }, - /* 0725 */ { UD_Ijno, O_Jz, O_NONE, O_NONE, O_NONE, P_oso|P_def64 }, - /* 0726 */ { UD_Ijb, O_Jb, O_NONE, O_NONE, O_NONE, P_none }, - /* 0727 */ { UD_Ijb, O_Jz, O_NONE, O_NONE, O_NONE, P_oso|P_def64 }, - /* 0728 */ { UD_Ijae, O_Jb, O_NONE, O_NONE, O_NONE, P_none }, - /* 0729 */ { UD_Ijae, O_Jz, O_NONE, O_NONE, O_NONE, P_oso|P_def64 }, - /* 0730 */ { UD_Ijz, O_Jb, O_NONE, O_NONE, O_NONE, P_none }, - /* 0731 */ { UD_Ijz, O_Jz, O_NONE, O_NONE, O_NONE, P_oso|P_def64 }, - /* 0732 */ { UD_Ijnz, O_Jb, O_NONE, O_NONE, O_NONE, P_none }, - /* 0733 */ { UD_Ijnz, O_Jz, O_NONE, O_NONE, O_NONE, P_oso|P_def64 }, - /* 0734 */ { UD_Ijbe, O_Jb, O_NONE, O_NONE, O_NONE, P_none }, - /* 0735 */ { UD_Ijbe, O_Jz, O_NONE, O_NONE, O_NONE, P_oso|P_def64 }, - /* 0736 */ { UD_Ija, O_Jb, O_NONE, O_NONE, O_NONE, P_none }, - /* 0737 */ { UD_Ija, O_Jz, O_NONE, O_NONE, O_NONE, P_oso|P_def64 }, - /* 0738 */ { UD_Ijs, O_Jb, O_NONE, O_NONE, O_NONE, P_none }, - /* 0739 */ { UD_Ijs, O_Jz, O_NONE, O_NONE, O_NONE, P_oso|P_def64 }, - /* 0740 */ { UD_Ijns, O_Jb, O_NONE, O_NONE, O_NONE, P_none }, - /* 0741 */ { UD_Ijns, O_Jz, O_NONE, O_NONE, O_NONE, P_oso|P_def64 }, - /* 0742 */ { UD_Ijp, O_Jb, O_NONE, O_NONE, O_NONE, P_none }, - /* 0743 */ { UD_Ijp, O_Jz, O_NONE, O_NONE, O_NONE, P_oso|P_def64 }, - /* 0744 */ { UD_Ijnp, O_Jb, O_NONE, O_NONE, O_NONE, P_none }, - /* 0745 */ { UD_Ijnp, O_Jz, O_NONE, O_NONE, O_NONE, P_oso|P_def64 }, - /* 0746 */ { UD_Ijl, O_Jb, O_NONE, O_NONE, O_NONE, P_none }, - /* 0747 */ { UD_Ijl, O_Jz, O_NONE, O_NONE, O_NONE, P_oso|P_def64 }, - /* 0748 */ { UD_Ijge, O_Jb, O_NONE, O_NONE, O_NONE, P_none }, - /* 0749 */ { UD_Ijge, O_Jz, O_NONE, O_NONE, O_NONE, P_oso|P_def64 }, - /* 0750 */ { UD_Ijle, O_Jb, O_NONE, O_NONE, O_NONE, P_none }, - /* 0751 */ { UD_Ijle, O_Jz, O_NONE, O_NONE, O_NONE, P_oso|P_def64 }, - /* 0752 */ { UD_Ijg, O_Jb, O_NONE, O_NONE, O_NONE, P_none }, - /* 0753 */ { UD_Ijg, O_Jz, O_NONE, O_NONE, O_NONE, P_oso|P_def64 }, - /* 0754 */ { UD_Ijcxz, O_Jb, O_NONE, O_NONE, O_NONE, P_aso }, - /* 0755 */ { UD_Ijecxz, O_Jb, O_NONE, O_NONE, O_NONE, P_aso }, - /* 0756 */ { UD_Ijrcxz, O_Jb, O_NONE, O_NONE, O_NONE, P_aso }, - /* 0757 */ { UD_Ijmp, O_Ev, O_NONE, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb|P_def64 }, - /* 0758 */ { UD_Ijmp, O_Fv, O_NONE, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 0759 */ { UD_Ijmp, O_Jz, O_NONE, O_NONE, O_NONE, P_oso|P_def64 }, - /* 0760 */ { UD_Ijmp, O_Av, O_NONE, O_NONE, O_NONE, P_oso }, - /* 0761 */ { UD_Ijmp, O_Jb, O_NONE, O_NONE, O_NONE, P_def64 }, - /* 0762 */ { UD_Ilahf, O_NONE, O_NONE, O_NONE, O_NONE, P_none }, - /* 0763 */ { UD_Ilar, O_Gv, O_Ew, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 0764 */ { UD_Ildmxcsr, O_Md, O_NONE, O_NONE, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 0765 */ { UD_Ilds, O_Gv, O_M, O_NONE, O_NONE, P_aso|P_oso }, - /* 0766 */ { UD_Ilea, O_Gv, O_M, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 0767 */ { UD_Iles, O_Gv, O_M, O_NONE, O_NONE, P_aso|P_oso }, - /* 0768 */ { UD_Ilfs, O_Gz, O_M, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 0769 */ { UD_Ilgs, O_Gz, O_M, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 0770 */ { UD_Ilidt, O_M, O_NONE, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0771 */ { UD_Ilss, O_Gv, O_M, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 0772 */ { UD_Ileave, O_NONE, O_NONE, O_NONE, O_NONE, P_none }, - /* 0773 */ { UD_Ilfence, O_NONE, O_NONE, O_NONE, O_NONE, P_none }, - /* 0774 */ { UD_Ilfence, O_NONE, O_NONE, O_NONE, O_NONE, P_none }, - /* 0775 */ { UD_Ilfence, O_NONE, O_NONE, O_NONE, O_NONE, P_none }, - /* 0776 */ { UD_Ilfence, O_NONE, O_NONE, O_NONE, O_NONE, P_none }, - /* 0777 */ { UD_Ilfence, O_NONE, O_NONE, O_NONE, O_NONE, P_none }, - /* 0778 */ { UD_Ilfence, O_NONE, O_NONE, O_NONE, O_NONE, P_none }, - /* 0779 */ { UD_Ilfence, O_NONE, O_NONE, O_NONE, O_NONE, P_none }, - /* 0780 */ { UD_Ilfence, O_NONE, O_NONE, O_NONE, O_NONE, P_none }, - /* 0781 */ { UD_Ilgdt, O_M, O_NONE, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0782 */ { UD_Illdt, O_Ew, O_NONE, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0783 */ { UD_Ilmsw, O_Ew, O_NONE, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0784 */ { UD_Ilmsw, O_Ew, O_NONE, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0785 */ { UD_Ilock, O_NONE, O_NONE, O_NONE, O_NONE, P_none }, - /* 0786 */ { UD_Ilodsb, O_NONE, O_NONE, O_NONE, O_NONE, P_str|P_seg }, - /* 0787 */ { UD_Ilodsw, O_NONE, O_NONE, O_NONE, O_NONE, P_str|P_seg|P_oso|P_rexw }, - /* 0788 */ { UD_Ilodsd, O_NONE, O_NONE, O_NONE, O_NONE, P_str|P_seg|P_oso|P_rexw }, - /* 0789 */ { UD_Ilodsq, O_NONE, O_NONE, O_NONE, O_NONE, P_str|P_seg|P_oso|P_rexw }, - /* 0790 */ { UD_Iloopne, O_Jb, O_NONE, O_NONE, O_NONE, P_none }, - /* 0791 */ { UD_Iloope, O_Jb, O_NONE, O_NONE, O_NONE, P_none }, - /* 0792 */ { UD_Iloop, O_Jb, O_NONE, O_NONE, O_NONE, P_none }, - /* 0793 */ { UD_Ilsl, O_Gv, O_Ew, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 0794 */ { UD_Iltr, O_Ew, O_NONE, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0795 */ { UD_Imaskmovq, O_P, O_N, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0796 */ { UD_Imaxpd, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0797 */ { UD_Ivmaxpd, O_Vx, O_Hx, O_Wx, O_NONE, P_aso|P_rexr|P_rexx|P_rexb|P_vexl }, - /* 0798 */ { UD_Imaxps, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0799 */ { UD_Ivmaxps, O_Vx, O_Hx, O_Wx, O_NONE, P_aso|P_rexr|P_rexx|P_rexb|P_vexl }, - /* 0800 */ { UD_Imaxsd, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0801 */ { UD_Ivmaxsd, O_Vx, O_Hx, O_Wx, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0802 */ { UD_Imaxss, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0803 */ { UD_Ivmaxss, O_Vx, O_Hx, O_Wx, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0804 */ { UD_Imfence, O_NONE, O_NONE, O_NONE, O_NONE, P_none }, - /* 0805 */ { UD_Imfence, O_NONE, O_NONE, O_NONE, O_NONE, P_none }, - /* 0806 */ { UD_Imfence, O_NONE, O_NONE, O_NONE, O_NONE, P_none }, - /* 0807 */ { UD_Imfence, O_NONE, O_NONE, O_NONE, O_NONE, P_none }, - /* 0808 */ { UD_Imfence, O_NONE, O_NONE, O_NONE, O_NONE, P_none }, - /* 0809 */ { UD_Imfence, O_NONE, O_NONE, O_NONE, O_NONE, P_none }, - /* 0810 */ { UD_Imfence, O_NONE, O_NONE, O_NONE, O_NONE, P_none }, - /* 0811 */ { UD_Imfence, O_NONE, O_NONE, O_NONE, O_NONE, P_none }, - /* 0812 */ { UD_Iminpd, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0813 */ { UD_Ivminpd, O_Vx, O_Hx, O_Wx, O_NONE, P_aso|P_rexr|P_rexx|P_rexb|P_vexl }, - /* 0814 */ { UD_Iminps, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0815 */ { UD_Ivminps, O_Vx, O_Hx, O_Wx, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0816 */ { UD_Iminsd, O_V, O_MqU, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0817 */ { UD_Ivminsd, O_Vx, O_Hx, O_MqU, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0818 */ { UD_Iminss, O_V, O_MdU, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0819 */ { UD_Ivminss, O_Vx, O_Hx, O_MdU, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0820 */ { UD_Imonitor, O_NONE, O_NONE, O_NONE, O_NONE, P_none }, - /* 0821 */ { UD_Imontmul, O_NONE, O_NONE, O_NONE, O_NONE, P_none }, - /* 0822 */ { UD_Imov, O_Eb, O_Ib, O_NONE, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 0823 */ { UD_Imov, O_Ev, O_sIz, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 0824 */ { UD_Imov, O_Eb, O_Gb, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0825 */ { UD_Imov, O_Ev, O_Gv, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 0826 */ { UD_Imov, O_Gb, O_Eb, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0827 */ { UD_Imov, O_Gv, O_Ev, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 0828 */ { UD_Imov, O_MwRv, O_S, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 0829 */ { UD_Imov, O_S, O_MwRv, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 0830 */ { UD_Imov, O_AL, O_Ob, O_NONE, O_NONE, P_none }, - /* 0831 */ { UD_Imov, O_rAX, O_Ov, O_NONE, O_NONE, P_aso|P_oso|P_rexw }, - /* 0832 */ { UD_Imov, O_Ob, O_AL, O_NONE, O_NONE, P_none }, - /* 0833 */ { UD_Imov, O_Ov, O_rAX, O_NONE, O_NONE, P_aso|P_oso|P_rexw }, - /* 0834 */ { UD_Imov, O_R0b, O_Ib, O_NONE, O_NONE, P_rexb }, - /* 0835 */ { UD_Imov, O_R1b, O_Ib, O_NONE, O_NONE, P_rexb }, - /* 0836 */ { UD_Imov, O_R2b, O_Ib, O_NONE, O_NONE, P_rexb }, - /* 0837 */ { UD_Imov, O_R3b, O_Ib, O_NONE, O_NONE, P_rexb }, - /* 0838 */ { UD_Imov, O_R4b, O_Ib, O_NONE, O_NONE, P_rexb }, - /* 0839 */ { UD_Imov, O_R5b, O_Ib, O_NONE, O_NONE, P_rexb }, - /* 0840 */ { UD_Imov, O_R6b, O_Ib, O_NONE, O_NONE, P_rexb }, - /* 0841 */ { UD_Imov, O_R7b, O_Ib, O_NONE, O_NONE, P_rexb }, - /* 0842 */ { UD_Imov, O_R0v, O_Iv, O_NONE, O_NONE, P_oso|P_rexw|P_rexb }, - /* 0843 */ { UD_Imov, O_R1v, O_Iv, O_NONE, O_NONE, P_oso|P_rexw|P_rexb }, - /* 0844 */ { UD_Imov, O_R2v, O_Iv, O_NONE, O_NONE, P_oso|P_rexw|P_rexb }, - /* 0845 */ { UD_Imov, O_R3v, O_Iv, O_NONE, O_NONE, P_oso|P_rexw|P_rexb }, - /* 0846 */ { UD_Imov, O_R4v, O_Iv, O_NONE, O_NONE, P_oso|P_rexw|P_rexb }, - /* 0847 */ { UD_Imov, O_R5v, O_Iv, O_NONE, O_NONE, P_oso|P_rexw|P_rexb }, - /* 0848 */ { UD_Imov, O_R6v, O_Iv, O_NONE, O_NONE, P_oso|P_rexw|P_rexb }, - /* 0849 */ { UD_Imov, O_R7v, O_Iv, O_NONE, O_NONE, P_oso|P_rexw|P_rexb }, - /* 0850 */ { UD_Imov, O_R, O_C, O_NONE, O_NONE, P_rexr|P_rexw|P_rexb }, - /* 0851 */ { UD_Imov, O_R, O_D, O_NONE, O_NONE, P_rexr|P_rexw|P_rexb }, - /* 0852 */ { UD_Imov, O_C, O_R, O_NONE, O_NONE, P_rexr|P_rexw|P_rexb }, - /* 0853 */ { UD_Imov, O_D, O_R, O_NONE, O_NONE, P_rexr|P_rexw|P_rexb }, - /* 0854 */ { UD_Imovapd, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0855 */ { UD_Ivmovapd, O_Vx, O_Wx, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb|P_vexl }, - /* 0856 */ { UD_Imovapd, O_W, O_V, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0857 */ { UD_Ivmovapd, O_Wx, O_Vx, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb|P_vexl }, - /* 0858 */ { UD_Imovaps, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0859 */ { UD_Ivmovaps, O_Vx, O_Wx, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb|P_vexl }, - /* 0860 */ { UD_Imovaps, O_W, O_V, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0861 */ { UD_Ivmovaps, O_Wx, O_Vx, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb|P_vexl }, - /* 0862 */ { UD_Imovd, O_P, O_Ey, O_NONE, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 0863 */ { UD_Imovd, O_P, O_Ey, O_NONE, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 0864 */ { UD_Imovd, O_V, O_Ey, O_NONE, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 0865 */ { UD_Ivmovd, O_Vx, O_Ey, O_NONE, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 0866 */ { UD_Imovd, O_V, O_Ey, O_NONE, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 0867 */ { UD_Ivmovd, O_Vx, O_Ey, O_NONE, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 0868 */ { UD_Imovd, O_Ey, O_P, O_NONE, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 0869 */ { UD_Imovd, O_Ey, O_P, O_NONE, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 0870 */ { UD_Imovd, O_Ey, O_V, O_NONE, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 0871 */ { UD_Ivmovd, O_Ey, O_Vx, O_NONE, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 0872 */ { UD_Imovd, O_Ey, O_V, O_NONE, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 0873 */ { UD_Ivmovd, O_Ey, O_Vx, O_NONE, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 0874 */ { UD_Imovhpd, O_V, O_M, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0875 */ { UD_Ivmovhpd, O_Vx, O_Hx, O_M, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0876 */ { UD_Imovhpd, O_M, O_V, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0877 */ { UD_Ivmovhpd, O_M, O_Vx, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0878 */ { UD_Imovhps, O_V, O_M, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0879 */ { UD_Ivmovhps, O_Vx, O_Hx, O_M, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0880 */ { UD_Imovhps, O_M, O_V, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0881 */ { UD_Ivmovhps, O_M, O_Vx, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0882 */ { UD_Imovlhps, O_V, O_U, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0883 */ { UD_Ivmovlhps, O_Vx, O_Hx, O_Ux, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0884 */ { UD_Imovlpd, O_V, O_M, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0885 */ { UD_Ivmovlpd, O_Vx, O_M, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0886 */ { UD_Imovlpd, O_M, O_V, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0887 */ { UD_Ivmovlpd, O_M, O_Vx, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0888 */ { UD_Imovlps, O_V, O_M, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0889 */ { UD_Ivmovlps, O_Vx, O_M, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0890 */ { UD_Imovlps, O_M, O_V, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0891 */ { UD_Ivmovlps, O_M, O_Vx, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0892 */ { UD_Imovhlps, O_V, O_U, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0893 */ { UD_Ivmovhlps, O_Vx, O_Ux, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0894 */ { UD_Imovmskpd, O_Gd, O_U, O_NONE, O_NONE, P_oso|P_rexr|P_rexb }, - /* 0895 */ { UD_Ivmovmskpd, O_Gd, O_Ux, O_NONE, O_NONE, P_oso|P_rexr|P_rexb|P_vexl }, - /* 0896 */ { UD_Imovmskps, O_Gd, O_U, O_NONE, O_NONE, P_oso|P_rexr|P_rexb }, - /* 0897 */ { UD_Ivmovmskps, O_Gd, O_Ux, O_NONE, O_NONE, P_oso|P_rexr|P_rexb }, - /* 0898 */ { UD_Imovntdq, O_M, O_V, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0899 */ { UD_Ivmovntdq, O_M, O_Vx, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb|P_vexl }, - /* 0900 */ { UD_Imovnti, O_M, O_Gy, O_NONE, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 0901 */ { UD_Imovntpd, O_M, O_V, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0902 */ { UD_Ivmovntpd, O_M, O_Vx, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb|P_vexl }, - /* 0903 */ { UD_Imovntps, O_M, O_V, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0904 */ { UD_Ivmovntps, O_M, O_Vx, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb|P_vexl }, - /* 0905 */ { UD_Imovntq, O_M, O_P, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0906 */ { UD_Imovq, O_P, O_Eq, O_NONE, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 0907 */ { UD_Imovq, O_V, O_Eq, O_NONE, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 0908 */ { UD_Ivmovq, O_Vx, O_Eq, O_NONE, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 0909 */ { UD_Imovq, O_Eq, O_P, O_NONE, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 0910 */ { UD_Imovq, O_Eq, O_V, O_NONE, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 0911 */ { UD_Ivmovq, O_Eq, O_Vx, O_NONE, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 0912 */ { UD_Imovq, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 0913 */ { UD_Ivmovq, O_Vx, O_Wx, O_NONE, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 0914 */ { UD_Imovq, O_W, O_V, O_NONE, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 0915 */ { UD_Ivmovq, O_Wx, O_Vx, O_NONE, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 0916 */ { UD_Imovq, O_P, O_Q, O_NONE, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 0917 */ { UD_Imovq, O_Q, O_P, O_NONE, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 0918 */ { UD_Imovsb, O_NONE, O_NONE, O_NONE, O_NONE, P_str|P_seg }, - /* 0919 */ { UD_Imovsw, O_NONE, O_NONE, O_NONE, O_NONE, P_str|P_seg|P_oso|P_rexw }, - /* 0920 */ { UD_Imovsd, O_NONE, O_NONE, O_NONE, O_NONE, P_str|P_seg|P_oso|P_rexw }, - /* 0921 */ { UD_Imovsd, O_V, O_MqU, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0922 */ { UD_Imovsd, O_W, O_V, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0923 */ { UD_Imovsq, O_NONE, O_NONE, O_NONE, O_NONE, P_str|P_seg|P_oso|P_rexw }, - /* 0924 */ { UD_Imovss, O_V, O_MdU, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0925 */ { UD_Imovss, O_W, O_V, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0926 */ { UD_Imovsx, O_Gv, O_Eb, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 0927 */ { UD_Imovsx, O_Gy, O_Ew, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 0928 */ { UD_Imovupd, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0929 */ { UD_Ivmovupd, O_Vx, O_Wx, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb|P_vexl }, - /* 0930 */ { UD_Imovupd, O_W, O_V, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0931 */ { UD_Ivmovupd, O_Wx, O_Vx, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb|P_vexl }, - /* 0932 */ { UD_Imovups, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0933 */ { UD_Ivmovups, O_Vx, O_Wx, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb|P_vexl }, - /* 0934 */ { UD_Imovups, O_W, O_V, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0935 */ { UD_Ivmovups, O_Wx, O_Vx, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb|P_vexl }, - /* 0936 */ { UD_Imovzx, O_Gv, O_Eb, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 0937 */ { UD_Imovzx, O_Gy, O_Ew, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 0938 */ { UD_Imul, O_Eb, O_NONE, O_NONE, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 0939 */ { UD_Imul, O_Ev, O_NONE, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 0940 */ { UD_Imulpd, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0941 */ { UD_Ivmulpd, O_Vx, O_Hx, O_Wx, O_NONE, P_aso|P_rexr|P_rexx|P_rexb|P_vexl }, - /* 0942 */ { UD_Imulps, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0943 */ { UD_Ivmulps, O_Vx, O_Hx, O_Wx, O_NONE, P_aso|P_rexr|P_rexx|P_rexb|P_vexl }, - /* 0944 */ { UD_Imulsd, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0945 */ { UD_Ivmulsd, O_Vx, O_Hx, O_Wx, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0946 */ { UD_Imulss, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0947 */ { UD_Ivmulss, O_Vx, O_Hx, O_Wx, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0948 */ { UD_Imwait, O_NONE, O_NONE, O_NONE, O_NONE, P_none }, - /* 0949 */ { UD_Ineg, O_Eb, O_NONE, O_NONE, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 0950 */ { UD_Ineg, O_Ev, O_NONE, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 0951 */ { UD_Inop, O_M, O_NONE, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0952 */ { UD_Inop, O_M, O_NONE, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0953 */ { UD_Inop, O_M, O_NONE, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0954 */ { UD_Inop, O_M, O_NONE, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0955 */ { UD_Inop, O_M, O_NONE, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0956 */ { UD_Inop, O_M, O_NONE, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0957 */ { UD_Inop, O_M, O_NONE, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0958 */ { UD_Inot, O_Eb, O_NONE, O_NONE, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 0959 */ { UD_Inot, O_Ev, O_NONE, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 0960 */ { UD_Ior, O_Eb, O_Gb, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0961 */ { UD_Ior, O_Ev, O_Gv, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 0962 */ { UD_Ior, O_Gb, O_Eb, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0963 */ { UD_Ior, O_Gv, O_Ev, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 0964 */ { UD_Ior, O_AL, O_Ib, O_NONE, O_NONE, P_none }, - /* 0965 */ { UD_Ior, O_rAX, O_sIz, O_NONE, O_NONE, P_oso|P_rexw }, - /* 0966 */ { UD_Ior, O_Eb, O_Ib, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0967 */ { UD_Ior, O_Ev, O_sIz, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 0968 */ { UD_Ior, O_Eb, O_Ib, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0969 */ { UD_Ior, O_Ev, O_sIb, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 0970 */ { UD_Iorpd, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0971 */ { UD_Ivorpd, O_Vx, O_Hx, O_Wx, O_NONE, P_aso|P_rexr|P_rexx|P_rexb|P_vexl }, - /* 0972 */ { UD_Iorps, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0973 */ { UD_Ivorps, O_Vx, O_Hx, O_Wx, O_NONE, P_aso|P_rexr|P_rexx|P_rexb|P_vexl }, - /* 0974 */ { UD_Iout, O_Ib, O_AL, O_NONE, O_NONE, P_none }, - /* 0975 */ { UD_Iout, O_Ib, O_eAX, O_NONE, O_NONE, P_oso }, - /* 0976 */ { UD_Iout, O_DX, O_AL, O_NONE, O_NONE, P_none }, - /* 0977 */ { UD_Iout, O_DX, O_eAX, O_NONE, O_NONE, P_oso }, - /* 0978 */ { UD_Ioutsb, O_NONE, O_NONE, O_NONE, O_NONE, P_str|P_seg }, - /* 0979 */ { UD_Ioutsw, O_NONE, O_NONE, O_NONE, O_NONE, P_str|P_oso|P_seg }, - /* 0980 */ { UD_Ioutsd, O_NONE, O_NONE, O_NONE, O_NONE, P_str|P_oso|P_seg }, - /* 0981 */ { UD_Ipacksswb, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0982 */ { UD_Ivpacksswb, O_Vx, O_Hx, O_Wx, O_NONE, P_aso|P_rexr|P_rexx|P_rexb|P_vexl }, - /* 0983 */ { UD_Ipacksswb, O_P, O_Q, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0984 */ { UD_Ipackssdw, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0985 */ { UD_Ivpackssdw, O_Vx, O_Hx, O_Wx, O_NONE, P_aso|P_rexr|P_rexx|P_rexb|P_vexl }, - /* 0986 */ { UD_Ipackssdw, O_P, O_Q, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0987 */ { UD_Ipackuswb, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0988 */ { UD_Ivpackuswb, O_Vx, O_Hx, O_Wx, O_NONE, P_aso|P_rexr|P_rexx|P_rexb|P_vexl }, - /* 0989 */ { UD_Ipackuswb, O_P, O_Q, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0990 */ { UD_Ipaddb, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0991 */ { UD_Ivpaddb, O_Vx, O_Hx, O_Wx, O_NONE, P_aso|P_rexr|P_rexx|P_rexb|P_vexl }, - /* 0992 */ { UD_Ipaddb, O_P, O_Q, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0993 */ { UD_Ipaddw, O_P, O_Q, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0994 */ { UD_Ipaddw, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0995 */ { UD_Ivpaddw, O_Vx, O_Hx, O_Wx, O_NONE, P_aso|P_rexr|P_rexx|P_rexb|P_vexl }, - /* 0996 */ { UD_Ipaddd, O_P, O_Q, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0997 */ { UD_Ipaddd, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 0998 */ { UD_Ivpaddd, O_Vx, O_Hx, O_Wx, O_NONE, P_aso|P_rexr|P_rexx|P_rexb|P_vexl }, - /* 0999 */ { UD_Ipaddsb, O_P, O_Q, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1000 */ { UD_Ipaddsb, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1001 */ { UD_Ivpaddsb, O_Vx, O_Hx, O_Wx, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1002 */ { UD_Ipaddsw, O_P, O_Q, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1003 */ { UD_Ipaddsw, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1004 */ { UD_Ivpaddsw, O_Vx, O_Hx, O_Wx, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1005 */ { UD_Ipaddusb, O_P, O_Q, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1006 */ { UD_Ipaddusb, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1007 */ { UD_Ivpaddusb, O_Vx, O_Hx, O_Wx, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1008 */ { UD_Ipaddusw, O_P, O_Q, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1009 */ { UD_Ipaddusw, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1010 */ { UD_Ivpaddusw, O_Vx, O_Hx, O_Wx, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1011 */ { UD_Ipand, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1012 */ { UD_Ivpand, O_Vx, O_Hx, O_Wx, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1013 */ { UD_Ipand, O_P, O_Q, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1014 */ { UD_Ipandn, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1015 */ { UD_Ivpandn, O_Vx, O_Hx, O_Wx, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1016 */ { UD_Ipandn, O_P, O_Q, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1017 */ { UD_Ipavgb, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1018 */ { UD_Ivpavgb, O_Vx, O_Hx, O_Wx, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1019 */ { UD_Ipavgb, O_P, O_Q, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1020 */ { UD_Ipavgw, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1021 */ { UD_Ivpavgw, O_Vx, O_Hx, O_Wx, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1022 */ { UD_Ipavgw, O_P, O_Q, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1023 */ { UD_Ipcmpeqb, O_P, O_Q, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1024 */ { UD_Ipcmpeqb, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1025 */ { UD_Ivpcmpeqb, O_Vx, O_Hx, O_Wx, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1026 */ { UD_Ipcmpeqw, O_P, O_Q, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1027 */ { UD_Ipcmpeqw, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1028 */ { UD_Ivpcmpeqw, O_Vx, O_Hx, O_Wx, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1029 */ { UD_Ipcmpeqd, O_P, O_Q, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1030 */ { UD_Ipcmpeqd, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1031 */ { UD_Ivpcmpeqd, O_Vx, O_Hx, O_Wx, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1032 */ { UD_Ipcmpgtb, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1033 */ { UD_Ivpcmpgtb, O_Vx, O_Hx, O_Wx, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1034 */ { UD_Ipcmpgtb, O_P, O_Q, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1035 */ { UD_Ipcmpgtw, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1036 */ { UD_Ivpcmpgtw, O_Vx, O_Hx, O_Wx, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1037 */ { UD_Ipcmpgtw, O_P, O_Q, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1038 */ { UD_Ipcmpgtd, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1039 */ { UD_Ivpcmpgtd, O_Vx, O_Hx, O_Wx, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1040 */ { UD_Ipcmpgtd, O_P, O_Q, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1041 */ { UD_Ipextrb, O_MbRv, O_V, O_Ib, O_NONE, P_aso|P_rexx|P_rexr|P_rexb|P_def64 }, - /* 1042 */ { UD_Ivpextrb, O_MbRv, O_Vx, O_Ib, O_NONE, P_aso|P_rexx|P_rexr|P_rexb|P_def64 }, - /* 1043 */ { UD_Ipextrd, O_Ed, O_V, O_Ib, O_NONE, P_aso|P_rexr|P_rexx|P_rexw|P_rexb }, - /* 1044 */ { UD_Ivpextrd, O_Ed, O_Vx, O_Ib, O_NONE, P_aso|P_rexr|P_rexx|P_rexw|P_rexb }, - /* 1045 */ { UD_Ipextrd, O_Ed, O_V, O_Ib, O_NONE, P_aso|P_rexr|P_rexx|P_rexw|P_rexb }, - /* 1046 */ { UD_Ivpextrd, O_Ed, O_Vx, O_Ib, O_NONE, P_aso|P_rexr|P_rexx|P_rexw|P_rexb }, - /* 1047 */ { UD_Ipextrq, O_Eq, O_V, O_Ib, O_NONE, P_aso|P_rexr|P_rexw|P_rexb|P_def64 }, - /* 1048 */ { UD_Ivpextrq, O_Eq, O_Vx, O_Ib, O_NONE, P_aso|P_rexr|P_rexw|P_rexb|P_def64 }, - /* 1049 */ { UD_Ipextrw, O_Gd, O_U, O_Ib, O_NONE, P_aso|P_rexw|P_rexr|P_rexb }, - /* 1050 */ { UD_Ivpextrw, O_Gd, O_Ux, O_Ib, O_NONE, P_aso|P_rexw|P_rexr|P_rexb }, - /* 1051 */ { UD_Ipextrw, O_Gd, O_N, O_Ib, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 1052 */ { UD_Ipextrw, O_MwRd, O_V, O_Ib, O_NONE, P_aso|P_rexw|P_rexx|P_rexr|P_rexb }, - /* 1053 */ { UD_Ivpextrw, O_MwRd, O_Vx, O_Ib, O_NONE, P_aso|P_rexw|P_rexx|P_rexr|P_rexb }, - /* 1054 */ { UD_Ipinsrb, O_V, O_MbRd, O_Ib, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 1055 */ { UD_Ipinsrw, O_P, O_MwRy, O_Ib, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb|P_def64 }, - /* 1056 */ { UD_Ipinsrw, O_V, O_MwRy, O_Ib, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb|P_def64 }, - /* 1057 */ { UD_Ivpinsrw, O_Vx, O_MwRy, O_Ib, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb|P_def64 }, - /* 1058 */ { UD_Ipinsrd, O_V, O_Ed, O_Ib, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 1059 */ { UD_Ipinsrd, O_V, O_Ed, O_Ib, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 1060 */ { UD_Ipinsrq, O_V, O_Eq, O_Ib, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 1061 */ { UD_Ivpinsrb, O_V, O_H, O_MbRd, O_Ib, P_aso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 1062 */ { UD_Ivpinsrd, O_V, O_H, O_Ed, O_Ib, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 1063 */ { UD_Ivpinsrd, O_V, O_H, O_Ed, O_Ib, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 1064 */ { UD_Ivpinsrq, O_V, O_H, O_Eq, O_Ib, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 1065 */ { UD_Ipmaddwd, O_P, O_Q, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1066 */ { UD_Ipmaddwd, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1067 */ { UD_Ivpmaddwd, O_Vx, O_Hx, O_Wx, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1068 */ { UD_Ipmaxsw, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1069 */ { UD_Ivpmaxsw, O_Vx, O_Hx, O_Wx, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1070 */ { UD_Ipmaxsw, O_P, O_Q, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1071 */ { UD_Ipmaxub, O_P, O_Q, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1072 */ { UD_Ipmaxub, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1073 */ { UD_Ivpmaxub, O_Vx, O_Hx, O_Wx, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1074 */ { UD_Ipminsw, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1075 */ { UD_Ivpminsw, O_Vx, O_Hx, O_Wx, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1076 */ { UD_Ipminsw, O_P, O_Q, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1077 */ { UD_Ipminub, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1078 */ { UD_Ivpminub, O_Vx, O_Hx, O_Wx, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1079 */ { UD_Ipminub, O_P, O_Q, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1080 */ { UD_Ipmovmskb, O_Gd, O_U, O_NONE, O_NONE, P_oso|P_rexr|P_rexw|P_rexb }, - /* 1081 */ { UD_Ivpmovmskb, O_Gd, O_Ux, O_NONE, O_NONE, P_oso|P_rexr|P_rexw|P_rexb }, - /* 1082 */ { UD_Ipmovmskb, O_Gd, O_N, O_NONE, O_NONE, P_oso|P_rexr|P_rexw|P_rexb }, - /* 1083 */ { UD_Ipmulhuw, O_P, O_Q, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1084 */ { UD_Ipmulhuw, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1085 */ { UD_Ivpmulhuw, O_Vx, O_Hx, O_Wx, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1086 */ { UD_Ipmulhw, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1087 */ { UD_Ivpmulhw, O_Vx, O_Hx, O_Wx, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1088 */ { UD_Ipmulhw, O_P, O_Q, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1089 */ { UD_Ipmullw, O_P, O_Q, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1090 */ { UD_Ipmullw, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1091 */ { UD_Ivpmullw, O_Vx, O_Hx, O_Wx, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1092 */ { UD_Ipop, O_ES, O_NONE, O_NONE, O_NONE, P_inv64 }, - /* 1093 */ { UD_Ipop, O_SS, O_NONE, O_NONE, O_NONE, P_inv64 }, - /* 1094 */ { UD_Ipop, O_DS, O_NONE, O_NONE, O_NONE, P_inv64 }, - /* 1095 */ { UD_Ipop, O_GS, O_NONE, O_NONE, O_NONE, P_none }, - /* 1096 */ { UD_Ipop, O_FS, O_NONE, O_NONE, O_NONE, P_none }, - /* 1097 */ { UD_Ipop, O_R0v, O_NONE, O_NONE, O_NONE, P_oso|P_rexb|P_def64 }, - /* 1098 */ { UD_Ipop, O_R1v, O_NONE, O_NONE, O_NONE, P_oso|P_rexb|P_def64 }, - /* 1099 */ { UD_Ipop, O_R2v, O_NONE, O_NONE, O_NONE, P_oso|P_rexb|P_def64 }, - /* 1100 */ { UD_Ipop, O_R3v, O_NONE, O_NONE, O_NONE, P_oso|P_rexb|P_def64 }, - /* 1101 */ { UD_Ipop, O_R4v, O_NONE, O_NONE, O_NONE, P_oso|P_rexb|P_def64 }, - /* 1102 */ { UD_Ipop, O_R5v, O_NONE, O_NONE, O_NONE, P_oso|P_rexb|P_def64 }, - /* 1103 */ { UD_Ipop, O_R6v, O_NONE, O_NONE, O_NONE, P_oso|P_rexb|P_def64 }, - /* 1104 */ { UD_Ipop, O_R7v, O_NONE, O_NONE, O_NONE, P_oso|P_rexb|P_def64 }, - /* 1105 */ { UD_Ipop, O_Ev, O_NONE, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb|P_def64 }, - /* 1106 */ { UD_Ipopa, O_NONE, O_NONE, O_NONE, O_NONE, P_oso|P_inv64 }, - /* 1107 */ { UD_Ipopad, O_NONE, O_NONE, O_NONE, O_NONE, P_oso|P_inv64 }, - /* 1108 */ { UD_Ipopfw, O_NONE, O_NONE, O_NONE, O_NONE, P_oso }, - /* 1109 */ { UD_Ipopfd, O_NONE, O_NONE, O_NONE, O_NONE, P_oso }, - /* 1110 */ { UD_Ipopfq, O_NONE, O_NONE, O_NONE, O_NONE, P_oso|P_def64 }, - /* 1111 */ { UD_Ipopfq, O_NONE, O_NONE, O_NONE, O_NONE, P_oso|P_def64 }, - /* 1112 */ { UD_Ipor, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1113 */ { UD_Ivpor, O_Vx, O_Hx, O_Wx, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1114 */ { UD_Ipor, O_P, O_Q, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1115 */ { UD_Iprefetch, O_M, O_NONE, O_NONE, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 1116 */ { UD_Iprefetch, O_M, O_NONE, O_NONE, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 1117 */ { UD_Iprefetch, O_M, O_NONE, O_NONE, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 1118 */ { UD_Iprefetch, O_M, O_NONE, O_NONE, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 1119 */ { UD_Iprefetch, O_M, O_NONE, O_NONE, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 1120 */ { UD_Iprefetch, O_M, O_NONE, O_NONE, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 1121 */ { UD_Iprefetch, O_M, O_NONE, O_NONE, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 1122 */ { UD_Iprefetch, O_M, O_NONE, O_NONE, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 1123 */ { UD_Iprefetchnta, O_M, O_NONE, O_NONE, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 1124 */ { UD_Iprefetcht0, O_M, O_NONE, O_NONE, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 1125 */ { UD_Iprefetcht1, O_M, O_NONE, O_NONE, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 1126 */ { UD_Iprefetcht2, O_M, O_NONE, O_NONE, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 1127 */ { UD_Ipsadbw, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1128 */ { UD_Ivpsadbw, O_Vx, O_Hx, O_Wx, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1129 */ { UD_Ipsadbw, O_P, O_Q, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1130 */ { UD_Ipshufw, O_P, O_Q, O_Ib, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1131 */ { UD_Ipsllw, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1132 */ { UD_Ipsllw, O_P, O_Q, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1133 */ { UD_Ipsllw, O_U, O_Ib, O_NONE, O_NONE, P_rexb }, - /* 1134 */ { UD_Ipsllw, O_N, O_Ib, O_NONE, O_NONE, P_none }, - /* 1135 */ { UD_Ipslld, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1136 */ { UD_Ipslld, O_P, O_Q, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1137 */ { UD_Ipslld, O_U, O_Ib, O_NONE, O_NONE, P_rexb }, - /* 1138 */ { UD_Ipslld, O_N, O_Ib, O_NONE, O_NONE, P_none }, - /* 1139 */ { UD_Ipsllq, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1140 */ { UD_Ipsllq, O_P, O_Q, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1141 */ { UD_Ipsllq, O_U, O_Ib, O_NONE, O_NONE, P_rexb }, - /* 1142 */ { UD_Ipsllq, O_N, O_Ib, O_NONE, O_NONE, P_none }, - /* 1143 */ { UD_Ipsraw, O_P, O_Q, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1144 */ { UD_Ipsraw, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1145 */ { UD_Ivpsraw, O_Vx, O_Hx, O_Wx, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1146 */ { UD_Ipsraw, O_U, O_Ib, O_NONE, O_NONE, P_rexb }, - /* 1147 */ { UD_Ivpsraw, O_Hx, O_Ux, O_Ib, O_NONE, P_rexb }, - /* 1148 */ { UD_Ipsraw, O_N, O_Ib, O_NONE, O_NONE, P_none }, - /* 1149 */ { UD_Ipsrad, O_N, O_Ib, O_NONE, O_NONE, P_none }, - /* 1150 */ { UD_Ipsrad, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1151 */ { UD_Ivpsrad, O_Vx, O_Hx, O_Wx, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1152 */ { UD_Ipsrad, O_P, O_Q, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1153 */ { UD_Ipsrad, O_U, O_Ib, O_NONE, O_NONE, P_rexb }, - /* 1154 */ { UD_Ivpsrad, O_Hx, O_Ux, O_Ib, O_NONE, P_rexb }, - /* 1155 */ { UD_Ipsrlw, O_N, O_Ib, O_NONE, O_NONE, P_none }, - /* 1156 */ { UD_Ipsrlw, O_P, O_Q, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1157 */ { UD_Ipsrlw, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1158 */ { UD_Ivpsrlw, O_Vx, O_Hx, O_Wx, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1159 */ { UD_Ipsrlw, O_U, O_Ib, O_NONE, O_NONE, P_rexb }, - /* 1160 */ { UD_Ivpsrlw, O_Hx, O_Ux, O_Ib, O_NONE, P_rexb }, - /* 1161 */ { UD_Ipsrld, O_N, O_Ib, O_NONE, O_NONE, P_none }, - /* 1162 */ { UD_Ipsrld, O_P, O_Q, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1163 */ { UD_Ipsrld, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1164 */ { UD_Ivpsrld, O_Vx, O_Hx, O_Wx, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1165 */ { UD_Ipsrld, O_U, O_Ib, O_NONE, O_NONE, P_rexb }, - /* 1166 */ { UD_Ivpsrld, O_Hx, O_Ux, O_Ib, O_NONE, P_rexb }, - /* 1167 */ { UD_Ipsrlq, O_N, O_Ib, O_NONE, O_NONE, P_none }, - /* 1168 */ { UD_Ipsrlq, O_P, O_Q, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1169 */ { UD_Ipsrlq, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1170 */ { UD_Ivpsrlq, O_Vx, O_Hx, O_Wx, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1171 */ { UD_Ipsrlq, O_U, O_Ib, O_NONE, O_NONE, P_rexb }, - /* 1172 */ { UD_Ivpsrlq, O_Hx, O_Ux, O_Ib, O_NONE, P_rexb }, - /* 1173 */ { UD_Ipsubb, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1174 */ { UD_Ivpsubb, O_Vx, O_Hx, O_Wx, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1175 */ { UD_Ipsubb, O_P, O_Q, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1176 */ { UD_Ipsubw, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1177 */ { UD_Ivpsubw, O_Vx, O_Hx, O_Wx, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1178 */ { UD_Ipsubw, O_P, O_Q, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1179 */ { UD_Ipsubd, O_P, O_Q, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1180 */ { UD_Ipsubd, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1181 */ { UD_Ivpsubd, O_Vx, O_Hx, O_Wx, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1182 */ { UD_Ipsubsb, O_P, O_Q, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1183 */ { UD_Ipsubsb, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1184 */ { UD_Ivpsubsb, O_Vx, O_Hx, O_Wx, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1185 */ { UD_Ipsubsw, O_P, O_Q, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1186 */ { UD_Ipsubsw, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1187 */ { UD_Ivpsubsw, O_Vx, O_Hx, O_Wx, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1188 */ { UD_Ipsubusb, O_P, O_Q, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1189 */ { UD_Ipsubusb, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1190 */ { UD_Ivpsubusb, O_Vx, O_Hx, O_Wx, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1191 */ { UD_Ipsubusw, O_P, O_Q, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1192 */ { UD_Ipsubusw, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1193 */ { UD_Ivpsubusw, O_Vx, O_Hx, O_Wx, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1194 */ { UD_Ipunpckhbw, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1195 */ { UD_Ivpunpckhbw, O_Vx, O_Hx, O_Wx, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1196 */ { UD_Ipunpckhbw, O_P, O_Q, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1197 */ { UD_Ipunpckhwd, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1198 */ { UD_Ivpunpckhwd, O_Vx, O_Hx, O_Wx, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1199 */ { UD_Ipunpckhwd, O_P, O_Q, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1200 */ { UD_Ipunpckhdq, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1201 */ { UD_Ivpunpckhdq, O_Vx, O_Hx, O_Wx, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1202 */ { UD_Ipunpckhdq, O_P, O_Q, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1203 */ { UD_Ipunpcklbw, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1204 */ { UD_Ivpunpcklbw, O_Vx, O_Hx, O_Wx, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1205 */ { UD_Ipunpcklbw, O_P, O_Q, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1206 */ { UD_Ipunpcklwd, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1207 */ { UD_Ivpunpcklwd, O_Vx, O_Hx, O_Wx, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1208 */ { UD_Ipunpcklwd, O_P, O_Q, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1209 */ { UD_Ipunpckldq, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1210 */ { UD_Ivpunpckldq, O_Vx, O_Hx, O_Wx, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1211 */ { UD_Ipunpckldq, O_P, O_Q, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1212 */ { UD_Ipi2fw, O_P, O_Q, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1213 */ { UD_Ipi2fd, O_P, O_Q, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1214 */ { UD_Ipf2iw, O_P, O_Q, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1215 */ { UD_Ipf2id, O_P, O_Q, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1216 */ { UD_Ipfnacc, O_P, O_Q, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1217 */ { UD_Ipfpnacc, O_P, O_Q, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1218 */ { UD_Ipfcmpge, O_P, O_Q, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1219 */ { UD_Ipfmin, O_P, O_Q, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1220 */ { UD_Ipfrcp, O_P, O_Q, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1221 */ { UD_Ipfrsqrt, O_P, O_Q, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1222 */ { UD_Ipfsub, O_P, O_Q, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1223 */ { UD_Ipfadd, O_P, O_Q, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1224 */ { UD_Ipfcmpgt, O_P, O_Q, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1225 */ { UD_Ipfmax, O_P, O_Q, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1226 */ { UD_Ipfrcpit1, O_P, O_Q, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1227 */ { UD_Ipfrsqit1, O_P, O_Q, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1228 */ { UD_Ipfsubr, O_P, O_Q, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1229 */ { UD_Ipfacc, O_P, O_Q, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1230 */ { UD_Ipfcmpeq, O_P, O_Q, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1231 */ { UD_Ipfmul, O_P, O_Q, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1232 */ { UD_Ipfrcpit2, O_P, O_Q, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1233 */ { UD_Ipmulhrw, O_P, O_Q, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1234 */ { UD_Ipswapd, O_P, O_Q, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1235 */ { UD_Ipavgusb, O_P, O_Q, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1236 */ { UD_Ipush, O_ES, O_NONE, O_NONE, O_NONE, P_inv64 }, - /* 1237 */ { UD_Ipush, O_CS, O_NONE, O_NONE, O_NONE, P_inv64 }, - /* 1238 */ { UD_Ipush, O_SS, O_NONE, O_NONE, O_NONE, P_inv64 }, - /* 1239 */ { UD_Ipush, O_DS, O_NONE, O_NONE, O_NONE, P_inv64 }, - /* 1240 */ { UD_Ipush, O_GS, O_NONE, O_NONE, O_NONE, P_none }, - /* 1241 */ { UD_Ipush, O_FS, O_NONE, O_NONE, O_NONE, P_none }, - /* 1242 */ { UD_Ipush, O_R0v, O_NONE, O_NONE, O_NONE, P_oso|P_rexb|P_def64 }, - /* 1243 */ { UD_Ipush, O_R1v, O_NONE, O_NONE, O_NONE, P_oso|P_rexb|P_def64 }, - /* 1244 */ { UD_Ipush, O_R2v, O_NONE, O_NONE, O_NONE, P_oso|P_rexb|P_def64 }, - /* 1245 */ { UD_Ipush, O_R3v, O_NONE, O_NONE, O_NONE, P_oso|P_rexb|P_def64 }, - /* 1246 */ { UD_Ipush, O_R4v, O_NONE, O_NONE, O_NONE, P_oso|P_rexb|P_def64 }, - /* 1247 */ { UD_Ipush, O_R5v, O_NONE, O_NONE, O_NONE, P_oso|P_rexb|P_def64 }, - /* 1248 */ { UD_Ipush, O_R6v, O_NONE, O_NONE, O_NONE, P_oso|P_rexb|P_def64 }, - /* 1249 */ { UD_Ipush, O_R7v, O_NONE, O_NONE, O_NONE, P_oso|P_rexb|P_def64 }, - /* 1250 */ { UD_Ipush, O_sIz, O_NONE, O_NONE, O_NONE, P_oso|P_def64 }, - /* 1251 */ { UD_Ipush, O_Ev, O_NONE, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb|P_def64 }, - /* 1252 */ { UD_Ipush, O_sIb, O_NONE, O_NONE, O_NONE, P_oso|P_def64 }, - /* 1253 */ { UD_Ipusha, O_NONE, O_NONE, O_NONE, O_NONE, P_oso|P_inv64 }, - /* 1254 */ { UD_Ipushad, O_NONE, O_NONE, O_NONE, O_NONE, P_oso|P_inv64 }, - /* 1255 */ { UD_Ipushfw, O_NONE, O_NONE, O_NONE, O_NONE, P_oso }, - /* 1256 */ { UD_Ipushfw, O_NONE, O_NONE, O_NONE, O_NONE, P_oso|P_rexw|P_def64 }, - /* 1257 */ { UD_Ipushfd, O_NONE, O_NONE, O_NONE, O_NONE, P_oso }, - /* 1258 */ { UD_Ipushfq, O_NONE, O_NONE, O_NONE, O_NONE, P_oso|P_rexw|P_def64 }, - /* 1259 */ { UD_Ipushfq, O_NONE, O_NONE, O_NONE, O_NONE, P_oso|P_rexw|P_def64 }, - /* 1260 */ { UD_Ipxor, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1261 */ { UD_Ivpxor, O_Vx, O_Hx, O_Wx, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1262 */ { UD_Ipxor, O_P, O_Q, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1263 */ { UD_Ircl, O_Eb, O_Ib, O_NONE, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 1264 */ { UD_Ircl, O_Ev, O_Ib, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 1265 */ { UD_Ircl, O_Eb, O_I1, O_NONE, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 1266 */ { UD_Ircl, O_Eb, O_CL, O_NONE, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 1267 */ { UD_Ircl, O_Ev, O_CL, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 1268 */ { UD_Ircl, O_Ev, O_I1, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 1269 */ { UD_Ircr, O_Eb, O_I1, O_NONE, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 1270 */ { UD_Ircr, O_Ev, O_Ib, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 1271 */ { UD_Ircr, O_Eb, O_Ib, O_NONE, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 1272 */ { UD_Ircr, O_Ev, O_I1, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 1273 */ { UD_Ircr, O_Eb, O_CL, O_NONE, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 1274 */ { UD_Ircr, O_Ev, O_CL, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 1275 */ { UD_Irol, O_Eb, O_Ib, O_NONE, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 1276 */ { UD_Irol, O_Eb, O_I1, O_NONE, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 1277 */ { UD_Irol, O_Ev, O_I1, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 1278 */ { UD_Irol, O_Eb, O_CL, O_NONE, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 1279 */ { UD_Irol, O_Ev, O_CL, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 1280 */ { UD_Irol, O_Ev, O_Ib, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 1281 */ { UD_Iror, O_Eb, O_I1, O_NONE, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 1282 */ { UD_Iror, O_Eb, O_Ib, O_NONE, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 1283 */ { UD_Iror, O_Ev, O_Ib, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 1284 */ { UD_Iror, O_Ev, O_I1, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 1285 */ { UD_Iror, O_Eb, O_CL, O_NONE, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 1286 */ { UD_Iror, O_Ev, O_CL, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 1287 */ { UD_Ircpps, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1288 */ { UD_Ivrcpps, O_Vx, O_Wx, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb|P_vexl }, - /* 1289 */ { UD_Ircpss, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1290 */ { UD_Ivrcpss, O_Vx, O_Wx, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1291 */ { UD_Irdmsr, O_NONE, O_NONE, O_NONE, O_NONE, P_none }, - /* 1292 */ { UD_Irdpmc, O_NONE, O_NONE, O_NONE, O_NONE, P_none }, - /* 1293 */ { UD_Irdtsc, O_NONE, O_NONE, O_NONE, O_NONE, P_none }, - /* 1294 */ { UD_Irdtscp, O_NONE, O_NONE, O_NONE, O_NONE, P_none }, - /* 1295 */ { UD_Irepne, O_NONE, O_NONE, O_NONE, O_NONE, P_none }, - /* 1296 */ { UD_Irep, O_NONE, O_NONE, O_NONE, O_NONE, P_none }, - /* 1297 */ { UD_Iret, O_Iw, O_NONE, O_NONE, O_NONE, P_none }, - /* 1298 */ { UD_Iret, O_NONE, O_NONE, O_NONE, O_NONE, P_none }, - /* 1299 */ { UD_Iretf, O_Iw, O_NONE, O_NONE, O_NONE, P_none }, - /* 1300 */ { UD_Iretf, O_NONE, O_NONE, O_NONE, O_NONE, P_none }, - /* 1301 */ { UD_Irsm, O_NONE, O_NONE, O_NONE, O_NONE, P_none }, - /* 1302 */ { UD_Irsqrtps, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1303 */ { UD_Ivrsqrtps, O_Vx, O_Wx, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb|P_vexl }, - /* 1304 */ { UD_Irsqrtss, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1305 */ { UD_Ivrsqrtss, O_Vx, O_Wx, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1306 */ { UD_Isahf, O_NONE, O_NONE, O_NONE, O_NONE, P_none }, - /* 1307 */ { UD_Isalc, O_NONE, O_NONE, O_NONE, O_NONE, P_inv64 }, - /* 1308 */ { UD_Isar, O_Ev, O_I1, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 1309 */ { UD_Isar, O_Eb, O_Ib, O_NONE, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 1310 */ { UD_Isar, O_Eb, O_I1, O_NONE, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 1311 */ { UD_Isar, O_Ev, O_Ib, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 1312 */ { UD_Isar, O_Eb, O_CL, O_NONE, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 1313 */ { UD_Isar, O_Ev, O_CL, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 1314 */ { UD_Ishl, O_Eb, O_Ib, O_NONE, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 1315 */ { UD_Ishl, O_Ev, O_Ib, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 1316 */ { UD_Ishl, O_Eb, O_I1, O_NONE, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 1317 */ { UD_Ishl, O_Eb, O_CL, O_NONE, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 1318 */ { UD_Ishl, O_Ev, O_CL, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 1319 */ { UD_Ishl, O_Ev, O_Ib, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 1320 */ { UD_Ishl, O_Eb, O_CL, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1321 */ { UD_Ishl, O_Ev, O_I1, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 1322 */ { UD_Ishl, O_Eb, O_I1, O_NONE, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 1323 */ { UD_Ishl, O_Eb, O_Ib, O_NONE, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 1324 */ { UD_Ishl, O_Ev, O_CL, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 1325 */ { UD_Ishl, O_Ev, O_I1, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 1326 */ { UD_Ishr, O_Ev, O_Ib, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 1327 */ { UD_Ishr, O_Eb, O_CL, O_NONE, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 1328 */ { UD_Ishr, O_Ev, O_I1, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 1329 */ { UD_Ishr, O_Eb, O_I1, O_NONE, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 1330 */ { UD_Ishr, O_Eb, O_Ib, O_NONE, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 1331 */ { UD_Ishr, O_Ev, O_CL, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 1332 */ { UD_Isbb, O_Eb, O_Gb, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1333 */ { UD_Isbb, O_Ev, O_Gv, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 1334 */ { UD_Isbb, O_Gb, O_Eb, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1335 */ { UD_Isbb, O_Gv, O_Ev, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 1336 */ { UD_Isbb, O_AL, O_Ib, O_NONE, O_NONE, P_none }, - /* 1337 */ { UD_Isbb, O_rAX, O_sIz, O_NONE, O_NONE, P_oso|P_rexw }, - /* 1338 */ { UD_Isbb, O_Eb, O_Ib, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1339 */ { UD_Isbb, O_Ev, O_sIz, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 1340 */ { UD_Isbb, O_Eb, O_Ib, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb|P_inv64 }, - /* 1341 */ { UD_Isbb, O_Ev, O_sIb, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 1342 */ { UD_Iscasb, O_NONE, O_NONE, O_NONE, O_NONE, P_strz }, - /* 1343 */ { UD_Iscasw, O_NONE, O_NONE, O_NONE, O_NONE, P_strz|P_oso|P_rexw }, - /* 1344 */ { UD_Iscasd, O_NONE, O_NONE, O_NONE, O_NONE, P_strz|P_oso|P_rexw }, - /* 1345 */ { UD_Iscasq, O_NONE, O_NONE, O_NONE, O_NONE, P_strz|P_oso|P_rexw }, - /* 1346 */ { UD_Iseto, O_Eb, O_NONE, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1347 */ { UD_Isetno, O_Eb, O_NONE, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1348 */ { UD_Isetb, O_Eb, O_NONE, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1349 */ { UD_Isetae, O_Eb, O_NONE, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1350 */ { UD_Isetz, O_Eb, O_NONE, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1351 */ { UD_Isetnz, O_Eb, O_NONE, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1352 */ { UD_Isetbe, O_Eb, O_NONE, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1353 */ { UD_Iseta, O_Eb, O_NONE, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1354 */ { UD_Isets, O_Eb, O_NONE, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1355 */ { UD_Isetns, O_Eb, O_NONE, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1356 */ { UD_Isetp, O_Eb, O_NONE, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1357 */ { UD_Isetnp, O_Eb, O_NONE, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1358 */ { UD_Isetl, O_Eb, O_NONE, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1359 */ { UD_Isetge, O_Eb, O_NONE, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1360 */ { UD_Isetle, O_Eb, O_NONE, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1361 */ { UD_Isetg, O_Eb, O_NONE, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1362 */ { UD_Isfence, O_NONE, O_NONE, O_NONE, O_NONE, P_none }, - /* 1363 */ { UD_Isfence, O_NONE, O_NONE, O_NONE, O_NONE, P_none }, - /* 1364 */ { UD_Isfence, O_NONE, O_NONE, O_NONE, O_NONE, P_none }, - /* 1365 */ { UD_Isfence, O_NONE, O_NONE, O_NONE, O_NONE, P_none }, - /* 1366 */ { UD_Isfence, O_NONE, O_NONE, O_NONE, O_NONE, P_none }, - /* 1367 */ { UD_Isfence, O_NONE, O_NONE, O_NONE, O_NONE, P_none }, - /* 1368 */ { UD_Isfence, O_NONE, O_NONE, O_NONE, O_NONE, P_none }, - /* 1369 */ { UD_Isfence, O_NONE, O_NONE, O_NONE, O_NONE, P_none }, - /* 1370 */ { UD_Isgdt, O_M, O_NONE, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1371 */ { UD_Ishld, O_Ev, O_Gv, O_Ib, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 1372 */ { UD_Ishld, O_Ev, O_Gv, O_CL, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 1373 */ { UD_Ishrd, O_Ev, O_Gv, O_Ib, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 1374 */ { UD_Ishrd, O_Ev, O_Gv, O_CL, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 1375 */ { UD_Ishufpd, O_V, O_W, O_Ib, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1376 */ { UD_Ivshufpd, O_Vx, O_Hx, O_Wx, O_Ib, P_aso|P_rexr|P_rexx|P_rexb|P_vexl }, - /* 1377 */ { UD_Ishufps, O_V, O_W, O_Ib, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1378 */ { UD_Ivshufps, O_Vx, O_Hx, O_Wx, O_Ib, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1379 */ { UD_Isidt, O_M, O_NONE, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1380 */ { UD_Isldt, O_MwRv, O_NONE, O_NONE, O_NONE, P_aso|P_oso|P_rexr|P_rexw|P_rexx|P_rexb }, - /* 1381 */ { UD_Ismsw, O_MwRv, O_NONE, O_NONE, O_NONE, P_aso|P_oso|P_rexr|P_rexw|P_rexx|P_rexb }, - /* 1382 */ { UD_Ismsw, O_MwRv, O_NONE, O_NONE, O_NONE, P_aso|P_oso|P_rexr|P_rexw|P_rexx|P_rexb }, - /* 1383 */ { UD_Isqrtps, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1384 */ { UD_Ivsqrtps, O_Vx, O_Wx, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb|P_vexl }, - /* 1385 */ { UD_Isqrtpd, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1386 */ { UD_Ivsqrtpd, O_Vx, O_Wx, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1387 */ { UD_Isqrtsd, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1388 */ { UD_Ivsqrtsd, O_Vx, O_Hx, O_Wx, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1389 */ { UD_Isqrtss, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1390 */ { UD_Ivsqrtss, O_Vx, O_Hx, O_Wx, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1391 */ { UD_Istc, O_NONE, O_NONE, O_NONE, O_NONE, P_none }, - /* 1392 */ { UD_Istd, O_NONE, O_NONE, O_NONE, O_NONE, P_none }, - /* 1393 */ { UD_Istgi, O_NONE, O_NONE, O_NONE, O_NONE, P_none }, - /* 1394 */ { UD_Isti, O_NONE, O_NONE, O_NONE, O_NONE, P_none }, - /* 1395 */ { UD_Iskinit, O_NONE, O_NONE, O_NONE, O_NONE, P_none }, - /* 1396 */ { UD_Istmxcsr, O_Md, O_NONE, O_NONE, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 1397 */ { UD_Ivstmxcsr, O_Md, O_NONE, O_NONE, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 1398 */ { UD_Istosb, O_NONE, O_NONE, O_NONE, O_NONE, P_str|P_seg }, - /* 1399 */ { UD_Istosw, O_NONE, O_NONE, O_NONE, O_NONE, P_str|P_seg|P_oso|P_rexw }, - /* 1400 */ { UD_Istosd, O_NONE, O_NONE, O_NONE, O_NONE, P_str|P_seg|P_oso|P_rexw }, - /* 1401 */ { UD_Istosq, O_NONE, O_NONE, O_NONE, O_NONE, P_str|P_seg|P_oso|P_rexw }, - /* 1402 */ { UD_Istr, O_MwRv, O_NONE, O_NONE, O_NONE, P_aso|P_oso|P_rexr|P_rexw|P_rexx|P_rexb }, - /* 1403 */ { UD_Isub, O_Eb, O_Gb, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1404 */ { UD_Isub, O_Ev, O_Gv, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 1405 */ { UD_Isub, O_Gb, O_Eb, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1406 */ { UD_Isub, O_Gv, O_Ev, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 1407 */ { UD_Isub, O_AL, O_Ib, O_NONE, O_NONE, P_none }, - /* 1408 */ { UD_Isub, O_rAX, O_sIz, O_NONE, O_NONE, P_oso|P_rexw }, - /* 1409 */ { UD_Isub, O_Eb, O_Ib, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1410 */ { UD_Isub, O_Ev, O_sIz, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 1411 */ { UD_Isub, O_Eb, O_Ib, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb|P_inv64 }, - /* 1412 */ { UD_Isub, O_Ev, O_sIb, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 1413 */ { UD_Isubpd, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1414 */ { UD_Ivsubpd, O_Vx, O_Hx, O_Wx, O_NONE, P_aso|P_rexr|P_rexx|P_rexb|P_vexl }, - /* 1415 */ { UD_Isubps, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1416 */ { UD_Ivsubps, O_Vx, O_Hx, O_Wx, O_NONE, P_aso|P_rexr|P_rexx|P_rexb|P_vexl }, - /* 1417 */ { UD_Isubsd, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1418 */ { UD_Ivsubsd, O_Vx, O_Hx, O_Wx, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1419 */ { UD_Isubss, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1420 */ { UD_Ivsubss, O_Vx, O_Hx, O_Wx, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1421 */ { UD_Iswapgs, O_NONE, O_NONE, O_NONE, O_NONE, P_none }, - /* 1422 */ { UD_Isyscall, O_NONE, O_NONE, O_NONE, O_NONE, P_none }, - /* 1423 */ { UD_Isysenter, O_NONE, O_NONE, O_NONE, O_NONE, P_none }, - /* 1424 */ { UD_Isysenter, O_NONE, O_NONE, O_NONE, O_NONE, P_none }, - /* 1425 */ { UD_Isysexit, O_NONE, O_NONE, O_NONE, O_NONE, P_none }, - /* 1426 */ { UD_Isysexit, O_NONE, O_NONE, O_NONE, O_NONE, P_none }, - /* 1427 */ { UD_Isysret, O_NONE, O_NONE, O_NONE, O_NONE, P_none }, - /* 1428 */ { UD_Itest, O_Eb, O_Ib, O_NONE, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 1429 */ { UD_Itest, O_Eb, O_Gb, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1430 */ { UD_Itest, O_Ev, O_Gv, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 1431 */ { UD_Itest, O_AL, O_Ib, O_NONE, O_NONE, P_none }, - /* 1432 */ { UD_Itest, O_rAX, O_sIz, O_NONE, O_NONE, P_oso|P_rexw }, - /* 1433 */ { UD_Itest, O_Eb, O_Ib, O_NONE, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 1434 */ { UD_Itest, O_Ev, O_sIz, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 1435 */ { UD_Itest, O_Ev, O_Iz, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 1436 */ { UD_Iucomisd, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1437 */ { UD_Ivucomisd, O_Vx, O_Wx, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1438 */ { UD_Iucomiss, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1439 */ { UD_Ivucomiss, O_Vx, O_Wx, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1440 */ { UD_Iud2, O_NONE, O_NONE, O_NONE, O_NONE, P_none }, - /* 1441 */ { UD_Iunpckhpd, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1442 */ { UD_Ivunpckhpd, O_Vx, O_Hx, O_Wx, O_NONE, P_aso|P_rexr|P_rexx|P_rexb|P_vexl }, - /* 1443 */ { UD_Iunpckhps, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1444 */ { UD_Ivunpckhps, O_Vx, O_Hx, O_Wx, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1445 */ { UD_Iunpcklps, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1446 */ { UD_Ivunpcklps, O_Vx, O_Hx, O_Wx, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1447 */ { UD_Iunpcklpd, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1448 */ { UD_Ivunpcklpd, O_Vx, O_Hx, O_Wx, O_NONE, P_aso|P_rexr|P_rexx|P_rexb|P_vexl }, - /* 1449 */ { UD_Iverr, O_Ew, O_NONE, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1450 */ { UD_Iverw, O_Ew, O_NONE, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1451 */ { UD_Ivmcall, O_NONE, O_NONE, O_NONE, O_NONE, P_none }, - /* 1452 */ { UD_Irdrand, O_R, O_NONE, O_NONE, O_NONE, P_oso|P_rexr|P_rexw|P_rexx|P_rexb }, - /* 1453 */ { UD_Ivmclear, O_Mq, O_NONE, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1454 */ { UD_Ivmxon, O_Mq, O_NONE, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1455 */ { UD_Ivmptrld, O_Mq, O_NONE, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1456 */ { UD_Ivmptrst, O_Mq, O_NONE, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1457 */ { UD_Ivmlaunch, O_NONE, O_NONE, O_NONE, O_NONE, P_none }, - /* 1458 */ { UD_Ivmresume, O_NONE, O_NONE, O_NONE, O_NONE, P_none }, - /* 1459 */ { UD_Ivmxoff, O_NONE, O_NONE, O_NONE, O_NONE, P_none }, - /* 1460 */ { UD_Ivmread, O_Ey, O_Gy, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb|P_def64 }, - /* 1461 */ { UD_Ivmwrite, O_Gy, O_Ey, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb|P_def64 }, - /* 1462 */ { UD_Ivmrun, O_NONE, O_NONE, O_NONE, O_NONE, P_none }, - /* 1463 */ { UD_Ivmmcall, O_NONE, O_NONE, O_NONE, O_NONE, P_none }, - /* 1464 */ { UD_Ivmload, O_NONE, O_NONE, O_NONE, O_NONE, P_none }, - /* 1465 */ { UD_Ivmsave, O_NONE, O_NONE, O_NONE, O_NONE, P_none }, - /* 1466 */ { UD_Iwait, O_NONE, O_NONE, O_NONE, O_NONE, P_none }, - /* 1467 */ { UD_Iwbinvd, O_NONE, O_NONE, O_NONE, O_NONE, P_none }, - /* 1468 */ { UD_Iwrmsr, O_NONE, O_NONE, O_NONE, O_NONE, P_none }, - /* 1469 */ { UD_Ixadd, O_Eb, O_Gb, O_NONE, O_NONE, P_aso|P_oso|P_rexr|P_rexx|P_rexb }, - /* 1470 */ { UD_Ixadd, O_Ev, O_Gv, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 1471 */ { UD_Ixchg, O_Eb, O_Gb, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1472 */ { UD_Ixchg, O_Ev, O_Gv, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 1473 */ { UD_Ixchg, O_R0v, O_rAX, O_NONE, O_NONE, P_oso|P_rexw|P_rexb }, - /* 1474 */ { UD_Ixchg, O_R1v, O_rAX, O_NONE, O_NONE, P_oso|P_rexw|P_rexb }, - /* 1475 */ { UD_Ixchg, O_R2v, O_rAX, O_NONE, O_NONE, P_oso|P_rexw|P_rexb }, - /* 1476 */ { UD_Ixchg, O_R3v, O_rAX, O_NONE, O_NONE, P_oso|P_rexw|P_rexb }, - /* 1477 */ { UD_Ixchg, O_R4v, O_rAX, O_NONE, O_NONE, P_oso|P_rexw|P_rexb }, - /* 1478 */ { UD_Ixchg, O_R5v, O_rAX, O_NONE, O_NONE, P_oso|P_rexw|P_rexb }, - /* 1479 */ { UD_Ixchg, O_R6v, O_rAX, O_NONE, O_NONE, P_oso|P_rexw|P_rexb }, - /* 1480 */ { UD_Ixchg, O_R7v, O_rAX, O_NONE, O_NONE, P_oso|P_rexw|P_rexb }, - /* 1481 */ { UD_Ixgetbv, O_NONE, O_NONE, O_NONE, O_NONE, P_none }, - /* 1482 */ { UD_Ixlatb, O_NONE, O_NONE, O_NONE, O_NONE, P_rexw|P_seg }, - /* 1483 */ { UD_Ixor, O_Eb, O_Gb, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1484 */ { UD_Ixor, O_Ev, O_Gv, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 1485 */ { UD_Ixor, O_Gb, O_Eb, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1486 */ { UD_Ixor, O_Gv, O_Ev, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 1487 */ { UD_Ixor, O_AL, O_Ib, O_NONE, O_NONE, P_none }, - /* 1488 */ { UD_Ixor, O_rAX, O_sIz, O_NONE, O_NONE, P_oso|P_rexw }, - /* 1489 */ { UD_Ixor, O_Eb, O_Ib, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1490 */ { UD_Ixor, O_Ev, O_sIz, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 1491 */ { UD_Ixor, O_Eb, O_Ib, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb|P_inv64 }, - /* 1492 */ { UD_Ixor, O_Ev, O_sIb, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 1493 */ { UD_Ixorpd, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1494 */ { UD_Ivxorpd, O_Vx, O_Hx, O_Wx, O_NONE, P_aso|P_rexr|P_rexx|P_rexb|P_vexl }, - /* 1495 */ { UD_Ixorps, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1496 */ { UD_Ivxorps, O_Vx, O_Hx, O_Wx, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1497 */ { UD_Ixcryptecb, O_NONE, O_NONE, O_NONE, O_NONE, P_none }, - /* 1498 */ { UD_Ixcryptcbc, O_NONE, O_NONE, O_NONE, O_NONE, P_none }, - /* 1499 */ { UD_Ixcryptctr, O_NONE, O_NONE, O_NONE, O_NONE, P_none }, - /* 1500 */ { UD_Ixcryptcfb, O_NONE, O_NONE, O_NONE, O_NONE, P_none }, - /* 1501 */ { UD_Ixcryptofb, O_NONE, O_NONE, O_NONE, O_NONE, P_none }, - /* 1502 */ { UD_Ixrstor, O_M, O_NONE, O_NONE, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 1503 */ { UD_Ixsave, O_M, O_NONE, O_NONE, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 1504 */ { UD_Ixsetbv, O_NONE, O_NONE, O_NONE, O_NONE, P_none }, - /* 1505 */ { UD_Ixsha1, O_NONE, O_NONE, O_NONE, O_NONE, P_none }, - /* 1506 */ { UD_Ixsha256, O_NONE, O_NONE, O_NONE, O_NONE, P_none }, - /* 1507 */ { UD_Ixstore, O_NONE, O_NONE, O_NONE, O_NONE, P_none }, - /* 1508 */ { UD_Ipclmulqdq, O_V, O_W, O_Ib, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1509 */ { UD_Ivpclmulqdq, O_Vx, O_Hx, O_Wx, O_Ib, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1510 */ { UD_Igetsec, O_NONE, O_NONE, O_NONE, O_NONE, P_none }, - /* 1511 */ { UD_Imovdqa, O_W, O_V, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1512 */ { UD_Ivmovdqa, O_Wx, O_Vx, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb|P_vexl }, - /* 1513 */ { UD_Imovdqa, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1514 */ { UD_Ivmovdqa, O_Vx, O_Wx, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb|P_vexl }, - /* 1515 */ { UD_Imaskmovdqu, O_V, O_U, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1516 */ { UD_Ivmaskmovdqu, O_Vx, O_Ux, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1517 */ { UD_Imovdq2q, O_P, O_U, O_NONE, O_NONE, P_aso|P_rexb }, - /* 1518 */ { UD_Imovdqu, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1519 */ { UD_Ivmovdqu, O_Vx, O_Wx, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb|P_vexl }, - /* 1520 */ { UD_Imovdqu, O_W, O_V, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1521 */ { UD_Imovq2dq, O_V, O_N, O_NONE, O_NONE, P_aso|P_rexr }, - /* 1522 */ { UD_Ipaddq, O_P, O_Q, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1523 */ { UD_Ipaddq, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1524 */ { UD_Ivpaddq, O_Vx, O_Hx, O_Wx, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1525 */ { UD_Ipsubq, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1526 */ { UD_Ivpsubq, O_Vx, O_Hx, O_Wx, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1527 */ { UD_Ipsubq, O_P, O_Q, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1528 */ { UD_Ipmuludq, O_P, O_Q, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1529 */ { UD_Ipmuludq, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1530 */ { UD_Ipshufhw, O_V, O_W, O_Ib, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1531 */ { UD_Ivpshufhw, O_Vx, O_Wx, O_Ib, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1532 */ { UD_Ipshuflw, O_V, O_W, O_Ib, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1533 */ { UD_Ivpshuflw, O_Vx, O_Wx, O_Ib, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1534 */ { UD_Ipshufd, O_V, O_W, O_Ib, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1535 */ { UD_Ivpshufd, O_Vx, O_Wx, O_Ib, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1536 */ { UD_Ipslldq, O_U, O_Ib, O_NONE, O_NONE, P_rexb }, - /* 1537 */ { UD_Ivpslldq, O_Hx, O_Ux, O_Ib, O_NONE, P_rexb }, - /* 1538 */ { UD_Ipsrldq, O_U, O_Ib, O_NONE, O_NONE, P_rexb }, - /* 1539 */ { UD_Ivpsrldq, O_Hx, O_Ux, O_Ib, O_NONE, P_rexb }, - /* 1540 */ { UD_Ipunpckhqdq, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1541 */ { UD_Ivpunpckhqdq, O_Vx, O_Hx, O_Wx, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1542 */ { UD_Ipunpcklqdq, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1543 */ { UD_Ivpunpcklqdq, O_Vx, O_Hx, O_Wx, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1544 */ { UD_Ihaddpd, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1545 */ { UD_Ivhaddpd, O_Vx, O_Hx, O_Wx, O_NONE, P_aso|P_rexr|P_rexx|P_rexb|P_vexl }, - /* 1546 */ { UD_Ihaddps, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1547 */ { UD_Ivhaddps, O_Vx, O_Hx, O_Wx, O_NONE, P_aso|P_rexr|P_rexx|P_rexb|P_vexl }, - /* 1548 */ { UD_Ihsubpd, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1549 */ { UD_Ivhsubpd, O_Vx, O_Hx, O_Wx, O_NONE, P_aso|P_rexr|P_rexx|P_rexb|P_vexl }, - /* 1550 */ { UD_Ihsubps, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1551 */ { UD_Ivhsubps, O_Vx, O_Hx, O_Wx, O_NONE, P_aso|P_rexr|P_rexx|P_rexb|P_vexl }, - /* 1552 */ { UD_Iinsertps, O_V, O_Md, O_Ib, O_NONE, P_aso|P_rexr|P_rexw|P_rexx|P_rexb }, - /* 1553 */ { UD_Ivinsertps, O_Vx, O_Hx, O_Md, O_Ib, P_aso|P_rexr|P_rexw|P_rexx|P_rexb }, - /* 1554 */ { UD_Ilddqu, O_V, O_M, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1555 */ { UD_Ivlddqu, O_Vx, O_M, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb|P_vexl }, - /* 1556 */ { UD_Imovddup, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1557 */ { UD_Ivmovddup, O_Vx, O_Wx, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1558 */ { UD_Imovddup, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1559 */ { UD_Ivmovddup, O_Vx, O_Wx, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1560 */ { UD_Imovshdup, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1561 */ { UD_Ivmovshdup, O_Vx, O_Wx, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb|P_vexl }, - /* 1562 */ { UD_Imovshdup, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1563 */ { UD_Ivmovshdup, O_Vx, O_Wx, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb|P_vexl }, - /* 1564 */ { UD_Imovsldup, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1565 */ { UD_Ivmovsldup, O_Vx, O_Wx, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb|P_vexl }, - /* 1566 */ { UD_Imovsldup, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1567 */ { UD_Ivmovsldup, O_Vx, O_Wx, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb|P_vexl }, - /* 1568 */ { UD_Ipabsb, O_P, O_Q, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1569 */ { UD_Ipabsb, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1570 */ { UD_Ivpabsb, O_Vx, O_Wx, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb|P_vexl }, - /* 1571 */ { UD_Ipabsw, O_P, O_Q, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1572 */ { UD_Ipabsw, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1573 */ { UD_Ivpabsw, O_Vx, O_Wx, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb|P_vexl }, - /* 1574 */ { UD_Ipabsd, O_P, O_Q, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1575 */ { UD_Ipabsd, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1576 */ { UD_Ivpabsd, O_Vx, O_Wx, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb|P_vexl }, - /* 1577 */ { UD_Ipshufb, O_P, O_Q, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1578 */ { UD_Ipshufb, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1579 */ { UD_Ivpshufb, O_Vx, O_Hx, O_Wx, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1580 */ { UD_Iphaddw, O_P, O_Q, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1581 */ { UD_Iphaddw, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1582 */ { UD_Ivphaddw, O_Vx, O_Hx, O_Wx, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1583 */ { UD_Iphaddd, O_P, O_Q, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1584 */ { UD_Iphaddd, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1585 */ { UD_Ivphaddd, O_Vx, O_Hx, O_Wx, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1586 */ { UD_Iphaddsw, O_P, O_Q, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1587 */ { UD_Iphaddsw, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1588 */ { UD_Ivphaddsw, O_Vx, O_Hx, O_Wx, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1589 */ { UD_Ipmaddubsw, O_P, O_Q, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1590 */ { UD_Ipmaddubsw, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1591 */ { UD_Ivpmaddubsw, O_Vx, O_Hx, O_Wx, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1592 */ { UD_Iphsubw, O_P, O_Q, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1593 */ { UD_Iphsubw, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1594 */ { UD_Ivphsubw, O_Vx, O_Hx, O_Wx, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1595 */ { UD_Iphsubd, O_P, O_Q, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1596 */ { UD_Iphsubd, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1597 */ { UD_Ivphsubd, O_Vx, O_Hx, O_Wx, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1598 */ { UD_Iphsubsw, O_P, O_Q, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1599 */ { UD_Iphsubsw, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1600 */ { UD_Ivphsubsw, O_Vx, O_Hx, O_Wx, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1601 */ { UD_Ipsignb, O_P, O_Q, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1602 */ { UD_Ipsignb, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1603 */ { UD_Ivpsignb, O_Vx, O_Hx, O_Wx, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1604 */ { UD_Ipsignd, O_P, O_Q, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1605 */ { UD_Ipsignd, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1606 */ { UD_Ivpsignd, O_Vx, O_Hx, O_Wx, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1607 */ { UD_Ipsignw, O_P, O_Q, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1608 */ { UD_Ipsignw, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1609 */ { UD_Ivpsignw, O_Vx, O_Hx, O_Wx, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1610 */ { UD_Ipmulhrsw, O_P, O_Q, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1611 */ { UD_Ipmulhrsw, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1612 */ { UD_Ivpmulhrsw, O_Vx, O_Hx, O_Wx, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1613 */ { UD_Ipalignr, O_P, O_Q, O_Ib, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1614 */ { UD_Ipalignr, O_V, O_W, O_Ib, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1615 */ { UD_Ivpalignr, O_Vx, O_Hx, O_Wx, O_Ib, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1616 */ { UD_Ipblendvb, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1617 */ { UD_Ipmuldq, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1618 */ { UD_Ivpmuldq, O_Vx, O_Hx, O_Wx, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1619 */ { UD_Ipminsb, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1620 */ { UD_Ivpminsb, O_Vx, O_Hx, O_Wx, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1621 */ { UD_Ipminsd, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1622 */ { UD_Ivpminsd, O_Vx, O_Hx, O_Wx, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1623 */ { UD_Ipminuw, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1624 */ { UD_Ivpminuw, O_Vx, O_Hx, O_Wx, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1625 */ { UD_Ipminud, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1626 */ { UD_Ivpminud, O_Vx, O_Hx, O_Wx, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1627 */ { UD_Ipmaxsb, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1628 */ { UD_Ivpmaxsb, O_Vx, O_Hx, O_Wx, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1629 */ { UD_Ipmaxsd, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1630 */ { UD_Ivpmaxsd, O_Vx, O_Hx, O_Wx, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1631 */ { UD_Ipmaxud, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1632 */ { UD_Ivpmaxud, O_Vx, O_Hx, O_Wx, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1633 */ { UD_Ipmaxuw, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1634 */ { UD_Ivpmaxuw, O_Vx, O_Hx, O_Wx, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1635 */ { UD_Ipmulld, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1636 */ { UD_Ivpmulld, O_Vx, O_Hx, O_Wx, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1637 */ { UD_Iphminposuw, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1638 */ { UD_Ivphminposuw, O_Vx, O_Wx, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1639 */ { UD_Iroundps, O_V, O_W, O_Ib, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1640 */ { UD_Ivroundps, O_Vx, O_Wx, O_Ib, O_NONE, P_aso|P_rexr|P_rexx|P_rexb|P_vexl }, - /* 1641 */ { UD_Iroundpd, O_V, O_W, O_Ib, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1642 */ { UD_Ivroundpd, O_Vx, O_Wx, O_Ib, O_NONE, P_aso|P_rexr|P_rexx|P_rexb|P_vexl }, - /* 1643 */ { UD_Iroundss, O_V, O_W, O_Ib, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1644 */ { UD_Ivroundss, O_Vx, O_Hx, O_Wx, O_Ib, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1645 */ { UD_Iroundsd, O_V, O_W, O_Ib, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1646 */ { UD_Ivroundsd, O_Vx, O_Hx, O_Wx, O_Ib, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1647 */ { UD_Iblendpd, O_V, O_W, O_Ib, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1648 */ { UD_Ivblendpd, O_Vx, O_Hx, O_Wx, O_Ib, P_aso|P_rexr|P_rexx|P_rexb|P_vexl }, - /* 1649 */ { UD_Iblendps, O_V, O_W, O_Ib, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1650 */ { UD_Ivblendps, O_Vx, O_Hx, O_Wx, O_Ib, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1651 */ { UD_Iblendvpd, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1652 */ { UD_Iblendvps, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1653 */ { UD_Ibound, O_Gv, O_M, O_NONE, O_NONE, P_aso|P_oso }, - /* 1654 */ { UD_Ibsf, O_Gv, O_Ev, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 1655 */ { UD_Ibsr, O_Gv, O_Ev, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 1656 */ { UD_Ibswap, O_R0y, O_NONE, O_NONE, O_NONE, P_oso|P_rexw|P_rexb }, - /* 1657 */ { UD_Ibswap, O_R1y, O_NONE, O_NONE, O_NONE, P_oso|P_rexw|P_rexb }, - /* 1658 */ { UD_Ibswap, O_R2y, O_NONE, O_NONE, O_NONE, P_oso|P_rexw|P_rexb }, - /* 1659 */ { UD_Ibswap, O_R3y, O_NONE, O_NONE, O_NONE, P_oso|P_rexw|P_rexb }, - /* 1660 */ { UD_Ibswap, O_R4y, O_NONE, O_NONE, O_NONE, P_oso|P_rexw|P_rexb }, - /* 1661 */ { UD_Ibswap, O_R5y, O_NONE, O_NONE, O_NONE, P_oso|P_rexw|P_rexb }, - /* 1662 */ { UD_Ibswap, O_R6y, O_NONE, O_NONE, O_NONE, P_oso|P_rexw|P_rexb }, - /* 1663 */ { UD_Ibswap, O_R7y, O_NONE, O_NONE, O_NONE, P_oso|P_rexw|P_rexb }, - /* 1664 */ { UD_Ibt, O_Ev, O_Ib, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 1665 */ { UD_Ibt, O_Ev, O_Gv, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 1666 */ { UD_Ibtc, O_Ev, O_Gv, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 1667 */ { UD_Ibtc, O_Ev, O_Ib, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 1668 */ { UD_Ibtr, O_Ev, O_Gv, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 1669 */ { UD_Ibtr, O_Ev, O_Ib, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 1670 */ { UD_Ibts, O_Ev, O_Gv, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 1671 */ { UD_Ibts, O_Ev, O_Ib, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb }, - /* 1672 */ { UD_Ipblendw, O_V, O_W, O_Ib, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1673 */ { UD_Ivpblendw, O_Vx, O_Hx, O_Wx, O_Ib, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1674 */ { UD_Impsadbw, O_V, O_W, O_Ib, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1675 */ { UD_Ivmpsadbw, O_Vx, O_Hx, O_Wx, O_Ib, P_aso|P_rexr|P_rexx|P_rexb|P_vexl }, - /* 1676 */ { UD_Imovntdqa, O_V, O_M, O_NONE, O_NONE, P_aso|P_rexr|P_rexw|P_rexx|P_rexb }, - /* 1677 */ { UD_Ivmovntdqa, O_Vx, O_M, O_NONE, O_NONE, P_aso|P_rexr|P_rexw|P_rexx|P_rexb|P_vexl }, - /* 1678 */ { UD_Ipackusdw, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexw|P_rexx|P_rexb }, - /* 1679 */ { UD_Ivpackusdw, O_Vx, O_Hx, O_Wx, O_NONE, P_aso|P_rexr|P_rexw|P_rexx|P_rexb|P_vexl }, - /* 1680 */ { UD_Ipmovsxbw, O_V, O_MqU, O_NONE, O_NONE, P_aso|P_rexr|P_rexw|P_rexx|P_rexb }, - /* 1681 */ { UD_Ivpmovsxbw, O_Vx, O_MqU, O_NONE, O_NONE, P_aso|P_rexr|P_rexw|P_rexx|P_rexb }, - /* 1682 */ { UD_Ipmovsxbd, O_V, O_MdU, O_NONE, O_NONE, P_aso|P_rexr|P_rexw|P_rexx|P_rexb }, - /* 1683 */ { UD_Ivpmovsxbd, O_Vx, O_MdU, O_NONE, O_NONE, P_aso|P_rexr|P_rexw|P_rexx|P_rexb }, - /* 1684 */ { UD_Ipmovsxbq, O_V, O_MwU, O_NONE, O_NONE, P_aso|P_rexr|P_rexw|P_rexx|P_rexb }, - /* 1685 */ { UD_Ivpmovsxbq, O_Vx, O_MwU, O_NONE, O_NONE, P_aso|P_rexr|P_rexw|P_rexx|P_rexb }, - /* 1686 */ { UD_Ipmovsxwd, O_V, O_MqU, O_NONE, O_NONE, P_aso|P_rexr|P_rexw|P_rexx|P_rexb }, - /* 1687 */ { UD_Ivpmovsxwd, O_Vx, O_MqU, O_NONE, O_NONE, P_aso|P_rexr|P_rexw|P_rexx|P_rexb }, - /* 1688 */ { UD_Ipmovsxwq, O_V, O_MdU, O_NONE, O_NONE, P_aso|P_rexr|P_rexw|P_rexx|P_rexb }, - /* 1689 */ { UD_Ivpmovsxwq, O_Vx, O_MdU, O_NONE, O_NONE, P_aso|P_rexr|P_rexw|P_rexx|P_rexb }, - /* 1690 */ { UD_Ipmovsxdq, O_V, O_MqU, O_NONE, O_NONE, P_aso|P_rexr|P_rexw|P_rexx|P_rexb }, - /* 1691 */ { UD_Ipmovzxbw, O_V, O_MqU, O_NONE, O_NONE, P_aso|P_rexr|P_rexw|P_rexx|P_rexb }, - /* 1692 */ { UD_Ivpmovzxbw, O_Vx, O_MqU, O_NONE, O_NONE, P_aso|P_rexr|P_rexw|P_rexx|P_rexb }, - /* 1693 */ { UD_Ipmovzxbd, O_V, O_MdU, O_NONE, O_NONE, P_aso|P_rexr|P_rexw|P_rexx|P_rexb }, - /* 1694 */ { UD_Ivpmovzxbd, O_Vx, O_MdU, O_NONE, O_NONE, P_aso|P_rexr|P_rexw|P_rexx|P_rexb }, - /* 1695 */ { UD_Ipmovzxbq, O_V, O_MwU, O_NONE, O_NONE, P_aso|P_rexr|P_rexw|P_rexx|P_rexb }, - /* 1696 */ { UD_Ivpmovzxbq, O_Vx, O_MwU, O_NONE, O_NONE, P_aso|P_rexr|P_rexw|P_rexx|P_rexb }, - /* 1697 */ { UD_Ipmovzxwd, O_V, O_MqU, O_NONE, O_NONE, P_aso|P_rexr|P_rexw|P_rexx|P_rexb }, - /* 1698 */ { UD_Ivpmovzxwd, O_Vx, O_MqU, O_NONE, O_NONE, P_aso|P_rexr|P_rexw|P_rexx|P_rexb }, - /* 1699 */ { UD_Ipmovzxwq, O_V, O_MdU, O_NONE, O_NONE, P_aso|P_rexr|P_rexw|P_rexx|P_rexb }, - /* 1700 */ { UD_Ivpmovzxwq, O_Vx, O_MdU, O_NONE, O_NONE, P_aso|P_rexr|P_rexw|P_rexx|P_rexb }, - /* 1701 */ { UD_Ipmovzxdq, O_V, O_MqU, O_NONE, O_NONE, P_aso|P_rexr|P_rexw|P_rexx|P_rexb }, - /* 1702 */ { UD_Ivpmovzxdq, O_Vx, O_MqU, O_NONE, O_NONE, P_aso|P_rexr|P_rexw|P_rexx|P_rexb }, - /* 1703 */ { UD_Ipcmpeqq, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexw|P_rexx|P_rexb }, - /* 1704 */ { UD_Ivpcmpeqq, O_Vx, O_Hx, O_Wx, O_NONE, P_aso|P_rexr|P_rexw|P_rexx|P_rexb }, - /* 1705 */ { UD_Ipopcnt, O_Gv, O_Ev, O_NONE, O_NONE, P_aso|P_oso|P_rexr|P_rexw|P_rexx|P_rexb }, - /* 1706 */ { UD_Iptest, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexw|P_rexx|P_rexb }, - /* 1707 */ { UD_Ivptest, O_Vx, O_Wx, O_NONE, O_NONE, P_aso|P_rexr|P_rexw|P_rexx|P_rexb|P_vexl }, - /* 1708 */ { UD_Ipcmpestri, O_V, O_W, O_Ib, O_NONE, P_aso|P_rexr|P_rexw|P_rexx|P_rexb }, - /* 1709 */ { UD_Ivpcmpestri, O_Vx, O_Wx, O_Ib, O_NONE, P_aso|P_rexr|P_rexw|P_rexx|P_rexb }, - /* 1710 */ { UD_Ipcmpestrm, O_V, O_W, O_Ib, O_NONE, P_aso|P_rexr|P_rexw|P_rexx|P_rexb }, - /* 1711 */ { UD_Ivpcmpestrm, O_Vx, O_Wx, O_Ib, O_NONE, P_aso|P_rexr|P_rexw|P_rexx|P_rexb }, - /* 1712 */ { UD_Ipcmpgtq, O_V, O_W, O_NONE, O_NONE, P_aso|P_rexr|P_rexw|P_rexx|P_rexb }, - /* 1713 */ { UD_Ivpcmpgtq, O_Vx, O_Hx, O_Wx, O_NONE, P_aso|P_rexr|P_rexw|P_rexx|P_rexb }, - /* 1714 */ { UD_Ipcmpistri, O_V, O_W, O_Ib, O_NONE, P_aso|P_rexr|P_rexw|P_rexx|P_rexb }, - /* 1715 */ { UD_Ivpcmpistri, O_Vx, O_Wx, O_Ib, O_NONE, P_aso|P_rexr|P_rexw|P_rexx|P_rexb }, - /* 1716 */ { UD_Ipcmpistrm, O_V, O_W, O_Ib, O_NONE, P_aso|P_rexr|P_rexw|P_rexx|P_rexb }, - /* 1717 */ { UD_Ivpcmpistrm, O_Vx, O_Wx, O_Ib, O_NONE, P_aso|P_rexr|P_rexw|P_rexx|P_rexb }, - /* 1718 */ { UD_Imovbe, O_Gv, O_Mv, O_NONE, O_NONE, P_aso|P_oso|P_rexr|P_rexw|P_rexx|P_rexb }, - /* 1719 */ { UD_Imovbe, O_Mv, O_Gv, O_NONE, O_NONE, P_aso|P_oso|P_rexr|P_rexw|P_rexx|P_rexb }, - /* 1720 */ { UD_Icrc32, O_Gy, O_Eb, O_NONE, O_NONE, P_aso|P_oso|P_rexr|P_rexw|P_rexx|P_rexb }, - /* 1721 */ { UD_Icrc32, O_Gy, O_Ev, O_NONE, O_NONE, P_aso|P_oso|P_rexr|P_rexw|P_rexx|P_rexb }, - /* 1722 */ { UD_Ivbroadcastss, O_V, O_Md, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb|P_vexl }, - /* 1723 */ { UD_Ivbroadcastsd, O_Vqq, O_Mq, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb|P_vexl }, - /* 1724 */ { UD_Ivextractf128, O_Wdq, O_Vqq, O_Ib, O_NONE, P_aso|P_rexr|P_rexx|P_rexb|P_vexl }, - /* 1725 */ { UD_Ivinsertf128, O_Vqq, O_Hqq, O_Wdq, O_Ib, P_aso|P_rexr|P_rexx|P_rexb|P_vexl }, - /* 1726 */ { UD_Ivmaskmovps, O_V, O_H, O_M, O_NONE, P_aso|P_rexr|P_rexx|P_rexb|P_vexl }, - /* 1727 */ { UD_Ivmaskmovps, O_M, O_H, O_V, O_NONE, P_aso|P_rexr|P_rexx|P_rexb|P_vexl }, - /* 1728 */ { UD_Ivmaskmovpd, O_V, O_H, O_M, O_NONE, P_aso|P_rexr|P_rexx|P_rexb|P_vexl }, - /* 1729 */ { UD_Ivmaskmovpd, O_M, O_H, O_V, O_NONE, P_aso|P_rexr|P_rexx|P_rexb|P_vexl }, - /* 1730 */ { UD_Ivpermilpd, O_Vx, O_Hx, O_Wx, O_NONE, P_aso|P_rexr|P_rexx|P_rexb|P_vexl }, - /* 1731 */ { UD_Ivpermilpd, O_V, O_W, O_Ib, O_NONE, P_aso|P_rexr|P_rexx|P_rexb|P_vexl }, - /* 1732 */ { UD_Ivpermilps, O_Vx, O_Hx, O_Wx, O_NONE, P_aso|P_rexr|P_rexx|P_rexb|P_vexl }, - /* 1733 */ { UD_Ivpermilps, O_Vx, O_Wx, O_Ib, O_NONE, P_aso|P_rexr|P_rexx|P_rexb|P_vexl }, - /* 1734 */ { UD_Ivperm2f128, O_Vqq, O_Hqq, O_Wqq, O_Ib, P_aso|P_rexr|P_rexx|P_rexb|P_vexl }, - /* 1735 */ { UD_Ivtestps, O_Vx, O_Wx, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb|P_vexl }, - /* 1736 */ { UD_Ivtestpd, O_Vx, O_Wx, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb|P_vexl }, - /* 1737 */ { UD_Ivzeroupper, O_NONE, O_NONE, O_NONE, O_NONE, P_none }, - /* 1738 */ { UD_Ivzeroall, O_NONE, O_NONE, O_NONE, O_NONE, P_none }, - /* 1739 */ { UD_Ivblendvpd, O_Vx, O_Hx, O_Wx, O_Lx, P_aso|P_rexr|P_rexx|P_rexb|P_vexl }, - /* 1740 */ { UD_Ivblendvps, O_Vx, O_Hx, O_Wx, O_Lx, P_aso|P_rexr|P_rexx|P_rexb|P_vexl }, - /* 1741 */ { UD_Ivmovsd, O_V, O_H, O_U, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1742 */ { UD_Ivmovsd, O_V, O_Mq, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1743 */ { UD_Ivmovsd, O_U, O_H, O_V, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1744 */ { UD_Ivmovsd, O_Mq, O_V, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1745 */ { UD_Ivmovss, O_V, O_H, O_U, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1746 */ { UD_Ivmovss, O_V, O_Md, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1747 */ { UD_Ivmovss, O_U, O_H, O_V, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1748 */ { UD_Ivmovss, O_Md, O_V, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1749 */ { UD_Ivpblendvb, O_V, O_H, O_W, O_L, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1750 */ { UD_Ivpsllw, O_V, O_H, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1751 */ { UD_Ivpsllw, O_H, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1752 */ { UD_Ivpslld, O_V, O_H, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1753 */ { UD_Ivpslld, O_H, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1754 */ { UD_Ivpsllq, O_V, O_H, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, - /* 1755 */ { UD_Ivpsllq, O_H, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb }, -}; - - -const char* ud_mnemonics_str[] = { - "aaa", - "aad", - "aam", - "aas", - "adc", - "add", - "addpd", - "addps", - "addsd", - "addss", - "addsubpd", - "addsubps", - "aesdec", - "aesdeclast", - "aesenc", - "aesenclast", - "aesimc", - "aeskeygenassist", - "and", - "andnpd", - "andnps", - "andpd", - "andps", - "arpl", - "blendpd", - "blendps", - "blendvpd", - "blendvps", - "bound", - "bsf", - "bsr", - "bswap", - "bt", - "btc", - "btr", - "bts", - "call", - "cbw", - "cdq", - "cdqe", - "clc", - "cld", - "clflush", - "clgi", - "cli", - "clts", - "cmc", - "cmova", - "cmovae", - "cmovb", - "cmovbe", - "cmovg", - "cmovge", - "cmovl", - "cmovle", - "cmovno", - "cmovnp", - "cmovns", - "cmovnz", - "cmovo", - "cmovp", - "cmovs", - "cmovz", - "cmp", - "cmppd", - "cmpps", - "cmpsb", - "cmpsd", - "cmpsq", - "cmpss", - "cmpsw", - "cmpxchg", - "cmpxchg16b", - "cmpxchg8b", - "comisd", - "comiss", - "cpuid", - "cqo", - "crc32", - "cvtdq2pd", - "cvtdq2ps", - "cvtpd2dq", - "cvtpd2pi", - "cvtpd2ps", - "cvtpi2pd", - "cvtpi2ps", - "cvtps2dq", - "cvtps2pd", - "cvtps2pi", - "cvtsd2si", - "cvtsd2ss", - "cvtsi2sd", - "cvtsi2ss", - "cvtss2sd", - "cvtss2si", - "cvttpd2dq", - "cvttpd2pi", - "cvttps2dq", - "cvttps2pi", - "cvttsd2si", - "cvttss2si", - "cwd", - "cwde", - "daa", - "das", - "dec", - "div", - "divpd", - "divps", - "divsd", - "divss", - "dppd", - "dpps", - "emms", - "enter", - "extractps", - "f2xm1", - "fabs", - "fadd", - "faddp", - "fbld", - "fbstp", - "fchs", - "fclex", - "fcmovb", - "fcmovbe", - "fcmove", - "fcmovnb", - "fcmovnbe", - "fcmovne", - "fcmovnu", - "fcmovu", - "fcom", - "fcom2", - "fcomi", - "fcomip", - "fcomp", - "fcomp3", - "fcomp5", - "fcompp", - "fcos", - "fdecstp", - "fdiv", - "fdivp", - "fdivr", - "fdivrp", - "femms", - "ffree", - "ffreep", - "fiadd", - "ficom", - "ficomp", - "fidiv", - "fidivr", - "fild", - "fimul", - "fincstp", - "fist", - "fistp", - "fisttp", - "fisub", - "fisubr", - "fld", - "fld1", - "fldcw", - "fldenv", - "fldl2e", - "fldl2t", - "fldlg2", - "fldln2", - "fldpi", - "fldz", - "fmul", - "fmulp", - "fninit", - "fnop", - "fnsave", - "fnstcw", - "fnstenv", - "fnstsw", - "fpatan", - "fprem", - "fprem1", - "fptan", - "frndint", - "frstor", - "fscale", - "fsin", - "fsincos", - "fsqrt", - "fst", - "fstp", - "fstp1", - "fstp8", - "fstp9", - "fsub", - "fsubp", - "fsubr", - "fsubrp", - "ftst", - "fucom", - "fucomi", - "fucomip", - "fucomp", - "fucompp", - "fxam", - "fxch", - "fxch4", - "fxch7", - "fxrstor", - "fxsave", - "fxtract", - "fyl2x", - "fyl2xp1", - "getsec", - "haddpd", - "haddps", - "hlt", - "hsubpd", - "hsubps", - "idiv", - "imul", - "in", - "inc", - "insb", - "insd", - "insertps", - "insw", - "int", - "int1", - "int3", - "into", - "invd", - "invept", - "invlpg", - "invlpga", - "invvpid", - "iretd", - "iretq", - "iretw", - "ja", - "jae", - "jb", - "jbe", - "jcxz", - "jecxz", - "jg", - "jge", - "jl", - "jle", - "jmp", - "jno", - "jnp", - "jns", - "jnz", - "jo", - "jp", - "jrcxz", - "js", - "jz", - "lahf", - "lar", - "lddqu", - "ldmxcsr", - "lds", - "lea", - "leave", - "les", - "lfence", - "lfs", - "lgdt", - "lgs", - "lidt", - "lldt", - "lmsw", - "lock", - "lodsb", - "lodsd", - "lodsq", - "lodsw", - "loop", - "loope", - "loopne", - "lsl", - "lss", - "ltr", - "maskmovdqu", - "maskmovq", - "maxpd", - "maxps", - "maxsd", - "maxss", - "mfence", - "minpd", - "minps", - "minsd", - "minss", - "monitor", - "montmul", - "mov", - "movapd", - "movaps", - "movbe", - "movd", - "movddup", - "movdq2q", - "movdqa", - "movdqu", - "movhlps", - "movhpd", - "movhps", - "movlhps", - "movlpd", - "movlps", - "movmskpd", - "movmskps", - "movntdq", - "movntdqa", - "movnti", - "movntpd", - "movntps", - "movntq", - "movq", - "movq2dq", - "movsb", - "movsd", - "movshdup", - "movsldup", - "movsq", - "movss", - "movsw", - "movsx", - "movsxd", - "movupd", - "movups", - "movzx", - "mpsadbw", - "mul", - "mulpd", - "mulps", - "mulsd", - "mulss", - "mwait", - "neg", - "nop", - "not", - "or", - "orpd", - "orps", - "out", - "outsb", - "outsd", - "outsw", - "pabsb", - "pabsd", - "pabsw", - "packssdw", - "packsswb", - "packusdw", - "packuswb", - "paddb", - "paddd", - "paddq", - "paddsb", - "paddsw", - "paddusb", - "paddusw", - "paddw", - "palignr", - "pand", - "pandn", - "pavgb", - "pavgusb", - "pavgw", - "pblendvb", - "pblendw", - "pclmulqdq", - "pcmpeqb", - "pcmpeqd", - "pcmpeqq", - "pcmpeqw", - "pcmpestri", - "pcmpestrm", - "pcmpgtb", - "pcmpgtd", - "pcmpgtq", - "pcmpgtw", - "pcmpistri", - "pcmpistrm", - "pextrb", - "pextrd", - "pextrq", - "pextrw", - "pf2id", - "pf2iw", - "pfacc", - "pfadd", - "pfcmpeq", - "pfcmpge", - "pfcmpgt", - "pfmax", - "pfmin", - "pfmul", - "pfnacc", - "pfpnacc", - "pfrcp", - "pfrcpit1", - "pfrcpit2", - "pfrsqit1", - "pfrsqrt", - "pfsub", - "pfsubr", - "phaddd", - "phaddsw", - "phaddw", - "phminposuw", - "phsubd", - "phsubsw", - "phsubw", - "pi2fd", - "pi2fw", - "pinsrb", - "pinsrd", - "pinsrq", - "pinsrw", - "pmaddubsw", - "pmaddwd", - "pmaxsb", - "pmaxsd", - "pmaxsw", - "pmaxub", - "pmaxud", - "pmaxuw", - "pminsb", - "pminsd", - "pminsw", - "pminub", - "pminud", - "pminuw", - "pmovmskb", - "pmovsxbd", - "pmovsxbq", - "pmovsxbw", - "pmovsxdq", - "pmovsxwd", - "pmovsxwq", - "pmovzxbd", - "pmovzxbq", - "pmovzxbw", - "pmovzxdq", - "pmovzxwd", - "pmovzxwq", - "pmuldq", - "pmulhrsw", - "pmulhrw", - "pmulhuw", - "pmulhw", - "pmulld", - "pmullw", - "pmuludq", - "pop", - "popa", - "popad", - "popcnt", - "popfd", - "popfq", - "popfw", - "por", - "prefetch", - "prefetchnta", - "prefetcht0", - "prefetcht1", - "prefetcht2", - "psadbw", - "pshufb", - "pshufd", - "pshufhw", - "pshuflw", - "pshufw", - "psignb", - "psignd", - "psignw", - "pslld", - "pslldq", - "psllq", - "psllw", - "psrad", - "psraw", - "psrld", - "psrldq", - "psrlq", - "psrlw", - "psubb", - "psubd", - "psubq", - "psubsb", - "psubsw", - "psubusb", - "psubusw", - "psubw", - "pswapd", - "ptest", - "punpckhbw", - "punpckhdq", - "punpckhqdq", - "punpckhwd", - "punpcklbw", - "punpckldq", - "punpcklqdq", - "punpcklwd", - "push", - "pusha", - "pushad", - "pushfd", - "pushfq", - "pushfw", - "pxor", - "rcl", - "rcpps", - "rcpss", - "rcr", - "rdmsr", - "rdpmc", - "rdrand", - "rdtsc", - "rdtscp", - "rep", - "repne", - "ret", - "retf", - "rol", - "ror", - "roundpd", - "roundps", - "roundsd", - "roundss", - "rsm", - "rsqrtps", - "rsqrtss", - "sahf", - "salc", - "sar", - "sbb", - "scasb", - "scasd", - "scasq", - "scasw", - "seta", - "setae", - "setb", - "setbe", - "setg", - "setge", - "setl", - "setle", - "setno", - "setnp", - "setns", - "setnz", - "seto", - "setp", - "sets", - "setz", - "sfence", - "sgdt", - "shl", - "shld", - "shr", - "shrd", - "shufpd", - "shufps", - "sidt", - "skinit", - "sldt", - "smsw", - "sqrtpd", - "sqrtps", - "sqrtsd", - "sqrtss", - "stc", - "std", - "stgi", - "sti", - "stmxcsr", - "stosb", - "stosd", - "stosq", - "stosw", - "str", - "sub", - "subpd", - "subps", - "subsd", - "subss", - "swapgs", - "syscall", - "sysenter", - "sysexit", - "sysret", - "test", - "ucomisd", - "ucomiss", - "ud2", - "unpckhpd", - "unpckhps", - "unpcklpd", - "unpcklps", - "vaddpd", - "vaddps", - "vaddsd", - "vaddss", - "vaddsubpd", - "vaddsubps", - "vaesdec", - "vaesdeclast", - "vaesenc", - "vaesenclast", - "vaesimc", - "vaeskeygenassist", - "vandnpd", - "vandnps", - "vandpd", - "vandps", - "vblendpd", - "vblendps", - "vblendvpd", - "vblendvps", - "vbroadcastsd", - "vbroadcastss", - "vcmppd", - "vcmpps", - "vcmpsd", - "vcmpss", - "vcomisd", - "vcomiss", - "vcvtdq2pd", - "vcvtdq2ps", - "vcvtpd2dq", - "vcvtpd2ps", - "vcvtps2dq", - "vcvtps2pd", - "vcvtsd2si", - "vcvtsd2ss", - "vcvtsi2sd", - "vcvtsi2ss", - "vcvtss2sd", - "vcvtss2si", - "vcvttpd2dq", - "vcvttps2dq", - "vcvttsd2si", - "vcvttss2si", - "vdivpd", - "vdivps", - "vdivsd", - "vdivss", - "vdppd", - "vdpps", - "verr", - "verw", - "vextractf128", - "vextractps", - "vhaddpd", - "vhaddps", - "vhsubpd", - "vhsubps", - "vinsertf128", - "vinsertps", - "vlddqu", - "vmaskmovdqu", - "vmaskmovpd", - "vmaskmovps", - "vmaxpd", - "vmaxps", - "vmaxsd", - "vmaxss", - "vmcall", - "vmclear", - "vminpd", - "vminps", - "vminsd", - "vminss", - "vmlaunch", - "vmload", - "vmmcall", - "vmovapd", - "vmovaps", - "vmovd", - "vmovddup", - "vmovdqa", - "vmovdqu", - "vmovhlps", - "vmovhpd", - "vmovhps", - "vmovlhps", - "vmovlpd", - "vmovlps", - "vmovmskpd", - "vmovmskps", - "vmovntdq", - "vmovntdqa", - "vmovntpd", - "vmovntps", - "vmovq", - "vmovsd", - "vmovshdup", - "vmovsldup", - "vmovss", - "vmovupd", - "vmovups", - "vmpsadbw", - "vmptrld", - "vmptrst", - "vmread", - "vmresume", - "vmrun", - "vmsave", - "vmulpd", - "vmulps", - "vmulsd", - "vmulss", - "vmwrite", - "vmxoff", - "vmxon", - "vorpd", - "vorps", - "vpabsb", - "vpabsd", - "vpabsw", - "vpackssdw", - "vpacksswb", - "vpackusdw", - "vpackuswb", - "vpaddb", - "vpaddd", - "vpaddq", - "vpaddsb", - "vpaddsw", - "vpaddusb", - "vpaddusw", - "vpaddw", - "vpalignr", - "vpand", - "vpandn", - "vpavgb", - "vpavgw", - "vpblendvb", - "vpblendw", - "vpclmulqdq", - "vpcmpeqb", - "vpcmpeqd", - "vpcmpeqq", - "vpcmpeqw", - "vpcmpestri", - "vpcmpestrm", - "vpcmpgtb", - "vpcmpgtd", - "vpcmpgtq", - "vpcmpgtw", - "vpcmpistri", - "vpcmpistrm", - "vperm2f128", - "vpermilpd", - "vpermilps", - "vpextrb", - "vpextrd", - "vpextrq", - "vpextrw", - "vphaddd", - "vphaddsw", - "vphaddw", - "vphminposuw", - "vphsubd", - "vphsubsw", - "vphsubw", - "vpinsrb", - "vpinsrd", - "vpinsrq", - "vpinsrw", - "vpmaddubsw", - "vpmaddwd", - "vpmaxsb", - "vpmaxsd", - "vpmaxsw", - "vpmaxub", - "vpmaxud", - "vpmaxuw", - "vpminsb", - "vpminsd", - "vpminsw", - "vpminub", - "vpminud", - "vpminuw", - "vpmovmskb", - "vpmovsxbd", - "vpmovsxbq", - "vpmovsxbw", - "vpmovsxwd", - "vpmovsxwq", - "vpmovzxbd", - "vpmovzxbq", - "vpmovzxbw", - "vpmovzxdq", - "vpmovzxwd", - "vpmovzxwq", - "vpmuldq", - "vpmulhrsw", - "vpmulhuw", - "vpmulhw", - "vpmulld", - "vpmullw", - "vpor", - "vpsadbw", - "vpshufb", - "vpshufd", - "vpshufhw", - "vpshuflw", - "vpsignb", - "vpsignd", - "vpsignw", - "vpslld", - "vpslldq", - "vpsllq", - "vpsllw", - "vpsrad", - "vpsraw", - "vpsrld", - "vpsrldq", - "vpsrlq", - "vpsrlw", - "vpsubb", - "vpsubd", - "vpsubq", - "vpsubsb", - "vpsubsw", - "vpsubusb", - "vpsubusw", - "vpsubw", - "vptest", - "vpunpckhbw", - "vpunpckhdq", - "vpunpckhqdq", - "vpunpckhwd", - "vpunpcklbw", - "vpunpckldq", - "vpunpcklqdq", - "vpunpcklwd", - "vpxor", - "vrcpps", - "vrcpss", - "vroundpd", - "vroundps", - "vroundsd", - "vroundss", - "vrsqrtps", - "vrsqrtss", - "vshufpd", - "vshufps", - "vsqrtpd", - "vsqrtps", - "vsqrtsd", - "vsqrtss", - "vstmxcsr", - "vsubpd", - "vsubps", - "vsubsd", - "vsubss", - "vtestpd", - "vtestps", - "vucomisd", - "vucomiss", - "vunpckhpd", - "vunpckhps", - "vunpcklpd", - "vunpcklps", - "vxorpd", - "vxorps", - "vzeroall", - "vzeroupper", - "wait", - "wbinvd", - "wrmsr", - "xadd", - "xchg", - "xcryptcbc", - "xcryptcfb", - "xcryptctr", - "xcryptecb", - "xcryptofb", - "xgetbv", - "xlatb", - "xor", - "xorpd", - "xorps", - "xrstor", - "xsave", - "xsetbv", - "xsha1", - "xsha256", - "xstore", - "invalid", - "3dnow", - "none", - "db", - "pause" -}; diff --git a/src/third_party/udis86/libudis86/itab.h b/src/third_party/udis86/libudis86/itab.h deleted file mode 100644 index 329fa07e..00000000 --- a/src/third_party/udis86/libudis86/itab.h +++ /dev/null @@ -1,935 +0,0 @@ -#ifndef UD_ITAB_H -#define UD_ITAB_H - -/* itab.h -- generated by udis86:scripts/ud_itab.py, do no edit */ - -/* ud_table_type -- lookup table types (see decode.c) */ -enum ud_table_type { - UD_TAB__OPC_VEX, - UD_TAB__OPC_TABLE, - UD_TAB__OPC_X87, - UD_TAB__OPC_MOD, - UD_TAB__OPC_RM, - UD_TAB__OPC_OSIZE, - UD_TAB__OPC_MODE, - UD_TAB__OPC_VEX_L, - UD_TAB__OPC_3DNOW, - UD_TAB__OPC_REG, - UD_TAB__OPC_ASIZE, - UD_TAB__OPC_VEX_W, - UD_TAB__OPC_SSE, - UD_TAB__OPC_VENDOR -}; - -/* ud_mnemonic -- mnemonic constants */ -enum ud_mnemonic_code { - UD_Iaaa, - UD_Iaad, - UD_Iaam, - UD_Iaas, - UD_Iadc, - UD_Iadd, - UD_Iaddpd, - UD_Iaddps, - UD_Iaddsd, - UD_Iaddss, - UD_Iaddsubpd, - UD_Iaddsubps, - UD_Iaesdec, - UD_Iaesdeclast, - UD_Iaesenc, - UD_Iaesenclast, - UD_Iaesimc, - UD_Iaeskeygenassist, - UD_Iand, - UD_Iandnpd, - UD_Iandnps, - UD_Iandpd, - UD_Iandps, - UD_Iarpl, - UD_Iblendpd, - UD_Iblendps, - UD_Iblendvpd, - UD_Iblendvps, - UD_Ibound, - UD_Ibsf, - UD_Ibsr, - UD_Ibswap, - UD_Ibt, - UD_Ibtc, - UD_Ibtr, - UD_Ibts, - UD_Icall, - UD_Icbw, - UD_Icdq, - UD_Icdqe, - UD_Iclc, - UD_Icld, - UD_Iclflush, - UD_Iclgi, - UD_Icli, - UD_Iclts, - UD_Icmc, - UD_Icmova, - UD_Icmovae, - UD_Icmovb, - UD_Icmovbe, - UD_Icmovg, - UD_Icmovge, - UD_Icmovl, - UD_Icmovle, - UD_Icmovno, - UD_Icmovnp, - UD_Icmovns, - UD_Icmovnz, - UD_Icmovo, - UD_Icmovp, - UD_Icmovs, - UD_Icmovz, - UD_Icmp, - UD_Icmppd, - UD_Icmpps, - UD_Icmpsb, - UD_Icmpsd, - UD_Icmpsq, - UD_Icmpss, - UD_Icmpsw, - UD_Icmpxchg, - UD_Icmpxchg16b, - UD_Icmpxchg8b, - UD_Icomisd, - UD_Icomiss, - UD_Icpuid, - UD_Icqo, - UD_Icrc32, - UD_Icvtdq2pd, - UD_Icvtdq2ps, - UD_Icvtpd2dq, - UD_Icvtpd2pi, - UD_Icvtpd2ps, - UD_Icvtpi2pd, - UD_Icvtpi2ps, - UD_Icvtps2dq, - UD_Icvtps2pd, - UD_Icvtps2pi, - UD_Icvtsd2si, - UD_Icvtsd2ss, - UD_Icvtsi2sd, - UD_Icvtsi2ss, - UD_Icvtss2sd, - UD_Icvtss2si, - UD_Icvttpd2dq, - UD_Icvttpd2pi, - UD_Icvttps2dq, - UD_Icvttps2pi, - UD_Icvttsd2si, - UD_Icvttss2si, - UD_Icwd, - UD_Icwde, - UD_Idaa, - UD_Idas, - UD_Idec, - UD_Idiv, - UD_Idivpd, - UD_Idivps, - UD_Idivsd, - UD_Idivss, - UD_Idppd, - UD_Idpps, - UD_Iemms, - UD_Ienter, - UD_Iextractps, - UD_If2xm1, - UD_Ifabs, - UD_Ifadd, - UD_Ifaddp, - UD_Ifbld, - UD_Ifbstp, - UD_Ifchs, - UD_Ifclex, - UD_Ifcmovb, - UD_Ifcmovbe, - UD_Ifcmove, - UD_Ifcmovnb, - UD_Ifcmovnbe, - UD_Ifcmovne, - UD_Ifcmovnu, - UD_Ifcmovu, - UD_Ifcom, - UD_Ifcom2, - UD_Ifcomi, - UD_Ifcomip, - UD_Ifcomp, - UD_Ifcomp3, - UD_Ifcomp5, - UD_Ifcompp, - UD_Ifcos, - UD_Ifdecstp, - UD_Ifdiv, - UD_Ifdivp, - UD_Ifdivr, - UD_Ifdivrp, - UD_Ifemms, - UD_Iffree, - UD_Iffreep, - UD_Ifiadd, - UD_Ificom, - UD_Ificomp, - UD_Ifidiv, - UD_Ifidivr, - UD_Ifild, - UD_Ifimul, - UD_Ifincstp, - UD_Ifist, - UD_Ifistp, - UD_Ifisttp, - UD_Ifisub, - UD_Ifisubr, - UD_Ifld, - UD_Ifld1, - UD_Ifldcw, - UD_Ifldenv, - UD_Ifldl2e, - UD_Ifldl2t, - UD_Ifldlg2, - UD_Ifldln2, - UD_Ifldpi, - UD_Ifldz, - UD_Ifmul, - UD_Ifmulp, - UD_Ifninit, - UD_Ifnop, - UD_Ifnsave, - UD_Ifnstcw, - UD_Ifnstenv, - UD_Ifnstsw, - UD_Ifpatan, - UD_Ifprem, - UD_Ifprem1, - UD_Ifptan, - UD_Ifrndint, - UD_Ifrstor, - UD_Ifscale, - UD_Ifsin, - UD_Ifsincos, - UD_Ifsqrt, - UD_Ifst, - UD_Ifstp, - UD_Ifstp1, - UD_Ifstp8, - UD_Ifstp9, - UD_Ifsub, - UD_Ifsubp, - UD_Ifsubr, - UD_Ifsubrp, - UD_Iftst, - UD_Ifucom, - UD_Ifucomi, - UD_Ifucomip, - UD_Ifucomp, - UD_Ifucompp, - UD_Ifxam, - UD_Ifxch, - UD_Ifxch4, - UD_Ifxch7, - UD_Ifxrstor, - UD_Ifxsave, - UD_Ifxtract, - UD_Ifyl2x, - UD_Ifyl2xp1, - UD_Igetsec, - UD_Ihaddpd, - UD_Ihaddps, - UD_Ihlt, - UD_Ihsubpd, - UD_Ihsubps, - UD_Iidiv, - UD_Iimul, - UD_Iin, - UD_Iinc, - UD_Iinsb, - UD_Iinsd, - UD_Iinsertps, - UD_Iinsw, - UD_Iint, - UD_Iint1, - UD_Iint3, - UD_Iinto, - UD_Iinvd, - UD_Iinvept, - UD_Iinvlpg, - UD_Iinvlpga, - UD_Iinvvpid, - UD_Iiretd, - UD_Iiretq, - UD_Iiretw, - UD_Ija, - UD_Ijae, - UD_Ijb, - UD_Ijbe, - UD_Ijcxz, - UD_Ijecxz, - UD_Ijg, - UD_Ijge, - UD_Ijl, - UD_Ijle, - UD_Ijmp, - UD_Ijno, - UD_Ijnp, - UD_Ijns, - UD_Ijnz, - UD_Ijo, - UD_Ijp, - UD_Ijrcxz, - UD_Ijs, - UD_Ijz, - UD_Ilahf, - UD_Ilar, - UD_Ilddqu, - UD_Ildmxcsr, - UD_Ilds, - UD_Ilea, - UD_Ileave, - UD_Iles, - UD_Ilfence, - UD_Ilfs, - UD_Ilgdt, - UD_Ilgs, - UD_Ilidt, - UD_Illdt, - UD_Ilmsw, - UD_Ilock, - UD_Ilodsb, - UD_Ilodsd, - UD_Ilodsq, - UD_Ilodsw, - UD_Iloop, - UD_Iloope, - UD_Iloopne, - UD_Ilsl, - UD_Ilss, - UD_Iltr, - UD_Imaskmovdqu, - UD_Imaskmovq, - UD_Imaxpd, - UD_Imaxps, - UD_Imaxsd, - UD_Imaxss, - UD_Imfence, - UD_Iminpd, - UD_Iminps, - UD_Iminsd, - UD_Iminss, - UD_Imonitor, - UD_Imontmul, - UD_Imov, - UD_Imovapd, - UD_Imovaps, - UD_Imovbe, - UD_Imovd, - UD_Imovddup, - UD_Imovdq2q, - UD_Imovdqa, - UD_Imovdqu, - UD_Imovhlps, - UD_Imovhpd, - UD_Imovhps, - UD_Imovlhps, - UD_Imovlpd, - UD_Imovlps, - UD_Imovmskpd, - UD_Imovmskps, - UD_Imovntdq, - UD_Imovntdqa, - UD_Imovnti, - UD_Imovntpd, - UD_Imovntps, - UD_Imovntq, - UD_Imovq, - UD_Imovq2dq, - UD_Imovsb, - UD_Imovsd, - UD_Imovshdup, - UD_Imovsldup, - UD_Imovsq, - UD_Imovss, - UD_Imovsw, - UD_Imovsx, - UD_Imovsxd, - UD_Imovupd, - UD_Imovups, - UD_Imovzx, - UD_Impsadbw, - UD_Imul, - UD_Imulpd, - UD_Imulps, - UD_Imulsd, - UD_Imulss, - UD_Imwait, - UD_Ineg, - UD_Inop, - UD_Inot, - UD_Ior, - UD_Iorpd, - UD_Iorps, - UD_Iout, - UD_Ioutsb, - UD_Ioutsd, - UD_Ioutsw, - UD_Ipabsb, - UD_Ipabsd, - UD_Ipabsw, - UD_Ipackssdw, - UD_Ipacksswb, - UD_Ipackusdw, - UD_Ipackuswb, - UD_Ipaddb, - UD_Ipaddd, - UD_Ipaddq, - UD_Ipaddsb, - UD_Ipaddsw, - UD_Ipaddusb, - UD_Ipaddusw, - UD_Ipaddw, - UD_Ipalignr, - UD_Ipand, - UD_Ipandn, - UD_Ipavgb, - UD_Ipavgusb, - UD_Ipavgw, - UD_Ipblendvb, - UD_Ipblendw, - UD_Ipclmulqdq, - UD_Ipcmpeqb, - UD_Ipcmpeqd, - UD_Ipcmpeqq, - UD_Ipcmpeqw, - UD_Ipcmpestri, - UD_Ipcmpestrm, - UD_Ipcmpgtb, - UD_Ipcmpgtd, - UD_Ipcmpgtq, - UD_Ipcmpgtw, - UD_Ipcmpistri, - UD_Ipcmpistrm, - UD_Ipextrb, - UD_Ipextrd, - UD_Ipextrq, - UD_Ipextrw, - UD_Ipf2id, - UD_Ipf2iw, - UD_Ipfacc, - UD_Ipfadd, - UD_Ipfcmpeq, - UD_Ipfcmpge, - UD_Ipfcmpgt, - UD_Ipfmax, - UD_Ipfmin, - UD_Ipfmul, - UD_Ipfnacc, - UD_Ipfpnacc, - UD_Ipfrcp, - UD_Ipfrcpit1, - UD_Ipfrcpit2, - UD_Ipfrsqit1, - UD_Ipfrsqrt, - UD_Ipfsub, - UD_Ipfsubr, - UD_Iphaddd, - UD_Iphaddsw, - UD_Iphaddw, - UD_Iphminposuw, - UD_Iphsubd, - UD_Iphsubsw, - UD_Iphsubw, - UD_Ipi2fd, - UD_Ipi2fw, - UD_Ipinsrb, - UD_Ipinsrd, - UD_Ipinsrq, - UD_Ipinsrw, - UD_Ipmaddubsw, - UD_Ipmaddwd, - UD_Ipmaxsb, - UD_Ipmaxsd, - UD_Ipmaxsw, - UD_Ipmaxub, - UD_Ipmaxud, - UD_Ipmaxuw, - UD_Ipminsb, - UD_Ipminsd, - UD_Ipminsw, - UD_Ipminub, - UD_Ipminud, - UD_Ipminuw, - UD_Ipmovmskb, - UD_Ipmovsxbd, - UD_Ipmovsxbq, - UD_Ipmovsxbw, - UD_Ipmovsxdq, - UD_Ipmovsxwd, - UD_Ipmovsxwq, - UD_Ipmovzxbd, - UD_Ipmovzxbq, - UD_Ipmovzxbw, - UD_Ipmovzxdq, - UD_Ipmovzxwd, - UD_Ipmovzxwq, - UD_Ipmuldq, - UD_Ipmulhrsw, - UD_Ipmulhrw, - UD_Ipmulhuw, - UD_Ipmulhw, - UD_Ipmulld, - UD_Ipmullw, - UD_Ipmuludq, - UD_Ipop, - UD_Ipopa, - UD_Ipopad, - UD_Ipopcnt, - UD_Ipopfd, - UD_Ipopfq, - UD_Ipopfw, - UD_Ipor, - UD_Iprefetch, - UD_Iprefetchnta, - UD_Iprefetcht0, - UD_Iprefetcht1, - UD_Iprefetcht2, - UD_Ipsadbw, - UD_Ipshufb, - UD_Ipshufd, - UD_Ipshufhw, - UD_Ipshuflw, - UD_Ipshufw, - UD_Ipsignb, - UD_Ipsignd, - UD_Ipsignw, - UD_Ipslld, - UD_Ipslldq, - UD_Ipsllq, - UD_Ipsllw, - UD_Ipsrad, - UD_Ipsraw, - UD_Ipsrld, - UD_Ipsrldq, - UD_Ipsrlq, - UD_Ipsrlw, - UD_Ipsubb, - UD_Ipsubd, - UD_Ipsubq, - UD_Ipsubsb, - UD_Ipsubsw, - UD_Ipsubusb, - UD_Ipsubusw, - UD_Ipsubw, - UD_Ipswapd, - UD_Iptest, - UD_Ipunpckhbw, - UD_Ipunpckhdq, - UD_Ipunpckhqdq, - UD_Ipunpckhwd, - UD_Ipunpcklbw, - UD_Ipunpckldq, - UD_Ipunpcklqdq, - UD_Ipunpcklwd, - UD_Ipush, - UD_Ipusha, - UD_Ipushad, - UD_Ipushfd, - UD_Ipushfq, - UD_Ipushfw, - UD_Ipxor, - UD_Ircl, - UD_Ircpps, - UD_Ircpss, - UD_Ircr, - UD_Irdmsr, - UD_Irdpmc, - UD_Irdrand, - UD_Irdtsc, - UD_Irdtscp, - UD_Irep, - UD_Irepne, - UD_Iret, - UD_Iretf, - UD_Irol, - UD_Iror, - UD_Iroundpd, - UD_Iroundps, - UD_Iroundsd, - UD_Iroundss, - UD_Irsm, - UD_Irsqrtps, - UD_Irsqrtss, - UD_Isahf, - UD_Isalc, - UD_Isar, - UD_Isbb, - UD_Iscasb, - UD_Iscasd, - UD_Iscasq, - UD_Iscasw, - UD_Iseta, - UD_Isetae, - UD_Isetb, - UD_Isetbe, - UD_Isetg, - UD_Isetge, - UD_Isetl, - UD_Isetle, - UD_Isetno, - UD_Isetnp, - UD_Isetns, - UD_Isetnz, - UD_Iseto, - UD_Isetp, - UD_Isets, - UD_Isetz, - UD_Isfence, - UD_Isgdt, - UD_Ishl, - UD_Ishld, - UD_Ishr, - UD_Ishrd, - UD_Ishufpd, - UD_Ishufps, - UD_Isidt, - UD_Iskinit, - UD_Isldt, - UD_Ismsw, - UD_Isqrtpd, - UD_Isqrtps, - UD_Isqrtsd, - UD_Isqrtss, - UD_Istc, - UD_Istd, - UD_Istgi, - UD_Isti, - UD_Istmxcsr, - UD_Istosb, - UD_Istosd, - UD_Istosq, - UD_Istosw, - UD_Istr, - UD_Isub, - UD_Isubpd, - UD_Isubps, - UD_Isubsd, - UD_Isubss, - UD_Iswapgs, - UD_Isyscall, - UD_Isysenter, - UD_Isysexit, - UD_Isysret, - UD_Itest, - UD_Iucomisd, - UD_Iucomiss, - UD_Iud2, - UD_Iunpckhpd, - UD_Iunpckhps, - UD_Iunpcklpd, - UD_Iunpcklps, - UD_Ivaddpd, - UD_Ivaddps, - UD_Ivaddsd, - UD_Ivaddss, - UD_Ivaddsubpd, - UD_Ivaddsubps, - UD_Ivaesdec, - UD_Ivaesdeclast, - UD_Ivaesenc, - UD_Ivaesenclast, - UD_Ivaesimc, - UD_Ivaeskeygenassist, - UD_Ivandnpd, - UD_Ivandnps, - UD_Ivandpd, - UD_Ivandps, - UD_Ivblendpd, - UD_Ivblendps, - UD_Ivblendvpd, - UD_Ivblendvps, - UD_Ivbroadcastsd, - UD_Ivbroadcastss, - UD_Ivcmppd, - UD_Ivcmpps, - UD_Ivcmpsd, - UD_Ivcmpss, - UD_Ivcomisd, - UD_Ivcomiss, - UD_Ivcvtdq2pd, - UD_Ivcvtdq2ps, - UD_Ivcvtpd2dq, - UD_Ivcvtpd2ps, - UD_Ivcvtps2dq, - UD_Ivcvtps2pd, - UD_Ivcvtsd2si, - UD_Ivcvtsd2ss, - UD_Ivcvtsi2sd, - UD_Ivcvtsi2ss, - UD_Ivcvtss2sd, - UD_Ivcvtss2si, - UD_Ivcvttpd2dq, - UD_Ivcvttps2dq, - UD_Ivcvttsd2si, - UD_Ivcvttss2si, - UD_Ivdivpd, - UD_Ivdivps, - UD_Ivdivsd, - UD_Ivdivss, - UD_Ivdppd, - UD_Ivdpps, - UD_Iverr, - UD_Iverw, - UD_Ivextractf128, - UD_Ivextractps, - UD_Ivhaddpd, - UD_Ivhaddps, - UD_Ivhsubpd, - UD_Ivhsubps, - UD_Ivinsertf128, - UD_Ivinsertps, - UD_Ivlddqu, - UD_Ivmaskmovdqu, - UD_Ivmaskmovpd, - UD_Ivmaskmovps, - UD_Ivmaxpd, - UD_Ivmaxps, - UD_Ivmaxsd, - UD_Ivmaxss, - UD_Ivmcall, - UD_Ivmclear, - UD_Ivminpd, - UD_Ivminps, - UD_Ivminsd, - UD_Ivminss, - UD_Ivmlaunch, - UD_Ivmload, - UD_Ivmmcall, - UD_Ivmovapd, - UD_Ivmovaps, - UD_Ivmovd, - UD_Ivmovddup, - UD_Ivmovdqa, - UD_Ivmovdqu, - UD_Ivmovhlps, - UD_Ivmovhpd, - UD_Ivmovhps, - UD_Ivmovlhps, - UD_Ivmovlpd, - UD_Ivmovlps, - UD_Ivmovmskpd, - UD_Ivmovmskps, - UD_Ivmovntdq, - UD_Ivmovntdqa, - UD_Ivmovntpd, - UD_Ivmovntps, - UD_Ivmovq, - UD_Ivmovsd, - UD_Ivmovshdup, - UD_Ivmovsldup, - UD_Ivmovss, - UD_Ivmovupd, - UD_Ivmovups, - UD_Ivmpsadbw, - UD_Ivmptrld, - UD_Ivmptrst, - UD_Ivmread, - UD_Ivmresume, - UD_Ivmrun, - UD_Ivmsave, - UD_Ivmulpd, - UD_Ivmulps, - UD_Ivmulsd, - UD_Ivmulss, - UD_Ivmwrite, - UD_Ivmxoff, - UD_Ivmxon, - UD_Ivorpd, - UD_Ivorps, - UD_Ivpabsb, - UD_Ivpabsd, - UD_Ivpabsw, - UD_Ivpackssdw, - UD_Ivpacksswb, - UD_Ivpackusdw, - UD_Ivpackuswb, - UD_Ivpaddb, - UD_Ivpaddd, - UD_Ivpaddq, - UD_Ivpaddsb, - UD_Ivpaddsw, - UD_Ivpaddusb, - UD_Ivpaddusw, - UD_Ivpaddw, - UD_Ivpalignr, - UD_Ivpand, - UD_Ivpandn, - UD_Ivpavgb, - UD_Ivpavgw, - UD_Ivpblendvb, - UD_Ivpblendw, - UD_Ivpclmulqdq, - UD_Ivpcmpeqb, - UD_Ivpcmpeqd, - UD_Ivpcmpeqq, - UD_Ivpcmpeqw, - UD_Ivpcmpestri, - UD_Ivpcmpestrm, - UD_Ivpcmpgtb, - UD_Ivpcmpgtd, - UD_Ivpcmpgtq, - UD_Ivpcmpgtw, - UD_Ivpcmpistri, - UD_Ivpcmpistrm, - UD_Ivperm2f128, - UD_Ivpermilpd, - UD_Ivpermilps, - UD_Ivpextrb, - UD_Ivpextrd, - UD_Ivpextrq, - UD_Ivpextrw, - UD_Ivphaddd, - UD_Ivphaddsw, - UD_Ivphaddw, - UD_Ivphminposuw, - UD_Ivphsubd, - UD_Ivphsubsw, - UD_Ivphsubw, - UD_Ivpinsrb, - UD_Ivpinsrd, - UD_Ivpinsrq, - UD_Ivpinsrw, - UD_Ivpmaddubsw, - UD_Ivpmaddwd, - UD_Ivpmaxsb, - UD_Ivpmaxsd, - UD_Ivpmaxsw, - UD_Ivpmaxub, - UD_Ivpmaxud, - UD_Ivpmaxuw, - UD_Ivpminsb, - UD_Ivpminsd, - UD_Ivpminsw, - UD_Ivpminub, - UD_Ivpminud, - UD_Ivpminuw, - UD_Ivpmovmskb, - UD_Ivpmovsxbd, - UD_Ivpmovsxbq, - UD_Ivpmovsxbw, - UD_Ivpmovsxwd, - UD_Ivpmovsxwq, - UD_Ivpmovzxbd, - UD_Ivpmovzxbq, - UD_Ivpmovzxbw, - UD_Ivpmovzxdq, - UD_Ivpmovzxwd, - UD_Ivpmovzxwq, - UD_Ivpmuldq, - UD_Ivpmulhrsw, - UD_Ivpmulhuw, - UD_Ivpmulhw, - UD_Ivpmulld, - UD_Ivpmullw, - UD_Ivpor, - UD_Ivpsadbw, - UD_Ivpshufb, - UD_Ivpshufd, - UD_Ivpshufhw, - UD_Ivpshuflw, - UD_Ivpsignb, - UD_Ivpsignd, - UD_Ivpsignw, - UD_Ivpslld, - UD_Ivpslldq, - UD_Ivpsllq, - UD_Ivpsllw, - UD_Ivpsrad, - UD_Ivpsraw, - UD_Ivpsrld, - UD_Ivpsrldq, - UD_Ivpsrlq, - UD_Ivpsrlw, - UD_Ivpsubb, - UD_Ivpsubd, - UD_Ivpsubq, - UD_Ivpsubsb, - UD_Ivpsubsw, - UD_Ivpsubusb, - UD_Ivpsubusw, - UD_Ivpsubw, - UD_Ivptest, - UD_Ivpunpckhbw, - UD_Ivpunpckhdq, - UD_Ivpunpckhqdq, - UD_Ivpunpckhwd, - UD_Ivpunpcklbw, - UD_Ivpunpckldq, - UD_Ivpunpcklqdq, - UD_Ivpunpcklwd, - UD_Ivpxor, - UD_Ivrcpps, - UD_Ivrcpss, - UD_Ivroundpd, - UD_Ivroundps, - UD_Ivroundsd, - UD_Ivroundss, - UD_Ivrsqrtps, - UD_Ivrsqrtss, - UD_Ivshufpd, - UD_Ivshufps, - UD_Ivsqrtpd, - UD_Ivsqrtps, - UD_Ivsqrtsd, - UD_Ivsqrtss, - UD_Ivstmxcsr, - UD_Ivsubpd, - UD_Ivsubps, - UD_Ivsubsd, - UD_Ivsubss, - UD_Ivtestpd, - UD_Ivtestps, - UD_Ivucomisd, - UD_Ivucomiss, - UD_Ivunpckhpd, - UD_Ivunpckhps, - UD_Ivunpcklpd, - UD_Ivunpcklps, - UD_Ivxorpd, - UD_Ivxorps, - UD_Ivzeroall, - UD_Ivzeroupper, - UD_Iwait, - UD_Iwbinvd, - UD_Iwrmsr, - UD_Ixadd, - UD_Ixchg, - UD_Ixcryptcbc, - UD_Ixcryptcfb, - UD_Ixcryptctr, - UD_Ixcryptecb, - UD_Ixcryptofb, - UD_Ixgetbv, - UD_Ixlatb, - UD_Ixor, - UD_Ixorpd, - UD_Ixorps, - UD_Ixrstor, - UD_Ixsave, - UD_Ixsetbv, - UD_Ixsha1, - UD_Ixsha256, - UD_Ixstore, - UD_Iinvalid, - UD_I3dnow, - UD_Inone, - UD_Idb, - UD_Ipause, - UD_MAX_MNEMONIC_CODE -} UD_ATTR_PACKED; - -extern const char * ud_mnemonics_str[]; - -#endif /* UD_ITAB_H */ diff --git a/src/third_party/udis86/libudis86/syn-att.c b/src/third_party/udis86/libudis86/syn-att.c deleted file mode 100644 index 7be01423..00000000 --- a/src/third_party/udis86/libudis86/syn-att.c +++ /dev/null @@ -1,228 +0,0 @@ -/* udis86 - libudis86/syn-att.c - * - * Copyright (c) 2002-2009 Vivek Thampi - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -#include "types.h" -#include "extern.h" -#include "decode.h" -#include "itab.h" -#include "syn.h" -#include "udint.h" - -/* ----------------------------------------------------------------------------- - * opr_cast_att() - Prints an operand cast. - * ----------------------------------------------------------------------------- - */ -static void -opr_cast_att(struct ud* u, struct ud_operand* op) -{ - switch(op->size) { - case 16 : case 32 : - ud_asmprintf(u, "*"); break; - default: break; - } -} - -/* ----------------------------------------------------------------------------- - * gen_operand_att() - Generates assembly output for each operand. - * ----------------------------------------------------------------------------- - */ -static void -gen_operand_att(struct ud* u, struct ud_operand* op) -{ - switch(op->type) { - case UD_OP_CONST: - ud_asmprintf(u, "$0x%x", op->lval.udword); - break; - - case UD_OP_REG: - ud_asmprintf(u, "%%%s", ud_reg_tab[op->base - UD_R_AL]); - break; - - case UD_OP_MEM: - if (u->br_far) { - opr_cast_att(u, op); - } - if (u->pfx_seg) { - ud_asmprintf(u, "%%%s:", ud_reg_tab[u->pfx_seg - UD_R_AL]); - } - if (op->offset != 0) { - ud_syn_print_mem_disp(u, op, 0); - } - if (op->base) { - ud_asmprintf(u, "(%%%s", ud_reg_tab[op->base - UD_R_AL]); - } - if (op->index) { - if (op->base) { - ud_asmprintf(u, ","); - } else { - ud_asmprintf(u, "("); - } - ud_asmprintf(u, "%%%s", ud_reg_tab[op->index - UD_R_AL]); - } - if (op->scale) { - ud_asmprintf(u, ",%d", op->scale); - } - if (op->base || op->index) { - ud_asmprintf(u, ")"); - } - break; - - case UD_OP_IMM: - ud_asmprintf(u, "$"); - ud_syn_print_imm(u, op); - break; - - case UD_OP_JIMM: - ud_syn_print_addr(u, ud_syn_rel_target(u, op)); - break; - - case UD_OP_PTR: - switch (op->size) { - case 32: - ud_asmprintf(u, "$0x%x, $0x%x", op->lval.ptr.seg, - op->lval.ptr.off & 0xFFFF); - break; - case 48: - ud_asmprintf(u, "$0x%x, $0x%x", op->lval.ptr.seg, - op->lval.ptr.off); - break; - } - break; - - default: return; - } -} - -/* ============================================================================= - * translates to AT&T syntax - * ============================================================================= - */ -extern void -ud_translate_att(struct ud *u) -{ - int size = 0; - int star = 0; - - /* check if P_OSO prefix is used */ - if (! P_OSO(u->itab_entry->prefix) && u->pfx_opr) { - switch (u->dis_mode) { - case 16: - ud_asmprintf(u, "o32 "); - break; - case 32: - case 64: - ud_asmprintf(u, "o16 "); - break; - } - } - - /* check if P_ASO prefix was used */ - if (! P_ASO(u->itab_entry->prefix) && u->pfx_adr) { - switch (u->dis_mode) { - case 16: - ud_asmprintf(u, "a32 "); - break; - case 32: - ud_asmprintf(u, "a16 "); - break; - case 64: - ud_asmprintf(u, "a32 "); - break; - } - } - - if (u->pfx_lock) - ud_asmprintf(u, "lock "); - if (u->pfx_rep) { - ud_asmprintf(u, "rep "); - } else if (u->pfx_rep) { - ud_asmprintf(u, "repe "); - } else if (u->pfx_repne) { - ud_asmprintf(u, "repne "); - } - - /* special instructions */ - switch (u->mnemonic) { - case UD_Iretf: - ud_asmprintf(u, "lret "); - break; - case UD_Idb: - ud_asmprintf(u, ".byte 0x%x", u->operand[0].lval.ubyte); - return; - case UD_Ijmp: - case UD_Icall: - if (u->br_far) ud_asmprintf(u, "l"); - if (u->operand[0].type == UD_OP_REG) { - star = 1; - } - ud_asmprintf(u, "%s", ud_lookup_mnemonic(u->mnemonic)); - break; - case UD_Ibound: - case UD_Ienter: - if (u->operand[0].type != UD_NONE) - gen_operand_att(u, &u->operand[0]); - if (u->operand[1].type != UD_NONE) { - ud_asmprintf(u, ","); - gen_operand_att(u, &u->operand[1]); - } - return; - default: - ud_asmprintf(u, "%s", ud_lookup_mnemonic(u->mnemonic)); - } - - if (size == 8) { - ud_asmprintf(u, "b"); - } else if (size == 16) { - ud_asmprintf(u, "w"); - } else if (size == 64) { - ud_asmprintf(u, "q"); - } - - if (star) { - ud_asmprintf(u, " *"); - } else { - ud_asmprintf(u, " "); - } - - if (u->operand[3].type != UD_NONE) { - gen_operand_att(u, &u->operand[3]); - ud_asmprintf(u, ", "); - } - if (u->operand[2].type != UD_NONE) { - gen_operand_att(u, &u->operand[2]); - ud_asmprintf(u, ", "); - } - if (u->operand[1].type != UD_NONE) { - gen_operand_att(u, &u->operand[1]); - ud_asmprintf(u, ", "); - } - if (u->operand[0].type != UD_NONE) { - gen_operand_att(u, &u->operand[0]); - } -} - -/* -vim: set ts=2 sw=2 expandtab -*/ diff --git a/src/third_party/udis86/libudis86/syn-intel.c b/src/third_party/udis86/libudis86/syn-intel.c deleted file mode 100644 index 471293c6..00000000 --- a/src/third_party/udis86/libudis86/syn-intel.c +++ /dev/null @@ -1,225 +0,0 @@ -/* udis86 - libudis86/syn-intel.c - * - * Copyright (c) 2002-2013 Vivek Thampi - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -#include "types.h" -#include "extern.h" -#include "decode.h" -#include "itab.h" -#include "syn.h" -#include "udint.h" - -/* ----------------------------------------------------------------------------- - * opr_cast_intel() - Prints an operand cast. - * ----------------------------------------------------------------------------- - */ -static void -opr_cast_intel(struct ud* u, struct ud_operand* op) -{ - if (u->br_far) { - ud_asmprintf(u, "far "); - } - switch(op->size) { - case 8: ud_asmprintf(u, "byte " ); break; - case 16: ud_asmprintf(u, "word " ); break; - case 32: ud_asmprintf(u, "dword "); break; - case 64: ud_asmprintf(u, "qword "); break; - case 80: ud_asmprintf(u, "tword "); break; - case 128: ud_asmprintf(u, "oword "); break; - case 256: ud_asmprintf(u, "yword "); break; - default: break; - } -} - -/* ----------------------------------------------------------------------------- - * gen_operand_intel() - Generates assembly output for each operand. - * ----------------------------------------------------------------------------- - */ -static void gen_operand_intel(struct ud* u, struct ud_operand* op, int syn_cast) -{ - switch(op->type) { - case UD_OP_REG: - ud_asmprintf(u, "%s", ud_reg_tab[op->base - UD_R_AL]); - break; - - case UD_OP_MEM: - { - opr_cast_intel(u, op); - ud_asmprintf(u, "ptr "); - } - ud_asmprintf(u, "["); - if (u->pfx_seg) { - ud_asmprintf(u, "%s:", ud_reg_tab[u->pfx_seg - UD_R_AL]); - } - if (op->base) { - ud_asmprintf(u, "%s", ud_reg_tab[op->base - UD_R_AL]); - } - if (op->index) { - ud_asmprintf(u, "%s%s", op->base != UD_NONE? "+" : "", - ud_reg_tab[op->index - UD_R_AL]); - if (op->scale) { - ud_asmprintf(u, "*%d", op->scale); - } - } - if (op->offset != 0) { - ud_syn_print_mem_disp(u, op, (op->base != UD_NONE || - op->index != UD_NONE) ? 1 : 0); - } - ud_asmprintf(u, "]"); - break; - - case UD_OP_IMM: - ud_syn_print_imm(u, op); - break; - - - case UD_OP_JIMM: - ud_syn_print_addr(u, ud_syn_rel_target(u, op)); - break; - - case UD_OP_PTR: - switch (op->size) { - case 32: - ud_asmprintf(u, "word 0x%x:0x%x", op->lval.ptr.seg, - op->lval.ptr.off & 0xFFFF); - break; - case 48: - ud_asmprintf(u, "dword 0x%x:0x%x", op->lval.ptr.seg, - op->lval.ptr.off); - break; - } - break; - - case UD_OP_CONST: - opr_cast_intel(u, op); - ud_asmprintf(u, "%d", op->lval.udword); - break; - - default: return; - } -} - -/* ============================================================================= - * translates to intel syntax - * ============================================================================= - */ -extern void -ud_translate_intel(struct ud* u) -{ - /* check if P_OSO prefix is used */ - if (!P_OSO(u->itab_entry->prefix) && u->pfx_opr) { - switch (u->dis_mode) { - case 16: ud_asmprintf(u, "o32 "); break; - case 32: - case 64: ud_asmprintf(u, "o16 "); break; - } - } - - /* check if P_ASO prefix was used */ - if (!P_ASO(u->itab_entry->prefix) && u->pfx_adr) { - switch (u->dis_mode) { - case 16: ud_asmprintf(u, "a32 "); break; - case 32: ud_asmprintf(u, "a16 "); break; - case 64: ud_asmprintf(u, "a32 "); break; - } - } - - if (u->pfx_seg && - u->operand[0].type != UD_OP_MEM && - u->operand[1].type != UD_OP_MEM ) { - ud_asmprintf(u, "%s ", ud_reg_tab[u->pfx_seg - UD_R_AL]); - } - - if (u->pfx_lock) { - ud_asmprintf(u, "lock "); - } - if (u->pfx_rep) { - ud_asmprintf(u, "rep "); - } else if (u->pfx_repe) { - ud_asmprintf(u, "repe "); - } else if (u->pfx_repne) { - ud_asmprintf(u, "repne "); - } - - /* print the instruction mnemonic */ - ud_asmprintf(u, "%s", ud_lookup_mnemonic(u->mnemonic)); - - if (u->operand[0].type != UD_NONE) { - int cast = 0; - ud_asmprintf(u, " "); - if (u->operand[0].type == UD_OP_MEM) { - if (u->operand[1].type == UD_OP_IMM || - u->operand[1].type == UD_OP_CONST || - u->operand[1].type == UD_NONE || - (u->operand[0].size != u->operand[1].size)) { - cast = 1; - } else if (u->operand[1].type == UD_OP_REG && - u->operand[1].base == UD_R_CL) { - switch (u->mnemonic) { - case UD_Ircl: - case UD_Irol: - case UD_Iror: - case UD_Ircr: - case UD_Ishl: - case UD_Ishr: - case UD_Isar: - cast = 1; - break; - default: break; - } - } - } - gen_operand_intel(u, &u->operand[0], cast); - } - - if (u->operand[1].type != UD_NONE) { - int cast = 0; - ud_asmprintf(u, ", "); - if (u->operand[1].type == UD_OP_MEM && - u->operand[0].size != u->operand[1].size && - !ud_opr_is_sreg(&u->operand[0])) { - cast = 1; - } - gen_operand_intel(u, &u->operand[1], cast); - } - - if (u->operand[2].type != UD_NONE) { - int cast = 0; - ud_asmprintf(u, ", "); - if (u->operand[2].type == UD_OP_MEM && - u->operand[2].size != u->operand[1].size) { - cast = 1; - } - gen_operand_intel(u, &u->operand[2], cast); - } - - if (u->operand[3].type != UD_NONE) { - ud_asmprintf(u, ", "); - gen_operand_intel(u, &u->operand[3], 0); - } -} - -/* -vim: set ts=2 sw=2 expandtab -*/ diff --git a/src/third_party/udis86/libudis86/syn.c b/src/third_party/udis86/libudis86/syn.c deleted file mode 100644 index 09e97653..00000000 --- a/src/third_party/udis86/libudis86/syn.c +++ /dev/null @@ -1,212 +0,0 @@ -/* udis86 - libudis86/syn.c - * - * Copyright (c) 2002-2013 Vivek Thampi - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -#include "types.h" -#include "decode.h" -#include "syn.h" -#include "udint.h" - -/* - * Register Table - Order Matters (types.h)! - * - */ -const char* ud_reg_tab[] = -{ - "al", "cl", "dl", "bl", - "ah", "ch", "dh", "bh", - "spl", "bpl", "sil", "dil", - "r8b", "r9b", "r10b", "r11b", - "r12b", "r13b", "r14b", "r15b", - - "ax", "cx", "dx", "bx", - "sp", "bp", "si", "di", - "r8w", "r9w", "r10w", "r11w", - "r12w", "r13w", "r14w", "r15w", - - "eax", "ecx", "edx", "ebx", - "esp", "ebp", "esi", "edi", - "r8d", "r9d", "r10d", "r11d", - "r12d", "r13d", "r14d", "r15d", - - "rax", "rcx", "rdx", "rbx", - "rsp", "rbp", "rsi", "rdi", - "r8", "r9", "r10", "r11", - "r12", "r13", "r14", "r15", - - "es", "cs", "ss", "ds", - "fs", "gs", - - "cr0", "cr1", "cr2", "cr3", - "cr4", "cr5", "cr6", "cr7", - "cr8", "cr9", "cr10", "cr11", - "cr12", "cr13", "cr14", "cr15", - - "dr0", "dr1", "dr2", "dr3", - "dr4", "dr5", "dr6", "dr7", - "dr8", "dr9", "dr10", "dr11", - "dr12", "dr13", "dr14", "dr15", - - "mm0", "mm1", "mm2", "mm3", - "mm4", "mm5", "mm6", "mm7", - - "st0", "st1", "st2", "st3", - "st4", "st5", "st6", "st7", - - "xmm0", "xmm1", "xmm2", "xmm3", - "xmm4", "xmm5", "xmm6", "xmm7", - "xmm8", "xmm9", "xmm10", "xmm11", - "xmm12", "xmm13", "xmm14", "xmm15", - - "ymm0", "ymm1", "ymm2", "ymm3", - "ymm4", "ymm5", "ymm6", "ymm7", - "ymm8", "ymm9", "ymm10", "ymm11", - "ymm12", "ymm13", "ymm14", "ymm15", - - "rip" -}; - - -uint64_t -ud_syn_rel_target(struct ud *u, struct ud_operand *opr) -{ - const uint64_t trunc_mask = 0xffffffffffffffffull >> (64 - u->opr_mode); - switch (opr->size) { - case 8 : return (u->pc + opr->lval.sbyte) & trunc_mask; - case 16: return (u->pc + opr->lval.sword) & trunc_mask; - case 32: return (u->pc + opr->lval.sdword) & trunc_mask; - default: UD_ASSERT(!"invalid relative offset size."); - return 0ull; - } -} - - -/* - * asmprintf - * Printf style function for printing translated assembly - * output. Returns the number of characters written and - * moves the buffer pointer forward. On an overflow, - * returns a negative number and truncates the output. - */ -int -ud_asmprintf(struct ud *u, const char *fmt, ...) -{ - int ret; - int avail; - va_list ap; - va_start(ap, fmt); - avail = u->asm_buf_size - u->asm_buf_fill - 1 /* nullchar */; - ret = vsnprintf((char*) u->asm_buf + u->asm_buf_fill, avail, fmt, ap); - if (ret < 0 || ret > avail) { - u->asm_buf_fill = u->asm_buf_size - 1; - } else { - u->asm_buf_fill += ret; - } - va_end(ap); - return ret; -} - - -void -ud_syn_print_addr(struct ud *u, uint64_t addr) -{ - const char *name = 0; - if (u->sym_resolver) { - int64_t offset = 0; - name = u->sym_resolver(u, addr, &offset); - if (name) { - if (offset) { - ud_asmprintf(u, "%s%+" FMT64 "d", name, offset); - } else { - ud_asmprintf(u, "%s", name); - } - return; - } - } - ud_asmprintf(u, "0x%" FMT64 "x", addr); -} - - -void -ud_syn_print_imm(struct ud* u, const struct ud_operand *op) -{ - uint64_t v; - if (op->_oprcode == OP_sI && op->size != u->opr_mode) { - if (op->size == 8) { - v = (int64_t)op->lval.sbyte; - } else { - UD_ASSERT(op->size == 32); - v = (int64_t)op->lval.sdword; - } - if (u->opr_mode < 64) { - v = v & ((1ull << u->opr_mode) - 1ull); - } - } else { - switch (op->size) { - case 8 : v = op->lval.ubyte; break; - case 16: v = op->lval.uword; break; - case 32: v = op->lval.udword; break; - case 64: v = op->lval.uqword; break; - default: UD_ASSERT(!"invalid offset"); v = 0; /* keep cc happy */ - } - } - ud_asmprintf(u, "0x%" FMT64 "x", v); -} - - -void -ud_syn_print_mem_disp(struct ud* u, const struct ud_operand *op, int sign) -{ - UD_ASSERT(op->offset != 0); - if (op->base == UD_NONE && op->index == UD_NONE) { - uint64_t v; - UD_ASSERT(op->scale == UD_NONE && op->offset != 8); - /* unsigned mem-offset */ - switch (op->offset) { - case 16: v = op->lval.uword; break; - case 32: v = op->lval.udword; break; - case 64: v = op->lval.uqword; break; - default: UD_ASSERT(!"invalid offset"); v = 0; /* keep cc happy */ - } - ud_asmprintf(u, "0x%" FMT64 "x", v); - } else { - int64_t v; - UD_ASSERT(op->offset != 64); - switch (op->offset) { - case 8 : v = op->lval.sbyte; break; - case 16: v = op->lval.sword; break; - case 32: v = op->lval.sdword; break; - default: UD_ASSERT(!"invalid offset"); v = 0; /* keep cc happy */ - } - if (v < 0) { - ud_asmprintf(u, "-0x%" FMT64 "x", -v); - } else if (v > 0) { - ud_asmprintf(u, "%s0x%" FMT64 "x", sign? "+" : "", v); - } - } -} - -/* -vim: set ts=2 sw=2 expandtab -*/ diff --git a/src/third_party/udis86/libudis86/syn.h b/src/third_party/udis86/libudis86/syn.h deleted file mode 100644 index bef13330..00000000 --- a/src/third_party/udis86/libudis86/syn.h +++ /dev/null @@ -1,53 +0,0 @@ -/* udis86 - libudis86/syn.h - * - * Copyright (c) 2002-2009 - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -#ifndef UD_SYN_H -#define UD_SYN_H - -#include "types.h" -#ifndef __UD_STANDALONE__ -# include -#endif /* __UD_STANDALONE__ */ - -extern const char* ud_reg_tab[]; - -uint64_t ud_syn_rel_target(struct ud*, struct ud_operand*); - -#ifdef __GNUC__ -int ud_asmprintf(struct ud *u, const char *fmt, ...) - __attribute__ ((format (gnu_printf, 2, 3))); -#else -int ud_asmprintf(struct ud *u, const char *fmt, ...); -#endif - -void ud_syn_print_addr(struct ud *u, uint64_t addr); -void ud_syn_print_imm(struct ud* u, const struct ud_operand *op); -void ud_syn_print_mem_disp(struct ud* u, const struct ud_operand *, int sign); - -#endif /* UD_SYN_H */ - -/* -vim: set ts=2 sw=2 expandtab -*/ diff --git a/src/third_party/udis86/libudis86/types.h b/src/third_party/udis86/libudis86/types.h deleted file mode 100644 index d79dae93..00000000 --- a/src/third_party/udis86/libudis86/types.h +++ /dev/null @@ -1,259 +0,0 @@ -/* udis86 - libudis86/types.h - * - * Copyright (c) 2002-2013 Vivek Thampi - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -#ifndef UD_TYPES_H -#define UD_TYPES_H - -#ifdef __KERNEL__ - /* - * -D__KERNEL__ is automatically passed on the command line when - * building something as part of the Linux kernel. Assume standalone - * mode. - */ -# include -# include -# ifndef __UD_STANDALONE__ -# define __UD_STANDALONE__ 1 -# endif -#endif /* __KERNEL__ */ - -#if !defined(__UD_STANDALONE__) -# include -# include -#endif - -/* gcc specific extensions */ -#ifdef __GNUC__ -# define UD_ATTR_PACKED __attribute__((packed)) -#else -# define UD_ATTR_PACKED -#endif /* UD_ATTR_PACKED */ - - -/* ----------------------------------------------------------------------------- - * All possible "types" of objects in udis86. Order is Important! - * ----------------------------------------------------------------------------- - */ -enum ud_type -{ - UD_NONE, - - /* 8 bit GPRs */ - UD_R_AL, UD_R_CL, UD_R_DL, UD_R_BL, - UD_R_AH, UD_R_CH, UD_R_DH, UD_R_BH, - UD_R_SPL, UD_R_BPL, UD_R_SIL, UD_R_DIL, - UD_R_R8B, UD_R_R9B, UD_R_R10B, UD_R_R11B, - UD_R_R12B, UD_R_R13B, UD_R_R14B, UD_R_R15B, - - /* 16 bit GPRs */ - UD_R_AX, UD_R_CX, UD_R_DX, UD_R_BX, - UD_R_SP, UD_R_BP, UD_R_SI, UD_R_DI, - UD_R_R8W, UD_R_R9W, UD_R_R10W, UD_R_R11W, - UD_R_R12W, UD_R_R13W, UD_R_R14W, UD_R_R15W, - - /* 32 bit GPRs */ - UD_R_EAX, UD_R_ECX, UD_R_EDX, UD_R_EBX, - UD_R_ESP, UD_R_EBP, UD_R_ESI, UD_R_EDI, - UD_R_R8D, UD_R_R9D, UD_R_R10D, UD_R_R11D, - UD_R_R12D, UD_R_R13D, UD_R_R14D, UD_R_R15D, - - /* 64 bit GPRs */ - UD_R_RAX, UD_R_RCX, UD_R_RDX, UD_R_RBX, - UD_R_RSP, UD_R_RBP, UD_R_RSI, UD_R_RDI, - UD_R_R8, UD_R_R9, UD_R_R10, UD_R_R11, - UD_R_R12, UD_R_R13, UD_R_R14, UD_R_R15, - - /* segment registers */ - UD_R_ES, UD_R_CS, UD_R_SS, UD_R_DS, - UD_R_FS, UD_R_GS, - - /* control registers*/ - UD_R_CR0, UD_R_CR1, UD_R_CR2, UD_R_CR3, - UD_R_CR4, UD_R_CR5, UD_R_CR6, UD_R_CR7, - UD_R_CR8, UD_R_CR9, UD_R_CR10, UD_R_CR11, - UD_R_CR12, UD_R_CR13, UD_R_CR14, UD_R_CR15, - - /* debug registers */ - UD_R_DR0, UD_R_DR1, UD_R_DR2, UD_R_DR3, - UD_R_DR4, UD_R_DR5, UD_R_DR6, UD_R_DR7, - UD_R_DR8, UD_R_DR9, UD_R_DR10, UD_R_DR11, - UD_R_DR12, UD_R_DR13, UD_R_DR14, UD_R_DR15, - - /* mmx registers */ - UD_R_MM0, UD_R_MM1, UD_R_MM2, UD_R_MM3, - UD_R_MM4, UD_R_MM5, UD_R_MM6, UD_R_MM7, - - /* x87 registers */ - UD_R_ST0, UD_R_ST1, UD_R_ST2, UD_R_ST3, - UD_R_ST4, UD_R_ST5, UD_R_ST6, UD_R_ST7, - - /* extended multimedia registers */ - UD_R_XMM0, UD_R_XMM1, UD_R_XMM2, UD_R_XMM3, - UD_R_XMM4, UD_R_XMM5, UD_R_XMM6, UD_R_XMM7, - UD_R_XMM8, UD_R_XMM9, UD_R_XMM10, UD_R_XMM11, - UD_R_XMM12, UD_R_XMM13, UD_R_XMM14, UD_R_XMM15, - - /* 256B multimedia registers */ - UD_R_YMM0, UD_R_YMM1, UD_R_YMM2, UD_R_YMM3, - UD_R_YMM4, UD_R_YMM5, UD_R_YMM6, UD_R_YMM7, - UD_R_YMM8, UD_R_YMM9, UD_R_YMM10, UD_R_YMM11, - UD_R_YMM12, UD_R_YMM13, UD_R_YMM14, UD_R_YMM15, - - UD_R_RIP, - - /* Operand Types */ - UD_OP_REG, UD_OP_MEM, UD_OP_PTR, UD_OP_IMM, - UD_OP_JIMM, UD_OP_CONST -}; - -#include "itab.h" - -union ud_lval { - int8_t sbyte; - uint8_t ubyte; - int16_t sword; - uint16_t uword; - int32_t sdword; - uint32_t udword; - int64_t sqword; - uint64_t uqword; - struct { - uint16_t seg; - uint32_t off; - } ptr; -}; - -/* ----------------------------------------------------------------------------- - * struct ud_operand - Disassembled instruction Operand. - * ----------------------------------------------------------------------------- - */ -struct ud_operand { - enum ud_type type; - uint16_t size; - enum ud_type base; - enum ud_type index; - uint8_t scale; - uint8_t offset; - union ud_lval lval; - /* - * internal use only - */ - uint64_t _legacy; /* this will be removed in 1.8 */ - uint8_t _oprcode; -}; - -/* ----------------------------------------------------------------------------- - * struct ud - The udis86 object. - * ----------------------------------------------------------------------------- - */ -struct ud -{ - /* - * input buffering - */ - int (*inp_hook) (struct ud*); -#ifndef __UD_STANDALONE__ - FILE* inp_file; -#endif - const uint8_t* inp_buf; - size_t inp_buf_size; - size_t inp_buf_index; - uint8_t inp_curr; - size_t inp_ctr; - uint8_t inp_sess[64]; - int inp_end; - int inp_peek; - - void (*translator)(struct ud*); - uint64_t insn_offset; - char insn_hexcode[64]; - - /* - * Assembly output buffer - */ - char *asm_buf; - size_t asm_buf_size; - size_t asm_buf_fill; - char asm_buf_int[128]; - - /* - * Symbol resolver for use in the translation phase. - */ - const char* (*sym_resolver)(struct ud*, uint64_t addr, int64_t *offset); - - uint8_t dis_mode; - uint64_t pc; - uint8_t vendor; - enum ud_mnemonic_code mnemonic; - struct ud_operand operand[4]; - uint8_t error; - uint8_t _rex; - uint8_t pfx_rex; - uint8_t pfx_seg; - uint8_t pfx_opr; - uint8_t pfx_adr; - uint8_t pfx_lock; - uint8_t pfx_str; - uint8_t pfx_rep; - uint8_t pfx_repe; - uint8_t pfx_repne; - uint8_t opr_mode; - uint8_t adr_mode; - uint8_t br_far; - uint8_t br_near; - uint8_t have_modrm; - uint8_t modrm; - uint8_t vex_op; - uint8_t vex_b1; - uint8_t vex_b2; - uint8_t primary_opcode; - void * user_opaque_data; - struct ud_itab_entry * itab_entry; - struct ud_lookup_table_list_entry *le; -}; - -/* ----------------------------------------------------------------------------- - * Type-definitions - * ----------------------------------------------------------------------------- - */ -typedef enum ud_type ud_type_t; -typedef enum ud_mnemonic_code ud_mnemonic_code_t; - -typedef struct ud ud_t; -typedef struct ud_operand ud_operand_t; - -#define UD_SYN_INTEL ud_translate_intel -#define UD_SYN_ATT ud_translate_att -#define UD_EOI (-1) -#define UD_INP_CACHE_SZ 32 -#define UD_VENDOR_AMD 0 -#define UD_VENDOR_INTEL 1 -#define UD_VENDOR_ANY 2 - -#endif - -/* -vim: set ts=2 sw=2 expandtab -*/ diff --git a/src/third_party/udis86/libudis86/udint.h b/src/third_party/udis86/libudis86/udint.h deleted file mode 100644 index 2e3e612b..00000000 --- a/src/third_party/udis86/libudis86/udint.h +++ /dev/null @@ -1,97 +0,0 @@ -/* udis86 - libudis86/udint.h -- definitions for internal use only - * - * Copyright (c) 2002-2009 Vivek Thampi - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -#ifndef _UDINT_H_ -#define _UDINT_H_ - -#if defined(HAVE_CONFIG_H) // || true // < Simplification for our (RAD Debugger) build process -# include -#endif /* HAVE_CONFIG_H */ - -#if defined(UD_DEBUG) && HAVE_ASSERT_H -# include -# define UD_ASSERT(_x) assert(_x) -#else -# define UD_ASSERT(_x) -#endif /* !HAVE_ASSERT_H */ - -#if defined(UD_DEBUG) -#define UDERR(u, msg) \ -do { \ -(u)->error = 1; \ -fprintf(stderr, "decode-error: %s:%d: %s", \ -__FILE__, __LINE__, (msg)); \ -} while (0) -#else -#define UDERR(u, m) \ -do { \ -(u)->error = 1; \ -} while (0) -#endif /* !LOGERR */ - -#define UD_RETURN_ON_ERROR(u) \ -do { \ -if ((u)->error != 0) { \ -return (u)->error; \ -} \ -} while (0) - -#define UD_RETURN_WITH_ERROR(u, m) \ -do { \ -UDERR(u, m); \ -return (u)->error; \ -} while (0) - -#ifndef __UD_STANDALONE__ -# define UD_NON_STANDALONE(x) x -#else -# define UD_NON_STANDALONE(x) -#endif - -/* printf formatting int64 specifier */ -#ifdef FMT64 -# undef FMT64 -#endif -#if defined(_MSC_VER) || defined(__BORLANDC__) -# define FMT64 "I64" -#else -# if defined(__APPLE__) || defined(_WIN32) // RJM added this -# define FMT64 "ll" -# elif defined(__amd64__) || defined(__x86_64__) -# define FMT64 "l" -# else -# define FMT64 "ll" -# endif /* !x64 */ -#endif - -/* define an inline macro */ -#if defined(_MSC_VER) || defined(__BORLANDC__) -# define UD_INLINE __inline /* MS Visual Studio requires __inline - instead of inline for C code */ -#else -# define UD_INLINE inline -#endif - -#endif /* _UDINT_H_ */ diff --git a/src/third_party/udis86/libudis86/udis86.c b/src/third_party/udis86/libudis86/udis86.c deleted file mode 100644 index 8a4956eb..00000000 --- a/src/third_party/udis86/libudis86/udis86.c +++ /dev/null @@ -1,458 +0,0 @@ -/* udis86 - libudis86/udis86.c - * - * Copyright (c) 2002-2013 Vivek Thampi - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#include "udint.h" -#include "extern.h" -#include "decode.h" - -#if !defined(__UD_STANDALONE__) -# if HAVE_STRING_H -# include -# endif -#endif /* !__UD_STANDALONE__ */ - -static void ud_inp_init(struct ud *u); - -/* ============================================================================= - * ud_init - * Initializes ud_t object. - * ============================================================================= - */ -extern void -ud_init(struct ud* u) -{ - memset((void*)u, 0, sizeof(struct ud)); - ud_set_mode(u, 16); - u->mnemonic = UD_Iinvalid; - ud_set_pc(u, 0); -#ifndef __UD_STANDALONE__ - ud_set_input_file(u, stdin); -#endif /* __UD_STANDALONE__ */ - - ud_set_asm_buffer(u, u->asm_buf_int, sizeof(u->asm_buf_int)); -} - - -/* ============================================================================= - * ud_disassemble - * Disassembles one instruction and returns the number of - * bytes disassembled. A zero means end of disassembly. - * ============================================================================= - */ -extern unsigned int -ud_disassemble(struct ud* u) -{ - int len; - if (u->inp_end) { - return 0; - } - if ((len = ud_decode(u)) > 0) { - if (u->translator != 0) { - u->asm_buf[0] = '\0'; - u->translator(u); - } - } - return len; -} - - -/* ============================================================================= - * ud_set_mode() - Set Disassemly Mode. - * ============================================================================= - */ -extern void -ud_set_mode(struct ud* u, uint8_t m) -{ - switch(m) { - case 16: - case 32: - case 64: u->dis_mode = m ; return; - default: u->dis_mode = 16; return; - } -} - -/* ============================================================================= - * ud_set_vendor() - Set vendor. - * ============================================================================= - */ -extern void -ud_set_vendor(struct ud* u, unsigned v) -{ - switch(v) { - case UD_VENDOR_INTEL: - u->vendor = v; - break; - case UD_VENDOR_ANY: - u->vendor = v; - break; - default: - u->vendor = UD_VENDOR_AMD; - } -} - -/* ============================================================================= - * ud_set_pc() - Sets code origin. - * ============================================================================= - */ -extern void -ud_set_pc(struct ud* u, uint64_t o) -{ - u->pc = o; -} - -/* ============================================================================= - * ud_set_syntax() - Sets the output syntax. - * ============================================================================= - */ -extern void -ud_set_syntax(struct ud* u, void (*t)(struct ud*)) -{ - u->translator = t; -} - -/* ============================================================================= - * ud_insn() - returns the disassembled instruction - * ============================================================================= - */ -const char* -ud_insn_asm(const struct ud* u) -{ - return u->asm_buf; -} - -/* ============================================================================= - * ud_insn_offset() - Returns the offset. - * ============================================================================= - */ -uint64_t -ud_insn_off(const struct ud* u) -{ - return u->insn_offset; -} - - -/* ============================================================================= - * ud_insn_hex() - Returns hex form of disassembled instruction. - * ============================================================================= - */ -const char* -ud_insn_hex(struct ud* u) -{ - u->insn_hexcode[0] = 0; - if (!u->error) { - unsigned int i; - const unsigned char *src_ptr = ud_insn_ptr(u); - char* src_hex; - src_hex = (char*) u->insn_hexcode; - /* for each byte used to decode instruction */ - for (i = 0; i < ud_insn_len(u) && i < sizeof(u->insn_hexcode) / 2; - ++i, ++src_ptr) { - sprintf(src_hex, "%02x", *src_ptr & 0xFF); - src_hex += 2; - } - } - return u->insn_hexcode; -} - - -/* ============================================================================= - * ud_insn_ptr - * Returns a pointer to buffer containing the bytes that were - * disassembled. - * ============================================================================= - */ -extern const uint8_t* -ud_insn_ptr(const struct ud* u) -{ - return (u->inp_buf == 0) ? - u->inp_sess : u->inp_buf + (u->inp_buf_index - u->inp_ctr); -} - - -/* ============================================================================= - * ud_insn_len - * Returns the count of bytes disassembled. - * ============================================================================= - */ -extern unsigned int -ud_insn_len(const struct ud* u) -{ - return u->inp_ctr; -} - - -/* ============================================================================= - * ud_insn_get_opr - * Return the operand struct representing the nth operand of - * the currently disassembled instruction. Returns 0 if - * there's no such operand. - * ============================================================================= - */ -const struct ud_operand* -ud_insn_opr(const struct ud *u, unsigned int n) -{ - if (n > 3 || u->operand[n].type == UD_NONE) { - return 0; - } else { - return &u->operand[n]; - } -} - - -/* ============================================================================= - * ud_opr_is_sreg - * Returns non-zero if the given operand is of a segment register type. - * ============================================================================= - */ -int -ud_opr_is_sreg(const struct ud_operand *opr) -{ - return opr->type == UD_OP_REG && - opr->base >= UD_R_ES && - opr->base <= UD_R_GS; -} - - -/* ============================================================================= - * ud_opr_is_sreg - * Returns non-zero if the given operand is of a general purpose - * register type. - * ============================================================================= - */ -int -ud_opr_is_gpr(const struct ud_operand *opr) -{ - return opr->type == UD_OP_REG && - opr->base >= UD_R_AL && - opr->base <= UD_R_R15; -} - - -/* ============================================================================= - * ud_set_user_opaque_data - * ud_get_user_opaque_data - * Get/set user opaqute data pointer - * ============================================================================= - */ -void -ud_set_user_opaque_data(struct ud * u, void* opaque) -{ - u->user_opaque_data = opaque; -} - -void* -ud_get_user_opaque_data(const struct ud *u) -{ - return u->user_opaque_data; -} - - -/* ============================================================================= - * ud_set_asm_buffer - * Allow the user to set an assembler output buffer. If `buf` is 0, - * we switch back to the internal buffer. - * ============================================================================= - */ -void -ud_set_asm_buffer(struct ud *u, char *buf, size_t size) -{ - if (buf == 0) { - ud_set_asm_buffer(u, u->asm_buf_int, sizeof(u->asm_buf_int)); - } else { - u->asm_buf = buf; - u->asm_buf_size = size; - } -} - - -/* ============================================================================= - * ud_set_sym_resolver - * Set symbol resolver for relative targets used in the translation - * phase. - * - * The resolver is a function that takes a uint64_t address and returns a - * symbolic name for the that address. The function also takes a second - * argument pointing to an integer that the client can optionally set to a - * non-zero value for offsetted targets. (symbol+offset) The function may - * also return 0, in which case the translator only prints the target - * address. - * - * The function pointer maybe 0 which resets symbol resolution. - * ============================================================================= - */ -void -ud_set_sym_resolver(struct ud *u, const char* (*resolver)(struct ud*, - uint64_t addr, - int64_t *offset)) -{ - u->sym_resolver = resolver; -} - - -/* ============================================================================= - * ud_insn_mnemonic - * Return the current instruction mnemonic. - * ============================================================================= - */ -enum ud_mnemonic_code -ud_insn_mnemonic(const struct ud *u) -{ - return u->mnemonic; -} - - -/* ============================================================================= - * ud_lookup_mnemonic - * Looks up mnemonic code in the mnemonic string table. - * Returns 0 if the mnemonic code is invalid. - * ============================================================================= - */ -const char* -ud_lookup_mnemonic(enum ud_mnemonic_code c) -{ - if (c < UD_MAX_MNEMONIC_CODE) { - return ud_mnemonics_str[c]; - } else { - return 0; - } -} - - -/* - * ud_inp_init - * Initializes the input system. - */ -static void -ud_inp_init(struct ud *u) -{ - u->inp_hook = 0; - u->inp_buf = 0; - u->inp_buf_size = 0; - u->inp_buf_index = 0; - u->inp_curr = 0; - u->inp_ctr = 0; - u->inp_end = 0; - u->inp_peek = UD_EOI; - UD_NON_STANDALONE(u->inp_file = 0); -} - - -/* ============================================================================= - * ud_inp_set_hook - * Sets input hook. - * ============================================================================= - */ -void -ud_set_input_hook(register struct ud* u, int (*hook)(struct ud*)) -{ - ud_inp_init(u); - u->inp_hook = hook; -} - -/* ============================================================================= - * ud_inp_set_buffer - * Set buffer as input. - * ============================================================================= - */ -void -ud_set_input_buffer(register struct ud* u, const uint8_t* buf, size_t len) -{ - ud_inp_init(u); - u->inp_buf = buf; - u->inp_buf_size = len; - u->inp_buf_index = 0; -} - - -#ifndef __UD_STANDALONE__ -/* ============================================================================= - * ud_input_set_file - * Set FILE as input. - * ============================================================================= - */ -static int -inp_file_hook(struct ud* u) -{ - return fgetc(u->inp_file); -} - -void -ud_set_input_file(register struct ud* u, FILE* f) -{ - ud_inp_init(u); - u->inp_hook = inp_file_hook; - u->inp_file = f; -} -#endif /* __UD_STANDALONE__ */ - - -/* ============================================================================= - * ud_input_skip - * Skip n input bytes. - * ============================================================================ - */ -void -ud_input_skip(struct ud* u, size_t n) -{ - if (u->inp_end) { - return; - } - if (u->inp_buf == 0) { - while (n--) { - int c = u->inp_hook(u); - if (c == UD_EOI) { - goto eoi; - } - } - return; - } else { - if (n > u->inp_buf_size || - u->inp_buf_index > u->inp_buf_size - n) { - u->inp_buf_index = u->inp_buf_size; - goto eoi; - } - u->inp_buf_index += n; - return; - } - eoi: - u->inp_end = 1; - UDERR(u, "cannot skip, eoi received\b"); - return; -} - - -/* ============================================================================= - * ud_input_end - * Returns non-zero on end-of-input. - * ============================================================================= - */ -int -ud_input_end(const struct ud *u) -{ - return u->inp_end; -} - -/* vim:set ts=2 sw=2 expandtab */ diff --git a/src/third_party/udis86/udis86.h b/src/third_party/udis86/udis86.h deleted file mode 100644 index bdd3857b..00000000 --- a/src/third_party/udis86/udis86.h +++ /dev/null @@ -1,33 +0,0 @@ -/* udis86 - udis86.h - * - * Copyright (c) 2002-2009 Vivek Thampi - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -#ifndef UDIS86_H -#define UDIS86_H - -#include "libudis86/types.h" -#include "libudis86/extern.h" -#include "libudis86/itab.h" - -#endif diff --git a/src/third_party/udis86/udis86_v56ff6c8.LICENSE b/src/third_party/udis86/udis86_v56ff6c8.LICENSE deleted file mode 100644 index b173897d..00000000 --- a/src/third_party/udis86/udis86_v56ff6c8.LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -================================================================================ -Software Name: udis86 -Version: 56ff6c8 -URL:https://github.com/vmt/udis86/blob/master/LICENSE -=========================================================================================== -Copyright (c) 2002-2012, Vivek Thampi -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/src/third_party/udis86/udis86_v56ff6c8.tps b/src/third_party/udis86/udis86_v56ff6c8.tps deleted file mode 100644 index c7f0d0dc..00000000 --- a/src/third_party/udis86/udis86_v56ff6c8.tps +++ /dev/null @@ -1,19 +0,0 @@ - - - udis86 - - - - Rad Games Github - Disassembles x86 object code. - https://github.com/jpcy/xatlas/blob/master/LICENSE - - Licencees - P4 - Git - - /Engine/Source/ThirdParty/Licenses - - \ No newline at end of file diff --git a/src/third_party/zydis/zydis.c b/src/third_party/zydis/zydis.c index 236b0372..29ea1345 100644 --- a/src/third_party/zydis/zydis.c +++ b/src/third_party/zydis/zydis.c @@ -1,7 +1,7 @@ // DO NOT EDIT. This file is auto-generated by `amalgamate.py`. -#include "Zydis.h" - +#ifndef ZYDIS_C +#define ZYDIS_C // // Source file: /home/ath/devel/zydis/src/Decoder.c @@ -54987,4 +54987,6 @@ ZyanStatus ZydisIsFeatureEnabled(ZydisFeature feature) } } -/* ============================================================================================== */ \ No newline at end of file +/* ============================================================================================== */ + +#endif