From 67f4ec6075d3c3242d322bd82fce7d1f48216e32 Mon Sep 17 00:00:00 2001 From: Cacodemon345 Date: Wed, 7 May 2025 00:48:08 +0600 Subject: [PATCH] x64 NDR: Guard fatals behind RECOMPILER_DEBUG --- src/codegen_new/codegen_backend_x86-64_ops.c | 202 +++++++++---------- 1 file changed, 101 insertions(+), 101 deletions(-) diff --git a/src/codegen_new/codegen_backend_x86-64_ops.c b/src/codegen_new/codegen_backend_x86-64_ops.c index 96b2d1d08..9f89012c6 100644 --- a/src/codegen_new/codegen_backend_x86-64_ops.c +++ b/src/codegen_new/codegen_backend_x86-64_ops.c @@ -68,7 +68,7 @@ jmp(codeblock_t *block, uintptr_t func) void host_x86_ADD8_REG_IMM(codeblock_t *block, int dst_reg, uint8_t imm_data) { -#if 0 +#ifdef RECOMPILER_DEBUG if (dst_reg & 8) fatal("host_x86_ADD8_REG_IMM - dst_reg & 8\n"); #endif @@ -84,7 +84,7 @@ host_x86_ADD8_REG_IMM(codeblock_t *block, int dst_reg, uint8_t imm_data) void host_x86_ADD16_REG_IMM(codeblock_t *block, int dst_reg, uint16_t imm_data) { -#if 0 +#ifdef RECOMPILER_DEBUG if (dst_reg & 8) fatal("host_x86_ADD16_REG_IMM - dst_reg & 8\n"); #endif @@ -105,7 +105,7 @@ host_x86_ADD16_REG_IMM(codeblock_t *block, int dst_reg, uint16_t imm_data) void host_x86_ADD32_REG_IMM(codeblock_t *block, int dst_reg, uint32_t imm_data) { -#if 0 +#ifdef RECOMPILER_DEBUG if (dst_reg & 8) fatal("host_x86_ADD32_REG_IMM - dst_reg & 8\n"); #endif @@ -126,7 +126,7 @@ host_x86_ADD32_REG_IMM(codeblock_t *block, int dst_reg, uint32_t imm_data) void host_x86_ADD64_REG_IMM(codeblock_t *block, int dst_reg, uint64_t imm_data) { -#if 0 +#ifdef RECOMPILER_DEBUG if (dst_reg & 8) fatal("host_x86_ADD64_REG_IMM - dst_reg & 8\n"); #endif @@ -140,7 +140,7 @@ host_x86_ADD64_REG_IMM(codeblock_t *block, int dst_reg, uint64_t imm_data) void host_x86_ADD8_REG_REG(codeblock_t *block, int dst_reg, int src_reg) { -#if 0 +#ifdef RECOMPILER_DEBUG if ((dst_reg & 8) || (src_reg & 8)) fatal("host_x86_ADD8_REG_REG - dst_reg & 8\n"); #endif @@ -151,7 +151,7 @@ host_x86_ADD8_REG_REG(codeblock_t *block, int dst_reg, int src_reg) void host_x86_ADD16_REG_REG(codeblock_t *block, int dst_reg, int src_reg) { -#if 0 +#ifdef RECOMPILER_DEBUG if ((dst_reg & 8) || (src_reg & 8)) fatal("host_x86_ADD16_REG_REG - dst_reg & 8\n"); #endif @@ -162,7 +162,7 @@ host_x86_ADD16_REG_REG(codeblock_t *block, int dst_reg, int src_reg) void host_x86_ADD32_REG_REG(codeblock_t *block, int dst_reg, int src_reg) { -#if 0 +#ifdef RECOMPILER_DEBUG if ((dst_reg & 8) || (src_reg & 8)) fatal("host_x86_ADD32_REG_REG - dst_reg & 8\n"); #endif @@ -174,7 +174,7 @@ host_x86_ADD32_REG_REG(codeblock_t *block, int dst_reg, int src_reg) void host_x86_AND8_REG_IMM(codeblock_t *block, int dst_reg, uint8_t imm_data) { -#if 0 +#ifdef RECOMPILER_DEBUG if (dst_reg & 8) fatal("host_x86_AND8_REG_IMM - dst_reg & 8\n"); #endif @@ -190,7 +190,7 @@ host_x86_AND8_REG_IMM(codeblock_t *block, int dst_reg, uint8_t imm_data) void host_x86_AND16_REG_IMM(codeblock_t *block, int dst_reg, uint16_t imm_data) { -#if 0 +#ifdef RECOMPILER_DEBUG if (dst_reg & 8) fatal("host_x86_AND16_REG_IMM - dst_reg & 8\n"); #endif @@ -211,7 +211,7 @@ host_x86_AND16_REG_IMM(codeblock_t *block, int dst_reg, uint16_t imm_data) void host_x86_AND32_REG_IMM(codeblock_t *block, int dst_reg, uint32_t imm_data) { -#if 0 +#ifdef RECOMPILER_DEBUG if (dst_reg & 8) fatal("host_x86_AND32_REG_IMM - dst_reg & 8\n"); #endif @@ -232,7 +232,7 @@ host_x86_AND32_REG_IMM(codeblock_t *block, int dst_reg, uint32_t imm_data) void host_x86_AND8_REG_REG(codeblock_t *block, int dst_reg, int src_reg) { -#if 0 +#ifdef RECOMPILER_DEBUG if ((dst_reg & 8) || (src_reg & 8)) fatal("host_x86_AND8_REG_REG - dst_reg & 8\n"); #endif @@ -243,7 +243,7 @@ host_x86_AND8_REG_REG(codeblock_t *block, int dst_reg, int src_reg) void host_x86_AND16_REG_REG(codeblock_t *block, int dst_reg, int src_reg) { -#if 0 +#ifdef RECOMPILER_DEBUG if ((dst_reg & 8) || (src_reg & 8)) fatal("host_x86_AND16_REG_REG - dst_reg & 8\n"); #endif @@ -254,7 +254,7 @@ host_x86_AND16_REG_REG(codeblock_t *block, int dst_reg, int src_reg) void host_x86_AND32_REG_REG(codeblock_t *block, int dst_reg, int src_reg) { -#if 0 +#ifdef RECOMPILER_DEBUG if ((dst_reg & 8) || (src_reg & 8)) fatal("host_x86_AND32_REG_REG - dst_reg & 8\n"); #endif @@ -508,7 +508,7 @@ host_x86_LEA_REG_IMM(codeblock_t *block, int dst_reg, int src_reg, uint32_t offs void host_x86_LEA_REG_REG(codeblock_t *block, int dst_reg, int src_reg_a, int src_reg_b) { -#if 0 +#ifdef RECOMPILER_DEBUG if ((dst_reg & 8) || (src_reg_a & 8) || (src_reg_b & 8)) fatal("host_x86_LEA_REG_REG - bad reg\n"); #endif @@ -520,7 +520,7 @@ host_x86_LEA_REG_REG(codeblock_t *block, int dst_reg, int src_reg_a, int src_reg void host_x86_LEA_REG_REG_SHIFT(codeblock_t *block, int dst_reg, int src_reg_a, int src_reg_b, int shift) { -#if 0 +#ifdef RECOMPILER_DEBUG if ((dst_reg & 8) || (src_reg_a & 8) || (src_reg_b & 8)) fatal("host_x86_LEA_REG_REG_SHIFT - bad reg\n"); #endif @@ -605,7 +605,7 @@ host_x86_MOV8_ABS_REG(codeblock_t *block, void *p, int src_reg) { int64_t offset = (uintptr_t) p - (((uintptr_t) &cpu_state) + 128); -#if 0 +#ifdef RECOMPILER_DEBUG if (src_reg & 8) fatal("host_x86_MOV8_ABS_REG - bad reg\n"); #endif @@ -631,7 +631,7 @@ host_x86_MOV16_ABS_REG(codeblock_t *block, void *p, int src_reg) { int64_t offset = (uintptr_t) p - (((uintptr_t) &cpu_state) + 128); -#if 0 +#ifdef RECOMPILER_DEBUG if (src_reg & 8) fatal("host_x86_MOV16_ABS_REG - bad reg\n"); #endif @@ -653,7 +653,7 @@ host_x86_MOV32_ABS_REG(codeblock_t *block, void *p, int src_reg) { int64_t offset = (uintptr_t) p - (((uintptr_t) &cpu_state) + 128); -#if 0 +#ifdef RECOMPILER_DEBUG if (src_reg & 8) fatal("host_x86_MOV32_ABS_REG - bad reg\n"); #endif @@ -679,7 +679,7 @@ host_x86_MOV64_ABS_REG(codeblock_t *block, void *p, int src_reg) { int64_t offset = (uintptr_t) p - (((uintptr_t) &cpu_state) + 128); -#if 0 +#ifdef RECOMPILER_DEBUG if (src_reg & 8) fatal("host_x86_MOV64_ABS_REG - bad reg\n"); #endif @@ -703,7 +703,7 @@ host_x86_MOV64_ABS_REG(codeblock_t *block, void *p, int src_reg) void host_x86_MOV8_ABS_REG_REG_SHIFT_REG(codeblock_t *block, uint32_t addr, int base_reg, int index_reg, int shift, int src_reg) { -#if 0 +#ifdef RECOMPILER_DEBUG if ((src_reg & 8) || (base_reg & 8) | (index_reg & 8)) fatal("host_x86_MOV8_BASE_INDEX_REG reg & 8\n"); #endif @@ -721,7 +721,7 @@ host_x86_MOV8_ABS_REG_REG_SHIFT_REG(codeblock_t *block, uint32_t addr, int base_ void host_x86_MOV8_BASE_INDEX_REG(codeblock_t *block, int base_reg, int index_reg, int src_reg) { -#if 0 +#ifdef RECOMPILER_DEBUG if ((src_reg & 8) || (base_reg & 8) | (index_reg & 8)) fatal("host_x86_MOV8_BASE_INDEX_REG reg & 8\n"); #endif @@ -731,7 +731,7 @@ host_x86_MOV8_BASE_INDEX_REG(codeblock_t *block, int base_reg, int index_reg, in void host_x86_MOV16_BASE_INDEX_REG(codeblock_t *block, int base_reg, int index_reg, int src_reg) { -#if 0 +#ifdef RECOMPILER_DEBUG if ((src_reg & 8) || (base_reg & 8) | (index_reg & 8)) fatal("host_x86_MOV8_BASE_INDEX_REG reg & 8\n"); #endif @@ -741,7 +741,7 @@ host_x86_MOV16_BASE_INDEX_REG(codeblock_t *block, int base_reg, int index_reg, i void host_x86_MOV32_BASE_INDEX_REG(codeblock_t *block, int base_reg, int index_reg, int src_reg) { -#if 0 +#ifdef RECOMPILER_DEBUG if ((src_reg & 8) || (base_reg & 8) | (index_reg & 8)) fatal("host_x86_MOV8_BASE_INDEX_REG reg & 8\n"); #endif @@ -755,7 +755,7 @@ host_x86_MOV8_REG_ABS(codeblock_t *block, int dst_reg, void *p) int64_t offset = (uintptr_t) p - (((uintptr_t) &cpu_state) + 128); int64_t ram_offset = (uintptr_t) p - (((uintptr_t) ram) + 2147483648ULL); -#if 0 +#ifdef RECOMPILER_DEBUG if (dst_reg & 8) fatal("host_x86_MOV8_REG_ABS reg & 8\n"); #endif @@ -785,7 +785,7 @@ host_x86_MOV16_REG_ABS(codeblock_t *block, int dst_reg, void *p) int64_t offset = (uintptr_t) p - (((uintptr_t) &cpu_state) + 128); int64_t ram_offset = (uintptr_t) p - (((uintptr_t) ram) + 2147483648ULL); -#if 0 +#ifdef RECOMPILER_DEBUG if (dst_reg & 8) fatal("host_x86_MOV16_REG_ABS reg & 8\n"); #endif @@ -817,7 +817,7 @@ host_x86_MOV32_REG_ABS(codeblock_t *block, int dst_reg, void *p) int64_t offset = (uintptr_t) p - (((uintptr_t) &cpu_state) + 128); int64_t ram_offset = (uintptr_t) p - (((uintptr_t) ram) + 2147483648ULL); -#if 0 +#ifdef RECOMPILER_DEBUG if (dst_reg & 8) fatal("host_x86_MOV32_REG_ABS reg & 8\n"); #endif @@ -851,7 +851,7 @@ host_x86_MOV64_REG_ABS(codeblock_t *block, int dst_reg, void *p) { int64_t offset = (uintptr_t) p - (((uintptr_t) &cpu_state) + 128); -#if 0 +#ifdef RECOMPILER_DEBUG if (dst_reg & 8) fatal("host_x86_MOV64_REG_ABS reg & 8\n"); #endif @@ -870,7 +870,7 @@ host_x86_MOV64_REG_ABS(codeblock_t *block, int dst_reg, void *p) void host_x86_MOV8_REG_ABS_REG_REG_SHIFT(codeblock_t *block, int dst_reg, uint32_t addr, int base_reg, int index_reg, int shift) { -#if 0 +#ifdef RECOMPILER_DEBUG if ((dst_reg & 8) || (base_reg & 8) | (index_reg & 8)) fatal("host_x86_MOV8_REG_ABS_REG_REG_SHIFT reg & 8\n"); #endif @@ -887,7 +887,7 @@ host_x86_MOV8_REG_ABS_REG_REG_SHIFT(codeblock_t *block, int dst_reg, uint32_t ad void host_x86_MOV32_REG_BASE_INDEX(codeblock_t *block, int dst_reg, int base_reg, int index_reg) { -#if 0 +#ifdef RECOMPILER_DEBUG if ((dst_reg & 8) || (base_reg & 8) | (index_reg & 8)) fatal("host_x86_MOV32_REG_BASE_INDEX reg & 8\n"); #endif @@ -898,7 +898,7 @@ host_x86_MOV32_REG_BASE_INDEX(codeblock_t *block, int dst_reg, int base_reg, int void host_x86_MOV64_REG_BASE_INDEX_SHIFT(codeblock_t *block, int dst_reg, int base_reg, int index_reg, int scale) { -#if 0 +#ifdef RECOMPILER_DEBUG if ((dst_reg & 8) || (index_reg & 8)) fatal("host_x86_MOV64_REG_BASE_INDEX_SHIFT reg & 8\n"); #endif @@ -912,7 +912,7 @@ host_x86_MOV64_REG_BASE_INDEX_SHIFT(codeblock_t *block, int dst_reg, int base_re void host_x86_MOV16_REG_BASE_OFFSET(codeblock_t *block, int dst_reg, int base_reg, int offset) { -#if 0 +#ifdef RECOMPILER_DEBUG if ((dst_reg & 8) || (base_reg & 8)) fatal("host_x86_MOV16_REG_BASE_OFFSET reg & 8\n"); #endif @@ -932,7 +932,7 @@ host_x86_MOV16_REG_BASE_OFFSET(codeblock_t *block, int dst_reg, int base_reg, in void host_x86_MOV32_REG_BASE_OFFSET(codeblock_t *block, int dst_reg, int base_reg, int offset) { -#if 0 +#ifdef RECOMPILER_DEBUG if ((dst_reg & 8) || (base_reg & 8)) fatal("host_x86_MOV32_REG_BASE_OFFSET reg & 8\n"); #endif @@ -951,7 +951,7 @@ host_x86_MOV32_REG_BASE_OFFSET(codeblock_t *block, int dst_reg, int base_reg, in void host_x86_MOV64_REG_BASE_OFFSET(codeblock_t *block, int dst_reg, int base_reg, int offset) { -#if 0 +#ifdef RECOMPILER_DEBUG if ((dst_reg & 8) || (base_reg & 8)) fatal("host_x86_MOV64_REG_BASE_OFFSET reg & 8\n"); #endif @@ -972,7 +972,7 @@ host_x86_MOV64_REG_BASE_OFFSET(codeblock_t *block, int dst_reg, int base_reg, in void host_x86_MOV32_BASE_OFFSET_REG(codeblock_t *block, int base_reg, int offset, int src_reg) { -#if 0 +#ifdef RECOMPILER_DEBUG if ((src_reg & 8) || (base_reg & 8)) fatal("host_x86_MOV32_BASE_OFFSET_REG reg & 8\n"); #endif @@ -991,7 +991,7 @@ host_x86_MOV32_BASE_OFFSET_REG(codeblock_t *block, int base_reg, int offset, int void host_x86_MOV64_BASE_OFFSET_REG(codeblock_t *block, int base_reg, int offset, int src_reg) { -#if 0 +#ifdef RECOMPILER_DEBUG if ((src_reg & 8) || (base_reg & 8)) fatal("host_x86_MOV64_BASE_OFFSET_REG reg & 8\n"); #endif @@ -1012,7 +1012,7 @@ host_x86_MOV64_BASE_OFFSET_REG(codeblock_t *block, int base_reg, int offset, int void host_x86_MOV32_BASE_OFFSET_IMM(codeblock_t *block, int base_reg, int offset, uint32_t imm_data) { -#if 0 +#ifdef RECOMPILER_DEBUG if (base_reg & 8) fatal("host_x86_MOV32_BASE_OFFSET_IMM reg & 8\n"); #endif @@ -1034,7 +1034,7 @@ host_x86_MOV32_BASE_OFFSET_IMM(codeblock_t *block, int base_reg, int offset, uin void host_x86_MOV8_REG_IMM(codeblock_t *block, int reg, uint16_t imm_data) { -#if 0 +#ifdef RECOMPILER_DEBUG if (reg >= 8) fatal("host_x86_MOV8_REG_IMM reg >= 4\n"); #endif @@ -1045,7 +1045,7 @@ host_x86_MOV8_REG_IMM(codeblock_t *block, int reg, uint16_t imm_data) void host_x86_MOV16_REG_IMM(codeblock_t *block, int reg, uint16_t imm_data) { -#if 0 +#ifdef RECOMPILER_DEBUG if (reg & 8) fatal("host_x86_MOV16_REG_IMM reg & 8\n"); #endif @@ -1056,7 +1056,7 @@ host_x86_MOV16_REG_IMM(codeblock_t *block, int reg, uint16_t imm_data) void host_x86_MOV32_REG_IMM(codeblock_t *block, int reg, uint32_t imm_data) { -#if 0 +#ifdef RECOMPILER_DEBUG if (reg & 8) fatal("host_x86_MOV32_REG_IMM reg & 8\n"); #endif @@ -1082,7 +1082,7 @@ host_x86_MOV64_REG_IMM(codeblock_t *block, int reg, uint64_t imm_data) void host_x86_MOV8_REG_REG(codeblock_t *block, int dst_reg, int src_reg) { -#if 0 +#ifdef RECOMPILER_DEBUG if ((dst_reg & 8) || (src_reg & 8)) fatal("host_x86_MOV8_REG_REG - bad reg\n"); #endif @@ -1093,7 +1093,7 @@ host_x86_MOV8_REG_REG(codeblock_t *block, int dst_reg, int src_reg) void host_x86_MOV16_REG_REG(codeblock_t *block, int dst_reg, int src_reg) { -#if 0 +#ifdef RECOMPILER_DEBUG if ((dst_reg & 8) || (src_reg & 8)) fatal("host_x86_MOV16_REG_REG - bad reg\n"); #endif @@ -1104,7 +1104,7 @@ host_x86_MOV16_REG_REG(codeblock_t *block, int dst_reg, int src_reg) void host_x86_MOV32_REG_REG(codeblock_t *block, int dst_reg, int src_reg) { -#if 0 +#ifdef RECOMPILER_DEBUG if ((dst_reg & 8) || (src_reg & 8)) fatal("host_x86_MOV32_REG_REG - bad reg\n"); #endif @@ -1154,7 +1154,7 @@ host_x86_MOVSX_REG_32_16(codeblock_t *block, int dst_reg, int src_reg) void host_x86_MOVZX_BASE_INDEX_32_8(codeblock_t *block, int dst_reg, int base_reg, int index_reg) { -#if 0 +#ifdef RECOMPILER_DEBUG if ((dst_reg & 8) || (base_reg & 8) | (index_reg & 8)) fatal("host_x86_MOVZX_BASE_INDEX_32_8 reg & 8\n"); #endif @@ -1165,7 +1165,7 @@ host_x86_MOVZX_BASE_INDEX_32_8(codeblock_t *block, int dst_reg, int base_reg, in void host_x86_MOVZX_BASE_INDEX_32_16(codeblock_t *block, int dst_reg, int base_reg, int index_reg) { -#if 0 +#ifdef RECOMPILER_DEBUG if ((dst_reg & 8) || (base_reg & 8) | (index_reg & 8)) fatal("host_x86_MOVZX_BASE_INDEX_32_16 reg & 8\n"); #endif @@ -1177,7 +1177,7 @@ host_x86_MOVZX_BASE_INDEX_32_16(codeblock_t *block, int dst_reg, int base_reg, i void host_x86_MOVZX_REG_16_8(codeblock_t *block, int dst_reg, int src_reg) { -#if 0 +#ifdef RECOMPILER_DEBUG if ((dst_reg & 8) || (src_reg & 8)) fatal("host_x86_MOVZX_REG_16_8 - bad reg\n"); #endif @@ -1188,7 +1188,7 @@ host_x86_MOVZX_REG_16_8(codeblock_t *block, int dst_reg, int src_reg) void host_x86_MOVZX_REG_32_8(codeblock_t *block, int dst_reg, int src_reg) { -#if 0 +#ifdef RECOMPILER_DEBUG if ((dst_reg & 8) || (src_reg & 8)) fatal("host_x86_MOVZX_REG_32_8 - bad reg\n"); #endif @@ -1199,7 +1199,7 @@ host_x86_MOVZX_REG_32_8(codeblock_t *block, int dst_reg, int src_reg) void host_x86_MOVZX_REG_32_16(codeblock_t *block, int dst_reg, int src_reg) { -#if 0 +#ifdef RECOMPILER_DEBUG if ((dst_reg & 8) || (src_reg & 8)) fatal("host_x86_MOVZX_REG_16_8 - bad reg\n"); #endif @@ -1214,7 +1214,7 @@ host_x86_MOVZX_REG_ABS_16_8(codeblock_t *block, int dst_reg, void *p) int64_t offset = (uintptr_t) p - (((uintptr_t) &cpu_state) + 128); int64_t ram_offset = (uintptr_t) p - (((uintptr_t) ram) + 2147483648ULL); -#if 0 +#ifdef RECOMPILER_DEBUG if (dst_reg & 8) fatal("host_x86_MOVZX_REG_ABS_16_8 - bad reg\n"); #endif @@ -1243,7 +1243,7 @@ host_x86_MOVZX_REG_ABS_32_8(codeblock_t *block, int dst_reg, void *p) int64_t offset = (uintptr_t) p - (((uintptr_t) &cpu_state) + 128); int64_t ram_offset = (uintptr_t) p - (((uintptr_t) ram) + 2147483648ULL); -#if 0 +#ifdef RECOMPILER_DEBUG if (dst_reg & 8) fatal("host_x86_MOVZX_REG_ABS_32_8 - bad reg\n"); #endif @@ -1282,7 +1282,7 @@ host_x86_MOVZX_REG_ABS_32_16(codeblock_t *block, int dst_reg, void *p) int64_t offset = (uintptr_t) p - (((uintptr_t) &cpu_state) + 128); int64_t ram_offset = (uintptr_t) p - (((uintptr_t) ram) + 2147483648ULL); -#if 0 +#ifdef RECOMPILER_DEBUG if (dst_reg & 8) fatal("host_x86_MOVZX_REG_ABS_32_16 - bad reg\n"); #endif @@ -1314,7 +1314,7 @@ host_x86_NOP(codeblock_t *block) void host_x86_OR8_REG_IMM(codeblock_t *block, int dst_reg, uint8_t imm_data) { -#if 0 +#ifdef RECOMPILER_DEBUG if (dst_reg & 8) fatal("host_x86_OR8_REG_IMM - dst_reg & 8\n"); #endif @@ -1330,7 +1330,7 @@ host_x86_OR8_REG_IMM(codeblock_t *block, int dst_reg, uint8_t imm_data) void host_x86_OR16_REG_IMM(codeblock_t *block, int dst_reg, uint16_t imm_data) { -#if 0 +#ifdef RECOMPILER_DEBUG if (dst_reg & 8) fatal("host_x86_OR16_REG_IMM - dst_reg & 8\n"); #endif @@ -1351,7 +1351,7 @@ host_x86_OR16_REG_IMM(codeblock_t *block, int dst_reg, uint16_t imm_data) void host_x86_OR32_REG_IMM(codeblock_t *block, int dst_reg, uint32_t imm_data) { -#if 0 +#ifdef RECOMPILER_DEBUG if (dst_reg & 8) fatal("host_x86_OR32_REG_IMM - dst_reg & 8\n"); #endif @@ -1372,7 +1372,7 @@ host_x86_OR32_REG_IMM(codeblock_t *block, int dst_reg, uint32_t imm_data) void host_x86_OR8_REG_REG(codeblock_t *block, int dst_reg, int src_reg) { -#if 0 +#ifdef RECOMPILER_DEBUG if ((dst_reg & 8) || (src_reg & 8)) fatal("host_x86_OR8_REG_IMM - dst_reg & 8\n"); #endif @@ -1383,7 +1383,7 @@ host_x86_OR8_REG_REG(codeblock_t *block, int dst_reg, int src_reg) void host_x86_OR16_REG_REG(codeblock_t *block, int dst_reg, int src_reg) { -#if 0 +#ifdef RECOMPILER_DEBUG if ((dst_reg & 8) || (src_reg & 8)) fatal("host_x86_OR16_REG_IMM - dst_reg & 8\n"); #endif @@ -1394,7 +1394,7 @@ host_x86_OR16_REG_REG(codeblock_t *block, int dst_reg, int src_reg) void host_x86_OR32_REG_REG(codeblock_t *block, int dst_reg, int src_reg) { -#if 0 +#ifdef RECOMPILER_DEBUG if ((dst_reg & 8) || (src_reg & 8)) fatal("host_x86_OR32_REG_IMM - dst_reg & 8\n"); #endif @@ -1437,7 +1437,7 @@ host_x86_RET(codeblock_t *block) void host_x86_ROL8_CL(codeblock_t *block, int dst_reg) { -#if 0 +#ifdef RECOMPILER_DEBUG if (dst_reg & 8) fatal("ROL8 CL & 8\n"); #endif @@ -1447,7 +1447,7 @@ host_x86_ROL8_CL(codeblock_t *block, int dst_reg) void host_x86_ROL16_CL(codeblock_t *block, int dst_reg) { -#if 0 +#ifdef RECOMPILER_DEBUG if (dst_reg & 8) fatal("ROL16 CL & 8\n"); #endif @@ -1457,7 +1457,7 @@ host_x86_ROL16_CL(codeblock_t *block, int dst_reg) void host_x86_ROL32_CL(codeblock_t *block, int dst_reg) { -#if 0 +#ifdef RECOMPILER_DEBUG if (dst_reg & 8) fatal("ROL32 CL & 8\n"); #endif @@ -1468,7 +1468,7 @@ host_x86_ROL32_CL(codeblock_t *block, int dst_reg) void host_x86_ROL8_IMM(codeblock_t *block, int dst_reg, int shift) { -#if 0 +#ifdef RECOMPILER_DEBUG if (dst_reg & 8) fatal("ROL8 imm & 8\n"); #endif @@ -1478,7 +1478,7 @@ host_x86_ROL8_IMM(codeblock_t *block, int dst_reg, int shift) void host_x86_ROL16_IMM(codeblock_t *block, int dst_reg, int shift) { -#if 0 +#ifdef RECOMPILER_DEBUG if (dst_reg & 8) fatal("ROL16 imm & 8\n"); #endif @@ -1488,7 +1488,7 @@ host_x86_ROL16_IMM(codeblock_t *block, int dst_reg, int shift) void host_x86_ROL32_IMM(codeblock_t *block, int dst_reg, int shift) { -#if 0 +#ifdef RECOMPILER_DEBUG if (dst_reg & 8) fatal("ROL32 imm & 8\n"); #endif @@ -1499,7 +1499,7 @@ host_x86_ROL32_IMM(codeblock_t *block, int dst_reg, int shift) void host_x86_ROR8_CL(codeblock_t *block, int dst_reg) { -#if 0 +#ifdef RECOMPILER_DEBUG if (dst_reg & 8) fatal("ROR8 CL & 8\n"); #endif @@ -1509,7 +1509,7 @@ host_x86_ROR8_CL(codeblock_t *block, int dst_reg) void host_x86_ROR16_CL(codeblock_t *block, int dst_reg) { -#if 0 +#ifdef RECOMPILER_DEBUG if (dst_reg & 8) fatal("ROR16 CL & 8\n"); #endif @@ -1519,7 +1519,7 @@ host_x86_ROR16_CL(codeblock_t *block, int dst_reg) void host_x86_ROR32_CL(codeblock_t *block, int dst_reg) { -#if 0 +#ifdef RECOMPILER_DEBUG if (dst_reg & 8) fatal("ROR32 CL & 8\n"); #endif @@ -1530,7 +1530,7 @@ host_x86_ROR32_CL(codeblock_t *block, int dst_reg) void host_x86_ROR8_IMM(codeblock_t *block, int dst_reg, int shift) { -#if 0 +#ifdef RECOMPILER_DEBUG if (dst_reg & 8) fatal("ROR8 imm & 8\n"); #endif @@ -1540,7 +1540,7 @@ host_x86_ROR8_IMM(codeblock_t *block, int dst_reg, int shift) void host_x86_ROR16_IMM(codeblock_t *block, int dst_reg, int shift) { -#if 0 +#ifdef RECOMPILER_DEBUG if (dst_reg & 8) fatal("ROR16 imm & 8\n"); #endif @@ -1550,7 +1550,7 @@ host_x86_ROR16_IMM(codeblock_t *block, int dst_reg, int shift) void host_x86_ROR32_IMM(codeblock_t *block, int dst_reg, int shift) { -#if 0 +#ifdef RECOMPILER_DEBUG if (dst_reg & 8) fatal("ROR32 im & 8\n"); #endif @@ -1561,7 +1561,7 @@ host_x86_ROR32_IMM(codeblock_t *block, int dst_reg, int shift) void host_x86_SAR8_CL(codeblock_t *block, int dst_reg) { -#if 0 +#ifdef RECOMPILER_DEBUG if (dst_reg & 8) fatal("SAR8 CL & 8\n"); #endif @@ -1572,7 +1572,7 @@ host_x86_SAR8_CL(codeblock_t *block, int dst_reg) void host_x86_SAR16_CL(codeblock_t *block, int dst_reg) { -#if 0 +#ifdef RECOMPILER_DEBUG if (dst_reg & 8) fatal("SAR16 CL & 8\n"); #endif @@ -1583,7 +1583,7 @@ host_x86_SAR16_CL(codeblock_t *block, int dst_reg) void host_x86_SAR32_CL(codeblock_t *block, int dst_reg) { -#if 0 +#ifdef RECOMPILER_DEBUG if (dst_reg & 8) fatal("SAR32 CL & 8\n"); #endif @@ -1595,7 +1595,7 @@ host_x86_SAR32_CL(codeblock_t *block, int dst_reg) void host_x86_SAR8_IMM(codeblock_t *block, int dst_reg, int shift) { -#if 0 +#ifdef RECOMPILER_DEBUG if (dst_reg & 8) fatal("SAR8 imm & 8\n"); #endif @@ -1606,7 +1606,7 @@ host_x86_SAR8_IMM(codeblock_t *block, int dst_reg, int shift) void host_x86_SAR16_IMM(codeblock_t *block, int dst_reg, int shift) { -#if 0 +#ifdef RECOMPILER_DEBUG if (dst_reg & 8) fatal("SAR16 imm & 8\n"); #endif @@ -1617,7 +1617,7 @@ host_x86_SAR16_IMM(codeblock_t *block, int dst_reg, int shift) void host_x86_SAR32_IMM(codeblock_t *block, int dst_reg, int shift) { -#if 0 +#ifdef RECOMPILER_DEBUG if (dst_reg & 8) fatal("SAR32 imm & 8\n"); #endif @@ -1628,7 +1628,7 @@ host_x86_SAR32_IMM(codeblock_t *block, int dst_reg, int shift) void host_x86_SHL8_CL(codeblock_t *block, int dst_reg) { -#if 0 +#ifdef RECOMPILER_DEBUG if (dst_reg & 8) fatal("SHL8 CL & 8\n"); #endif @@ -1639,7 +1639,7 @@ host_x86_SHL8_CL(codeblock_t *block, int dst_reg) void host_x86_SHL16_CL(codeblock_t *block, int dst_reg) { -#if 0 +#ifdef RECOMPILER_DEBUG if (dst_reg & 8) fatal("SHL16 CL & 8\n"); #endif @@ -1650,7 +1650,7 @@ host_x86_SHL16_CL(codeblock_t *block, int dst_reg) void host_x86_SHL32_CL(codeblock_t *block, int dst_reg) { -#if 0 +#ifdef RECOMPILER_DEBUG if (dst_reg & 8) fatal("SHL32 CL & 8\n"); #endif @@ -1662,7 +1662,7 @@ host_x86_SHL32_CL(codeblock_t *block, int dst_reg) void host_x86_SHL8_IMM(codeblock_t *block, int dst_reg, int shift) { -#if 0 +#ifdef RECOMPILER_DEBUG if (dst_reg & 8) fatal("SHL8 imm & 8\n"); #endif @@ -1673,7 +1673,7 @@ host_x86_SHL8_IMM(codeblock_t *block, int dst_reg, int shift) void host_x86_SHL16_IMM(codeblock_t *block, int dst_reg, int shift) { -#if 0 +#ifdef RECOMPILER_DEBUG if (dst_reg & 8) fatal("SHL16 imm & 8\n"); #endif @@ -1684,7 +1684,7 @@ host_x86_SHL16_IMM(codeblock_t *block, int dst_reg, int shift) void host_x86_SHL32_IMM(codeblock_t *block, int dst_reg, int shift) { -#if 0 +#ifdef RECOMPILER_DEBUG if (dst_reg & 8) fatal("SHL32 imm & 8\n"); #endif @@ -1696,7 +1696,7 @@ host_x86_SHL32_IMM(codeblock_t *block, int dst_reg, int shift) void host_x86_SHR8_CL(codeblock_t *block, int dst_reg) { -#if 0 +#ifdef RECOMPILER_DEBUG if (dst_reg & 8) fatal("SHR8 CL & 8\n"); #endif @@ -1707,7 +1707,7 @@ host_x86_SHR8_CL(codeblock_t *block, int dst_reg) void host_x86_SHR16_CL(codeblock_t *block, int dst_reg) { -#if 0 +#ifdef RECOMPILER_DEBUG if (dst_reg & 8) fatal("SHR16 CL & 8\n"); #endif @@ -1718,7 +1718,7 @@ host_x86_SHR16_CL(codeblock_t *block, int dst_reg) void host_x86_SHR32_CL(codeblock_t *block, int dst_reg) { -#if 0 +#ifdef RECOMPILER_DEBUG if (dst_reg & 8) fatal("SHR32 CL & 8\n"); #endif @@ -1730,7 +1730,7 @@ host_x86_SHR32_CL(codeblock_t *block, int dst_reg) void host_x86_SHR8_IMM(codeblock_t *block, int dst_reg, int shift) { -#if 0 +#ifdef RECOMPILER_DEBUG if (dst_reg & 8) fatal("SHR8 imm & 8\n"); #endif @@ -1741,7 +1741,7 @@ host_x86_SHR8_IMM(codeblock_t *block, int dst_reg, int shift) void host_x86_SHR16_IMM(codeblock_t *block, int dst_reg, int shift) { -#if 0 +#ifdef RECOMPILER_DEBUG if (dst_reg & 8) fatal("SHR16 imm & 8\n"); #endif @@ -1752,7 +1752,7 @@ host_x86_SHR16_IMM(codeblock_t *block, int dst_reg, int shift) void host_x86_SHR32_IMM(codeblock_t *block, int dst_reg, int shift) { -#if 0 +#ifdef RECOMPILER_DEBUG if (dst_reg & 8) fatal("SHR32 imm & 8\n"); #endif @@ -1763,7 +1763,7 @@ host_x86_SHR32_IMM(codeblock_t *block, int dst_reg, int shift) void host_x86_SUB8_REG_IMM(codeblock_t *block, int dst_reg, uint8_t imm_data) { -#if 0 +#ifdef RECOMPILER_DEBUG if (dst_reg & 8) fatal("host_x86_SUB8_REG_IMM - dst_reg & 8\n"); #endif @@ -1779,7 +1779,7 @@ host_x86_SUB8_REG_IMM(codeblock_t *block, int dst_reg, uint8_t imm_data) void host_x86_SUB16_REG_IMM(codeblock_t *block, int dst_reg, uint16_t imm_data) { -#if 0 +#ifdef RECOMPILER_DEBUG if (dst_reg & 8) fatal("host_x86_SUB16_REG_IMM - dst_reg & 8\n"); #endif @@ -1800,7 +1800,7 @@ host_x86_SUB16_REG_IMM(codeblock_t *block, int dst_reg, uint16_t imm_data) void host_x86_SUB32_REG_IMM(codeblock_t *block, int dst_reg, uint32_t imm_data) { -#if 0 +#ifdef RECOMPILER_DEBUG if (dst_reg & 8) fatal("host_x86_SUB32_REG_IMM - dst_reg & 8\n"); #endif @@ -1821,7 +1821,7 @@ host_x86_SUB32_REG_IMM(codeblock_t *block, int dst_reg, uint32_t imm_data) void host_x86_SUB64_REG_IMM(codeblock_t *block, int dst_reg, uint64_t imm_data) { -#if 0 +#ifdef RECOMPILER_DEBUG if (dst_reg & 8) fatal("host_x86_SUB64_REG_IMM - dst_reg & 8\n"); #endif @@ -1835,7 +1835,7 @@ host_x86_SUB64_REG_IMM(codeblock_t *block, int dst_reg, uint64_t imm_data) void host_x86_SUB8_REG_REG(codeblock_t *block, int dst_reg, int src_reg) { -#if 0 +#ifdef RECOMPILER_DEBUG if ((dst_reg & 8) || (src_reg & 8)) fatal("host_x86_SUB8_REG_REG - dst_reg & 8\n"); #endif @@ -1846,7 +1846,7 @@ host_x86_SUB8_REG_REG(codeblock_t *block, int dst_reg, int src_reg) void host_x86_SUB16_REG_REG(codeblock_t *block, int dst_reg, int src_reg) { -#if 0 +#ifdef RECOMPILER_DEBUG if ((dst_reg & 8) || (src_reg & 8)) fatal("host_x86_SUB16_REG_REG - dst_reg & 8\n"); #endif @@ -1857,7 +1857,7 @@ host_x86_SUB16_REG_REG(codeblock_t *block, int dst_reg, int src_reg) void host_x86_SUB32_REG_REG(codeblock_t *block, int dst_reg, int src_reg) { -#if 0 +#ifdef RECOMPILER_DEBUG if ((dst_reg & 8) || (src_reg & 8)) fatal("host_x86_SUB32_REG_REG - dst_reg & 8\n"); #endif @@ -1883,7 +1883,7 @@ host_x86_TEST16_REG(codeblock_t *block, int src_host_reg, int dst_host_reg) void host_x86_TEST32_REG(codeblock_t *block, int src_reg, int dst_reg) { -#if 0 +#ifdef RECOMPILER_DEBUG if ((dst_reg & 8) || (src_reg & 8)) fatal("host_x86_TEST32_REG - bad reg\n"); #endif @@ -1894,7 +1894,7 @@ host_x86_TEST32_REG(codeblock_t *block, int src_reg, int dst_reg) void host_x86_TEST32_REG_IMM(codeblock_t *block, int dst_reg, uint32_t imm_data) { -#if 0 +#ifdef RECOMPILER_DEBUG if (dst_reg & 8) fatal("TEST32_REG_IMM reg & 8\n"); #endif @@ -1912,7 +1912,7 @@ host_x86_TEST32_REG_IMM(codeblock_t *block, int dst_reg, uint32_t imm_data) void host_x86_XOR8_REG_IMM(codeblock_t *block, int dst_reg, uint8_t imm_data) { -#if 0 +#ifdef RECOMPILER_DEBUG if (dst_reg & 8) fatal("host_x86_XOR8_REG_IMM - dst_reg & 8\n"); #endif @@ -1928,7 +1928,7 @@ host_x86_XOR8_REG_IMM(codeblock_t *block, int dst_reg, uint8_t imm_data) void host_x86_XOR16_REG_IMM(codeblock_t *block, int dst_reg, uint16_t imm_data) { -#if 0 +#ifdef RECOMPILER_DEBUG if (dst_reg & 8) fatal("host_x86_XOR16_REG_IMM - dst_reg & 8\n"); #endif @@ -1949,7 +1949,7 @@ host_x86_XOR16_REG_IMM(codeblock_t *block, int dst_reg, uint16_t imm_data) void host_x86_XOR32_REG_IMM(codeblock_t *block, int dst_reg, uint32_t imm_data) { -#if 0 +#ifdef RECOMPILER_DEBUG if (dst_reg & 8) fatal("host_x86_XOR32_REG_IMM - dst_reg & 8\n"); #endif @@ -1970,7 +1970,7 @@ host_x86_XOR32_REG_IMM(codeblock_t *block, int dst_reg, uint32_t imm_data) void host_x86_XOR8_REG_REG(codeblock_t *block, int dst_reg, int src_reg) { -#if 0 +#ifdef RECOMPILER_DEBUG if ((dst_reg & 8) || (src_reg & 8)) fatal("host_x86_XOR8_REG_IMM - dst_reg & 8\n"); #endif @@ -1981,7 +1981,7 @@ host_x86_XOR8_REG_REG(codeblock_t *block, int dst_reg, int src_reg) void host_x86_XOR16_REG_REG(codeblock_t *block, int dst_reg, int src_reg) { -#if 0 +#ifdef RECOMPILER_DEBUG if ((dst_reg & 8) || (src_reg & 8)) fatal("host_x86_XOR16_REG_IMM - dst_reg & 8\n"); #endif @@ -1992,7 +1992,7 @@ host_x86_XOR16_REG_REG(codeblock_t *block, int dst_reg, int src_reg) void host_x86_XOR32_REG_REG(codeblock_t *block, int dst_reg, int src_reg) { -#if 0 +#ifdef RECOMPILER_DEBUG if ((dst_reg & 8) || (src_reg & 8)) fatal("host_x86_XOR32_REG_IMM - dst_reg & 8\n"); #endif