Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/external/bsd/sljit/dist Resolve conflicts.



details:   https://anonhg.NetBSD.org/src/rev/3d68fdb6b90d
branches:  trunk
changeset: 815599:3d68fdb6b90d
user:      alnsn <alnsn%NetBSD.org@localhost>
date:      Sun May 29 17:09:33 2016 +0000

description:
Resolve conflicts.

diffstat:

 sys/external/bsd/sljit/dist/sljit_src/sljitConfig.h             |    19 +-
 sys/external/bsd/sljit/dist/sljit_src/sljitConfigInternal.h     |   425 +-
 sys/external/bsd/sljit/dist/sljit_src/sljitExecAllocator.c      |    10 +-
 sys/external/bsd/sljit/dist/sljit_src/sljitLir.c                |  1415 ++-
 sys/external/bsd/sljit/dist/sljit_src/sljitLir.h                |   926 +-
 sys/external/bsd/sljit/dist/sljit_src/sljitNativeARM_32.c       |   770 +-
 sys/external/bsd/sljit/dist/sljit_src/sljitNativeARM_64.c       |   708 +-
 sys/external/bsd/sljit/dist/sljit_src/sljitNativeARM_T2_32.c    |   713 +-
 sys/external/bsd/sljit/dist/sljit_src/sljitNativeMIPS_32.c      |    80 +-
 sys/external/bsd/sljit/dist/sljit_src/sljitNativeMIPS_64.c      |    96 +-
 sys/external/bsd/sljit/dist/sljit_src/sljitNativeMIPS_common.c  |   852 +-
 sys/external/bsd/sljit/dist/sljit_src/sljitNativePPC_32.c       |    28 +-
 sys/external/bsd/sljit/dist/sljit_src/sljitNativePPC_64.c       |    30 +-
 sys/external/bsd/sljit/dist/sljit_src/sljitNativePPC_common.c   |   863 +-
 sys/external/bsd/sljit/dist/sljit_src/sljitNativeSPARC_32.c     |    30 +-
 sys/external/bsd/sljit/dist/sljit_src/sljitNativeSPARC_common.c |   556 +-
 sys/external/bsd/sljit/dist/sljit_src/sljitNativeTILEGX_64.c    |   541 +-
 sys/external/bsd/sljit/dist/sljit_src/sljitNativeX86_32.c       |   277 +-
 sys/external/bsd/sljit/dist/sljit_src/sljitNativeX86_64.c       |   483 +-
 sys/external/bsd/sljit/dist/sljit_src/sljitNativeX86_common.c   |  1079 +-
 sys/external/bsd/sljit/dist/sljit_src/sljitUtils.c              |    31 +-
 sys/external/bsd/sljit/dist/test_src/sljitMain.c                |     8 +-
 sys/external/bsd/sljit/dist/test_src/sljitTest.c                |  3916 ++++++---
 23 files changed, 7979 insertions(+), 5877 deletions(-)

diffs (truncated from 23114 to 300 lines):

diff -r 92ad7f1a8512 -r 3d68fdb6b90d sys/external/bsd/sljit/dist/sljit_src/sljitConfig.h
--- a/sys/external/bsd/sljit/dist/sljit_src/sljitConfig.h       Sun May 29 17:06:17 2016 +0000
+++ b/sys/external/bsd/sljit/dist/sljit_src/sljitConfig.h       Sun May 29 17:09:33 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sljitConfig.h,v 1.12 2014/07/23 18:19:45 alnsn Exp $   */
+/*     $NetBSD: sljitConfig.h,v 1.13 2016/05/29 17:09:33 alnsn Exp $   */
 
 /*
  *    Stack-less Just-In-Time compiler
@@ -140,13 +140,28 @@
 #define SLJIT_EXECUTABLE_ALLOCATOR 1
 #endif
 
+/* Force cdecl calling convention even if a better calling
+   convention (e.g. fastcall) is supported by the C compiler.
+   If this option is enabled, C functions without
+   SLJIT_CALL can also be called from JIT code. */
+#ifndef SLJIT_USE_CDECL_CALLING_CONVENTION
+/* Disabled by default */
+#define SLJIT_USE_CDECL_CALLING_CONVENTION 0
+#endif
+
+/* Return with error when an invalid argument is passed. */
+#ifndef SLJIT_ARGUMENT_CHECKS
+/* Disabled by default */
+#define SLJIT_ARGUMENT_CHECKS 0
+#endif
+
 /* Debug checks (assertions, etc.). */
 #ifndef SLJIT_DEBUG
 /* Enabled by default */
 #define SLJIT_DEBUG 1
 #endif
 
