mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Update IR
IR commit: 8fb33ceccd39d0052c5949cf96fc135e7ba1fbcb
This commit is contained in:
parent
15470bd16c
commit
7b25cac32b
3 changed files with 7 additions and 3 deletions
|
@ -22,7 +22,7 @@ extern "C" {
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
/* TODO Handle ARM, too. */
|
/* TODO Handle ARM, too. */
|
||||||
# if defined(_M_X64)
|
# if defined(_M_X64) || defined(_M_ARM64)
|
||||||
# define __SIZEOF_SIZE_T__ 8
|
# define __SIZEOF_SIZE_T__ 8
|
||||||
# elif defined(_M_IX86)
|
# elif defined(_M_IX86)
|
||||||
# define __SIZEOF_SIZE_T__ 4
|
# define __SIZEOF_SIZE_T__ 4
|
||||||
|
|
|
@ -29,6 +29,10 @@
|
||||||
#include <capstone/capstone.h>
|
#include <capstone/capstone.h>
|
||||||
#define HAVE_CAPSTONE_ITER
|
#define HAVE_CAPSTONE_ITER
|
||||||
|
|
||||||
|
#ifndef IR_DISASM_INTEL_SYNTAX
|
||||||
|
# define IR_DISASM_INTEL_SYNTAX 0
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef struct _ir_sym_node {
|
typedef struct _ir_sym_node {
|
||||||
uint64_t addr;
|
uint64_t addr;
|
||||||
uint64_t end;
|
uint64_t end;
|
||||||
|
@ -365,7 +369,7 @@ int ir_disasm(const char *name,
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
cs_option(cs, CS_OPT_DETAIL, CS_OPT_ON);
|
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);
|
cs_option(cs, CS_OPT_SYNTAX, CS_OPT_SYNTAX_INTEL);
|
||||||
# else
|
# else
|
||||||
cs_option(cs, CS_OPT_SYNTAX, CS_OPT_SYNTAX_ATT);
|
cs_option(cs, CS_OPT_SYNTAX, CS_OPT_SYNTAX_ATT);
|
||||||
|
|
|
@ -494,7 +494,7 @@ IR_ALWAYS_INLINE void ir_sparse_set_init(ir_sparse_set *set, uint32_t size)
|
||||||
set->size = size;
|
set->size = size;
|
||||||
set->len = 0;
|
set->len = 0;
|
||||||
set->data = (uint32_t*)ir_mem_malloc(sizeof(uint32_t) * 2 * size) + size;
|
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 */
|
/* initialize sparse part to avoid valgrind warnings */
|
||||||
memset(&IR_SPARSE_SET_SPARSE(set, size - 1), 0, size * sizeof(uint32_t));
|
memset(&IR_SPARSE_SET_SPARSE(set, size - 1), 0, size * sizeof(uint32_t));
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue