"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/sljit/sljitLir.c" between
pcre2-10.35.tar.bz2 and pcre2-10.36.tar.bz2

About: The PCRE2 library implements Perl compatible regular expression pattern matching. New future PCRE version with revised API.

sljitLir.c  (pcre2-10.35.tar.bz2):sljitLir.c  (pcre2-10.36.tar.bz2)
skipping to change at line 31 skipping to change at line 31
* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFIT S; OR * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFIT S; OR
* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISI NG IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISI NG IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O F SUCH DAMAGE. * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY O F SUCH DAMAGE.
*/ */
#include "sljitLir.h" #include "sljitLir.h"
#ifdef _WIN32 #ifdef _WIN32
/* For SLJIT_CACHE_FLUSH, which can expand to FlushInstructionCache. */
#include <windows.h> #include <windows.h>
#endif /* _WIN32 */ #endif /* _WIN32 */
#if !(defined SLJIT_STD_MACROS_DEFINED && SLJIT_STD_MACROS_DEFINED) #if !(defined SLJIT_STD_MACROS_DEFINED && SLJIT_STD_MACROS_DEFINED)
/* These libraries are needed for the macros below. */ /* These libraries are needed for the macros below. */
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
skipping to change at line 226 skipping to change at line 225
/* instruction types */ /* instruction types */
# define MOVABLE_INS 0 # define MOVABLE_INS 0
/* 1 - 31 last destination register */ /* 1 - 31 last destination register */
/* no destination (i.e: store) */ /* no destination (i.e: store) */
# define UNMOVABLE_INS 32 # define UNMOVABLE_INS 32
/* FPU status register */ /* FPU status register */
# define FCSR_FCC 33 # define FCSR_FCC 33
#endif #endif
#if (defined SLJIT_CONFIG_TILEGX && SLJIT_CONFIG_TILEGX)
# define IS_JAL 0x04
# define IS_COND 0x08
# define PATCH_B 0x10
# define PATCH_J 0x20
#endif
#if (defined SLJIT_CONFIG_SPARC_32 && SLJIT_CONFIG_SPARC_32) #if (defined SLJIT_CONFIG_SPARC_32 && SLJIT_CONFIG_SPARC_32)
# define IS_MOVABLE 0x04 # define IS_MOVABLE 0x04
# define IS_COND 0x08 # define IS_COND 0x08
# define IS_CALL 0x10 # define IS_CALL 0x10
# define PATCH_B 0x20 # define PATCH_B 0x20
# define PATCH_CALL 0x40 # define PATCH_CALL 0x40
/* instruction types */ /* instruction types */
# define MOVABLE_INS 0 # define MOVABLE_INS 0
skipping to change at line 277 skipping to change at line 268
/* Utils can still be used even if SLJIT_CONFIG_UNSUPPORTED is set. */ /* Utils can still be used even if SLJIT_CONFIG_UNSUPPORTED is set. */
#include "sljitUtils.c" #include "sljitUtils.c"
#if !(defined SLJIT_CONFIG_UNSUPPORTED && SLJIT_CONFIG_UNSUPPORTED) #if !(defined SLJIT_CONFIG_UNSUPPORTED && SLJIT_CONFIG_UNSUPPORTED)
#if (defined SLJIT_EXECUTABLE_ALLOCATOR && SLJIT_EXECUTABLE_ALLOCATOR) #if (defined SLJIT_EXECUTABLE_ALLOCATOR && SLJIT_EXECUTABLE_ALLOCATOR)
#if (defined SLJIT_PROT_EXECUTABLE_ALLOCATOR && SLJIT_PROT_EXECUTABLE_ALLOCATOR) #if (defined SLJIT_PROT_EXECUTABLE_ALLOCATOR && SLJIT_PROT_EXECUTABLE_ALLOCATOR)
#include "sljitProtExecAllocator.c" #include "sljitProtExecAllocator.c"
#elif (defined SLJIT_WX_EXECUTABLE_ALLOCATOR && SLJIT_WX_EXECUTABLE_ALLOCATOR)
#include "sljitWXExecAllocator.c"
#else #else
#include "sljitExecAllocator.c" #include "sljitExecAllocator.c"
#endif #endif
#endif #endif
#if (defined SLJIT_PROT_EXECUTABLE_ALLOCATOR && SLJIT_PROT_EXECUTABLE_ALLOCATOR) #if (defined SLJIT_PROT_EXECUTABLE_ALLOCATOR && SLJIT_PROT_EXECUTABLE_ALLOCATOR)
#define SLJIT_ADD_EXEC_OFFSET(ptr, exec_offset) ((sljit_u8 *)(ptr) + (exec_offse t)) #define SLJIT_ADD_EXEC_OFFSET(ptr, exec_offset) ((sljit_u8 *)(ptr) + (exec_offse t))
#else #else
#define SLJIT_ADD_EXEC_OFFSET(ptr, exec_offset) ((sljit_u8 *)(ptr)) #define SLJIT_ADD_EXEC_OFFSET(ptr, exec_offset) ((sljit_u8 *)(ptr))
#endif #endif
#ifndef SLJIT_UPDATE_WX_FLAGS
#define SLJIT_UPDATE_WX_FLAGS(from, to, enable_exec)
#endif
/* Argument checking features. */ /* Argument checking features. */
#if (defined SLJIT_ARGUMENT_CHECKS && SLJIT_ARGUMENT_CHECKS) #if (defined SLJIT_ARGUMENT_CHECKS && SLJIT_ARGUMENT_CHECKS)
/* Returns with error when an invalid argument is passed. */ /* Returns with error when an invalid argument is passed. */
#define CHECK_ARGUMENT(x) \ #define CHECK_ARGUMENT(x) \
do { \ do { \
if (SLJIT_UNLIKELY(!(x))) \ if (SLJIT_UNLIKELY(!(x))) \
return 1; \ return 1; \
skipping to change at line 369 skipping to change at line 366
/* Public functions */ /* Public functions */
/* --------------------------------------------------------------------- */ /* --------------------------------------------------------------------- */
#if (defined SLJIT_CONFIG_X86 && SLJIT_CONFIG_X86) #if (defined SLJIT_CONFIG_X86 && SLJIT_CONFIG_X86)
#define SLJIT_NEEDS_COMPILER_INIT 1 #define SLJIT_NEEDS_COMPILER_INIT 1
static sljit_s32 compiler_initialized = 0; static sljit_s32 compiler_initialized = 0;
/* A thread safe initialization. */ /* A thread safe initialization. */
static void init_compiler(void); static void init_compiler(void);
#endif #endif
SLJIT_API_FUNC_ATTRIBUTE struct sljit_compiler* sljit_create_compiler(void *allo cator_data) SLJIT_API_FUNC_ATTRIBUTE struct sljit_compiler* sljit_create_compiler(void *allo cator_data, void *exec_allocator_data)
{ {
struct sljit_compiler *compiler = (struct sljit_compiler*)SLJIT_MALLOC(si zeof(struct sljit_compiler), allocator_data); struct sljit_compiler *compiler = (struct sljit_compiler*)SLJIT_MALLOC(si zeof(struct sljit_compiler), allocator_data);
if (!compiler) if (!compiler)
return NULL; return NULL;
SLJIT_ZEROMEM(compiler, sizeof(struct sljit_compiler)); SLJIT_ZEROMEM(compiler, sizeof(struct sljit_compiler));
SLJIT_COMPILE_ASSERT( SLJIT_COMPILE_ASSERT(
sizeof(sljit_s8) == 1 && sizeof(sljit_u8) == 1 sizeof(sljit_s8) == 1 && sizeof(sljit_u8) == 1
&& sizeof(sljit_s16) == 2 && sizeof(sljit_u16) == 2 && sizeof(sljit_s16) == 2 && sizeof(sljit_u16) == 2
&& sizeof(sljit_s32) == 4 && sizeof(sljit_u32) == 4 && sizeof(sljit_s32) == 4 && sizeof(sljit_u32) == 4
skipping to change at line 396 skipping to change at line 393
int_op_and_single_op_must_be_the_same); int_op_and_single_op_must_be_the_same);
SLJIT_COMPILE_ASSERT(SLJIT_REWRITABLE_JUMP != SLJIT_F32_OP, SLJIT_COMPILE_ASSERT(SLJIT_REWRITABLE_JUMP != SLJIT_F32_OP,
rewritable_jump_and_single_op_must_not_be_the_same); rewritable_jump_and_single_op_must_not_be_the_same);
SLJIT_COMPILE_ASSERT(!(SLJIT_EQUAL & 0x1) && !(SLJIT_LESS & 0x1) && !(SLJ IT_EQUAL_F64 & 0x1) && !(SLJIT_JUMP & 0x1), SLJIT_COMPILE_ASSERT(!(SLJIT_EQUAL & 0x1) && !(SLJIT_LESS & 0x1) && !(SLJ IT_EQUAL_F64 & 0x1) && !(SLJIT_JUMP & 0x1),
conditional_flags_must_be_even_numbers); conditional_flags_must_be_even_numbers);
/* Only the non-zero members must be set. */ /* Only the non-zero members must be set. */
compiler->error = SLJIT_SUCCESS; compiler->error = SLJIT_SUCCESS;
compiler->allocator_data = allocator_data; compiler->allocator_data = allocator_data;
compiler->exec_allocator_data = exec_allocator_data;
compiler->buf = (struct sljit_memory_fragment*)SLJIT_MALLOC(BUF_SIZE, all ocator_data); compiler->buf = (struct sljit_memory_fragment*)SLJIT_MALLOC(BUF_SIZE, all ocator_data);
compiler->abuf = (struct sljit_memory_fragment*)SLJIT_MALLOC(ABUF_SIZE, a llocator_data); compiler->abuf = (struct sljit_memory_fragment*)SLJIT_MALLOC(ABUF_SIZE, a llocator_data);
if (!compiler->buf || !compiler->abuf) { if (!compiler->buf || !compiler->abuf) {
if (compiler->buf) if (compiler->buf)
SLJIT_FREE(compiler->buf, allocator_data); SLJIT_FREE(compiler->buf, allocator_data);
if (compiler->abuf) if (compiler->abuf)
SLJIT_FREE(compiler->abuf, allocator_data); SLJIT_FREE(compiler->abuf, allocator_data);
SLJIT_FREE(compiler, allocator_data); SLJIT_FREE(compiler, allocator_data);
return NULL; return NULL;
skipping to change at line 488 skipping to change at line 486
SLJIT_FREE(compiler, allocator_data); SLJIT_FREE(compiler, allocator_data);
} }
SLJIT_API_FUNC_ATTRIBUTE void sljit_set_compiler_memory_error(struct sljit_compi ler *compiler) SLJIT_API_FUNC_ATTRIBUTE void sljit_set_compiler_memory_error(struct sljit_compi ler *compiler)
{ {
if (compiler->error == SLJIT_SUCCESS) if (compiler->error == SLJIT_SUCCESS)
compiler->error = SLJIT_ERR_ALLOC_FAILED; compiler->error = SLJIT_ERR_ALLOC_FAILED;
} }
#if (defined SLJIT_CONFIG_ARM_THUMB2 && SLJIT_CONFIG_ARM_THUMB2) #if (defined SLJIT_CONFIG_ARM_THUMB2 && SLJIT_CONFIG_ARM_THUMB2)
SLJIT_API_FUNC_ATTRIBUTE void sljit_free_code(void* code) SLJIT_API_FUNC_ATTRIBUTE void sljit_free_code(void* code, void *exec_allocator_d ata)
{ {
SLJIT_UNUSED_ARG(exec_allocator_data);
/* Remove thumb mode flag. */ /* Remove thumb mode flag. */
SLJIT_FREE_EXEC((void*)((sljit_uw)code & ~0x1)); SLJIT_FREE_EXEC((void*)((sljit_uw)code & ~0x1), exec_allocator_data);
} }
#elif (defined SLJIT_INDIRECT_CALL && SLJIT_INDIRECT_CALL) #elif (defined SLJIT_INDIRECT_CALL && SLJIT_INDIRECT_CALL)
SLJIT_API_FUNC_ATTRIBUTE void sljit_free_code(void* code) SLJIT_API_FUNC_ATTRIBUTE void sljit_free_code(void* code, void *exec_allocator_d ata)
{ {
SLJIT_UNUSED_ARG(exec_allocator_data);
/* Resolve indirection. */ /* Resolve indirection. */
code = (void*)(*(sljit_uw*)code); code = (void*)(*(sljit_uw*)code);
SLJIT_FREE_EXEC(code); SLJIT_FREE_EXEC(code, exec_allocator_data);
} }
#else #else
SLJIT_API_FUNC_ATTRIBUTE void sljit_free_code(void* code) SLJIT_API_FUNC_ATTRIBUTE void sljit_free_code(void* code, void *exec_allocator_d ata)
{ {
SLJIT_FREE_EXEC(code); SLJIT_UNUSED_ARG(exec_allocator_data);
SLJIT_FREE_EXEC(code, exec_allocator_data);
} }
#endif #endif
SLJIT_API_FUNC_ATTRIBUTE void sljit_set_label(struct sljit_jump *jump, struct sl jit_label* label) SLJIT_API_FUNC_ATTRIBUTE void sljit_set_label(struct sljit_jump *jump, struct sl jit_label* label)
{ {
if (SLJIT_LIKELY(!!jump) && SLJIT_LIKELY(!!label)) { if (SLJIT_LIKELY(!!jump) && SLJIT_LIKELY(!!label)) {
jump->flags &= ~JUMP_ADDR; jump->flags &= ~JUMP_ADDR;
jump->flags |= JUMP_LABEL; jump->flags |= JUMP_LABEL;
jump->u.label = label; jump->u.label = label;
} }
skipping to change at line 630 skipping to change at line 634
arg_types >>= SLJIT_DEF_SHIFT; arg_types >>= SLJIT_DEF_SHIFT;
while (arg_types) { while (arg_types) {
arg_count++; arg_count++;
arg_types >>= SLJIT_DEF_SHIFT; arg_types >>= SLJIT_DEF_SHIFT;
} }
return arg_count; return arg_count;
} }
#if !(defined SLJIT_CONFIG_X86 && SLJIT_CONFIG_X86) /* Only used in RISC architectures where the instruction size is constant */
#if !(defined SLJIT_CONFIG_X86 && SLJIT_CONFIG_X86) \
&& !(defined SLJIT_CONFIG_S390X && SLJIT_CONFIG_S390X)
static SLJIT_INLINE sljit_uw compute_next_addr(struct sljit_label *label, struct sljit_jump *jump, static SLJIT_INLINE sljit_uw compute_next_addr(struct sljit_label *label, struct sljit_jump *jump,
struct sljit_const *const_, struct sljit_put_label *put_label) struct sljit_const *const_, struct sljit_put_label *put_label)
{ {
sljit_uw result = ~(sljit_uw)0; sljit_uw result = ~(sljit_uw)0;
if (label) if (label)
result = label->size; result = label->size;
if (jump && jump->addr < result) if (jump && jump->addr < result)
skipping to change at line 652 skipping to change at line 658
if (const_ && const_->addr < result) if (const_ && const_->addr < result)
result = const_->addr; result = const_->addr;
if (put_label && put_label->addr < result) if (put_label && put_label->addr < result)
result = put_label->addr; result = put_label->addr;
return result; return result;
} }
#endif /* !SLJIT_CONFIG_X86 */ #endif /* !SLJIT_CONFIG_X86 && !SLJIT_CONFIG_S390X */
static SLJIT_INLINE void set_emit_enter(struct sljit_compiler *compiler, static SLJIT_INLINE void set_emit_enter(struct sljit_compiler *compiler,
sljit_s32 options, sljit_s32 args, sljit_s32 scratches, sljit_s32 saveds, sljit_s32 options, sljit_s32 args, sljit_s32 scratches, sljit_s32 saveds,
sljit_s32 fscratches, sljit_s32 fsaveds, sljit_s32 local_size) sljit_s32 fscratches, sljit_s32 fsaveds, sljit_s32 local_size)
{ {
SLJIT_UNUSED_ARG(args); SLJIT_UNUSED_ARG(args);
SLJIT_UNUSED_ARG(local_size); SLJIT_UNUSED_ARG(local_size);
compiler->options = options; compiler->options = options;
compiler->scratches = scratches; compiler->scratches = scratches;
skipping to change at line 1381 skipping to change at line 1387
SLJIT_UNUSED_ARG(compiler); SLJIT_UNUSED_ARG(compiler);
#if (defined SLJIT_ARGUMENT_CHECKS && SLJIT_ARGUMENT_CHECKS) #if (defined SLJIT_ARGUMENT_CHECKS && SLJIT_ARGUMENT_CHECKS)
CHECK_ARGUMENT(instruction); CHECK_ARGUMENT(instruction);
#if (defined SLJIT_CONFIG_X86 && SLJIT_CONFIG_X86) #if (defined SLJIT_CONFIG_X86 && SLJIT_CONFIG_X86)
CHECK_ARGUMENT(size > 0 && size < 16); CHECK_ARGUMENT(size > 0 && size < 16);
#elif (defined SLJIT_CONFIG_ARM_THUMB2 && SLJIT_CONFIG_ARM_THUMB2) #elif (defined SLJIT_CONFIG_ARM_THUMB2 && SLJIT_CONFIG_ARM_THUMB2)
CHECK_ARGUMENT((size == 2 && (((sljit_sw)instruction) & 0x1) == 0) CHECK_ARGUMENT((size == 2 && (((sljit_sw)instruction) & 0x1) == 0)
|| (size == 4 && (((sljit_sw)instruction) & 0x3) == 0)); || (size == 4 && (((sljit_sw)instruction) & 0x3) == 0));
#elif (defined SLJIT_CONFIG_S390X && SLJIT_CONFIG_S390X)
CHECK_ARGUMENT(size == 2 || size == 4 || size == 6);
#else #else
CHECK_ARGUMENT(size == 4 && (((sljit_sw)instruction) & 0x3) == 0); CHECK_ARGUMENT(size == 4 && (((sljit_sw)instruction) & 0x3) == 0);
#endif #endif
compiler->last_flags = 0; compiler->last_flags = 0;
#endif #endif
#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) #if (defined SLJIT_VERBOSE && SLJIT_VERBOSE)
if (SLJIT_UNLIKELY(!!compiler->verbose)) { if (SLJIT_UNLIKELY(!!compiler->verbose)) {
fprintf(compiler->verbose, " op_custom"); fprintf(compiler->verbose, " op_custom");
for (i = 0; i < size; i++) for (i = 0; i < size; i++)
skipping to change at line 2037 skipping to change at line 2045
#if (defined SLJIT_ARGUMENT_CHECKS && SLJIT_ARGUMENT_CHECKS) \ #if (defined SLJIT_ARGUMENT_CHECKS && SLJIT_ARGUMENT_CHECKS) \
|| (defined SLJIT_VERBOSE && SLJIT_VERBOSE) || (defined SLJIT_VERBOSE && SLJIT_VERBOSE)
compiler->skip_checks = 1; compiler->skip_checks = 1;
#endif #endif
return sljit_emit_op1(compiler, op, SLJIT_RETURN_REG, 0, src, srcw); return sljit_emit_op1(compiler, op, SLJIT_RETURN_REG, 0, src, srcw);
} }
#if (defined SLJIT_CONFIG_X86 && SLJIT_CONFIG_X86) \ #if (defined SLJIT_CONFIG_X86 && SLJIT_CONFIG_X86) \
|| (defined SLJIT_CONFIG_PPC && SLJIT_CONFIG_PPC) \ || (defined SLJIT_CONFIG_PPC && SLJIT_CONFIG_PPC) \
|| (defined SLJIT_CONFIG_SPARC_32 && SLJIT_CONFIG_SPARC_32) \ || (defined SLJIT_CONFIG_SPARC_32 && SLJIT_CONFIG_SPARC_32) \
|| ((defined SLJIT_CONFIG_MIPS && SLJIT_CONFIG_MIPS) && !(defined SLJIT_MIPS_REV && SLJIT_MIPS_REV >= 1)) || ((defined SLJIT_CONFIG_MIPS && SLJIT_CONFIG_MIPS) && !(defined SLJIT_MIPS_REV && SLJIT_MIPS_REV >= 1 && SLJIT_MIPS_REV < 6))
static SLJIT_INLINE sljit_s32 sljit_emit_cmov_generic(struct sljit_compiler *com piler, sljit_s32 type, static SLJIT_INLINE sljit_s32 sljit_emit_cmov_generic(struct sljit_compiler *com piler, sljit_s32 type,
sljit_s32 dst_reg, sljit_s32 dst_reg,
sljit_s32 src, sljit_sw srcw) sljit_s32 src, sljit_sw srcw)
{ {
struct sljit_label *label; struct sljit_label *label;
struct sljit_jump *jump; struct sljit_jump *jump;
sljit_s32 op = (dst_reg & SLJIT_I32_OP) ? SLJIT_MOV32 : SLJIT_MOV; sljit_s32 op = (dst_reg & SLJIT_I32_OP) ? SLJIT_MOV32 : SLJIT_MOV;
#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) \ #if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) \
skipping to change at line 2114 skipping to change at line 2122
#elif (defined SLJIT_CONFIG_ARM_THUMB2 && SLJIT_CONFIG_ARM_THUMB2) #elif (defined SLJIT_CONFIG_ARM_THUMB2 && SLJIT_CONFIG_ARM_THUMB2)
# include "sljitNativeARM_T2_32.c" # include "sljitNativeARM_T2_32.c"
#elif (defined SLJIT_CONFIG_ARM_64 && SLJIT_CONFIG_ARM_64) #elif (defined SLJIT_CONFIG_ARM_64 && SLJIT_CONFIG_ARM_64)
# include "sljitNativeARM_64.c" # include "sljitNativeARM_64.c"
#elif (defined SLJIT_CONFIG_PPC && SLJIT_CONFIG_PPC) #elif (defined SLJIT_CONFIG_PPC && SLJIT_CONFIG_PPC)
# include "sljitNativePPC_common.c" # include "sljitNativePPC_common.c"
#elif (defined SLJIT_CONFIG_MIPS && SLJIT_CONFIG_MIPS) #elif (defined SLJIT_CONFIG_MIPS && SLJIT_CONFIG_MIPS)
# include "sljitNativeMIPS_common.c" # include "sljitNativeMIPS_common.c"
#elif (defined SLJIT_CONFIG_SPARC && SLJIT_CONFIG_SPARC) #elif (defined SLJIT_CONFIG_SPARC && SLJIT_CONFIG_SPARC)
# include "sljitNativeSPARC_common.c" # include "sljitNativeSPARC_common.c"
#elif (defined SLJIT_CONFIG_TILEGX && SLJIT_CONFIG_TILEGX) #elif (defined SLJIT_CONFIG_S390X && SLJIT_CONFIG_S390X)
# include "sljitNativeTILEGX_64.c" # include "sljitNativeS390X.c"
#endif #endif
#if !(defined SLJIT_CONFIG_MIPS && SLJIT_CONFIG_MIPS) #if !(defined SLJIT_CONFIG_MIPS && SLJIT_CONFIG_MIPS)
SLJIT_API_FUNC_ATTRIBUTE struct sljit_jump* sljit_emit_cmp(struct sljit_compiler *compiler, sljit_s32 type, SLJIT_API_FUNC_ATTRIBUTE struct sljit_jump* sljit_emit_cmp(struct sljit_compiler *compiler, sljit_s32 type,
sljit_s32 src1, sljit_sw src1w, sljit_s32 src1, sljit_sw src1w,
sljit_s32 src2, sljit_sw src2w) sljit_s32 src2, sljit_sw src2w)
{ {
/* Default compare for most architectures. */ /* Default compare for most architectures. */
sljit_s32 flags, tmp_src, condition; sljit_s32 flags, tmp_src, condition;
skipping to change at line 2146 skipping to change at line 2154
src1w = src2w; src1w = src2w;
src2 = SLJIT_IMM; src2 = SLJIT_IMM;
src2w = 0; src2w = 0;
} }
if ((src2 & SLJIT_IMM) && !src2w) if ((src2 & SLJIT_IMM) && !src2w)
return emit_cmp_to0(compiler, type, src1, src1w); return emit_cmp_to0(compiler, type, src1, src1w);
} }
#endif #endif
if (SLJIT_UNLIKELY((src1 & SLJIT_IMM) && !(src2 & SLJIT_IMM))) { if (SLJIT_UNLIKELY((src1 & SLJIT_IMM) && !(src2 & SLJIT_IMM))) {
/* Immediate is prefered as second argument by most architectures . */ /* Immediate is preferred as second argument by most architecture s. */
switch (condition) { switch (condition) {
case SLJIT_LESS: case SLJIT_LESS:
condition = SLJIT_GREATER; condition = SLJIT_GREATER;
break; break;
case SLJIT_GREATER_EQUAL: case SLJIT_GREATER_EQUAL:
condition = SLJIT_LESS_EQUAL; condition = SLJIT_LESS_EQUAL;
break; break;
case SLJIT_GREATER: case SLJIT_GREATER:
condition = SLJIT_LESS; condition = SLJIT_LESS;
break; break;
skipping to change at line 2295 skipping to change at line 2303
#else /* SLJIT_CONFIG_UNSUPPORTED */ #else /* SLJIT_CONFIG_UNSUPPORTED */
/* Empty function bodies for those machines, which are not (yet) supported. */ /* Empty function bodies for those machines, which are not (yet) supported. */
SLJIT_API_FUNC_ATTRIBUTE const char* sljit_get_platform_name(void) SLJIT_API_FUNC_ATTRIBUTE const char* sljit_get_platform_name(void)
{ {
return "unsupported"; return "unsupported";
} }
SLJIT_API_FUNC_ATTRIBUTE struct sljit_compiler* sljit_create_compiler(void *allo cator_data) SLJIT_API_FUNC_ATTRIBUTE struct sljit_compiler* sljit_create_compiler(void *allo cator_data, void *exec_allocator_data)
{ {
SLJIT_UNUSED_ARG(allocator_data); SLJIT_UNUSED_ARG(allocator_data);
SLJIT_UNUSED_ARG(exec_allocator_data);
SLJIT_UNREACHABLE(); SLJIT_UNREACHABLE();
return NULL; return NULL;
} }
SLJIT_API_FUNC_ATTRIBUTE void sljit_free_compiler(struct sljit_compiler *compile r) SLJIT_API_FUNC_ATTRIBUTE void sljit_free_compiler(struct sljit_compiler *compile r)
{ {
SLJIT_UNUSED_ARG(compiler); SLJIT_UNUSED_ARG(compiler);
SLJIT_UNREACHABLE(); SLJIT_UNREACHABLE();
} }
skipping to change at line 2345 skipping to change at line 2354
return NULL; return NULL;
} }
SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_has_cpu_feature(sljit_s32 feature_type) SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_has_cpu_feature(sljit_s32 feature_type)
{ {
SLJIT_UNUSED_ARG(feature_type); SLJIT_UNUSED_ARG(feature_type);
SLJIT_UNREACHABLE(); SLJIT_UNREACHABLE();
return 0; return 0;
} }
SLJIT_API_FUNC_ATTRIBUTE void sljit_free_code(void* code) SLJIT_API_FUNC_ATTRIBUTE void sljit_free_code(void* code, void *exec_allocator_d ata)
{ {
SLJIT_UNUSED_ARG(code); SLJIT_UNUSED_ARG(code);
SLJIT_UNUSED_ARG(exec_allocator_data);
SLJIT_UNREACHABLE(); SLJIT_UNREACHABLE();
} }
SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_enter(struct sljit_compiler *compi ler, SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_enter(struct sljit_compiler *compi ler,
sljit_s32 options, sljit_s32 arg_types, sljit_s32 scratches, sljit_s32 sa veds, sljit_s32 options, sljit_s32 arg_types, sljit_s32 scratches, sljit_s32 sa veds,
sljit_s32 fscratches, sljit_s32 fsaveds, sljit_s32 local_size) sljit_s32 fscratches, sljit_s32 fsaveds, sljit_s32 local_size)
{ {
SLJIT_UNUSED_ARG(compiler); SLJIT_UNUSED_ARG(compiler);
SLJIT_UNUSED_ARG(options); SLJIT_UNUSED_ARG(options);
SLJIT_UNUSED_ARG(arg_types); SLJIT_UNUSED_ARG(arg_types);
 End of changes. 24 change blocks. 
24 lines changed or deleted 34 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)