-/* Verbose operations */
+/* Verbose operations. */
 #ifndef SLJIT_VERBOSE
 /* Enabled by default */
 #define SLJIT_VERBOSE 1
diff -r 92ad7f1a8512 -r 3d68fdb6b90d sys/external/bsd/sljit/dist/sljit_src/sljitConfigInternal.h
--- a/sys/external/bsd/sljit/dist/sljit_src/sljitConfigInternal.h       Sun May 29 17:06:17 2016 +0000
+++ b/sys/external/bsd/sljit/dist/sljit_src/sljitConfigInternal.h       Sun May 29 17:09:33 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sljitConfigInternal.h,v 1.9 2014/06/17 19:36:45 alnsn Exp $    */
+/*     $NetBSD: sljitConfigInternal.h,v 1.10 2016/05/29 17:09:33 alnsn Exp $   */
 
 /*
  *    Stack-less Just-In-Time compiler
@@ -30,32 +30,50 @@
 #define _SLJIT_CONFIG_INTERNAL_H_
 
 /*
-   SLJIT defines the following macros depending on the target architecture:
+   SLJIT defines the following architecture dependent types and macros:
 
-   Feature detection (boolean) macros:
-   SLJIT_32BIT_ARCHITECTURE : 32 bit architecture
-   SLJIT_64BIT_ARCHITECTURE : 64 bit architecture
-   SLJIT_WORD_SHIFT : the shift required to apply when accessing a sljit_sw/sljit_uw array by index
-   SLJIT_DOUBLE_SHIFT : the shift required to apply when accessing a double array by index
-   SLJIT_LITTLE_ENDIAN : little endian architecture
-   SLJIT_BIG_ENDIAN : big endian architecture
-   SLJIT_UNALIGNED : allows unaligned memory accesses for non-fpu operations (only!)
-   SLJIT_INDIRECT_CALL : see SLJIT_FUNC_OFFSET() for more information
-   SLJIT_RETURN_ADDRESS_OFFSET : a return instruction always adds this offset to the return address
+   Types:
+     sljit_s8, sljit_u8   : signed and unsigned 8 bit integer type
+     sljit_s16, sljit_u16 : signed and unsigned 16 bit integer type
+     sljit_s32, sljit_u32 : signed and unsigned 32 bit integer type
+     sljit_sw, sljit_uw   : signed and unsigned machine word, enough to store a pointer
+     sljit_p              : unsgined pointer value (usually the same as sljit_uw, but
+                            some 64 bit ABIs may use 32 bit pointers)
+     sljit_f32            : 32 bit single precision floating point value
+     sljit_f64            : 64 bit double precision floating point value
+
+   Macros for feature detection (boolean):
+     SLJIT_32BIT_ARCHITECTURE : 32 bit architecture
+     SLJIT_64BIT_ARCHITECTURE : 64 bit architecture
+     SLJIT_LITTLE_ENDIAN : little endian architecture
+     SLJIT_BIG_ENDIAN : big endian architecture
+     SLJIT_UNALIGNED : allows unaligned memory accesses for non-fpu operations (only!)
+     SLJIT_INDIRECT_CALL : see SLJIT_FUNC_OFFSET() for more information
 
-   Types and useful macros:
-   sljit_sb, sljit_ub : signed and unsigned 8 bit byte
-   sljit_sh, sljit_uh : signed and unsigned 16 bit half-word (short) type
-   sljit_si, sljit_ui : signed and unsigned 32 bit integer type
-   sljit_sw, sljit_uw : signed and unsigned machine word, enough to store a pointer
-   sljit_p : unsgined pointer value (usually the same as sljit_uw, but
-             some 64 bit ABIs may use 32 bit pointers)
-   sljit_s : single precision floating point value
-   sljit_d : double precision floating point value
-   SLJIT_CALL : C calling convention define for both calling JIT form C and C callbacks for JIT
-   SLJIT_W(number) : defining 64 bit constants on 64 bit architectures (compiler independent helper)
+   Constants:
+     SLJIT_NUMBER_OF_REGISTERS : number of available registers
+     SLJIT_NUMBER_OF_SCRATCH_REGISTERS : number of available scratch registers
+     SLJIT_NUMBER_OF_SAVED_REGISTERS : number of available saved registers
+     SLJIT_NUMBER_OF_FLOAT_REGISTERS : number of available floating point registers
+     SLJIT_NUMBER_OF_SCRATCH_FLOAT_REGISTERS : number of available floating point scratch registers
+     SLJIT_NUMBER_OF_SAVED_FLOAT_REGISTERS : number of available floating point saved registers
+     SLJIT_WORD_SHIFT : the shift required to apply when accessing a sljit_sw/sljit_uw array by index
+     SLJIT_F32_SHIFT : the shift required to apply when accessing
+                       a single precision floating point array by index
+     SLJIT_F64_SHIFT : the shift required to apply when accessing
+                       a double precision floating point array by index
+     SLJIT_LOCALS_OFFSET : local space starting offset (SLJIT_SP + SLJIT_LOCALS_OFFSET)
+     SLJIT_RETURN_ADDRESS_OFFSET : a return instruction always adds this offset to the return address
+
+   Other macros:
+     SLJIT_CALL : C calling convention define for both calling JIT form C and C callbacks for JIT
+     SLJIT_W(number) : defining 64 bit constants on 64 bit architectures (compiler independent helper)
 */
 
