diff --git a/code/8086/decoder.c b/code/8086/decoder.c index b17f992..ddd4936 100644 --- a/code/8086/decoder.c +++ b/code/8086/decoder.c @@ -86,13 +86,16 @@ internal X8616_OpcodePrefix x8616_decode_opcode(X8616_DecodePlan const* plan, U1 opcode) { U1 field_mask = 0; - if (plan->flags & x8616_plan_has_d) field_mask |= u1_(1u << plan->d_shift); - if (plan->flags & x8616_plan_has_w) field_mask |= u1_(1u << plan->w_shift); - if (plan->flags & x8616_plan_has_s) field_mask |= u1_(1u << plan->s_shift); - if (plan->flags & x8616_plan_has_v) field_mask |= u1_(1u << plan->v_shift); - if (plan->flags & x8616_plan_has_z) field_mask |= u1_(1u << plan->z_shift); - if (plan->flags & x8616_plan_has_reg) field_mask |= u1_(0b111u << plan->reg_shift); - if (plan->flags & x8616_plan_has_sr) field_mask |= u1_(0b11u << plan->sr_shift); + if (plan->flags & x8616_plan_has_d) field_mask |= x8616_field_mask(plan->d_shift, X8616_OPCODE_BIT_WIDTH); + if (plan->flags & x8616_plan_has_w) field_mask |= x8616_field_mask(plan->w_shift, X8616_OPCODE_BIT_WIDTH); + if (plan->flags & x8616_plan_has_s) field_mask |= x8616_field_mask(plan->s_shift, X8616_OPCODE_BIT_WIDTH); + if (plan->flags & x8616_plan_has_v) field_mask |= x8616_field_mask(plan->v_shift, X8616_OPCODE_BIT_WIDTH); + if (plan->flags & x8616_plan_has_z) field_mask |= x8616_field_mask(plan->z_shift, X8616_OPCODE_BIT_WIDTH); + if (plan->flags & x8616_plan_has_reg) field_mask |= x8616_field_mask(plan->reg_shift, X8616_OPCODE_REG_REG_WIDTH); + if (plan->flags & x8616_plan_has_sr) field_mask |= x8616_field_mask(plan->sr_shift, X8616_OPCODE_SR_WIDTH); + if (plan->flags & x8616_plan_has_alu) field_mask |= x8616_field_mask(plan->alu_shift, X8616_OPCODE_ALU_TTT_WIDTH); + if (plan->flags & x8616_plan_has_cc) field_mask |= x8616_field_mask(plan->cc_shift, X8616_OPCODE_CC_WIDTH); + if (plan->flags & x8616_plan_has_pair) field_mask |= x8616_field_mask(plan->pair_shift, X8616_OPCODE_PAIR_WIDTH); if (field_mask == 0) return 0; U1 stem_mask = u1_(~field_mask); if (stem_mask == 0) return 0; @@ -105,11 +108,11 @@ x8616_decode_apply_prefix(X8616_DecodePlex_R plex, X8616_DecodePlan_R plan, U1 o plex->prefixes.lock |= plan->prefix_kind == x8616_prefix_lock; if (plan->prefix_kind == x8616_prefix_repeat) { plex->prefixes.has_repeat = 1; - plex->prefixes.repeat = C_(X8616_Repeat, (opcode >> plan->z_shift) & 0b1); + plex->prefixes.repeat = C_(X8616_Repeat, x8616_bit_field_extract(opcode, (X8616_BitField){ plan->z_shift, X8616_OPCODE_BIT_WIDTH })); } if (plan->prefix_kind == x8616_prefix_segment) { plex->prefixes.has_segment = 1; - plex->prefixes.segment = C_(X8616_Segment, (opcode >> plan->sr_shift) & 0b11); + plex->prefixes.segment = C_(X8616_Segment, x8616_bit_field_extract(opcode, (X8616_BitField){ plan->sr_shift, X8616_OPCODE_SR_WIDTH })); } } @@ -181,7 +184,7 @@ x8616_decode_one_plex(X8616_DecodePlex* plex) } else { - plex->plan_idx = C_(U1, plex->dispatch); + plex->plan_idx = u1_(plex->dispatch); if (plex->plan_idx == 0) { plex->encoding_invalid = 1; x8616_info_push(plex->info_arena, plex->msgs, x8616_info_error @@ -252,14 +255,14 @@ x8616_decode_one_plex(X8616_DecodePlex* plex) return plex->instruction.size; } - X8616_DecodePlan const* plan = plex->plan; - plex->d = C_(X8616_Direction, (plex->opcode >> plan->d_shift) & 0b1); - plex->w = C_(X8616_Width, (plex->opcode >> plan->w_shift) & 0b1); - plex->s = C_(X8616_Sign, (plex->opcode >> plan->s_shift) & 0b1); - plex->v = C_(X8616_VariableShift, (plex->opcode >> plan->v_shift) & 0b1); - plex->z = C_(X8616_Repeat, (plex->opcode >> plan->z_shift) & 0b1); - plex->reg_opcode.r16 = C_(X8616_Reg16, (plex->opcode >> plan->reg_shift) & 0b111); - plex->sr_opcode = C_(X8616_Segment, (plex->opcode >> plan->sr_shift) & 0b11); + X8616_DecodePlan_R plan = plex->plan; + plex->d = C_(X8616_Direction, x8616_bit_field_extract(plex->opcode, (X8616_BitField){ plan->d_shift, X8616_OPCODE_BIT_WIDTH })); + plex->w = C_(X8616_Width, x8616_bit_field_extract(plex->opcode, (X8616_BitField){ plan->w_shift, X8616_OPCODE_BIT_WIDTH })); + plex->s = C_(X8616_Sign, x8616_bit_field_extract(plex->opcode, (X8616_BitField){ plan->s_shift, X8616_OPCODE_BIT_WIDTH })); + plex->v = C_(X8616_VariableShift, x8616_bit_field_extract(plex->opcode, (X8616_BitField){ plan->v_shift, X8616_OPCODE_BIT_WIDTH })); + plex->z = C_(X8616_Repeat, x8616_bit_field_extract(plex->opcode, (X8616_BitField){ plan->z_shift, X8616_OPCODE_BIT_WIDTH })); + plex->reg_opcode.r16 = C_(X8616_Reg16, x8616_bit_field_extract(plex->opcode, (X8616_BitField){ plan->reg_shift, X8616_OPCODE_REG_REG_WIDTH })); + plex->sr_opcode = C_(X8616_Segment, x8616_bit_field_extract(plex->opcode, (X8616_BitField){ plan->sr_shift, X8616_OPCODE_SR_WIDTH })); plex->width = plan->width; if (plex->width == x8616_width_dynamic && (plan->flags & x8616_plan_has_w)) @@ -277,16 +280,15 @@ x8616_decode_one_plex(X8616_DecodePlex* plex) plex->mod = C_(X8616_Mod, x8616_modrm_mod(plex->mod_rm)); plex->reg.r16 = C_(X8616_Reg16, x8616_modrm_reg(plex->mod_rm)); plex->rm = C_(X8616_EA, x8616_modrm_rm(plex->mod_rm)); - plex->sr_modrm = C_(X8616_Segment, x8616_modrm_sr(plex->mod_rm)); + plex->sr_modrm = C_(X8616_Segment, x8616_modrm_sr(plex->mod_rm)); plex->body_at += 1; } if (plan->flags & x8616_plan_has_alu) { - if (plan->flags & x8616_plan_alu_modrm) plex->alu = C_(X8616_ALU, plex->reg.r16); - else plex->alu = C_(X8616_ALU, (plex->opcode >> plan->alu_shift) & x8616_field_mask(0, X8616_OPCODE_ALU_TTT_WIDTH)); + plex->alu = C_(X8616_ALU, x8616_bit_field_extract(plex->opcode, (X8616_BitField){ plan->alu_shift, X8616_OPCODE_ALU_TTT_WIDTH })); } if (plan->flags & x8616_plan_has_cc) { - plex->cc = C_(X8616_Condition, (plex->opcode >> plan->cc_shift) & x8616_field_mask(0, X8616_OPCODE_CC_WIDTH)); + plex->cc = C_(X8616_Condition, x8616_bit_field_extract(plex->opcode, (X8616_BitField){ plan->cc_shift, X8616_OPCODE_CC_WIDTH })); } plex->displacement_at = plex->body_at; @@ -378,7 +380,7 @@ x8616_decode_one_plex(X8616_DecodePlex* plex) source[x8616_operand_imm8].flags = x8616_decoded_operand_immediate; source[x8616_operand_imm8].width = x8616_width_byte; - source[x8616_operand_imm8].immediate = C_(U1, plex->payload_u16); + source[x8616_operand_imm8].immediate = u1_(plex->payload_u16); source[x8616_operand_imm8].immediate_bytes = 1; source[x8616_operand_imm16].flags = x8616_decoded_operand_immediate; @@ -392,12 +394,12 @@ x8616_decode_one_plex(X8616_DecodePlex* plex) source[x8616_operand_rel8].flags = x8616_decoded_operand_relative; source[x8616_operand_rel8].width = x8616_width_byte; - source[x8616_operand_rel8].displacement = C_(S2, C_(S1, plex->payload_u16)); + source[x8616_operand_rel8].displacement = C_(S2, s1_(plex->payload_u16)); source[x8616_operand_rel8].displacement_bytes = 1; source[x8616_operand_rel16].flags = x8616_decoded_operand_relative; source[x8616_operand_rel16].width = x8616_width_word; - source[x8616_operand_rel16].displacement = C_(S2, plex->payload_u16); + source[x8616_operand_rel16].displacement = s2_(plex->payload_u16); source[x8616_operand_rel16].displacement_bytes = 2; source[x8616_operand_far_ptr].flags = x8616_decoded_operand_far_ptr; @@ -430,6 +432,23 @@ x8616_decode_one_plex(X8616_DecodePlex* plex) plex->instruction.cc = plex->cc; plex->instruction.op = x8616_op_from_cc[plex->cc]; } + if (plan->digit_kind != x8616_digit_none) { + U1 digit = u1_(plex->reg.r16); + if (plan->digit_kind == x8616_digit_alu) { + plex->alu = C_(X8616_ALU, digit); + plex->instruction.alu = plex->alu; + plex->instruction.op = x8616_op_from_alu[digit]; + } + else if (plan->digit_kind == x8616_digit_shift) plex->instruction.op = x8616_op_from_shift[digit]; + else if (plan->digit_kind == x8616_digit_g3) plex->instruction.op = x8616_op_from_g3[digit]; + else if (plan->digit_kind == x8616_digit_ff) plex->instruction.op = x8616_op_from_ff[digit]; + else if (plan->digit_kind == x8616_digit_incdec) plex->instruction.op = x8616_op_from_incdec[digit]; + } + if (plan->flags & x8616_plan_has_pair) { + U1 bit = x8616_bit_field_extract(plex->opcode, (X8616_BitField){ plan->pair_shift, X8616_OPCODE_PAIR_WIDTH }); + if (plan->pair_kind == x8616_pair_incdec) plex->instruction.op = x8616_op_from_incdec[bit]; + if (plan->pair_kind == x8616_pair_pushpop) plex->instruction.op = x8616_op_from_pushpop[bit]; + } plex->instruction.flags = plan->encoding_flags; plex->instruction.decode_flags = (plex->encoding_invalid ? x8616_decode_invalid : 0) | (plex->classification_truncated ? x8616_decode_truncated : 0); plex->instruction.width = plex->width; diff --git a/code/8086/decoder.h b/code/8086/decoder.h index 00bd915..5d2f956 100644 --- a/code/8086/decoder.h +++ b/code/8086/decoder.h @@ -93,7 +93,7 @@ typedef Enum_(U2, X8616_DecodePlanFlags) { Bit_(x8616_plan_is_prefix, 11), Bit_(x8616_plan_has_alu, 12), Bit_(x8616_plan_has_cc, 13), - Bit_(x8616_plan_alu_modrm, 14), + Bit_(x8616_plan_has_pair, 14), }; typedef Enum_(U1, X8616_DecodePayload) { @@ -140,6 +140,9 @@ typedef Struct_(X8616_DecodePlan) { U1 alu_shift; U1 cc_shift; + U1 pair_shift; + X8616_DigitKind digit_kind; + X8616_PairKind pair_kind; }; enum { diff --git a/code/8086/decoder_table_generator.meta.c b/code/8086/decoder_table_generator.meta.c index 3f8fb5f..8a25527 100644 --- a/code/8086/decoder_table_generator.meta.c +++ b/code/8086/decoder_table_generator.meta.c @@ -97,13 +97,11 @@ x8616_decode_gen_plan(X8616_Encoding_R encoding, U4 encoding_idx, X8616_InfoList if (encoding->fields.z.width) { plan.flags |= x8616_plan_has_z; plan.z_shift = encoding->fields.z.shift; } if (encoding->fields.reg.width) { plan.flags |= x8616_plan_has_reg; plan.reg_shift = encoding->fields.reg.shift; } if (encoding->fields.sr.width) { plan.flags |= x8616_plan_has_sr; plan.sr_shift = encoding->fields.sr.shift; } - if (encoding->fields.alu.width) { - plan.flags |= x8616_plan_has_alu; - plan.alu_shift = encoding->fields.alu.shift; - if ((plan.flags & x8616_plan_has_modrm) && encoding->fields.d.width == 0) - plan.flags |= x8616_plan_alu_modrm; - } - if (encoding->fields.cc.width) { plan.flags |= x8616_plan_has_cc; plan.cc_shift = encoding->fields.cc.shift; } + if (encoding->fields.alu.width) { plan.flags |= x8616_plan_has_alu; plan.alu_shift = encoding->fields.alu.shift; } + if (encoding->fields.cc.width) { plan.flags |= x8616_plan_has_cc; plan.cc_shift = encoding->fields.cc.shift; } + if (encoding->fields.pair.width){ plan.flags |= x8616_plan_has_pair; plan.pair_shift = encoding->fields.pair.shift; } + plan.digit_kind = encoding->digit_kind; + plan.pair_kind = encoding->pair_kind; if (x8616_decode_gen_operand_uses_rm(encoding->operands[0]) || x8616_decode_gen_operand_uses_rm(encoding->operands[1])) plan.flags |= x8616_plan_uses_rm; @@ -336,7 +334,7 @@ x8616_decode_gen_emit_plan(Str8Gen_R out, X8616_DecodePlan_R plan) { defer_rewin , , , , , , , {, }, {, }, - , , + , , , , , },\n ); KTL_Slot_Str8 tbl[] = { @@ -362,6 +360,9 @@ x8616_decode_gen_emit_plan(Str8Gen_R out, X8616_DecodePlan_R plan) { defer_rewin entry("post_opcode.mask", hex_u1(plan->post_opcode.mask)), entry("alu_shift", dec(plan->alu_shift)), entry("cc_shift", dec(plan->cc_shift)), + entry("pair_shift", dec(plan->pair_shift)), + entry("digit_kind", dec(plan->digit_kind)), + entry("pair_kind", dec(plan->pair_kind)), }; str8gen_append_fmt(out, template, ktl_str8_from_arr(tbl)); }} diff --git a/code/8086/encoder.h b/code/8086/encoder.h index 2079408..6e3f8b2 100644 --- a/code/8086/encoder.h +++ b/code/8086/encoder.h @@ -16,6 +16,7 @@ typedef Struct_(X8616_OpcodeFields) { X8616_BitField sr; X8616_BitField alu; X8616_BitField cc; + X8616_BitField pair; }; #define x8616_field_mask(shift, width) u1_(((1u << (width)) - 1u) << (shift)) @@ -148,6 +149,21 @@ typedef Enum_(U1, X8616_EncodingFlags) { x8616_encoding_prefix = 0b00000010, }; +typedef Enum_(U1, X8616_DigitKind) { + x8616_digit_none = 0x0, + x8616_digit_alu = 0x1, + x8616_digit_shift = 0x2, + x8616_digit_g3 = 0x3, + x8616_digit_ff = 0x4, + x8616_digit_incdec = 0x5, +}; + +typedef Enum_(U1, X8616_PairKind) { + x8616_pair_none = 0x0, + x8616_pair_incdec = 0x1, + x8616_pair_pushpop = 0x2, +}; + /* mod_rm (Optional): Fixed constraint on the ModR/M byte. post_opcode (Optional): Fixed byte immediately following the opcode. fields: Variable fields carried by the opcode byte. width == 0: field is absent. @@ -163,6 +179,8 @@ typedef Struct_(X8616_Encoding) { X8616_Operand operands[2]; X8616_WidthMode width; X8616_EncodingFlags flags; + X8616_DigitKind digit_kind; + X8616_PairKind pair_kind; X8616_Op op; }; @@ -297,6 +315,49 @@ typedef Enum_(U1, X8616_Shift) { x8616_sar = 0b111, }; +RO_ global X8616_Op x8616_op_from_shift[] = { + [x8616_rol] = x8616_op_rol, + [x8616_ror] = x8616_op_ror, + [x8616_rcl] = x8616_op_rcl, + [x8616_rcr] = x8616_op_rcr, + [x8616_shl] = x8616_op_shl, + [x8616_shr] = x8616_op_shr, + [0b110] = x8616_op_invalid, + [x8616_sar] = x8616_op_sar, +}; + +RO_ global X8616_Op x8616_op_from_g3[] = { + [x8616_g3_test] = x8616_op_test, + [0b001] = x8616_op_invalid, + [x8616_g3_not] = x8616_op_not, + [x8616_g3_neg] = x8616_op_neg, + [x8616_g3_mul] = x8616_op_mul, + [x8616_g3_imul] = x8616_op_imul, + [x8616_g3_div] = x8616_op_div, + [x8616_g3_idiv] = x8616_op_idiv, +}; + +RO_ global X8616_Op x8616_op_from_ff[] = { + [0b000] = x8616_op_invalid, + [0b001] = x8616_op_invalid, + [x8616_ff_call_near] = x8616_op_call, + [x8616_ff_call_far] = x8616_op_call, + [x8616_ff_jmp_near] = x8616_op_jmp, + [x8616_ff_jmp_far] = x8616_op_jmp, + [x8616_ff_push] = x8616_op_push, + [0b111] = x8616_op_invalid, +}; + +RO_ global X8616_Op x8616_op_from_incdec[] = { + [x8616_inc] = x8616_op_inc, + [x8616_dec] = x8616_op_dec, +}; + +RO_ global X8616_Op x8616_op_from_pushpop[] = { + [0] = x8616_op_push, + [1] = x8616_op_pop, +}; + typedef Enum_(U1, X8616_Condition) { x8616_cc_o = 0b0000, x8616_cc_no = 0b0001, @@ -431,7 +492,8 @@ typedef Enum_(U1, X8616_Opcode) { }; enum { - X8616_OPCODE_MASK = x8616_field_mask(0, 8), + X8616_OPCODE_BIT_WIDTH = 1, + X8616_OPCODE_MASK = x8616_field_mask(0, 8), X8616_POST_OPCODE_AAM_AAD = 0b00001010, @@ -545,6 +607,11 @@ enum { X8616_OPCODE_ALU_BIT2_SHIFT = 2, X8616_OPCODE_ALU_ACC_FORM = 0b10, X8616_OPCODE_ALU_ACC_FORM_SHIFT = 1, + + X8616_OPCODE_PAIR_SHIFT = 3, + X8616_OPCODE_PAIR_WIDTH = 1, + X8616_OPCODE_IO_CLASS = 0b1110, + X8616_OPCODE_IO_CLASS_SHIFT = 4, }; // ============================================================================ @@ -616,6 +683,9 @@ FI_ U1 x8616_modrm_sr (U1 modrm) { return ( #define x8616_enc_alu_op(alu) x8616_enc_alu_ttt(alu) #define x8616_enc_alu_rm_r(ttt,d,w) C_(U1, x8616_enc_alu_class() | x8616_enc_alu_ttt(ttt) | (0 << X8616_OPCODE_ALU_BIT2_SHIFT) | x8616_enc_d(d) | x8616_enc_width(w)) #define x8616_enc_alu_acc_i(ttt,w) C_(U1, x8616_enc_alu_class() | x8616_enc_alu_ttt(ttt) | (X8616_OPCODE_ALU_ACC_FORM << X8616_OPCODE_ALU_ACC_FORM_SHIFT) | x8616_enc_width(w)) +#define x8616_enc_io_stem(dx, out) ((X8616_OPCODE_IO_CLASS << 3) | ((dx) << 2) | 0b10 | (out)) +#define x8616_enc_io(dx, out, w) C_(U1, (x8616_enc_io_stem(dx, out) << X8616_OPCODE_W_PREFIX_SHIFT) | x8616_enc_width(w)) +#define x8616_enc_pair(bit) ((bit) << X8616_OPCODE_PAIR_SHIFT) // Scalar / generic packets diff --git a/code/8086/encoder_table.h b/code/8086/encoder_table.h index 01a564f..7730ecc 100644 --- a/code/8086/encoder_table.h +++ b/code/8086/encoder_table.h @@ -105,17 +105,19 @@ RO_ global X8616_Encoding x8616_encodings[] = .op = x8616_op_push, }, - /* PUSH reg16: 01010 reg */ { + /* PUSH/POP reg16: 0101 pair reg */ { .opcode = { - .bits = x8616_opcode_push_reg << X8616_OPCODE_REG_PREFIX_SHIFT, - .mask = X8616_OPCODE_REG_PREFIX_MASK, + .bits = 0b0101 << 4, + .mask = x8616_stem_mask(4), }, .fields = { - .reg = { X8616_OPCODE_REG_REG_SHIFT, X8616_OPCODE_REG_REG_WIDTH }, + .pair = { X8616_OPCODE_PAIR_SHIFT, X8616_OPCODE_PAIR_WIDTH }, + .reg = { X8616_OPCODE_REG_REG_SHIFT, X8616_OPCODE_REG_REG_WIDTH }, }, - .operands = { x8616_operand_reg_opcode }, - .width = x8616_width_word, - .op = x8616_op_push, + .operands = { x8616_operand_reg_opcode }, + .width = x8616_width_word, + .pair_kind = x8616_pair_pushpop, + .op = x8616_op_invalid, }, /* PUSH segment: 000 sr 110 */ { @@ -145,18 +147,7 @@ RO_ global X8616_Encoding x8616_encodings[] = .op = x8616_op_pop, }, - /* POP reg16: 01011 reg */ { - .opcode = { - .bits = x8616_opcode_pop_reg << X8616_OPCODE_REG_PREFIX_SHIFT, - .mask = X8616_OPCODE_REG_PREFIX_MASK, - }, - .fields = { - .reg = { X8616_OPCODE_REG_REG_SHIFT, X8616_OPCODE_REG_REG_WIDTH }, - }, - .operands = { x8616_operand_reg_opcode }, - .width = x8616_width_word, - .op = x8616_op_pop, - }, + /* POP segment: 000 sr 111 */ { .opcode = { @@ -198,9 +189,9 @@ RO_ global X8616_Encoding x8616_encodings[] = // I/O / address / flags--------------------------------------------------- - /* IN acc,imm8: 1110010 w */ { + /* IN acc,imm8: 1110 0 10 w */ { .opcode = { - .bits = x8616_opcode_in_i << X8616_OPCODE_W_PREFIX_SHIFT, + .bits = x8616_enc_io_stem(0, 0) << X8616_OPCODE_W_PREFIX_SHIFT, .mask = X8616_OPCODE_W_PREFIX_MASK, }, .fields = { @@ -210,9 +201,9 @@ RO_ global X8616_Encoding x8616_encodings[] = .op = x8616_op_in, }, - /* IN acc,DX: 1110110 w */ { + /* IN acc,DX: 1110 1 10 w */ { .opcode = { - .bits = x8616_opcode_in_dx << X8616_OPCODE_W_PREFIX_SHIFT, + .bits = x8616_enc_io_stem(1, 0) << X8616_OPCODE_W_PREFIX_SHIFT, .mask = X8616_OPCODE_W_PREFIX_MASK, }, .fields = { @@ -222,9 +213,9 @@ RO_ global X8616_Encoding x8616_encodings[] = .op = x8616_op_in, }, - /* OUT imm8,acc: 1110011 w */ { + /* OUT imm8,acc: 1110 0 11 w */ { .opcode = { - .bits = x8616_opcode_out_i << X8616_OPCODE_W_PREFIX_SHIFT, + .bits = x8616_enc_io_stem(0, 1) << X8616_OPCODE_W_PREFIX_SHIFT, .mask = X8616_OPCODE_W_PREFIX_MASK, }, .fields = { @@ -234,9 +225,9 @@ RO_ global X8616_Encoding x8616_encodings[] = .op = x8616_op_out, }, - /* OUT DX,acc: 1110111 w */ { + /* OUT DX,acc: 1110 1 11 w */ { .opcode = { - .bits = x8616_opcode_out_dx << X8616_OPCODE_W_PREFIX_SHIFT, + .bits = x8616_enc_io_stem(1, 1) << X8616_OPCODE_W_PREFIX_SHIFT, .mask = X8616_OPCODE_W_PREFIX_MASK, }, .fields = { @@ -355,12 +346,12 @@ RO_ global X8616_Encoding x8616_encodings[] = .mask = X8616_OPCODE_SW_PREFIX_MASK, }, .fields = { - .alu = { X8616_MODRM_REG_SHIFT, X8616_MODRM_REG_WIDTH }, - .s = { X8616_OPCODE_SW_S_SHIFT, 1 }, - .w = { X8616_OPCODE_SW_W_SHIFT, 1 }, + .s = { X8616_OPCODE_SW_S_SHIFT, 1 }, + .w = { X8616_OPCODE_SW_W_SHIFT, 1 }, }, - .operands = { x8616_operand_rm, x8616_operand_imm }, - .op = x8616_op_invalid, + .operands = { x8616_operand_rm, x8616_operand_imm }, + .digit_kind = x8616_digit_alu, + .op = x8616_op_invalid, }, @@ -382,17 +373,19 @@ RO_ global X8616_Encoding x8616_encodings[] = .op = x8616_op_inc, }, - /* INC reg16: 01000 reg */ { + /* INC/DEC reg16: 0100 pair reg */ { .opcode = { - .bits = x8616_opcode_inc_reg << X8616_OPCODE_REG_PREFIX_SHIFT, - .mask = X8616_OPCODE_REG_PREFIX_MASK, + .bits = 0b0100 << 4, + .mask = x8616_stem_mask(4), }, .fields = { - .reg = { X8616_OPCODE_REG_REG_SHIFT, X8616_OPCODE_REG_REG_WIDTH }, + .pair = { X8616_OPCODE_PAIR_SHIFT, X8616_OPCODE_PAIR_WIDTH }, + .reg = { X8616_OPCODE_REG_REG_SHIFT, X8616_OPCODE_REG_REG_WIDTH }, }, - .operands = { x8616_operand_reg_opcode }, - .width = x8616_width_word, - .op = x8616_op_inc, + .operands = { x8616_operand_reg_opcode }, + .width = x8616_width_word, + .pair_kind = x8616_pair_incdec, + .op = x8616_op_invalid, }, /* AAA */ { @@ -427,18 +420,7 @@ RO_ global X8616_Encoding x8616_encodings[] = .op = x8616_op_dec, }, - /* DEC reg16: 01001 reg */ { - .opcode = { - .bits = x8616_opcode_dec_reg << X8616_OPCODE_REG_PREFIX_SHIFT, - .mask = X8616_OPCODE_REG_PREFIX_MASK, - }, - .fields = { - .reg = { X8616_OPCODE_REG_REG_SHIFT, X8616_OPCODE_REG_REG_WIDTH }, - }, - .operands = { x8616_operand_reg_opcode }, - .width = x8616_width_word, - .op = x8616_op_dec, - }, + /* NEG r/m: 1111011 w /neg */ { .opcode = { @@ -594,124 +576,20 @@ RO_ global X8616_Encoding x8616_encodings[] = // Shift / rotate / TEST--------------------------------------------------- - /* ROL r/m,1|CL: 110100 v w */ { + /* SHIFT/ROTATE r/m,1|CL: 110100 v w /ttt */ { .opcode = { .bits = x8616_opcode_shift_rm << X8616_OPCODE_VW_PREFIX_SHIFT, .mask = X8616_OPCODE_VW_PREFIX_MASK, }, - .mod_rm = { - .bits = x8616_rol << X8616_MODRM_REG_SHIFT, - .mask = X8616_MODRM_REG_MASK, - }, .fields = { .v = { X8616_OPCODE_VW_V_SHIFT, 1 }, .w = { X8616_OPCODE_VW_W_SHIFT, 1 }, }, - .operands = { x8616_operand_rm, x8616_operand_shift_count }, - .op = x8616_op_rol, + .operands = { x8616_operand_rm, x8616_operand_shift_count }, + .digit_kind = x8616_digit_shift, + .op = x8616_op_invalid, }, - /* ROR r/m,1|CL: 110100 v w */ { - .opcode = { - .bits = x8616_opcode_shift_rm << X8616_OPCODE_VW_PREFIX_SHIFT, - .mask = X8616_OPCODE_VW_PREFIX_MASK, - }, - .mod_rm = { - .bits = x8616_ror << X8616_MODRM_REG_SHIFT, - .mask = X8616_MODRM_REG_MASK, - }, - .fields = { - .v = { X8616_OPCODE_VW_V_SHIFT, 1 }, - .w = { X8616_OPCODE_VW_W_SHIFT, 1 }, - }, - .operands = { x8616_operand_rm, x8616_operand_shift_count }, - .op = x8616_op_ror, - }, - - /* RCL r/m,1|CL: 110100 v w */ { - .opcode = { - .bits = x8616_opcode_shift_rm << X8616_OPCODE_VW_PREFIX_SHIFT, - .mask = X8616_OPCODE_VW_PREFIX_MASK, - }, - .mod_rm = { - .bits = x8616_rcl << X8616_MODRM_REG_SHIFT, - .mask = X8616_MODRM_REG_MASK, - }, - .fields = { - .v = { X8616_OPCODE_VW_V_SHIFT, 1 }, - .w = { X8616_OPCODE_VW_W_SHIFT, 1 }, - }, - .operands = { x8616_operand_rm, x8616_operand_shift_count }, - .op = x8616_op_rcl, - }, - - /* RCR r/m,1|CL: 110100 v w */ { - .opcode = { - .bits = x8616_opcode_shift_rm << X8616_OPCODE_VW_PREFIX_SHIFT, - .mask = X8616_OPCODE_VW_PREFIX_MASK, - }, - .mod_rm = { - .bits = x8616_rcr << X8616_MODRM_REG_SHIFT, - .mask = X8616_MODRM_REG_MASK, - }, - .fields = { - .v = { X8616_OPCODE_VW_V_SHIFT, 1 }, - .w = { X8616_OPCODE_VW_W_SHIFT, 1 }, - }, - .operands = { x8616_operand_rm, x8616_operand_shift_count }, - .op = x8616_op_rcr, - }, - - /* SHL r/m,1|CL: 110100 v w */ { - .opcode = { - .bits = x8616_opcode_shift_rm << X8616_OPCODE_VW_PREFIX_SHIFT, - .mask = X8616_OPCODE_VW_PREFIX_MASK, - }, - .mod_rm = { - .bits = x8616_shl << X8616_MODRM_REG_SHIFT, - .mask = X8616_MODRM_REG_MASK, - }, - .fields = { - .v = { X8616_OPCODE_VW_V_SHIFT, 1 }, - .w = { X8616_OPCODE_VW_W_SHIFT, 1 }, - }, - .operands = { x8616_operand_rm, x8616_operand_shift_count }, - .op = x8616_op_shl, - }, - - /* SHR r/m,1|CL: 110100 v w */ { - .opcode = { - .bits = x8616_opcode_shift_rm << X8616_OPCODE_VW_PREFIX_SHIFT, - .mask = X8616_OPCODE_VW_PREFIX_MASK, - }, - .mod_rm = { - .bits = x8616_shr << X8616_MODRM_REG_SHIFT, - .mask = X8616_MODRM_REG_MASK, - }, - .fields = { - .v = { X8616_OPCODE_VW_V_SHIFT, 1 }, - .w = { X8616_OPCODE_VW_W_SHIFT, 1 }, - }, - .operands = { x8616_operand_rm, x8616_operand_shift_count }, - .op = x8616_op_shr, - }, - - /* SAR r/m,1|CL: 110100 v w */ { - .opcode = { - .bits = x8616_opcode_shift_rm << X8616_OPCODE_VW_PREFIX_SHIFT, - .mask = X8616_OPCODE_VW_PREFIX_MASK, - }, - .mod_rm = { - .bits = x8616_sar << X8616_MODRM_REG_SHIFT, - .mask = X8616_MODRM_REG_MASK, - }, - .fields = { - .v = { X8616_OPCODE_VW_V_SHIFT, 1 }, - .w = { X8616_OPCODE_VW_W_SHIFT, 1 }, - }, - .operands = { x8616_operand_rm, x8616_operand_shift_count }, - .op = x8616_op_sar, - }, /* TEST r/m,reg: 1000010 w */ { .opcode = { diff --git a/code/8086/gen/decoder_table.h b/code/8086/gen/decoder_table.h index eb4f8e4..6102fe9 100644 --- a/code/8086/gen/decoder_table.h +++ b/code/8086/gen/decoder_table.h @@ -4,259 +4,187 @@ # include "dsl.h" #endif -RO_ global X8616_DecodePlan x8616_decode_plans[96] = +RO_ global X8616_DecodePlan x8616_decode_plans[88] = { - { 0x0000, 0x00, 0x00, 0x00, {0x00, 0x00}, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 0, 0, }, - { 0x041a, 0x02, 0x00, 0x00, {0x01, 0x02}, 2, 0, 0, 1, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 0, 0, }, - { 0x0412, 0x02, 0x00, 0x00, {0x01, 0x07}, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x38}, {0x00, 0x00}, 0, 0, }, - { 0x0110, 0x02, 0x00, 0x00, {0x03, 0x07}, 2, 1, 0, 0, 3, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 0, 0, }, - { 0x0018, 0x02, 0x00, 0x00, {0x06, 0x0a}, 2, 4, 0, 1, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 0, 0, }, - { 0x040a, 0x02, 0x00, 0x02, {0x01, 0x04}, 2, 0, 0, 1, 0, 0, 0, 0, 0, 0, {0x00, 0x20}, {0x00, 0x00}, 0, 0, }, - { 0x0402, 0x0b, 0x00, 0x02, {0x01, 0x00}, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0x30, 0x38}, {0x00, 0x00}, 0, 0, }, - { 0x0100, 0x0b, 0x00, 0x02, {0x03, 0x00}, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 0, 0, }, - { 0x0200, 0x0b, 0x00, 0x02, {0x05, 0x00}, 1, 0, 0, 0, 0, 0, 0, 0, 0, 3, {0x00, 0x00}, {0x00, 0x00}, 0, 0, }, - { 0x0402, 0x0c, 0x00, 0x02, {0x01, 0x00}, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x38}, {0x00, 0x00}, 0, 0, }, - { 0x0100, 0x0c, 0x00, 0x02, {0x03, 0x00}, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 0, 0, }, - { 0x0200, 0x0c, 0x00, 0x02, {0x05, 0x00}, 1, 0, 0, 0, 0, 0, 0, 0, 0, 3, {0x00, 0x00}, {0x00, 0x00}, 0, 0, }, - { 0x0412, 0x0d, 0x00, 0x00, {0x02, 0x01}, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 0, 0, }, - { 0x0100, 0x0d, 0x00, 0x02, {0x06, 0x03}, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 0, 0, }, - { 0x0010, 0x0e, 0x00, 0x00, {0x06, 0x08}, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 0, 0, }, - { 0x0010, 0x0e, 0x00, 0x00, {0x06, 0x0e}, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 0, 0, }, - { 0x0010, 0x0f, 0x00, 0x00, {0x08, 0x06}, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 0, 0, }, - { 0x0010, 0x0f, 0x00, 0x00, {0x0e, 0x06}, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 0, 0, }, - { 0x0000, 0x10, 0x00, 0x00, {0x00, 0x00}, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 0, 0, }, - { 0x0402, 0x11, 0x00, 0x02, {0x02, 0x01}, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 0, 0, }, - { 0x0402, 0x12, 0x00, 0x02, {0x02, 0x01}, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 0, 0, }, - { 0x0402, 0x13, 0x00, 0x02, {0x02, 0x01}, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 0, 0, }, - { 0x0000, 0x14, 0x00, 0x00, {0x00, 0x00}, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 0, 0, }, - { 0x0000, 0x15, 0x00, 0x00, {0x00, 0x00}, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 0, 0, }, - { 0x0000, 0x16, 0x00, 0x00, {0x00, 0x00}, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 0, 0, }, - { 0x0000, 0x17, 0x00, 0x00, {0x00, 0x00}, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 0, 0, }, - { 0x141a, 0x00, 0x00, 0x00, {0x01, 0x02}, 2, 0, 0, 1, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 3, 0, }, - { 0x1010, 0x00, 0x00, 0x00, {0x06, 0x07}, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 3, 0, }, - { 0x5432, 0x00, 0x00, 0x00, {0x01, 0x07}, 2, 1, 0, 0, 0, 1, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 3, 0, }, - { 0x0412, 0x18, 0x00, 0x00, {0x01, 0x00}, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x38}, {0x00, 0x00}, 0, 0, }, - { 0x0100, 0x18, 0x00, 0x02, {0x03, 0x00}, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 0, 0, }, - { 0x0000, 0x19, 0x00, 0x00, {0x00, 0x00}, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 0, 0, }, - { 0x0000, 0x1a, 0x00, 0x00, {0x00, 0x00}, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 0, 0, }, - { 0x0412, 0x1b, 0x00, 0x00, {0x01, 0x00}, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0x08, 0x38}, {0x00, 0x00}, 0, 0, }, - { 0x0100, 0x1b, 0x00, 0x02, {0x03, 0x00}, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 0, 0, }, - { 0x0412, 0x1c, 0x00, 0x00, {0x01, 0x00}, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0x18, 0x38}, {0x00, 0x00}, 0, 0, }, - { 0x0412, 0x1f, 0x00, 0x00, {0x01, 0x00}, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0x20, 0x38}, {0x00, 0x00}, 0, 0, }, - { 0x0412, 0x20, 0x00, 0x00, {0x01, 0x00}, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0x28, 0x38}, {0x00, 0x00}, 0, 0, }, - { 0x0412, 0x22, 0x00, 0x00, {0x01, 0x00}, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0x30, 0x38}, {0x00, 0x00}, 0, 0, }, - { 0x0412, 0x23, 0x00, 0x00, {0x01, 0x00}, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0x38, 0x38}, {0x00, 0x00}, 0, 0, }, - { 0x0412, 0x27, 0x00, 0x00, {0x01, 0x00}, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0x10, 0x38}, {0x00, 0x00}, 0, 0, }, - { 0x0000, 0x1d, 0x00, 0x00, {0x00, 0x00}, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 0, 0, }, - { 0x0000, 0x1e, 0x00, 0x00, {0x00, 0x00}, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 0, 0, }, - { 0x0004, 0x21, 0x00, 0x00, {0x00, 0x00}, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x0a, 0xff}, 0, 0, }, - { 0x0004, 0x24, 0x00, 0x00, {0x00, 0x00}, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x0a, 0xff}, 0, 0, }, - { 0x0000, 0x25, 0x00, 0x00, {0x00, 0x00}, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 0, 0, }, - { 0x0000, 0x26, 0x00, 0x00, {0x00, 0x00}, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 0, 0, }, - { 0x0452, 0x2b, 0x00, 0x00, {0x01, 0x0f}, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, {0x00, 0x38}, {0x00, 0x00}, 0, 0, }, - { 0x0452, 0x2c, 0x00, 0x00, {0x01, 0x0f}, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, {0x08, 0x38}, {0x00, 0x00}, 0, 0, }, - { 0x0452, 0x2d, 0x00, 0x00, {0x01, 0x0f}, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, {0x10, 0x38}, {0x00, 0x00}, 0, 0, }, - { 0x0452, 0x2e, 0x00, 0x00, {0x01, 0x0f}, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, {0x18, 0x38}, {0x00, 0x00}, 0, 0, }, - { 0x0452, 0x28, 0x00, 0x00, {0x01, 0x0f}, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, {0x20, 0x38}, {0x00, 0x00}, 0, 0, }, - { 0x0452, 0x29, 0x00, 0x00, {0x01, 0x0f}, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, {0x28, 0x38}, {0x00, 0x00}, 0, 0, }, - { 0x0452, 0x2a, 0x00, 0x00, {0x01, 0x0f}, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, {0x38, 0x38}, {0x00, 0x00}, 0, 0, }, - { 0x0412, 0x2f, 0x00, 0x00, {0x01, 0x02}, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 0, 0, }, - { 0x0412, 0x2f, 0x00, 0x00, {0x01, 0x07}, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x38}, {0x00, 0x00}, 0, 0, }, - { 0x0010, 0x2f, 0x00, 0x00, {0x06, 0x07}, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 0, 0, }, - { 0x0880, 0x30, 0x02, 0x00, {0x00, 0x00}, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 0, 0, }, - { 0x0010, 0x31, 0x00, 0x00, {0x00, 0x00}, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 0, 0, }, - { 0x0010, 0x32, 0x00, 0x00, {0x00, 0x00}, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 0, 0, }, - { 0x0010, 0x33, 0x00, 0x00, {0x00, 0x00}, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 0, 0, }, - { 0x0010, 0x34, 0x00, 0x00, {0x00, 0x00}, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 0, 0, }, - { 0x0010, 0x35, 0x00, 0x00, {0x00, 0x00}, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 0, 0, }, - { 0x0800, 0x5b, 0x02, 0x00, {0x00, 0x00}, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 0, 0, }, - { 0x0a00, 0x5c, 0x02, 0x00, {0x00, 0x00}, 0, 0, 3, 0, 0, 0, 0, 0, 0, 3, {0x00, 0x00}, {0x00, 0x00}, 0, 0, }, - { 0x0000, 0x36, 0x00, 0x00, {0x0c, 0x00}, 1, 6, 0, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 0, 0, }, - { 0x0402, 0x36, 0x00, 0x02, {0x01, 0x00}, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0x10, 0x38}, {0x00, 0x00}, 0, 0, }, - { 0x0000, 0x36, 0x01, 0x00, {0x0d, 0x00}, 1, 7, 0, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 0, 0, }, - { 0x0402, 0x36, 0x01, 0x02, {0x01, 0x00}, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0x18, 0x38}, {0x00, 0x00}, 0, 0, }, - { 0x0000, 0x37, 0x00, 0x00, {0x0c, 0x00}, 1, 6, 0, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 0, 0, }, - { 0x0000, 0x37, 0x00, 0x00, {0x0b, 0x00}, 1, 5, 0, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 0, 0, }, - { 0x0402, 0x37, 0x00, 0x02, {0x01, 0x00}, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0x20, 0x38}, {0x00, 0x00}, 0, 0, }, - { 0x0000, 0x37, 0x01, 0x00, {0x0d, 0x00}, 1, 7, 0, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 0, 0, }, - { 0x0402, 0x37, 0x01, 0x02, {0x01, 0x00}, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0x28, 0x38}, {0x00, 0x00}, 0, 0, }, - { 0x0000, 0x38, 0x00, 0x00, {0x00, 0x00}, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 0, 0, }, - { 0x0000, 0x38, 0x00, 0x00, {0x09, 0x00}, 1, 3, 0, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 0, 0, }, - { 0x0000, 0x39, 0x00, 0x00, {0x00, 0x00}, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 0, 0, }, - { 0x0000, 0x39, 0x00, 0x00, {0x09, 0x00}, 1, 3, 0, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 0, 0, }, - { 0x2000, 0x00, 0x00, 0x00, {0x0b, 0x00}, 1, 5, 0, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 0, 0, }, - { 0x0000, 0x4c, 0x00, 0x00, {0x0b, 0x00}, 1, 5, 0, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 0, 0, }, - { 0x0000, 0x4b, 0x00, 0x00, {0x0b, 0x00}, 1, 5, 0, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 0, 0, }, - { 0x0000, 0x4a, 0x00, 0x00, {0x0b, 0x00}, 1, 5, 0, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 0, 0, }, - { 0x0000, 0x4d, 0x00, 0x00, {0x0b, 0x00}, 1, 5, 0, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 0, 0, }, - { 0x0000, 0x4e, 0x00, 0x00, {0x08, 0x00}, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 0, 0, }, - { 0x0000, 0x4f, 0x00, 0x00, {0x00, 0x00}, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 0, 0, }, - { 0x0000, 0x50, 0x00, 0x00, {0x00, 0x00}, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 0, 0, }, - { 0x0000, 0x51, 0x00, 0x00, {0x00, 0x00}, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 0, 0, }, - { 0x0000, 0x52, 0x00, 0x00, {0x00, 0x00}, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 0, 0, }, - { 0x0000, 0x53, 0x00, 0x00, {0x00, 0x00}, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 0, 0, }, - { 0x0000, 0x54, 0x00, 0x00, {0x00, 0x00}, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 0, 0, }, - { 0x0000, 0x55, 0x00, 0x00, {0x00, 0x00}, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 0, 0, }, - { 0x0000, 0x56, 0x00, 0x00, {0x00, 0x00}, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 0, 0, }, - { 0x0000, 0x57, 0x00, 0x00, {0x00, 0x00}, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 0, 0, }, - { 0x0000, 0x58, 0x00, 0x00, {0x00, 0x00}, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 0, 0, }, - { 0x0000, 0x59, 0x00, 0x00, {0x00, 0x00}, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 0, 0, }, - { 0x0000, 0x5a, 0x00, 0x00, {0x00, 0x00}, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 0, 0, }, + { 0x0000, 0x00, 0x00, 0x00, {0x00, 0x00}, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 0, 0, 0, 0, 0, }, + { 0x041a, 0x02, 0x00, 0x00, {0x01, 0x02}, 2, 0, 0, 1, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 0, 0, 0, 0, 0, }, + { 0x0412, 0x02, 0x00, 0x00, {0x01, 0x07}, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x38}, {0x00, 0x00}, 0, 0, 0, 0, 0, }, + { 0x0110, 0x02, 0x00, 0x00, {0x03, 0x07}, 2, 1, 0, 0, 3, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 0, 0, 0, 0, 0, }, + { 0x0018, 0x02, 0x00, 0x00, {0x06, 0x0a}, 2, 4, 0, 1, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 0, 0, 0, 0, 0, }, + { 0x040a, 0x02, 0x00, 0x02, {0x01, 0x04}, 2, 0, 0, 1, 0, 0, 0, 0, 0, 0, {0x00, 0x20}, {0x00, 0x00}, 0, 0, 0, 0, 0, }, + { 0x0402, 0x0b, 0x00, 0x02, {0x01, 0x00}, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0x30, 0x38}, {0x00, 0x00}, 0, 0, 0, 0, 0, }, + { 0x4100, 0x00, 0x00, 0x02, {0x03, 0x00}, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 0, 0, 3, 0, 2, }, + { 0x0200, 0x0b, 0x00, 0x02, {0x05, 0x00}, 1, 0, 0, 0, 0, 0, 0, 0, 0, 3, {0x00, 0x00}, {0x00, 0x00}, 0, 0, 0, 0, 0, }, + { 0x0402, 0x0c, 0x00, 0x02, {0x01, 0x00}, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x38}, {0x00, 0x00}, 0, 0, 0, 0, 0, }, + { 0x0200, 0x0c, 0x00, 0x02, {0x05, 0x00}, 1, 0, 0, 0, 0, 0, 0, 0, 0, 3, {0x00, 0x00}, {0x00, 0x00}, 0, 0, 0, 0, 0, }, + { 0x0412, 0x0d, 0x00, 0x00, {0x02, 0x01}, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 0, 0, 0, 0, 0, }, + { 0x0100, 0x0d, 0x00, 0x02, {0x06, 0x03}, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 0, 0, 0, 0, 0, }, + { 0x0010, 0x0e, 0x00, 0x00, {0x06, 0x08}, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 0, 0, 0, 0, 0, }, + { 0x0010, 0x0e, 0x00, 0x00, {0x06, 0x0e}, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 0, 0, 0, 0, 0, }, + { 0x0010, 0x0f, 0x00, 0x00, {0x08, 0x06}, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 0, 0, 0, 0, 0, }, + { 0x0010, 0x0f, 0x00, 0x00, {0x0e, 0x06}, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 0, 0, 0, 0, 0, }, + { 0x0000, 0x10, 0x00, 0x00, {0x00, 0x00}, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 0, 0, 0, 0, 0, }, + { 0x0402, 0x11, 0x00, 0x02, {0x02, 0x01}, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 0, 0, 0, 0, 0, }, + { 0x0402, 0x12, 0x00, 0x02, {0x02, 0x01}, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 0, 0, 0, 0, 0, }, + { 0x0402, 0x13, 0x00, 0x02, {0x02, 0x01}, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 0, 0, 0, 0, 0, }, + { 0x0000, 0x14, 0x00, 0x00, {0x00, 0x00}, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 0, 0, 0, 0, 0, }, + { 0x0000, 0x15, 0x00, 0x00, {0x00, 0x00}, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 0, 0, 0, 0, 0, }, + { 0x0000, 0x16, 0x00, 0x00, {0x00, 0x00}, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 0, 0, 0, 0, 0, }, + { 0x0000, 0x17, 0x00, 0x00, {0x00, 0x00}, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 0, 0, 0, 0, 0, }, + { 0x141a, 0x00, 0x00, 0x00, {0x01, 0x02}, 2, 0, 0, 1, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 3, 0, 0, 0, 0, }, + { 0x1010, 0x00, 0x00, 0x00, {0x06, 0x07}, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 3, 0, 0, 0, 0, }, + { 0x0432, 0x00, 0x00, 0x00, {0x01, 0x07}, 2, 1, 0, 0, 0, 1, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 0, 0, 0, 1, 0, }, + { 0x0412, 0x18, 0x00, 0x00, {0x01, 0x00}, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x38}, {0x00, 0x00}, 0, 0, 0, 0, 0, }, + { 0x4100, 0x00, 0x00, 0x02, {0x03, 0x00}, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 0, 0, 3, 0, 1, }, + { 0x0000, 0x19, 0x00, 0x00, {0x00, 0x00}, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 0, 0, 0, 0, 0, }, + { 0x0000, 0x1a, 0x00, 0x00, {0x00, 0x00}, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 0, 0, 0, 0, 0, }, + { 0x0412, 0x1b, 0x00, 0x00, {0x01, 0x00}, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0x08, 0x38}, {0x00, 0x00}, 0, 0, 0, 0, 0, }, + { 0x0412, 0x1c, 0x00, 0x00, {0x01, 0x00}, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0x18, 0x38}, {0x00, 0x00}, 0, 0, 0, 0, 0, }, + { 0x0412, 0x1f, 0x00, 0x00, {0x01, 0x00}, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0x20, 0x38}, {0x00, 0x00}, 0, 0, 0, 0, 0, }, + { 0x0412, 0x20, 0x00, 0x00, {0x01, 0x00}, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0x28, 0x38}, {0x00, 0x00}, 0, 0, 0, 0, 0, }, + { 0x0412, 0x22, 0x00, 0x00, {0x01, 0x00}, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0x30, 0x38}, {0x00, 0x00}, 0, 0, 0, 0, 0, }, + { 0x0412, 0x23, 0x00, 0x00, {0x01, 0x00}, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0x38, 0x38}, {0x00, 0x00}, 0, 0, 0, 0, 0, }, + { 0x0412, 0x27, 0x00, 0x00, {0x01, 0x00}, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0x10, 0x38}, {0x00, 0x00}, 0, 0, 0, 0, 0, }, + { 0x0000, 0x1d, 0x00, 0x00, {0x00, 0x00}, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 0, 0, 0, 0, 0, }, + { 0x0000, 0x1e, 0x00, 0x00, {0x00, 0x00}, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 0, 0, 0, 0, 0, }, + { 0x0004, 0x21, 0x00, 0x00, {0x00, 0x00}, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x0a, 0xff}, 0, 0, 0, 0, 0, }, + { 0x0004, 0x24, 0x00, 0x00, {0x00, 0x00}, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x0a, 0xff}, 0, 0, 0, 0, 0, }, + { 0x0000, 0x25, 0x00, 0x00, {0x00, 0x00}, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 0, 0, 0, 0, 0, }, + { 0x0000, 0x26, 0x00, 0x00, {0x00, 0x00}, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 0, 0, 0, 0, 0, }, + { 0x0452, 0x00, 0x00, 0x00, {0x01, 0x0f}, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 0, 0, 0, 2, 0, }, + { 0x0412, 0x2f, 0x00, 0x00, {0x01, 0x02}, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 0, 0, 0, 0, 0, }, + { 0x0412, 0x2f, 0x00, 0x00, {0x01, 0x07}, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x38}, {0x00, 0x00}, 0, 0, 0, 0, 0, }, + { 0x0010, 0x2f, 0x00, 0x00, {0x06, 0x07}, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 0, 0, 0, 0, 0, }, + { 0x0880, 0x30, 0x02, 0x00, {0x00, 0x00}, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 0, 0, 0, 0, 0, }, + { 0x0010, 0x31, 0x00, 0x00, {0x00, 0x00}, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 0, 0, 0, 0, 0, }, + { 0x0010, 0x32, 0x00, 0x00, {0x00, 0x00}, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 0, 0, 0, 0, 0, }, + { 0x0010, 0x33, 0x00, 0x00, {0x00, 0x00}, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 0, 0, 0, 0, 0, }, + { 0x0010, 0x34, 0x00, 0x00, {0x00, 0x00}, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 0, 0, 0, 0, 0, }, + { 0x0010, 0x35, 0x00, 0x00, {0x00, 0x00}, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 0, 0, 0, 0, 0, }, + { 0x0800, 0x5b, 0x02, 0x00, {0x00, 0x00}, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 0, 0, 0, 0, 0, }, + { 0x0a00, 0x5c, 0x02, 0x00, {0x00, 0x00}, 0, 0, 3, 0, 0, 0, 0, 0, 0, 3, {0x00, 0x00}, {0x00, 0x00}, 0, 0, 0, 0, 0, }, + { 0x0000, 0x36, 0x00, 0x00, {0x0c, 0x00}, 1, 6, 0, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 0, 0, 0, 0, 0, }, + { 0x0402, 0x36, 0x00, 0x02, {0x01, 0x00}, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0x10, 0x38}, {0x00, 0x00}, 0, 0, 0, 0, 0, }, + { 0x0000, 0x36, 0x01, 0x00, {0x0d, 0x00}, 1, 7, 0, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 0, 0, 0, 0, 0, }, + { 0x0402, 0x36, 0x01, 0x02, {0x01, 0x00}, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0x18, 0x38}, {0x00, 0x00}, 0, 0, 0, 0, 0, }, + { 0x0000, 0x37, 0x00, 0x00, {0x0c, 0x00}, 1, 6, 0, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 0, 0, 0, 0, 0, }, + { 0x0000, 0x37, 0x00, 0x00, {0x0b, 0x00}, 1, 5, 0, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 0, 0, 0, 0, 0, }, + { 0x0402, 0x37, 0x00, 0x02, {0x01, 0x00}, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0x20, 0x38}, {0x00, 0x00}, 0, 0, 0, 0, 0, }, + { 0x0000, 0x37, 0x01, 0x00, {0x0d, 0x00}, 1, 7, 0, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 0, 0, 0, 0, 0, }, + { 0x0402, 0x37, 0x01, 0x02, {0x01, 0x00}, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0x28, 0x38}, {0x00, 0x00}, 0, 0, 0, 0, 0, }, + { 0x0000, 0x38, 0x00, 0x00, {0x00, 0x00}, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 0, 0, 0, 0, 0, }, + { 0x0000, 0x38, 0x00, 0x00, {0x09, 0x00}, 1, 3, 0, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 0, 0, 0, 0, 0, }, + { 0x0000, 0x39, 0x00, 0x00, {0x00, 0x00}, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 0, 0, 0, 0, 0, }, + { 0x0000, 0x39, 0x00, 0x00, {0x09, 0x00}, 1, 3, 0, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 0, 0, 0, 0, 0, }, + { 0x2000, 0x00, 0x00, 0x00, {0x0b, 0x00}, 1, 5, 0, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 0, 0, 0, 0, 0, }, + { 0x0000, 0x4c, 0x00, 0x00, {0x0b, 0x00}, 1, 5, 0, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 0, 0, 0, 0, 0, }, + { 0x0000, 0x4b, 0x00, 0x00, {0x0b, 0x00}, 1, 5, 0, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 0, 0, 0, 0, 0, }, + { 0x0000, 0x4a, 0x00, 0x00, {0x0b, 0x00}, 1, 5, 0, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 0, 0, 0, 0, 0, }, + { 0x0000, 0x4d, 0x00, 0x00, {0x0b, 0x00}, 1, 5, 0, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 0, 0, 0, 0, 0, }, + { 0x0000, 0x4e, 0x00, 0x00, {0x08, 0x00}, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 0, 0, 0, 0, 0, }, + { 0x0000, 0x4f, 0x00, 0x00, {0x00, 0x00}, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 0, 0, 0, 0, 0, }, + { 0x0000, 0x50, 0x00, 0x00, {0x00, 0x00}, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 0, 0, 0, 0, 0, }, + { 0x0000, 0x51, 0x00, 0x00, {0x00, 0x00}, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 0, 0, 0, 0, 0, }, + { 0x0000, 0x52, 0x00, 0x00, {0x00, 0x00}, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 0, 0, 0, 0, 0, }, + { 0x0000, 0x53, 0x00, 0x00, {0x00, 0x00}, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 0, 0, 0, 0, 0, }, + { 0x0000, 0x54, 0x00, 0x00, {0x00, 0x00}, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 0, 0, 0, 0, 0, }, + { 0x0000, 0x55, 0x00, 0x00, {0x00, 0x00}, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 0, 0, 0, 0, 0, }, + { 0x0000, 0x56, 0x00, 0x00, {0x00, 0x00}, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 0, 0, 0, 0, 0, }, + { 0x0000, 0x57, 0x00, 0x00, {0x00, 0x00}, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 0, 0, 0, 0, 0, }, + { 0x0000, 0x58, 0x00, 0x00, {0x00, 0x00}, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 0, 0, 0, 0, 0, }, + { 0x0000, 0x59, 0x00, 0x00, {0x00, 0x00}, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 0, 0, 0, 0, 0, }, + { 0x0000, 0x5a, 0x00, 0x00, {0x00, 0x00}, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0x00, 0x00}, {0x00, 0x00}, 0, 0, 0, 0, 0, }, }; RO_ global U2 x8616_decode_dispatch[256] = { - 0x001a, 0x001a, 0x001a, 0x001a, 0x001b, 0x001b, 0x0008, 0x000b, 0x001a, 0x001a, 0x001a, 0x001a, 0x001b, 0x001b, 0x0008, 0x000b, - 0x001a, 0x001a, 0x001a, 0x001a, 0x001b, 0x001b, 0x0008, 0x000b, 0x001a, 0x001a, 0x001a, 0x001a, 0x001b, 0x001b, 0x0008, 0x000b, - 0x001a, 0x001a, 0x001a, 0x001a, 0x001b, 0x001b, 0x0040, 0x0020, 0x001a, 0x001a, 0x001a, 0x001a, 0x001b, 0x001b, 0x0040, 0x002a, - 0x001a, 0x001a, 0x001a, 0x001a, 0x001b, 0x001b, 0x0040, 0x001f, 0x001a, 0x001a, 0x001a, 0x001a, 0x001b, 0x001b, 0x0040, 0x0029, - 0x001e, 0x001e, 0x001e, 0x001e, 0x001e, 0x001e, 0x001e, 0x001e, 0x0022, 0x0022, 0x0022, 0x0022, 0x0022, 0x0022, 0x0022, 0x0022, - 0x0007, 0x0007, 0x0007, 0x0007, 0x0007, 0x0007, 0x0007, 0x0007, 0x000a, 0x000a, 0x000a, 0x000a, 0x000a, 0x000a, 0x000a, 0x000a, + 0x0019, 0x0019, 0x0019, 0x0019, 0x001a, 0x001a, 0x0008, 0x000a, 0x0019, 0x0019, 0x0019, 0x0019, 0x001a, 0x001a, 0x0008, 0x000a, + 0x0019, 0x0019, 0x0019, 0x0019, 0x001a, 0x001a, 0x0008, 0x000a, 0x0019, 0x0019, 0x0019, 0x0019, 0x001a, 0x001a, 0x0008, 0x000a, + 0x0019, 0x0019, 0x0019, 0x0019, 0x001a, 0x001a, 0x0038, 0x001f, 0x0019, 0x0019, 0x0019, 0x0019, 0x001a, 0x001a, 0x0038, 0x0028, + 0x0019, 0x0019, 0x0019, 0x0019, 0x001a, 0x001a, 0x0038, 0x001e, 0x0019, 0x0019, 0x0019, 0x0019, 0x001a, 0x001a, 0x0038, 0x0027, + 0x001d, 0x001d, 0x001d, 0x001d, 0x001d, 0x001d, 0x001d, 0x001d, 0x001d, 0x001d, 0x001d, 0x001d, 0x001d, 0x001d, 0x001d, 0x001d, + 0x0007, 0x0007, 0x0007, 0x0007, 0x0007, 0x0007, 0x0007, 0x0007, 0x0007, 0x0007, 0x0007, 0x0007, 0x0007, 0x0007, 0x0007, 0x0007, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x004e, 0x004e, 0x004e, 0x004e, 0x004e, 0x004e, 0x004e, 0x004e, 0x004e, 0x004e, 0x004e, 0x004e, 0x004e, 0x004e, 0x004e, 0x004e, - 0x001c, 0x001c, 0x001c, 0x001c, 0x0036, 0x0036, 0x000c, 0x000c, 0x0001, 0x0001, 0x0001, 0x0001, 0x0005, 0x0013, 0x0005, 0x0009, - 0x000d, 0x000d, 0x000d, 0x000d, 0x000d, 0x000d, 0x000d, 0x000d, 0x002d, 0x002e, 0x0043, 0x005f, 0x0018, 0x0019, 0x0017, 0x0016, - 0x0004, 0x0004, 0x0004, 0x0004, 0x003a, 0x003a, 0x003b, 0x003b, 0x0038, 0x0038, 0x003e, 0x003e, 0x003d, 0x003d, 0x003c, 0x003c, + 0x0046, 0x0046, 0x0046, 0x0046, 0x0046, 0x0046, 0x0046, 0x0046, 0x0046, 0x0046, 0x0046, 0x0046, 0x0046, 0x0046, 0x0046, 0x0046, + 0x001b, 0x001b, 0x001b, 0x001b, 0x002e, 0x002e, 0x000b, 0x000b, 0x0001, 0x0001, 0x0001, 0x0001, 0x0005, 0x0012, 0x0005, 0x0009, + 0x000c, 0x000c, 0x000c, 0x000c, 0x000c, 0x000c, 0x000c, 0x000c, 0x002b, 0x002c, 0x003b, 0x0057, 0x0017, 0x0018, 0x0016, 0x0015, + 0x0004, 0x0004, 0x0004, 0x0004, 0x0032, 0x0032, 0x0033, 0x0033, 0x0030, 0x0030, 0x0036, 0x0036, 0x0035, 0x0035, 0x0034, 0x0034, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, 0x0003, - 0x0000, 0x0000, 0x004b, 0x004a, 0x0015, 0x0014, 0x0002, 0x0002, 0x0000, 0x0000, 0x004d, 0x004c, 0x0054, 0x0053, 0x0055, 0x0056, - 0x8000, 0x8100, 0x8200, 0x8300, 0x002b, 0x002c, 0x0000, 0x0012, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, - 0x004f, 0x0050, 0x0051, 0x0052, 0x000e, 0x000e, 0x0010, 0x0010, 0x0041, 0x0045, 0x0048, 0x0046, 0x000f, 0x000f, 0x0011, 0x0011, - 0x003f, 0x0000, 0x0039, 0x0039, 0x005e, 0x0058, 0x8400, 0x8500, 0x0057, 0x0059, 0x005c, 0x005d, 0x005a, 0x005b, 0x8600, 0x8700, + 0x0000, 0x0000, 0x0043, 0x0042, 0x0014, 0x0013, 0x0002, 0x0002, 0x0000, 0x0000, 0x0045, 0x0044, 0x004c, 0x004b, 0x004d, 0x004e, + 0x002d, 0x002d, 0x002d, 0x002d, 0x0029, 0x002a, 0x0000, 0x0011, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, + 0x0047, 0x0048, 0x0049, 0x004a, 0x000d, 0x000d, 0x000f, 0x000f, 0x0039, 0x003d, 0x0040, 0x003e, 0x000e, 0x000e, 0x0010, 0x0010, + 0x0037, 0x0000, 0x0031, 0x0031, 0x0056, 0x0050, 0x8000, 0x8100, 0x004f, 0x0051, 0x0054, 0x0055, 0x0052, 0x0053, 0x8200, 0x8300, }; -RO_ global U1 x8616_decode_aux[2048] = +RO_ global U1 x8616_decode_aux[1024] = { - 0x2f, 0x2f, 0x2f, 0x2f, 0x2f, 0x2f, 0x2f, 0x2f, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, - 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x32, 0x32, 0x32, 0x32, 0x32, 0x32, 0x32, 0x32, - 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x34, 0x34, 0x34, 0x34, 0x34, 0x34, 0x34, 0x34, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, - 0x2f, 0x2f, 0x2f, 0x2f, 0x2f, 0x2f, 0x2f, 0x2f, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, - 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x32, 0x32, 0x32, 0x32, 0x32, 0x32, 0x32, 0x32, - 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x34, 0x34, 0x34, 0x34, 0x34, 0x34, 0x34, 0x34, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, - 0x2f, 0x2f, 0x2f, 0x2f, 0x2f, 0x2f, 0x2f, 0x2f, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, - 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x32, 0x32, 0x32, 0x32, 0x32, 0x32, 0x32, 0x32, - 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x34, 0x34, 0x34, 0x34, 0x34, 0x34, 0x34, 0x34, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, - 0x2f, 0x2f, 0x2f, 0x2f, 0x2f, 0x2f, 0x2f, 0x2f, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, - 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x32, 0x32, 0x32, 0x32, 0x32, 0x32, 0x32, 0x32, - 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x34, 0x34, 0x34, 0x34, 0x34, 0x34, 0x34, 0x34, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, - 0x2f, 0x2f, 0x2f, 0x2f, 0x2f, 0x2f, 0x2f, 0x2f, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, - 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x32, 0x32, 0x32, 0x32, 0x32, 0x32, 0x32, 0x32, - 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x34, 0x34, 0x34, 0x34, 0x34, 0x34, 0x34, 0x34, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, - 0x2f, 0x2f, 0x2f, 0x2f, 0x2f, 0x2f, 0x2f, 0x2f, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, - 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x32, 0x32, 0x32, 0x32, 0x32, 0x32, 0x32, 0x32, - 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x34, 0x34, 0x34, 0x34, 0x34, 0x34, 0x34, 0x34, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, - 0x2f, 0x2f, 0x2f, 0x2f, 0x2f, 0x2f, 0x2f, 0x2f, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, - 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x32, 0x32, 0x32, 0x32, 0x32, 0x32, 0x32, 0x32, - 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x34, 0x34, 0x34, 0x34, 0x34, 0x34, 0x34, 0x34, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, - 0x2f, 0x2f, 0x2f, 0x2f, 0x2f, 0x2f, 0x2f, 0x2f, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, - 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x32, 0x32, 0x32, 0x32, 0x32, 0x32, 0x32, 0x32, - 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x34, 0x34, 0x34, 0x34, 0x34, 0x34, 0x34, 0x34, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, - 0x2f, 0x2f, 0x2f, 0x2f, 0x2f, 0x2f, 0x2f, 0x2f, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, - 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x32, 0x32, 0x32, 0x32, 0x32, 0x32, 0x32, 0x32, - 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x34, 0x34, 0x34, 0x34, 0x34, 0x34, 0x34, 0x34, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, - 0x2f, 0x2f, 0x2f, 0x2f, 0x2f, 0x2f, 0x2f, 0x2f, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, - 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x32, 0x32, 0x32, 0x32, 0x32, 0x32, 0x32, 0x32, - 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x34, 0x34, 0x34, 0x34, 0x34, 0x34, 0x34, 0x34, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, - 0x2f, 0x2f, 0x2f, 0x2f, 0x2f, 0x2f, 0x2f, 0x2f, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, - 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x32, 0x32, 0x32, 0x32, 0x32, 0x32, 0x32, 0x32, - 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x34, 0x34, 0x34, 0x34, 0x34, 0x34, 0x34, 0x34, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, - 0x2f, 0x2f, 0x2f, 0x2f, 0x2f, 0x2f, 0x2f, 0x2f, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, - 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x32, 0x32, 0x32, 0x32, 0x32, 0x32, 0x32, 0x32, - 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x34, 0x34, 0x34, 0x34, 0x34, 0x34, 0x34, 0x34, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, - 0x2f, 0x2f, 0x2f, 0x2f, 0x2f, 0x2f, 0x2f, 0x2f, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, - 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x32, 0x32, 0x32, 0x32, 0x32, 0x32, 0x32, 0x32, - 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x34, 0x34, 0x34, 0x34, 0x34, 0x34, 0x34, 0x34, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, - 0x2f, 0x2f, 0x2f, 0x2f, 0x2f, 0x2f, 0x2f, 0x2f, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, - 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x32, 0x32, 0x32, 0x32, 0x32, 0x32, 0x32, 0x32, - 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x34, 0x34, 0x34, 0x34, 0x34, 0x34, 0x34, 0x34, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, - 0x2f, 0x2f, 0x2f, 0x2f, 0x2f, 0x2f, 0x2f, 0x2f, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, - 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x32, 0x32, 0x32, 0x32, 0x32, 0x32, 0x32, 0x32, - 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x34, 0x34, 0x34, 0x34, 0x34, 0x34, 0x34, 0x34, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, - 0x2f, 0x2f, 0x2f, 0x2f, 0x2f, 0x2f, 0x2f, 0x2f, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, - 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x32, 0x32, 0x32, 0x32, 0x32, 0x32, 0x32, 0x32, - 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x34, 0x34, 0x34, 0x34, 0x34, 0x34, 0x34, 0x34, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, 0x35, - 0x37, 0x37, 0x37, 0x37, 0x37, 0x37, 0x37, 0x37, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x23, 0x23, 0x23, 0x23, 0x23, 0x23, 0x23, 0x23, + 0x2f, 0x2f, 0x2f, 0x2f, 0x2f, 0x2f, 0x2f, 0x2f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x26, 0x26, 0x26, 0x26, 0x26, 0x26, 0x26, 0x26, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x23, 0x23, 0x23, 0x23, 0x23, 0x23, 0x23, 0x23, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, - 0x26, 0x26, 0x26, 0x26, 0x26, 0x26, 0x26, 0x26, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, - 0x37, 0x37, 0x37, 0x37, 0x37, 0x37, 0x37, 0x37, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x23, 0x23, 0x23, 0x23, 0x23, 0x23, 0x23, 0x23, + 0x2f, 0x2f, 0x2f, 0x2f, 0x2f, 0x2f, 0x2f, 0x2f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x26, 0x26, 0x26, 0x26, 0x26, 0x26, 0x26, 0x26, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x23, 0x23, 0x23, 0x23, 0x23, 0x23, 0x23, 0x23, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, - 0x26, 0x26, 0x26, 0x26, 0x26, 0x26, 0x26, 0x26, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, - 0x37, 0x37, 0x37, 0x37, 0x37, 0x37, 0x37, 0x37, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x23, 0x23, 0x23, 0x23, 0x23, 0x23, 0x23, 0x23, + 0x2f, 0x2f, 0x2f, 0x2f, 0x2f, 0x2f, 0x2f, 0x2f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x26, 0x26, 0x26, 0x26, 0x26, 0x26, 0x26, 0x26, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x23, 0x23, 0x23, 0x23, 0x23, 0x23, 0x23, 0x23, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, - 0x26, 0x26, 0x26, 0x26, 0x26, 0x26, 0x26, 0x26, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, - 0x37, 0x37, 0x37, 0x37, 0x37, 0x37, 0x37, 0x37, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x23, 0x23, 0x23, 0x23, 0x23, 0x23, 0x23, 0x23, + 0x2f, 0x2f, 0x2f, 0x2f, 0x2f, 0x2f, 0x2f, 0x2f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x26, 0x26, 0x26, 0x26, 0x26, 0x26, 0x26, 0x26, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x23, 0x23, 0x23, 0x23, 0x23, 0x23, 0x23, 0x23, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, - 0x26, 0x26, 0x26, 0x26, 0x26, 0x26, 0x26, 0x26, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, - 0x37, 0x37, 0x37, 0x37, 0x37, 0x37, 0x37, 0x37, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x23, 0x23, 0x23, 0x23, 0x23, 0x23, 0x23, 0x23, + 0x2f, 0x2f, 0x2f, 0x2f, 0x2f, 0x2f, 0x2f, 0x2f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x26, 0x26, 0x26, 0x26, 0x26, 0x26, 0x26, 0x26, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x23, 0x23, 0x23, 0x23, 0x23, 0x23, 0x23, 0x23, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, - 0x26, 0x26, 0x26, 0x26, 0x26, 0x26, 0x26, 0x26, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, - 0x37, 0x37, 0x37, 0x37, 0x37, 0x37, 0x37, 0x37, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x23, 0x23, 0x23, 0x23, 0x23, 0x23, 0x23, 0x23, + 0x2f, 0x2f, 0x2f, 0x2f, 0x2f, 0x2f, 0x2f, 0x2f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x26, 0x26, 0x26, 0x26, 0x26, 0x26, 0x26, 0x26, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x23, 0x23, 0x23, 0x23, 0x23, 0x23, 0x23, 0x23, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, - 0x26, 0x26, 0x26, 0x26, 0x26, 0x26, 0x26, 0x26, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, - 0x37, 0x37, 0x37, 0x37, 0x37, 0x37, 0x37, 0x37, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x23, 0x23, 0x23, 0x23, 0x23, 0x23, 0x23, 0x23, + 0x2f, 0x2f, 0x2f, 0x2f, 0x2f, 0x2f, 0x2f, 0x2f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x26, 0x26, 0x26, 0x26, 0x26, 0x26, 0x26, 0x26, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x23, 0x23, 0x23, 0x23, 0x23, 0x23, 0x23, 0x23, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, - 0x26, 0x26, 0x26, 0x26, 0x26, 0x26, 0x26, 0x26, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, - 0x37, 0x37, 0x37, 0x37, 0x37, 0x37, 0x37, 0x37, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x23, 0x23, 0x23, 0x23, 0x23, 0x23, 0x23, 0x23, + 0x2f, 0x2f, 0x2f, 0x2f, 0x2f, 0x2f, 0x2f, 0x2f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x26, 0x26, 0x26, 0x26, 0x26, 0x26, 0x26, 0x26, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, + 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x23, 0x23, 0x23, 0x23, 0x23, 0x23, 0x23, 0x23, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x24, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, 0x25, - 0x26, 0x26, 0x26, 0x26, 0x26, 0x26, 0x26, 0x26, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, 0x27, - 0x1d, 0x1d, 0x1d, 0x1d, 0x1d, 0x1d, 0x1d, 0x1d, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, + 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x1d, 0x1d, 0x1d, 0x1d, 0x1d, 0x1d, 0x1d, 0x1d, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, + 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x1d, 0x1d, 0x1d, 0x1d, 0x1d, 0x1d, 0x1d, 0x1d, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, + 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x1d, 0x1d, 0x1d, 0x1d, 0x1d, 0x1d, 0x1d, 0x1d, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, + 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x1d, 0x1d, 0x1d, 0x1d, 0x1d, 0x1d, 0x1d, 0x1d, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, - 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, - 0x47, 0x47, 0x47, 0x47, 0x47, 0x47, 0x47, 0x47, 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, + 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x3a, 0x3a, 0x3a, 0x3a, 0x3a, 0x3a, 0x3a, 0x3a, 0x3c, 0x3c, 0x3c, 0x3c, 0x3c, 0x3c, 0x3c, 0x3c, + 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x1d, 0x1d, 0x1d, 0x1d, 0x1d, 0x1d, 0x1d, 0x1d, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, - 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, - 0x47, 0x47, 0x47, 0x47, 0x47, 0x47, 0x47, 0x47, 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, + 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x3a, 0x3a, 0x3a, 0x3a, 0x3a, 0x3a, 0x3a, 0x3a, 0x3c, 0x3c, 0x3c, 0x3c, 0x3c, 0x3c, 0x3c, 0x3c, + 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x1d, 0x1d, 0x1d, 0x1d, 0x1d, 0x1d, 0x1d, 0x1d, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, - 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, - 0x47, 0x47, 0x47, 0x47, 0x47, 0x47, 0x47, 0x47, 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, + 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x3a, 0x3a, 0x3a, 0x3a, 0x3a, 0x3a, 0x3a, 0x3a, 0x3c, 0x3c, 0x3c, 0x3c, 0x3c, 0x3c, 0x3c, 0x3c, + 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x1d, 0x1d, 0x1d, 0x1d, 0x1d, 0x1d, 0x1d, 0x1d, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, - 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, - 0x47, 0x47, 0x47, 0x47, 0x47, 0x47, 0x47, 0x47, 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, + 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x1c, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x3a, 0x3a, 0x3a, 0x3a, 0x3a, 0x3a, 0x3a, 0x3a, 0x3c, 0x3c, 0x3c, 0x3c, 0x3c, 0x3c, 0x3c, 0x3c, + 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; enum { - X8616_DECODE_PLAN_COUNT = 96, - X8616_DECODE_AUX_COUNT = 2048, + X8616_DECODE_PLAN_COUNT = 88, + X8616_DECODE_AUX_COUNT = 1024, }; diff --git a/code/8086/serializer.c b/code/8086/serializer.c index c1b7f51..5eb7aaa 100644 --- a/code/8086/serializer.c +++ b/code/8086/serializer.c @@ -180,14 +180,8 @@ internal B4 x8616_serialize_put_s4(Str8Gen_R gen, S4 value) { } internal S4 x8616_serialize_s4_from_bits(U2 bits, U1 byte_count) { - if (byte_count <= 1) { - U4 value = bits & 0xFF; - if (value & 0x80) return C_(S4, value) - 256; - return C_(S4, value); - } - U4 value = bits; - if (value & 0x8000) return C_(S4, value) - 65536; - return C_(S4, value); + if (byte_count <= 1) return s4_(s1_(u1_(bits))); + return s4_(s2_(bits)); } FI_ B4 x8616_serialize_imm_is_signed(X8616_Op op) { switch (op) { @@ -237,7 +231,7 @@ x8616_serialize_size_where(X8616_Op op, U1 operand_count, X8616_DecodedOperand o B4 has_imm = 0; for (U1 id = 0; id < operand_count; ++id) { X8616_DecodedOperandFlags flags = operands[id].flags; - if (flags & x8616_decoded_operand_memory) has_mem = 1; + if (flags & x8616_decoded_operand_memory) has_mem = 1; if ((flags & x8616_decoded_operand_immediate) && ((flags & x8616_decoded_operand_register) == 0)) has_imm = 1; } switch (op) { diff --git a/code/part_1/sim_8086.c b/code/part_1/sim_8086.c index ca95ffd..ed844aa 100644 --- a/code/part_1/sim_8086.c +++ b/code/part_1/sim_8086.c @@ -121,8 +121,6 @@ int main() ms_exit_process(13); return 13; } - Str8 listing_text = text.text; - (void)listing_text; ms_exit_process(0); return 0;