diff --git a/src/codegen_backend_x86_uops.c b/src/codegen_backend_x86_uops.c index 9882f82..c6dea83 100644 --- a/src/codegen_backend_x86_uops.c +++ b/src/codegen_backend_x86_uops.c @@ -54,9 +54,10 @@ static int codegen_ADD(codeblock_t *block, uop_t *uop) host_x86_MOV8_REG_REG(block, dest_reg, src_reg_a); host_x86_ADD8_REG_REG(block, dest_reg, dest_reg, src_reg_b); } +#ifdef RECOMPILER_DEBUG else fatal("ADD %02x %02x %02x\n", uop->dest_reg_a_real, uop->src_reg_a_real, uop->src_reg_b_real); - +#endif return 0; } @@ -84,9 +85,10 @@ static int codegen_ADD_IMM(codeblock_t *block, uop_t *uop) host_x86_MOV8_REG_REG(block, dest_reg, src_reg); host_x86_ADD8_REG_IMM(block, dest_reg, dest_reg, uop->imm_data); } +#ifdef RECOMPILER_DEBUG else fatal("ADD_IMM %02x %02x\n", uop->dest_reg_a_real, uop->src_reg_a_real); - +#endif return 0; } @@ -96,9 +98,10 @@ static int codegen_ADD_LSHIFT(codeblock_t *block, uop_t *uop) host_x86_ADD32_REG_REG(block, uop->dest_reg_a_real, uop->src_reg_a_real, uop->src_reg_b_real); else if (uop->imm_data < 4) host_x86_LEA_REG_REG_SHIFT(block, uop->dest_reg_a_real, uop->src_reg_a_real, uop->src_reg_b_real, uop->imm_data); +#ifdef RECOMPILER_DEBUG else fatal("codegen_ADD_LSHIFT - shift out of range %i\n", uop->imm_data); - +#endif return 0; } @@ -129,9 +132,10 @@ static int codegen_AND(codeblock_t *block, uop_t *uop) host_x86_MOV8_REG_REG(block, dest_reg, src_reg_a); host_x86_AND8_REG_REG(block, dest_reg, dest_reg, src_reg_b); } +#ifdef RECOMPILER_DEBUG else fatal("AND %02x %02x %02x\n", uop->dest_reg_a_real, uop->src_reg_a_real, uop->src_reg_b_real); - +#endif return 0; } @@ -158,9 +162,10 @@ static int codegen_AND_IMM(codeblock_t *block, uop_t *uop) host_x86_MOV8_REG_REG(block, dest_reg, src_reg); host_x86_AND8_REG_IMM(block, dest_reg, dest_reg, uop->imm_data); } +#ifdef RECOMPILER_DEBUG else fatal("AND_IMM %02x %02x\n", uop->dest_reg_a_real, uop->src_reg_a_real); - +#endif return 0; } @@ -173,9 +178,10 @@ static int codegen_ANDN(codeblock_t *block, uop_t *uop) { host_x86_PANDN_XREG_XREG(block, dest_reg, src_reg_b); } +#ifdef RECOMPILER_DEBUG else fatal("ANDN %02x %02x %02x\n", uop->dest_reg_a_real, uop->src_reg_a_real, uop->src_reg_b_real); - +#endif return 0; } @@ -189,10 +195,12 @@ static int codegen_CALL_FUNC(codeblock_t *block, uop_t *uop) static int codegen_CALL_FUNC_RESULT(codeblock_t *block, uop_t *uop) { int dest_reg = HOST_REG_GET(uop->dest_reg_a_real); +#ifdef RECOMPILER_DEBUG int dest_size = IREG_GET_SIZE(uop->dest_reg_a_real); if (!REG_IS_L(dest_size)) fatal("CALL_FUNC_RESULT %02x\n", uop->dest_reg_a_real); +#endif host_x86_CALL(block, uop->p); host_x86_MOV32_REG_REG(block, dest_reg, REG_EAX); @@ -218,8 +226,10 @@ static int codegen_CMP_IMM_JZ(codeblock_t *block, uop_t *uop) { host_x86_CMP32_REG_IMM(block, src_reg, uop->imm_data); } +#ifdef RECOMPILER_DEBUG else fatal("CMP_IMM_JZ %02x\n", uop->src_reg_a_real); +#endif host_x86_JZ(block, uop->p); return 0; @@ -238,9 +248,10 @@ static int codegen_CMP_IMM_JNZ_DEST(codeblock_t *block, uop_t *uop) { host_x86_CMP16_REG_IMM(block, src_reg, uop->imm_data); } +#ifdef RECOMPILER_DEBUG else fatal("CMP_IMM_JNZ_DEST %02x\n", uop->src_reg_a_real); - +#endif uop->p = host_x86_JNZ_long(block); return 0; @@ -258,9 +269,10 @@ static int codegen_CMP_IMM_JZ_DEST(codeblock_t *block, uop_t *uop) { host_x86_CMP16_REG_IMM(block, src_reg, uop->imm_data); } +#ifdef RECOMPILER_DEBUG else fatal("CMP_IMM_JZ_DEST %02x\n", uop->src_reg_a_real); - +#endif uop->p = host_x86_JZ_long(block); return 0; @@ -283,9 +295,10 @@ static int codegen_CMP_JNB_DEST(codeblock_t *block, uop_t *uop) { host_x86_CMP8_REG_REG(block, src_reg_a, src_reg_b); } +#ifdef RECOMPILER_DEBUG else fatal("CMP_JNB_DEST %02x\n", uop->src_reg_a_real); - +#endif uop->p = host_x86_JNB_long(block); return 0; @@ -307,9 +320,10 @@ static int codegen_CMP_JNBE_DEST(codeblock_t *block, uop_t *uop) { host_x86_CMP8_REG_REG(block, src_reg_a, src_reg_b); } +#ifdef RECOMPILER_DEBUG else fatal("CMP_JNBE_DEST %02x\n", uop->src_reg_a_real); - +#endif uop->p = host_x86_JNBE_long(block); return 0; @@ -331,9 +345,10 @@ static int codegen_CMP_JNL_DEST(codeblock_t *block, uop_t *uop) { host_x86_CMP8_REG_REG(block, src_reg_a, src_reg_b); } +#ifdef RECOMPILER_DEBUG else fatal("CMP_JNL_DEST %02x\n", uop->src_reg_a_real); - +#endif uop->p = host_x86_JNL_long(block); return 0; @@ -355,9 +370,10 @@ static int codegen_CMP_JNLE_DEST(codeblock_t *block, uop_t *uop) { host_x86_CMP8_REG_REG(block, src_reg_a, src_reg_b); } +#ifdef RECOMPILER_DEBUG else fatal("CMP_JNLE_DEST %02x\n", uop->src_reg_a_real); - +#endif uop->p = host_x86_JNLE_long(block); return 0; @@ -379,9 +395,10 @@ static int codegen_CMP_JNO_DEST(codeblock_t *block, uop_t *uop) { host_x86_CMP8_REG_REG(block, src_reg_a, src_reg_b); } +#ifdef RECOMPILER_DEBUG else fatal("CMP_JNO_DEST %02x\n", uop->src_reg_a_real); - +#endif uop->p = host_x86_JNO_long(block); return 0; @@ -403,9 +420,10 @@ static int codegen_CMP_JNZ_DEST(codeblock_t *block, uop_t *uop) { host_x86_CMP8_REG_REG(block, src_reg_a, src_reg_b); } +#ifdef RECOMPILER_DEBUG else fatal("CMP_JNZ_DEST %02x\n", uop->src_reg_a_real); - +#endif uop->p = host_x86_JNZ_long(block); return 0; @@ -427,9 +445,10 @@ static int codegen_CMP_JB_DEST(codeblock_t *block, uop_t *uop) { host_x86_CMP8_REG_REG(block, src_reg_a, src_reg_b); } +#ifdef RECOMPILER_DEBUG else fatal("CMP_JB_DEST %02x\n", uop->src_reg_a_real); - +#endif uop->p = host_x86_JB_long(block); return 0; @@ -451,9 +470,10 @@ static int codegen_CMP_JBE_DEST(codeblock_t *block, uop_t *uop) { host_x86_CMP8_REG_REG(block, src_reg_a, src_reg_b); } +#ifdef RECOMPILER_DEBUG else fatal("CMP_JBE_DEST %02x\n", uop->src_reg_a_real); - +#endif uop->p = host_x86_JBE_long(block); return 0; @@ -475,9 +495,10 @@ static int codegen_CMP_JL_DEST(codeblock_t *block, uop_t *uop) { host_x86_CMP8_REG_REG(block, src_reg_a, src_reg_b); } +#ifdef RECOMPILER_DEBUG else fatal("CMP_JL_DEST %02x\n", uop->src_reg_a_real); - +#endif uop->p = host_x86_JL_long(block); return 0; @@ -499,9 +520,10 @@ static int codegen_CMP_JLE_DEST(codeblock_t *block, uop_t *uop) { host_x86_CMP8_REG_REG(block, src_reg_a, src_reg_b); } +#ifdef RECOMPILER_DEBUG else fatal("CMP_JLE_DEST %02x\n", uop->src_reg_a_real); - +#endif uop->p = host_x86_JLE_long(block); return 0; @@ -523,9 +545,10 @@ static int codegen_CMP_JO_DEST(codeblock_t *block, uop_t *uop) { host_x86_CMP8_REG_REG(block, src_reg_a, src_reg_b); } +#ifdef RECOMPILER_DEBUG else fatal("CMP_JO_DEST %02x\n", uop->src_reg_a_real); - +#endif uop->p = host_x86_JO_long(block); return 0; @@ -547,9 +570,10 @@ static int codegen_CMP_JZ_DEST(codeblock_t *block, uop_t *uop) { host_x86_CMP8_REG_REG(block, src_reg_a, src_reg_b); } +#ifdef RECOMPILER_DEBUG else fatal("CMP_JZ_DEST %02x\n", uop->src_reg_a_real); - +#endif uop->p = host_x86_JZ_long(block); return 0; @@ -566,9 +590,10 @@ static int codegen_FABS(codeblock_t *block, uop_t *uop) host_x86_SUBSD_XREG_XREG(block, REG_XMM_TEMP, dest_reg); host_x86_MAXSD_XREG_XREG(block, dest_reg, REG_XMM_TEMP); } +#ifdef RECOMPILER_DEBUG else fatal("codegen_FABS %02x %02x %02x\n", uop->dest_reg_a_real, uop->src_reg_a_real); - +#endif return 0; } static int codegen_FCHS(codeblock_t *block, uop_t *uop) @@ -582,9 +607,10 @@ static int codegen_FCHS(codeblock_t *block, uop_t *uop) host_x86_PXOR_XREG_XREG(block, dest_reg, dest_reg); host_x86_SUBSD_XREG_XREG(block, dest_reg, REG_XMM_TEMP); } +#ifdef RECOMPILER_DEBUG else fatal("codegen_FCHS %02x %02x %02x\n", uop->dest_reg_a_real, uop->src_reg_a_real); - +#endif return 0; } static int codegen_FSQRT(codeblock_t *block, uop_t *uop) @@ -596,9 +622,10 @@ static int codegen_FSQRT(codeblock_t *block, uop_t *uop) { host_x86_SQRTSD_XREG_XREG(block, dest_reg, src_reg_a); } +#ifdef RECOMPILER_DEBUG else fatal("codegen_FSQRT %02x %02x %02x\n", uop->dest_reg_a_real, uop->src_reg_a_real); - +#endif return 0; } static int codegen_FTST(codeblock_t *block, uop_t *uop) @@ -621,9 +648,10 @@ static int codegen_FTST(codeblock_t *block, uop_t *uop) host_x86_MOV32_REG_REG(block, REG_EAX, REG_ECX); } } +#ifdef RECOMPILER_DEBUG else fatal("codegen_FTST %02x %02x %02x\n", uop->dest_reg_a_real, uop->src_reg_a_real, uop->src_reg_b_real); - +#endif return 0; } @@ -636,9 +664,10 @@ static int codegen_FADD(codeblock_t *block, uop_t *uop) { host_x86_ADDSD_XREG_XREG(block, dest_reg, src_reg_b); } +#ifdef RECOMPILER_DEBUG else fatal("codegen_FADD %02x %02x %02x\n", uop->dest_reg_a_real, uop->src_reg_a_real, uop->src_reg_b_real); - +#endif return 0; } static int codegen_FCOM(codeblock_t *block, uop_t *uop) @@ -660,9 +689,10 @@ static int codegen_FCOM(codeblock_t *block, uop_t *uop) host_x86_MOV32_REG_REG(block, REG_EAX, REG_ECX); } } +#ifdef RECOMPILER_DEBUG else fatal("codegen_FCOM %02x %02x %02x\n", uop->dest_reg_a_real, uop->src_reg_a_real, uop->src_reg_b_real); - +#endif return 0; } static int codegen_FDIV(codeblock_t *block, uop_t *uop) @@ -680,9 +710,10 @@ static int codegen_FDIV(codeblock_t *block, uop_t *uop) host_x86_DIVSD_XREG_XREG(block, REG_XMM_TEMP, src_reg_b); host_x86_MOVQ_XREG_XREG(block, dest_reg, REG_XMM_TEMP); } +#ifdef RECOMPILER_DEBUG else fatal("codegen_FDIV %02x %02x %02x\n", uop->dest_reg_a_real, uop->src_reg_a_real, uop->src_reg_b_real); - +#endif return 0; } static int codegen_FMUL(codeblock_t *block, uop_t *uop) @@ -694,9 +725,10 @@ static int codegen_FMUL(codeblock_t *block, uop_t *uop) { host_x86_MULSD_XREG_XREG(block, dest_reg, src_reg_b); } +#ifdef RECOMPILER_DEBUG else fatal("codegen_FMUL %02x %02x %02x\n", uop->dest_reg_a_real, uop->src_reg_a_real, uop->src_reg_b_real); - +#endif return 0; } static int codegen_FSUB(codeblock_t *block, uop_t *uop) @@ -714,9 +746,10 @@ static int codegen_FSUB(codeblock_t *block, uop_t *uop) host_x86_SUBSD_XREG_XREG(block, REG_XMM_TEMP, src_reg_b); host_x86_MOVQ_XREG_XREG(block, dest_reg, REG_XMM_TEMP); } +#ifdef RECOMPILER_DEBUG else fatal("codegen_FSUB %02x %02x %02x\n", uop->dest_reg_a_real, uop->src_reg_a_real, uop->src_reg_b_real); - +#endif return 0; } @@ -778,24 +811,31 @@ static int codegen_LOAD_FUNC_ARG0(codeblock_t *block, uop_t *uop) { host_x86_MOV16_STACK_REG(block, STACK_ARG0, src_reg); } +#ifdef RECOMPILER_DEBUG else fatal("codegen_LOAD_FUNC_ARG0 %02x\n", uop->src_reg_a_real); - +#endif return 0; } static int codegen_LOAD_FUNC_ARG1(codeblock_t *block, uop_t *uop) { +#ifdef RECOMPILER_DEBUG fatal("codegen_LOAD_FUNC_ARG1 %02x\n", uop->src_reg_a_real); +#endif return 0; } static int codegen_LOAD_FUNC_ARG2(codeblock_t *block, uop_t *uop) { +#ifdef RECOMPILER_DEBUG fatal("codegen_LOAD_FUNC_ARG2 %02x\n", uop->src_reg_a_real); +#endif return 0; } static int codegen_LOAD_FUNC_ARG3(codeblock_t *block, uop_t *uop) { +#ifdef RECOMPILER_DEBUG fatal("codegen_LOAD_FUNC_ARG3 %02x\n", uop->src_reg_a_real); +#endif return 0; } @@ -823,10 +863,12 @@ static int codegen_LOAD_FUNC_ARG3_IMM(codeblock_t *block, uop_t *uop) static int codegen_LOAD_SEG(codeblock_t *block, uop_t *uop) { int src_reg = HOST_REG_GET(uop->src_reg_a_real); +#ifdef RECOMPILER_DEBUG int src_size = IREG_GET_SIZE(uop->src_reg_a_real); if (!REG_IS_W(src_size)) fatal("LOAD_SEG %02x %p\n", uop->src_reg_a_real, uop->p); +#endif host_x86_MOV16_STACK_REG(block, STACK_ARG0, src_reg); host_x86_MOV32_STACK_IMM(block, STACK_ARG1, (uint32_t)uop->p); host_x86_CALL(block, loadseg); @@ -854,8 +896,10 @@ static int codegen_MEM_LOAD_ABS(codeblock_t *block, uop_t *uop) { host_x86_CALL(block, codegen_mem_load_long); } +#ifdef RECOMPILER_DEBUG else fatal("MEM_LOAD_ABS - %02x\n", uop->dest_reg_a_real); +#endif host_x86_TEST32_REG(block, REG_ESI, REG_ESI); host_x86_JNZ(block, codegen_exit_rout); if (REG_IS_B(dest_size)) @@ -897,8 +941,10 @@ static int codegen_MEM_LOAD_REG(codeblock_t *block, uop_t *uop) { host_x86_CALL(block, codegen_mem_load_quad); } +#ifdef RECOMPILER_DEBUG else fatal("MEM_LOAD_REG - %02x\n", uop->dest_reg_a_real); +#endif host_x86_TEST32_REG(block, REG_ESI, REG_ESI); host_x86_JNZ(block, codegen_exit_rout); if (REG_IS_B(dest_size)) @@ -923,11 +969,12 @@ static int codegen_MEM_LOAD_REG(codeblock_t *block, uop_t *uop) static int codegen_MEM_LOAD_SINGLE(codeblock_t *block, uop_t *uop) { int dest_reg = HOST_REG_GET(uop->dest_reg_a_real), seg_reg = HOST_REG_GET(uop->src_reg_a_real), addr_reg = HOST_REG_GET(uop->src_reg_b_real); +#ifdef RECOMPILER_DEBUG int dest_size = IREG_GET_SIZE(uop->dest_reg_a_real); if (!REG_IS_D(dest_size)) fatal("MEM_LOAD_SINGLE - %02x\n", uop->dest_reg_a_real); - +#endif host_x86_LEA_REG_REG(block, REG_ESI, seg_reg, addr_reg); if (uop->imm_data) host_x86_ADD32_REG_IMM(block, REG_ESI, REG_ESI, uop->imm_data); @@ -942,11 +989,12 @@ static int codegen_MEM_LOAD_SINGLE(codeblock_t *block, uop_t *uop) static int codegen_MEM_LOAD_DOUBLE(codeblock_t *block, uop_t *uop) { int dest_reg = HOST_REG_GET(uop->dest_reg_a_real), seg_reg = HOST_REG_GET(uop->src_reg_a_real), addr_reg = HOST_REG_GET(uop->src_reg_b_real); +#ifdef RECOMPILER_DEBUG int dest_size = IREG_GET_SIZE(uop->dest_reg_a_real); if (!REG_IS_D(dest_size)) fatal("MEM_LOAD_DOUBLE - %02x\n", uop->dest_reg_a_real); - +#endif host_x86_LEA_REG_REG(block, REG_ESI, seg_reg, addr_reg); if (uop->imm_data) host_x86_ADD32_REG_IMM(block, REG_ESI, REG_ESI, uop->imm_data); @@ -979,8 +1027,10 @@ static int codegen_MEM_STORE_ABS(codeblock_t *block, uop_t *uop) host_x86_MOV32_REG_REG(block, REG_ECX, src_reg); host_x86_CALL(block, codegen_mem_store_long); } +#ifdef RECOMPILER_DEBUG else fatal("MEM_STORE_ABS - %02x\n", uop->src_reg_b_real); +#endif host_x86_TEST32_REG(block, REG_ESI, REG_ESI); host_x86_JNZ(block, codegen_exit_rout); @@ -1015,8 +1065,10 @@ static int codegen_MEM_STORE_REG(codeblock_t *block, uop_t *uop) host_x86_MOVQ_XREG_XREG(block, REG_XMM_TEMP, src_reg); host_x86_CALL(block, codegen_mem_store_quad); } +#ifdef RECOMPILER_DEBUG else fatal("MEM_STORE_REG - %02x\n", uop->src_reg_b_real); +#endif host_x86_TEST32_REG(block, REG_ESI, REG_ESI); host_x86_JNZ(block, codegen_exit_rout); @@ -1063,11 +1115,12 @@ static int codegen_MEM_STORE_IMM_32(codeblock_t *block, uop_t *uop) static int codegen_MEM_STORE_SINGLE(codeblock_t *block, uop_t *uop) { int seg_reg = HOST_REG_GET(uop->src_reg_a_real), addr_reg = HOST_REG_GET(uop->src_reg_b_real), src_reg = HOST_REG_GET(uop->src_reg_c_real); +#ifdef RECOMPILER_DEBUG int src_size = IREG_GET_SIZE(uop->src_reg_c_real); if (!REG_IS_D(src_size)) fatal("MEM_STORE_SINGLE - %02x\n", uop->src_reg_b_real); - +#endif host_x86_LEA_REG_REG(block, REG_ESI, seg_reg, addr_reg); if (uop->imm_data) host_x86_ADD32_REG_IMM(block, REG_ESI, REG_ESI, uop->imm_data); @@ -1081,11 +1134,12 @@ static int codegen_MEM_STORE_SINGLE(codeblock_t *block, uop_t *uop) static int codegen_MEM_STORE_DOUBLE(codeblock_t *block, uop_t *uop) { int seg_reg = HOST_REG_GET(uop->src_reg_a_real), addr_reg = HOST_REG_GET(uop->src_reg_b_real), src_reg = HOST_REG_GET(uop->src_reg_c_real); +#ifdef RECOMPILER_DEBUG int src_size = IREG_GET_SIZE(uop->src_reg_c_real); if (!REG_IS_D(src_size)) fatal("MEM_STORE_DOUBLE - %02x\n", uop->src_reg_b_real); - +#endif host_x86_LEA_REG_REG(block, REG_ESI, seg_reg, addr_reg); if (uop->imm_data) host_x86_ADD32_REG_IMM(block, REG_ESI, REG_ESI, uop->imm_data); @@ -1122,9 +1176,10 @@ static int codegen_MOV(codeblock_t *block, uop_t *uop) { host_x86_MOVQ_XREG_XREG(block, dest_reg, src_reg); } +#ifdef RECOMPILER_DEBUG else fatal("MOV %02x %02x\n", uop->dest_reg_a_real, uop->src_reg_a_real); - +#endif return 0; } static int codegen_MOV_IMM(codeblock_t *block, uop_t *uop) @@ -1144,9 +1199,10 @@ static int codegen_MOV_IMM(codeblock_t *block, uop_t *uop) { host_x86_MOV8_REG_IMM(block, dest_reg, uop->imm_data); } +#ifdef RECOMPILER_DEBUG else fatal("MOV_IMM %02x\n", uop->dest_reg_a_real); - +#endif return 0; } static int codegen_MOV_PTR(codeblock_t *block, uop_t *uop) @@ -1171,8 +1227,10 @@ static int codegen_MOVSX(codeblock_t *block, uop_t *uop) { host_x86_MOVSX_REG_16_8(block, dest_reg, src_reg); } +#ifdef RECOMPILER_DEBUG else fatal("MOVSX %02x %02x\n", uop->dest_reg_a_real, uop->src_reg_a_real); +#endif return 0; } static int codegen_MOVZX(codeblock_t *block, uop_t *uop) @@ -1200,8 +1258,10 @@ static int codegen_MOVZX(codeblock_t *block, uop_t *uop) { host_x86_MOVZX_REG_16_8(block, dest_reg, src_reg); } +#ifdef RECOMPILER_DEBUG else fatal("MOVZX %02x %02x\n", uop->dest_reg_a_real, uop->src_reg_a_real); +#endif return 0; } @@ -1228,9 +1288,10 @@ static int codegen_MOV_DOUBLE_INT(codeblock_t *block, uop_t *uop) host_x87_FSTPd_BASE(block, REG_ESP); host_x86_MOVQ_XREG_BASE_OFFSET(block, dest_reg, REG_ESP, 0); } +#ifdef RECOMPILER_DEBUG else fatal("MOV_DOUBLE_INT %02x %02x\n", uop->dest_reg_a_real, uop->src_reg_a_real); - +#endif return 0; } static int codegen_MOV_INT_DOUBLE(codeblock_t *block, uop_t *uop) @@ -1251,9 +1312,10 @@ static int codegen_MOV_INT_DOUBLE(codeblock_t *block, uop_t *uop) host_x86_MOV16_REG_REG(block, dest_reg, REG_ECX); host_x86_LDMXCSR(block, &cpu_state.old_fp_control); } +#ifdef RECOMPILER_DEBUG else fatal("MOV_INT_DOUBLE %02x %02x\n", uop->dest_reg_a_real, uop->src_reg_a_real); - +#endif return 0; } @@ -1282,9 +1344,10 @@ static int codegen_MOV_INT_DOUBLE_64(codeblock_t *block, uop_t *uop) *branch_offset = (uint32_t)((uintptr_t)&block_write_data[block_pos] - (uintptr_t)branch_offset) - 4; } +#ifdef RECOMPILER_DEBUG else fatal("MOV_INT_DOUBLE_64 %02x %02x\n", uop->dest_reg_a_real, uop->src_reg_a_real); - +#endif return 0; } @@ -1313,9 +1376,10 @@ static int codegen_OR(codeblock_t *block, uop_t *uop) { host_x86_OR8_REG_REG(block, dest_reg, src_reg_a, src_reg_b); } +#ifdef RECOMPILER_DEBUG else fatal("OR %02x %02x %02x\n", uop->dest_reg_a_real, uop->src_reg_a_real, uop->src_reg_b_real); - +#endif return 0; } static int codegen_OR_IMM(codeblock_t *block, uop_t *uop) @@ -1335,9 +1399,10 @@ static int codegen_OR_IMM(codeblock_t *block, uop_t *uop) { host_x86_OR8_REG_IMM(block, dest_reg, src_reg, uop->imm_data); } +#ifdef RECOMPILER_DEBUG else fatal("OR_IMM %02x %02x\n", uop->dest_reg_a_real, uop->src_reg_a_real); - +#endif return 0; } @@ -1350,9 +1415,10 @@ static int codegen_PACKSSWB(codeblock_t *block, uop_t *uop) { host_x86_PACKSSWB_XREG_XREG(block, dest_reg, src_reg_b); } +#ifdef RECOMPILER_DEBUG else fatal("PACKSSWB %02x %02x %02x\n", uop->dest_reg_a_real, uop->src_reg_a_real, uop->src_reg_b_real); - +#endif return 0; } static int codegen_PACKSSDW(codeblock_t *block, uop_t *uop) @@ -1364,9 +1430,10 @@ static int codegen_PACKSSDW(codeblock_t *block, uop_t *uop) { host_x86_PACKSSDW_XREG_XREG(block, dest_reg, src_reg_b); } +#ifdef RECOMPILER_DEBUG else fatal("PACKSSDW %02x %02x %02x\n", uop->dest_reg_a_real, uop->src_reg_a_real, uop->src_reg_b_real); - +#endif return 0; } static int codegen_PACKUSWB(codeblock_t *block, uop_t *uop) @@ -1378,9 +1445,10 @@ static int codegen_PACKUSWB(codeblock_t *block, uop_t *uop) { host_x86_PACKUSWB_XREG_XREG(block, dest_reg, src_reg_b); } +#ifdef RECOMPILER_DEBUG else fatal("PACKUSWB %02x %02x %02x\n", uop->dest_reg_a_real, uop->src_reg_a_real, uop->src_reg_b_real); - +#endif return 0; } @@ -1393,9 +1461,10 @@ static int codegen_PADDB(codeblock_t *block, uop_t *uop) { host_x86_PADDB_XREG_XREG(block, dest_reg, src_reg_b); } +#ifdef RECOMPILER_DEBUG else fatal("PADDB %02x %02x %02x\n", uop->dest_reg_a_real, uop->src_reg_a_real, uop->src_reg_b_real); - +#endif return 0; } static int codegen_PADDW(codeblock_t *block, uop_t *uop) @@ -1407,9 +1476,10 @@ static int codegen_PADDW(codeblock_t *block, uop_t *uop) { host_x86_PADDW_XREG_XREG(block, dest_reg, src_reg_b); } +#ifdef RECOMPILER_DEBUG else fatal("PADDW %02x %02x %02x\n", uop->dest_reg_a_real, uop->src_reg_a_real, uop->src_reg_b_real); - +#endif return 0; } static int codegen_PADDD(codeblock_t *block, uop_t *uop) @@ -1421,9 +1491,10 @@ static int codegen_PADDD(codeblock_t *block, uop_t *uop) { host_x86_PADDD_XREG_XREG(block, dest_reg, src_reg_b); } +#ifdef RECOMPILER_DEBUG else fatal("PADDD %02x %02x %02x\n", uop->dest_reg_a_real, uop->src_reg_a_real, uop->src_reg_b_real); - +#endif return 0; } static int codegen_PADDSB(codeblock_t *block, uop_t *uop) @@ -1435,9 +1506,10 @@ static int codegen_PADDSB(codeblock_t *block, uop_t *uop) { host_x86_PADDSB_XREG_XREG(block, dest_reg, src_reg_b); } +#ifdef RECOMPILER_DEBUG else fatal("PADDSB %02x %02x %02x\n", uop->dest_reg_a_real, uop->src_reg_a_real, uop->src_reg_b_real); - +#endif return 0; } static int codegen_PADDSW(codeblock_t *block, uop_t *uop) @@ -1449,9 +1521,10 @@ static int codegen_PADDSW(codeblock_t *block, uop_t *uop) { host_x86_PADDSW_XREG_XREG(block, dest_reg, src_reg_b); } +#ifdef RECOMPILER_DEBUG else fatal("PADDSW %02x %02x %02x\n", uop->dest_reg_a_real, uop->src_reg_a_real, uop->src_reg_b_real); - +#endif return 0; } static int codegen_PADDUSB(codeblock_t *block, uop_t *uop) @@ -1463,9 +1536,10 @@ static int codegen_PADDUSB(codeblock_t *block, uop_t *uop) { host_x86_PADDUSB_XREG_XREG(block, dest_reg, src_reg_b); } +#ifdef RECOMPILER_DEBUG else fatal("PADDUSB %02x %02x %02x\n", uop->dest_reg_a_real, uop->src_reg_a_real, uop->src_reg_b_real); - +#endif return 0; } static int codegen_PADDUSW(codeblock_t *block, uop_t *uop) @@ -1477,9 +1551,10 @@ static int codegen_PADDUSW(codeblock_t *block, uop_t *uop) { host_x86_PADDUSW_XREG_XREG(block, dest_reg, src_reg_b); } +#ifdef RECOMPILER_DEBUG else fatal("PADDUSW %02x %02x %02x\n", uop->dest_reg_a_real, uop->src_reg_a_real, uop->src_reg_b_real); - +#endif return 0; } @@ -1492,9 +1567,10 @@ static int codegen_PCMPEQB(codeblock_t *block, uop_t *uop) { host_x86_PCMPEQB_XREG_XREG(block, dest_reg, src_reg_b); } +#ifdef RECOMPILER_DEBUG else fatal("PCMPEQB %02x %02x %02x\n", uop->dest_reg_a_real, uop->src_reg_a_real, uop->src_reg_b_real); - +#endif return 0; } static int codegen_PCMPEQW(codeblock_t *block, uop_t *uop) @@ -1506,9 +1582,10 @@ static int codegen_PCMPEQW(codeblock_t *block, uop_t *uop) { host_x86_PCMPEQW_XREG_XREG(block, dest_reg, src_reg_b); } +#ifdef RECOMPILER_DEBUG else fatal("PCMPEQW %02x %02x %02x\n", uop->dest_reg_a_real, uop->src_reg_a_real, uop->src_reg_b_real); - +#endif return 0; } static int codegen_PCMPEQD(codeblock_t *block, uop_t *uop) @@ -1520,9 +1597,10 @@ static int codegen_PCMPEQD(codeblock_t *block, uop_t *uop) { host_x86_PCMPEQD_XREG_XREG(block, dest_reg, src_reg_b); } +#ifdef RECOMPILER_DEBUG else fatal("PCMPEQD %02x %02x %02x\n", uop->dest_reg_a_real, uop->src_reg_a_real, uop->src_reg_b_real); - +#endif return 0; } static int codegen_PCMPGTB(codeblock_t *block, uop_t *uop) @@ -1534,9 +1612,10 @@ static int codegen_PCMPGTB(codeblock_t *block, uop_t *uop) { host_x86_PCMPGTB_XREG_XREG(block, dest_reg, src_reg_b); } +#ifdef RECOMPILER_DEBUG else fatal("PCMPGTB %02x %02x %02x\n", uop->dest_reg_a_real, uop->src_reg_a_real, uop->src_reg_b_real); - +#endif return 0; } static int codegen_PCMPGTW(codeblock_t *block, uop_t *uop) @@ -1548,9 +1627,10 @@ static int codegen_PCMPGTW(codeblock_t *block, uop_t *uop) { host_x86_PCMPGTW_XREG_XREG(block, dest_reg, src_reg_b); } +#ifdef RECOMPILER_DEBUG else fatal("PCMPGTW %02x %02x %02x\n", uop->dest_reg_a_real, uop->src_reg_a_real, uop->src_reg_b_real); - +#endif return 0; } static int codegen_PCMPGTD(codeblock_t *block, uop_t *uop) @@ -1562,9 +1642,10 @@ static int codegen_PCMPGTD(codeblock_t *block, uop_t *uop) { host_x86_PCMPGTD_XREG_XREG(block, dest_reg, src_reg_b); } +#ifdef RECOMPILER_DEBUG else fatal("PCMPGTD %02x %02x %02x\n", uop->dest_reg_a_real, uop->src_reg_a_real, uop->src_reg_b_real); - +#endif return 0; } @@ -1579,9 +1660,10 @@ static int codegen_PF2ID(codeblock_t *block, uop_t *uop) host_x86_CVTPS2DQ_XREG_XREG(block, dest_reg, src_reg_a); host_x86_LDMXCSR(block, &cpu_state.old_fp_control); } +#ifdef RECOMPILER_DEBUG else fatal("PF2ID %02x %02x\n", uop->dest_reg_a_real); - +#endif return 0; } static int codegen_PFADD(codeblock_t *block, uop_t *uop) @@ -1593,9 +1675,10 @@ static int codegen_PFADD(codeblock_t *block, uop_t *uop) { host_x86_ADDPS_XREG_XREG(block, dest_reg, src_reg_b); } +#ifdef RECOMPILER_DEBUG else fatal("PFADD %02x %02x %02x\n", uop->dest_reg_a_real, uop->src_reg_a_real, uop->src_reg_b_real); - +#endif return 0; } static int codegen_PFCMPEQ(codeblock_t *block, uop_t *uop) @@ -1607,9 +1690,10 @@ static int codegen_PFCMPEQ(codeblock_t *block, uop_t *uop) { host_x86_CMPPS_XREG_XREG(block, dest_reg, src_reg_b, CMPPS_EQ); } +#ifdef RECOMPILER_DEBUG else fatal("PFCMPEQ %02x %02x %02x\n", uop->dest_reg_a_real, uop->src_reg_a_real, uop->src_reg_b_real); - +#endif return 0; } static int codegen_PFCMPGE(codeblock_t *block, uop_t *uop) @@ -1621,9 +1705,10 @@ static int codegen_PFCMPGE(codeblock_t *block, uop_t *uop) { host_x86_CMPPS_XREG_XREG(block, dest_reg, src_reg_b, CMPPS_NLT); } +#ifdef RECOMPILER_DEBUG else fatal("PFCMPGE %02x %02x %02x\n", uop->dest_reg_a_real, uop->src_reg_a_real, uop->src_reg_b_real); - +#endif return 0; } static int codegen_PFCMPGT(codeblock_t *block, uop_t *uop) @@ -1635,9 +1720,10 @@ static int codegen_PFCMPGT(codeblock_t *block, uop_t *uop) { host_x86_CMPPS_XREG_XREG(block, dest_reg, src_reg_b, CMPPS_NLE); } +#ifdef RECOMPILER_DEBUG else fatal("PFCMPGT %02x %02x %02x\n", uop->dest_reg_a_real, uop->src_reg_a_real, uop->src_reg_b_real); - +#endif return 0; } static int codegen_PFMAX(codeblock_t *block, uop_t *uop) @@ -1649,9 +1735,10 @@ static int codegen_PFMAX(codeblock_t *block, uop_t *uop) { host_x86_MAXPS_XREG_XREG(block, dest_reg, src_reg_b); } +#ifdef RECOMPILER_DEBUG else fatal("PFMAX %02x %02x %02x\n", uop->dest_reg_a_real, uop->src_reg_a_real, uop->src_reg_b_real); - +#endif return 0; } static int codegen_PFMIN(codeblock_t *block, uop_t *uop) @@ -1663,9 +1750,10 @@ static int codegen_PFMIN(codeblock_t *block, uop_t *uop) { host_x86_MINPS_XREG_XREG(block, dest_reg, src_reg_b); } +#ifdef RECOMPILER_DEBUG else fatal("PFMIN %02x %02x %02x\n", uop->dest_reg_a_real, uop->src_reg_a_real, uop->src_reg_b_real); - +#endif return 0; } static int codegen_PFMUL(codeblock_t *block, uop_t *uop) @@ -1677,9 +1765,10 @@ static int codegen_PFMUL(codeblock_t *block, uop_t *uop) { host_x86_MULPS_XREG_XREG(block, dest_reg, src_reg_b); } +#ifdef RECOMPILER_DEBUG else fatal("PFMUL %02x %02x %02x\n", uop->dest_reg_a_real, uop->src_reg_a_real, uop->src_reg_b_real); - +#endif return 0; } static int codegen_PFRCP(codeblock_t *block, uop_t *uop) @@ -1696,9 +1785,10 @@ static int codegen_PFRCP(codeblock_t *block, uop_t *uop) host_x86_DIVSS_XREG_XREG(block, dest_reg, REG_XMM_TEMP); host_x86_UNPCKLPS_XREG_XREG(block, dest_reg, dest_reg); } +#ifdef RECOMPILER_DEBUG else fatal("PFRCP %02x %02x\n", uop->dest_reg_a_real); - +#endif return 0; } static int codegen_PFRSQRT(codeblock_t *block, uop_t *uop) @@ -1715,9 +1805,10 @@ static int codegen_PFRSQRT(codeblock_t *block, uop_t *uop) host_x86_DIVSS_XREG_XREG(block, dest_reg, REG_XMM_TEMP); host_x86_UNPCKLPS_XREG_XREG(block, dest_reg, dest_reg); } +#ifdef RECOMPILER_DEBUG else fatal("PFRSQRT %02x %02x\n", uop->dest_reg_a_real); - +#endif return 0; } static int codegen_PFSUB(codeblock_t *block, uop_t *uop) @@ -1735,9 +1826,10 @@ static int codegen_PFSUB(codeblock_t *block, uop_t *uop) host_x86_SUBPS_XREG_XREG(block, REG_XMM_TEMP, src_reg_b); host_x86_MOVQ_XREG_XREG(block, dest_reg, REG_XMM_TEMP); } +#ifdef RECOMPILER_DEBUG else fatal("PFSUB %02x %02x %02x\n", uop->dest_reg_a_real, uop->src_reg_a_real, uop->src_reg_b_real); - +#endif return 0; } static int codegen_PI2FD(codeblock_t *block, uop_t *uop) @@ -1749,9 +1841,10 @@ static int codegen_PI2FD(codeblock_t *block, uop_t *uop) { host_x86_CVTDQ2PS_XREG_XREG(block, dest_reg, src_reg_a); } +#ifdef RECOMPILER_DEBUG else fatal("PI2FD %02x %02x\n", uop->dest_reg_a_real); - +#endif return 0; } @@ -1764,9 +1857,10 @@ static int codegen_PMADDWD(codeblock_t *block, uop_t *uop) { host_x86_PMADDWD_XREG_XREG(block, dest_reg, src_reg_b); } +#ifdef RECOMPILER_DEBUG else fatal("PMULHW %02x %02x %02x\n", uop->dest_reg_a_real, uop->src_reg_a_real, uop->src_reg_b_real); - +#endif return 0; } static int codegen_PMULHW(codeblock_t *block, uop_t *uop) @@ -1778,9 +1872,10 @@ static int codegen_PMULHW(codeblock_t *block, uop_t *uop) { host_x86_PMULHW_XREG_XREG(block, dest_reg, src_reg_b); } +#ifdef RECOMPILER_DEBUG else fatal("PMULHW %02x %02x %02x\n", uop->dest_reg_a_real, uop->src_reg_a_real, uop->src_reg_b_real); - +#endif return 0; } static int codegen_PMULLW(codeblock_t *block, uop_t *uop) @@ -1792,9 +1887,10 @@ static int codegen_PMULLW(codeblock_t *block, uop_t *uop) { host_x86_PMULLW_XREG_XREG(block, dest_reg, src_reg_b); } +#ifdef RECOMPILER_DEBUG else fatal("PMULLW %02x %02x %02x\n", uop->dest_reg_a_real, uop->src_reg_a_real, uop->src_reg_b_real); - +#endif return 0; } @@ -1807,9 +1903,10 @@ static int codegen_PSLLW_IMM(codeblock_t *block, uop_t *uop) { host_x86_PSLLW_XREG_IMM(block, dest_reg, uop->imm_data); } +#ifdef RECOMPILER_DEBUG else fatal("PSLLW_IMM %02x %02x\n", uop->dest_reg_a_real, uop->src_reg_a_real); - +#endif return 0; } static int codegen_PSLLD_IMM(codeblock_t *block, uop_t *uop) @@ -1821,9 +1918,10 @@ static int codegen_PSLLD_IMM(codeblock_t *block, uop_t *uop) { host_x86_PSLLD_XREG_IMM(block, dest_reg, uop->imm_data); } +#ifdef RECOMPILER_DEBUG else fatal("PSLLD_IMM %02x %02x\n", uop->dest_reg_a_real, uop->src_reg_a_real); - +#endif return 0; } static int codegen_PSLLQ_IMM(codeblock_t *block, uop_t *uop) @@ -1835,9 +1933,10 @@ static int codegen_PSLLQ_IMM(codeblock_t *block, uop_t *uop) { host_x86_PSLLQ_XREG_IMM(block, dest_reg, uop->imm_data); } +#ifdef RECOMPILER_DEBUG else fatal("PSLLQ_IMM %02x %02x\n", uop->dest_reg_a_real, uop->src_reg_a_real); - +#endif return 0; } static int codegen_PSRAW_IMM(codeblock_t *block, uop_t *uop) @@ -1849,9 +1948,10 @@ static int codegen_PSRAW_IMM(codeblock_t *block, uop_t *uop) { host_x86_PSRAW_XREG_IMM(block, dest_reg, uop->imm_data); } +#ifdef RECOMPILER_DEBUG else fatal("PSRAW_IMM %02x %02x\n", uop->dest_reg_a_real, uop->src_reg_a_real); - +#endif return 0; } static int codegen_PSRAD_IMM(codeblock_t *block, uop_t *uop) @@ -1863,9 +1963,10 @@ static int codegen_PSRAD_IMM(codeblock_t *block, uop_t *uop) { host_x86_PSRAD_XREG_IMM(block, dest_reg, uop->imm_data); } +#ifdef RECOMPILER_DEBUG else fatal("PSRAD_IMM %02x %02x\n", uop->dest_reg_a_real, uop->src_reg_a_real); - +#endif return 0; } static int codegen_PSRAQ_IMM(codeblock_t *block, uop_t *uop) @@ -1877,9 +1978,10 @@ static int codegen_PSRAQ_IMM(codeblock_t *block, uop_t *uop) { host_x86_PSRAQ_XREG_IMM(block, dest_reg, uop->imm_data); } +#ifdef RECOMPILER_DEBUG else fatal("PSRAQ_IMM %02x %02x\n", uop->dest_reg_a_real, uop->src_reg_a_real); - +#endif return 0; } static int codegen_PSRLW_IMM(codeblock_t *block, uop_t *uop) @@ -1891,9 +1993,10 @@ static int codegen_PSRLW_IMM(codeblock_t *block, uop_t *uop) { host_x86_PSRLW_XREG_IMM(block, dest_reg, uop->imm_data); } +#ifdef RECOMPILER_DEBUG else fatal("PSRLW_IMM %02x %02x\n", uop->dest_reg_a_real, uop->src_reg_a_real); - +#endif return 0; } static int codegen_PSRLD_IMM(codeblock_t *block, uop_t *uop) @@ -1905,9 +2008,10 @@ static int codegen_PSRLD_IMM(codeblock_t *block, uop_t *uop) { host_x86_PSRLD_XREG_IMM(block, dest_reg, uop->imm_data); } +#ifdef RECOMPILER_DEBUG else fatal("PSRLD_IMM %02x %02x\n", uop->dest_reg_a_real, uop->src_reg_a_real); - +#endif return 0; } static int codegen_PSRLQ_IMM(codeblock_t *block, uop_t *uop) @@ -1919,9 +2023,10 @@ static int codegen_PSRLQ_IMM(codeblock_t *block, uop_t *uop) { host_x86_PSRLQ_XREG_IMM(block, dest_reg, uop->imm_data); } +#ifdef RECOMPILER_DEBUG else fatal("PSRLQ_IMM %02x %02x\n", uop->dest_reg_a_real, uop->src_reg_a_real); - +#endif return 0; } @@ -1934,9 +2039,10 @@ static int codegen_PSUBB(codeblock_t *block, uop_t *uop) { host_x86_PSUBB_XREG_XREG(block, dest_reg, src_reg_b); } +#ifdef RECOMPILER_DEBUG else fatal("PSUBB %02x %02x %02x\n", uop->dest_reg_a_real, uop->src_reg_a_real, uop->src_reg_b_real); - +#endif return 0; } static int codegen_PSUBW(codeblock_t *block, uop_t *uop) @@ -1948,9 +2054,10 @@ static int codegen_PSUBW(codeblock_t *block, uop_t *uop) { host_x86_PSUBW_XREG_XREG(block, dest_reg, src_reg_b); } +#ifdef RECOMPILER_DEBUG else fatal("PSUBW %02x %02x %02x\n", uop->dest_reg_a_real, uop->src_reg_a_real, uop->src_reg_b_real); - +#endif return 0; } static int codegen_PSUBD(codeblock_t *block, uop_t *uop) @@ -1962,9 +2069,10 @@ static int codegen_PSUBD(codeblock_t *block, uop_t *uop) { host_x86_PSUBD_XREG_XREG(block, dest_reg, src_reg_b); } +#ifdef RECOMPILER_DEBUG else fatal("PSUBD %02x %02x %02x\n", uop->dest_reg_a_real, uop->src_reg_a_real, uop->src_reg_b_real); - +#endif return 0; } static int codegen_PSUBSB(codeblock_t *block, uop_t *uop) @@ -1976,9 +2084,10 @@ static int codegen_PSUBSB(codeblock_t *block, uop_t *uop) { host_x86_PSUBSB_XREG_XREG(block, dest_reg, src_reg_b); } +#ifdef RECOMPILER_DEBUG else fatal("PSUBSB %02x %02x %02x\n", uop->dest_reg_a_real, uop->src_reg_a_real, uop->src_reg_b_real); - +#endif return 0; } static int codegen_PSUBSW(codeblock_t *block, uop_t *uop) @@ -1990,9 +2099,10 @@ static int codegen_PSUBSW(codeblock_t *block, uop_t *uop) { host_x86_PSUBSW_XREG_XREG(block, dest_reg, src_reg_b); } +#ifdef RECOMPILER_DEBUG else fatal("PSUBSW %02x %02x %02x\n", uop->dest_reg_a_real, uop->src_reg_a_real, uop->src_reg_b_real); - +#endif return 0; } static int codegen_PSUBUSB(codeblock_t *block, uop_t *uop) @@ -2004,9 +2114,10 @@ static int codegen_PSUBUSB(codeblock_t *block, uop_t *uop) { host_x86_PSUBUSB_XREG_XREG(block, dest_reg, src_reg_b); } +#ifdef RECOMPILER_DEBUG else fatal("PSUBUSB %02x %02x %02x\n", uop->dest_reg_a_real, uop->src_reg_a_real, uop->src_reg_b_real); - +#endif return 0; } static int codegen_PSUBUSW(codeblock_t *block, uop_t *uop) @@ -2018,9 +2129,10 @@ static int codegen_PSUBUSW(codeblock_t *block, uop_t *uop) { host_x86_PSUBUSW_XREG_XREG(block, dest_reg, src_reg_b); } +#ifdef RECOMPILER_DEBUG else fatal("PSUBUSW %02x %02x %02x\n", uop->dest_reg_a_real, uop->src_reg_a_real, uop->src_reg_b_real); - +#endif return 0; } @@ -2033,9 +2145,10 @@ static int codegen_PUNPCKHBW(codeblock_t *block, uop_t *uop) { host_x86_PUNPCKHBW_XREG_XREG(block, dest_reg, src_reg_b); } +#ifdef RECOMPILER_DEBUG else fatal("PUNPCKHBW %02x %02x %02x\n", uop->dest_reg_a_real, uop->src_reg_a_real, uop->src_reg_b_real); - +#endif return 0; } static int codegen_PUNPCKHWD(codeblock_t *block, uop_t *uop) @@ -2047,9 +2160,10 @@ static int codegen_PUNPCKHWD(codeblock_t *block, uop_t *uop) { host_x86_PUNPCKHWD_XREG_XREG(block, dest_reg, src_reg_b); } +#ifdef RECOMPILER_DEBUG else fatal("PUNPCKHWD %02x %02x %02x\n", uop->dest_reg_a_real, uop->src_reg_a_real, uop->src_reg_b_real); - +#endif return 0; } static int codegen_PUNPCKHDQ(codeblock_t *block, uop_t *uop) @@ -2061,9 +2175,10 @@ static int codegen_PUNPCKHDQ(codeblock_t *block, uop_t *uop) { host_x86_PUNPCKHDQ_XREG_XREG(block, dest_reg, src_reg_b); } +#ifdef RECOMPILER_DEBUG else fatal("PUNPCKHDQ %02x %02x %02x\n", uop->dest_reg_a_real, uop->src_reg_a_real, uop->src_reg_b_real); - +#endif return 0; } static int codegen_PUNPCKLBW(codeblock_t *block, uop_t *uop) @@ -2075,9 +2190,10 @@ static int codegen_PUNPCKLBW(codeblock_t *block, uop_t *uop) { host_x86_PUNPCKLBW_XREG_XREG(block, dest_reg, src_reg_b); } +#ifdef RECOMPILER_DEBUG else fatal("PUNPCKLBW %02x %02x %02x\n", uop->dest_reg_a_real, uop->src_reg_a_real, uop->src_reg_b_real); - +#endif return 0; } static int codegen_PUNPCKLWD(codeblock_t *block, uop_t *uop) @@ -2089,9 +2205,10 @@ static int codegen_PUNPCKLWD(codeblock_t *block, uop_t *uop) { host_x86_PUNPCKLWD_XREG_XREG(block, dest_reg, src_reg_b); } +#ifdef RECOMPILER_DEBUG else fatal("PUNPCKLWD %02x %02x %02x\n", uop->dest_reg_a_real, uop->src_reg_a_real, uop->src_reg_b_real); - +#endif return 0; } static int codegen_PUNPCKLDQ(codeblock_t *block, uop_t *uop) @@ -2103,9 +2220,10 @@ static int codegen_PUNPCKLDQ(codeblock_t *block, uop_t *uop) { host_x86_PUNPCKLDQ_XREG_XREG(block, dest_reg, src_reg_b); } +#ifdef RECOMPILER_DEBUG else fatal("PUNPCKLDQ %02x %02x %02x\n", uop->dest_reg_a_real, uop->src_reg_a_real, uop->src_reg_b_real); - +#endif return 0; } @@ -2133,9 +2251,10 @@ static int codegen_SAR(codeblock_t *block, uop_t *uop) host_x86_MOV8_REG_REG(block, dest_reg, src_reg); host_x86_SAR8_CL(block, dest_reg); } +#ifdef RECOMPILER_DEBUG else fatal("SAR %02x %02x\n", uop->dest_reg_a_real, uop->src_reg_a_real); - +#endif return 0; } static int codegen_SAR_IMM(codeblock_t *block, uop_t *uop) @@ -2161,9 +2280,10 @@ static int codegen_SAR_IMM(codeblock_t *block, uop_t *uop) host_x86_MOV8_REG_REG(block, dest_reg, src_reg); host_x86_SAR8_IMM(block, dest_reg, uop->imm_data); } +#ifdef RECOMPILER_DEBUG else fatal("SAR_IMM %02x %02x\n", uop->dest_reg_a_real, uop->src_reg_a_real); - +#endif return 0; } static int codegen_SHL(codeblock_t *block, uop_t *uop) @@ -2190,9 +2310,10 @@ static int codegen_SHL(codeblock_t *block, uop_t *uop) host_x86_MOV8_REG_REG(block, dest_reg, src_reg); host_x86_SHL8_CL(block, dest_reg); } +#ifdef RECOMPILER_DEBUG else fatal("SHL %02x %02x\n", uop->dest_reg_a_real, uop->src_reg_a_real); - +#endif return 0; } static int codegen_SHL_IMM(codeblock_t *block, uop_t *uop) @@ -2218,9 +2339,10 @@ static int codegen_SHL_IMM(codeblock_t *block, uop_t *uop) host_x86_MOV8_REG_REG(block, dest_reg, src_reg); host_x86_SHL8_IMM(block, dest_reg, uop->imm_data); } +#ifdef RECOMPILER_DEBUG else fatal("SHL_IMM %02x %02x\n", uop->dest_reg_a_real, uop->src_reg_a_real); - +#endif return 0; } static int codegen_SHR(codeblock_t *block, uop_t *uop) @@ -2247,9 +2369,10 @@ static int codegen_SHR(codeblock_t *block, uop_t *uop) host_x86_MOV8_REG_REG(block, dest_reg, src_reg); host_x86_SHR8_CL(block, dest_reg); } +#ifdef RECOMPILER_DEBUG else fatal("SHR %02x %02x\n", uop->dest_reg_a_real, uop->src_reg_a_real); - +#endif return 0; } static int codegen_SHR_IMM(codeblock_t *block, uop_t *uop) @@ -2275,9 +2398,10 @@ static int codegen_SHR_IMM(codeblock_t *block, uop_t *uop) host_x86_MOV8_REG_REG(block, dest_reg, src_reg); host_x86_SHR8_IMM(block, dest_reg, uop->imm_data); } +#ifdef RECOMPILER_DEBUG else fatal("SHR_IMM %02x %02x\n", uop->dest_reg_a_real, uop->src_reg_a_real); - +#endif return 0; } @@ -2315,9 +2439,10 @@ static int codegen_SUB(codeblock_t *block, uop_t *uop) host_x86_MOV8_REG_REG(block, dest_reg, src_reg_a); host_x86_SUB8_REG_REG(block, dest_reg, dest_reg, src_reg_b); } +#ifdef RECOMPILER_DEBUG else fatal("SUB %02x %02x %02x\n", uop->dest_reg_a_real, uop->src_reg_a_real, uop->src_reg_b_real); - +#endif return 0; } static int codegen_SUB_IMM(codeblock_t *block, uop_t *uop) @@ -2343,9 +2468,10 @@ static int codegen_SUB_IMM(codeblock_t *block, uop_t *uop) host_x86_MOV8_REG_REG(block, dest_reg, src_reg); host_x86_SUB8_REG_IMM(block, dest_reg, dest_reg, uop->imm_data); } +#ifdef RECOMPILER_DEBUG else fatal("SUB_IMM %02x %02x\n", uop->dest_reg_a_real, uop->src_reg_a_real); - +#endif return 0; } @@ -2366,9 +2492,10 @@ static int codegen_TEST_JNS_DEST(codeblock_t *block, uop_t *uop) { host_x86_TEST8_REG(block, src_reg, src_reg); } +#ifdef RECOMPILER_DEBUG else fatal("TEST_JNS_DEST %02x\n", uop->src_reg_a_real); - +#endif uop->p = host_x86_JNS_long(block); return 0; @@ -2390,9 +2517,10 @@ static int codegen_TEST_JS_DEST(codeblock_t *block, uop_t *uop) { host_x86_TEST8_REG(block, src_reg, src_reg); } +#ifdef RECOMPILER_DEBUG else fatal("TEST_JS_DEST %02x\n", uop->src_reg_a_real); - +#endif uop->p = host_x86_JS_long(block); return 0; @@ -2419,9 +2547,10 @@ static int codegen_XOR(codeblock_t *block, uop_t *uop) { host_x86_XOR8_REG_REG(block, dest_reg, src_reg_a, src_reg_b); } +#ifdef RECOMPILER_DEBUG else fatal("XOR %02x %02x %02x\n", uop->dest_reg_a_real, uop->src_reg_a_real, uop->src_reg_b_real); - +#endif return 0; } static int codegen_XOR_IMM(codeblock_t *block, uop_t *uop) @@ -2441,9 +2570,10 @@ static int codegen_XOR_IMM(codeblock_t *block, uop_t *uop) { host_x86_XOR8_REG_IMM(block, dest_reg, src_reg, uop->imm_data); } +#ifdef RECOMPILER_DEBUG else fatal("XOR_IMM %02x %02x\n", uop->dest_reg_a_real, uop->src_reg_a_real); - +#endif return 0; }