+/*****************/
+/* Sanity check. */
+/*****************/
+
 #if !((defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32) \
        || (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64) \
        || (defined SLJIT_CONFIG_ARM_V5 && SLJIT_CONFIG_ARM_V5) \
@@ -73,7 +91,6 @@
 #error "An architecture must be selected"
 #endif
 
-/* Sanity check. */
 #if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32) \
        + (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64) \
        + (defined SLJIT_CONFIG_ARM_V5 && SLJIT_CONFIG_ARM_V5) \
@@ -91,7 +108,10 @@
 #error "Multiple architectures are selected"
 #endif
 
-/* Auto select option (requires compiler support) */
+/********************************************************/
+/* Automatic CPU detection (requires compiler support). */
+/********************************************************/
+
 #if (defined SLJIT_CONFIG_AUTO && SLJIT_CONFIG_AUTO)
 
 #ifndef _WIN32
@@ -144,6 +164,31 @@
 #undef SLJIT_EXECUTABLE_ALLOCATOR
 #endif
 
+/******************************/
+/* CPU family type detection. */
+/******************************/
+
+#if (defined SLJIT_CONFIG_ARM_V5 && SLJIT_CONFIG_ARM_V5) || (defined SLJIT_CONFIG_ARM_V7 && SLJIT_CONFIG_ARM_V7) \
+       || (defined SLJIT_CONFIG_ARM_THUMB2 && SLJIT_CONFIG_ARM_THUMB2)
+#define SLJIT_CONFIG_ARM_32 1
+#endif
+
+#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32) || (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
+#define SLJIT_CONFIG_X86 1
+#elif (defined SLJIT_CONFIG_ARM_32 && SLJIT_CONFIG_ARM_32) || (defined SLJIT_CONFIG_ARM_64 && SLJIT_CONFIG_ARM_64)
+#define SLJIT_CONFIG_ARM 1
+#elif (defined SLJIT_CONFIG_PPC_32 && SLJIT_CONFIG_PPC_32) || (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64)
+#define SLJIT_CONFIG_PPC 1
+#elif (defined SLJIT_CONFIG_MIPS_32 && SLJIT_CONFIG_MIPS_32) || (defined SLJIT_CONFIG_MIPS_64 && SLJIT_CONFIG_MIPS_64)
+#define SLJIT_CONFIG_MIPS 1
+#elif (defined SLJIT_CONFIG_SPARC_32 && SLJIT_CONFIG_SPARC_32) || (defined SLJIT_CONFIG_SPARC_64 && SLJIT_CONFIG_SPARC_64)
+#define SLJIT_CONFIG_SPARC 1
+#endif
+
+/**********************************/
+/* External function definitions. */
+/**********************************/
+
 #if !(defined SLJIT_STD_MACROS_DEFINED && SLJIT_STD_MACROS_DEFINED)
 
 #ifndef _KERNEL
@@ -152,20 +197,21 @@
 #include <string.h>
 #endif
 
-#endif /* STD_MACROS_DEFINED */
+#endif /* SLJIT_STD_MACROS_DEFINED */
 
 /* General macros:
    Note: SLJIT is designed to be independent from them as possible.
 
-   In release mode (SLJIT_DEBUG is not defined) only the following macros are needed:
+   In release mode (SLJIT_DEBUG is not defined) only the following
+   external functions are needed:
 */
 
 #ifndef SLJIT_MALLOC
