diff --git a/ext/opcache/jit/ir/ir.h b/ext/opcache/jit/ir/ir.h index 832b5c2a9e2..cf7580dc749 100644 --- a/ext/opcache/jit/ir/ir.h +++ b/ext/opcache/jit/ir/ir.h @@ -22,7 +22,7 @@ extern "C" { #ifdef _WIN32 /* TODO Handle ARM, too. */ -# if defined(_M_X64) +# if defined(_M_X64) || defined(_M_ARM64) # define __SIZEOF_SIZE_T__ 8 # elif defined(_M_IX86) # define __SIZEOF_SIZE_T__ 4 diff --git a/ext/opcache/jit/ir/ir_disasm.c b/ext/opcache/jit/ir/ir_disasm.c index 79c80c04747..46deee32e17 100644 --- a/ext/opcache/jit/ir/ir_disasm.c +++ b/ext/opcache/jit/ir/ir_disasm.c @@ -29,6 +29,10 @@ #include #define HAVE_CAPSTONE_ITER +#ifndef IR_DISASM_INTEL_SYNTAX +# define IR_DISASM_INTEL_SYNTAX 0 +#endif + typedef struct _ir_sym_node { uint64_t addr; uint64_t end; @@ -365,7 +369,7 @@ int ir_disasm(const char *name, } # endif cs_option(cs, CS_OPT_DETAIL, CS_OPT_ON); -# if DISASM_INTEL_SYNTAX +# if IR_DISASM_INTEL_SYNTAX cs_option(cs, CS_OPT_SYNTAX, CS_OPT_SYNTAX_INTEL); # else cs_option(cs, CS_OPT_SYNTAX, CS_OPT_SYNTAX_ATT); diff --git a/ext/opcache/jit/ir/ir_private.h b/ext/opcache/jit/ir/ir_private.h index 8f8db7b4a3d..064d713b201 100644 --- a/ext/opcache/jit/ir/ir_private.h +++ b/ext/opcache/jit/ir/ir_private.h @@ -494,7 +494,7 @@ IR_ALWAYS_INLINE void ir_sparse_set_init(ir_sparse_set *set, uint32_t size) set->size = size; set->len = 0; set->data = (uint32_t*)ir_mem_malloc(sizeof(uint32_t) * 2 * size) + size; -#if IR_DEBUG +#ifdef IR_DEBUG /* initialize sparse part to avoid valgrind warnings */ memset(&IR_SPARSE_SET_SPARSE(set, size - 1), 0, size * sizeof(uint32_t)); #endif