-#define SLJIT_MALLOC(size) malloc(size)
+#define SLJIT_MALLOC(size, allocator_data) malloc(size)
 #endif
 
 #ifndef SLJIT_FREE
-#define SLJIT_FREE(ptr) free(ptr)
+#define SLJIT_FREE(ptr, allocator_data) free(ptr)
 #endif
 
 #ifndef SLJIT_MEMMOVE
@@ -176,6 +222,10 @@
 #define SLJIT_ZEROMEM(dest, len) memset(dest, 0, len)
 #endif
 
+/***************************/
+/* Compiler helper macros. */
+/***************************/
+
 #if !defined(SLJIT_LIKELY) && !defined(SLJIT_UNLIKELY)
 
 #if defined(__GNUC__) && (__GNUC__ >= 3)
@@ -197,16 +247,24 @@
 #endif
 #endif /* !SLJIT_INLINE */
 
-#ifndef SLJIT_CONST
-/* Const variables. */
-#define SLJIT_CONST const
+#ifndef SLJIT_NOINLINE
+/* Not inline functions. */
+#if defined(__GNUC__)
+#define SLJIT_NOINLINE __attribute__ ((noinline))
+#else
+#define SLJIT_NOINLINE
 #endif
+#endif /* !SLJIT_INLINE */
 
 #ifndef SLJIT_UNUSED_ARG
 /* Unused arguments. */
 #define SLJIT_UNUSED_ARG(arg) (void)arg
 #endif
 
+/*********************************/
+/* Type of public API functions. */
+/*********************************/
+
 #if (defined SLJIT_CONFIG_STATIC && SLJIT_CONFIG_STATIC)
 /* Static ABI functions. For all-in-one programs. */
 
@@ -221,9 +279,22 @@
 #define SLJIT_API_FUNC_ATTRIBUTE
 #endif /* (defined SLJIT_CONFIG_STATIC && SLJIT_CONFIG_STATIC) */
 
+/****************************/
+/* Instruction cache flush. */
+/****************************/
+
+#if (!defined SLJIT_CACHE_FLUSH && defined __has_builtin)
+#if __has_builtin(__builtin___clear_cache)
+
+#define SLJIT_CACHE_FLUSH(from, to) \
+       __builtin___clear_cache((char*)from, (char*)to)
+
+#endif /* __has_builtin(__builtin___clear_cache) */
+#endif /* (!defined SLJIT_CACHE_FLUSH && defined __has_builtin) */
+
 #ifndef SLJIT_CACHE_FLUSH
 
-#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32) || (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
+#if (defined SLJIT_CONFIG_X86 && SLJIT_CONFIG_X86)
 
 /* Not required to implement on archs with unified caches. */
 #define SLJIT_CACHE_FLUSH(from, to)
@@ -237,6 +308,11 @@
 #define SLJIT_CACHE_FLUSH(from, to) \
        sys_icache_invalidate((char*)(from), (char*)(to) - (char*)(from))
 
+#elif (defined(__GNUC__) && (__GNUC__ >= 5 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)))
+
+#define SLJIT_CACHE_FLUSH(from, to) \
+       __builtin___clear_cache((char*)from, (char*)to)
+
 #elif defined __ANDROID__
 
 /* Android lacks __clear_cache; instead, cacheflush should be used. */
@@ -244,17 +320,19 @@
 #define SLJIT_CACHE_FLUSH(from, to) \
     cacheflush((long)(from), (long)(to), 0)
 
-#elif (defined SLJIT_CONFIG_PPC_32 && SLJIT_CONFIG_PPC_32) || (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64)
+#elif (defined SLJIT_CONFIG_PPC && SLJIT_CONFIG_PPC)
 
 /* The __clear_cache() implementation of GCC is a dummy function on PowerPC. */
 #define SLJIT_CACHE_FLUSH(from, to) \
        ppc_cache_flush((from), (to))
+#define SLJIT_CACHE_FLUSH_OWN_IMPL 1
 
 #elif (defined SLJIT_CONFIG_SPARC_32 && SLJIT_CONFIG_SPARC_32)
 
 /* The __clear_cache() implementation of GCC is a dummy function on Sparc. */
 #define SLJIT_CACHE_FLUSH(from, to) \
        sparc_cache_flush((from), (to))
+#define SLJIT_CACHE_FLUSH_OWN_IMPL 1
 
 #else
 
@@ -266,19 +344,23 @@
 
 #endif /* !SLJIT_CACHE_FLUSH */
 
+/******************************************************/



Home | Main Index | Thread Index | Old Index