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/9632a985b596
branches:  trunk
changeset: 996123:9632a985b596
user:      alnsn <alnsn%NetBSD.org@localhost>
date:      Sun Jan 20 23:14:16 2019 +0000

description:
Resolve conflicts.

diffstat:

 sys/external/bsd/sljit/dist/hist                                  |    60 -
 sys/external/bsd/sljit/dist/sljit_src/sljitConfig.h               |    18 +-
 sys/external/bsd/sljit/dist/sljit_src/sljitConfigInternal.h       |    84 +-
 sys/external/bsd/sljit/dist/sljit_src/sljitExecAllocator.c        |    25 +-
 sys/external/bsd/sljit/dist/sljit_src/sljitLir.c                  |   407 ++-
 sys/external/bsd/sljit/dist/sljit_src/sljitLir.h                  |   490 ++-
 sys/external/bsd/sljit/dist/sljit_src/sljitNativeARM_32.c         |  1074 +++------
 sys/external/bsd/sljit/dist/sljit_src/sljitNativeARM_64.c         |    76 +-
 sys/external/bsd/sljit/dist/sljit_src/sljitNativeARM_T2_32.c      |   657 ++---
 sys/external/bsd/sljit/dist/sljit_src/sljitNativeMIPS_32.c        |   273 +-
 sys/external/bsd/sljit/dist/sljit_src/sljitNativeMIPS_64.c        |   276 +-
 sys/external/bsd/sljit/dist/sljit_src/sljitNativeMIPS_common.c    |   327 +--
 sys/external/bsd/sljit/dist/sljit_src/sljitNativePPC_32.c         |    62 +-
 sys/external/bsd/sljit/dist/sljit_src/sljitNativePPC_64.c         |    79 +-
 sys/external/bsd/sljit/dist/sljit_src/sljitNativePPC_common.c     |   229 +-
 sys/external/bsd/sljit/dist/sljit_src/sljitNativeSPARC_32.c       |    24 +-
 sys/external/bsd/sljit/dist/sljit_src/sljitNativeSPARC_common.c   |    46 +-
 sys/external/bsd/sljit/dist/sljit_src/sljitNativeTILEGX-encoder.c |     4 +-
 sys/external/bsd/sljit/dist/sljit_src/sljitNativeTILEGX_64.c      |    32 +-
 sys/external/bsd/sljit/dist/sljit_src/sljitNativeX86_32.c         |   168 +-
 sys/external/bsd/sljit/dist/sljit_src/sljitNativeX86_64.c         |   154 +-
 sys/external/bsd/sljit/dist/sljit_src/sljitNativeX86_common.c     |   350 +-
 sys/external/bsd/sljit/dist/sljit_src/sljitUtils.c                |   121 +-
 sys/external/bsd/sljit/dist/test_src/sljitTest.c                  |   720 ++++--
 24 files changed, 2852 insertions(+), 2904 deletions(-)

diffs (truncated from 11191 to 300 lines):

diff -r 84f0155d62ed -r 9632a985b596 sys/external/bsd/sljit/dist/hist
--- a/sys/external/bsd/sljit/dist/hist  Sun Jan 20 22:44:25 2019 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,60 +0,0 @@
-Import the latest version of sljit @ r313.
-
-Changes since the last import:
-
-r313 Fix a racing condition reported by Mozilla.
-r312 Support Android ARM64 cacheflush. Patch by Tavian Barnes.
-r311 Update opcode dump.
-r310 Better type specification for integer operations and conditional types.
-r309 Better type specification for long mul and divide operators.
-r308 Better type specification for floating point operations.
-r307 Change d and s postfixes to f64 and f32.
-r306 Change b,h,i postifxes to 8,16,32.
-r305 Fix a wrong immediate number. Reported by Michael McConville.
-r304 Make file patch by Michael McConville.
-r303 Landed changes created by Michael McConville.
-r302 Add support for cmov on x86.
-r301 Tile-Gx fixes by Walter Lee
-r300 Add WinCE support.
-r299 Add a tutorial for SLJIT. Contributed by Wen Xichang.
-r298 Improve integer division.
-r297 Start reworking the integer division.
-r296 Add an overview for SLJIT.
-r295 Small optimizations for x86 and ARM64.
-r294 Fix ARM64 SP alignment.
-r293 Add a new sljit_set_compiler_memory_error function.
-r292 Add missing argument on ARM32.
-r291 Minor fixes and NOINLINE support.
-r290 Support custom memory allocators.
-r289 Add SLJIT_DOUBLE_ALIGNMENT support and emit_op_custom size check.
-r288 Add suport for SLJIT_ARGUMENT_CHECKS on all architectures.
-r287 Add SLJIT_ARGUMENT_CHECKS compiler option and lots of cleanups.
-r286 Support the new naming on PPC and MIPS.
-r285 Support the new naming on ARM and SPARC.
-r284 Move the type letter to the beggining of the floating point opcodes.
-r283 Add i_ s_ d_ froms to compare types.
-r282 Fix an incorrect form of mul on x86-64.
-r281 Refactoring sljitConfigInternal.h header.
-r280 Remove variable locals offset.
-r279 Test skips are not reported if verbose is disabled.
-r278 Add options to sljit_emit_enter and sljit_set_context.
-r277 Reindexing opX opcodes.
-r276 Some comments are fixed and minor refactors were done.
-r275 Minor optimizations.
-r274 Extend the register set on ARM.
-r273 Extend the register set on PPC, MIPS, SPARC.
-r272 Allow remapping of any registers: not just scratch->saved, but saved->scratch as well.
-r271 Renaming floating point registers to support more of them.
-r270 Extend the register set on x86.
-r269 Renaming integer registers for preparing the support of any all machine registers.
-r268 Refactor a macro to work when debug is disabled.
-r267 Introduce architecture macros without 32/64 bit postfix.
-r266 The floating point conversion operators are finished on PPC, and they are supported on all architectures now.
-r265 FPU operations support locals access now. CONW is supported on PPC now.
-r264 Continue code refactoring, MOVS/MOVD are optimized on all architectures.
-r263 SPARC implementation of floating point operators.
-r262 Small refactorings.
-r261 MIPS implementation of floating point conversion operators.
-r260 ARM implementation of floating point operators.
-r259 x86 implementation of floating point conversion operators.
-r258 Refactoring sljit_emit_fop1 opcodes, inserting placeholders for new ones.
diff -r 84f0155d62ed -r 9632a985b596 sys/external/bsd/sljit/dist/sljit_src/sljitConfig.h
--- a/sys/external/bsd/sljit/dist/sljit_src/sljitConfig.h       Sun Jan 20 22:44:25 2019 +0000
+++ b/sys/external/bsd/sljit/dist/sljit_src/sljitConfig.h       Sun Jan 20 23:14:16 2019 +0000
@@ -1,9 +1,9 @@
-/*     $NetBSD: sljitConfig.h,v 1.14 2016/05/29 17:19:01 alnsn Exp $   */
+/*     $NetBSD: sljitConfig.h,v 1.15 2019/01/20 23:14:16 alnsn Exp $   */
 
 /*
  *    Stack-less Just-In-Time compiler
  *
- *    Copyright 2009-2012 Zoltan Herczeg (hzmester%freemail.hu@localhost). All rights reserved.
+ *    Copyright Zoltan Herczeg (hzmester%freemail.hu@localhost). All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without modification, are
  * permitted provided that the following conditions are met:
@@ -126,7 +126,7 @@
 /* --------------------------------------------------------------------- */
 
 /* If SLJIT_STD_MACROS_DEFINED is not defined, the application should
-   define SLJIT_MALLOC, SLJIT_FREE, SLJIT_MEMMOVE, and NULL. */
+   define SLJIT_MALLOC, SLJIT_FREE, SLJIT_MEMCPY, and NULL. */
 #ifndef SLJIT_STD_MACROS_DEFINED
 /* Disabled by default. */
 #define SLJIT_STD_MACROS_DEFINED 0
@@ -134,10 +134,20 @@
 
 /* Executable code allocation:
    If SLJIT_EXECUTABLE_ALLOCATOR is not defined, the application should
-   define both SLJIT_MALLOC_EXEC and SLJIT_FREE_EXEC. */
+   define SLJIT_MALLOC_EXEC, SLJIT_FREE_EXEC, and SLJIT_EXEC_OFFSET. */
 #ifndef SLJIT_EXECUTABLE_ALLOCATOR
 /* Enabled by default. */
 #define SLJIT_EXECUTABLE_ALLOCATOR 1
+
+/* When SLJIT_PROT_EXECUTABLE_ALLOCATOR is enabled SLJIT uses
+   an allocator which does not set writable and executable
+   permission flags at the same time. The trade-of is increased
+   memory consumption and disabled dynamic code modifications. */
+#ifndef SLJIT_PROT_EXECUTABLE_ALLOCATOR
+/* Disabled by default. */
+#define SLJIT_PROT_EXECUTABLE_ALLOCATOR 0
+#endif
+
 #endif
 
 /* Force cdecl calling convention even if a better calling
diff -r 84f0155d62ed -r 9632a985b596 sys/external/bsd/sljit/dist/sljit_src/sljitConfigInternal.h
--- a/sys/external/bsd/sljit/dist/sljit_src/sljitConfigInternal.h       Sun Jan 20 22:44:25 2019 +0000
+++ b/sys/external/bsd/sljit/dist/sljit_src/sljitConfigInternal.h       Sun Jan 20 23:14:16 2019 +0000
@@ -1,9 +1,9 @@
-/*     $NetBSD: sljitConfigInternal.h,v 1.10 2016/05/29 17:09:33 alnsn Exp $   */
+/*     $NetBSD: sljitConfigInternal.h,v 1.11 2019/01/20 23:14:16 alnsn Exp $   */
 
 /*
  *    Stack-less Just-In-Time compiler
  *
- *    Copyright 2009-2012 Zoltan Herczeg (hzmester%freemail.hu@localhost). All rights reserved.
+ *    Copyright Zoltan Herczeg (hzmester%freemail.hu@localhost). All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without modification, are
  * permitted provided that the following conditions are met:
@@ -189,16 +189,6 @@
 /* External function definitions. */
 /**********************************/
 
-#if !(defined SLJIT_STD_MACROS_DEFINED && SLJIT_STD_MACROS_DEFINED)
-
-#ifndef _KERNEL
-/* These libraries are needed for the macros below. */
-#include <stdlib.h>
-#include <string.h>
-#endif
-
-#endif /* SLJIT_STD_MACROS_DEFINED */
-
 /* General macros:
    Note: SLJIT is designed to be independent from them as possible.
 
@@ -214,8 +204,8 @@
 #define SLJIT_FREE(ptr, allocator_data) free(ptr)
 #endif
 
-#ifndef SLJIT_MEMMOVE
-#define SLJIT_MEMMOVE(dest, src, len) memmove(dest, src, len)
+#ifndef SLJIT_MEMCPY
+#define SLJIT_MEMCPY(dest, src, len) memcpy(dest, src, len)
 #endif
 
 #ifndef SLJIT_ZEROMEM
@@ -308,6 +298,13 @@
 #define SLJIT_CACHE_FLUSH(from, to) \
        sys_icache_invalidate((char*)(from), (char*)(to) - (char*)(from))
 
+#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(__GNUC__) && (__GNUC__ >= 5 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)))
 
 #define SLJIT_CACHE_FLUSH(from, to) \
@@ -320,13 +317,6 @@
 #define SLJIT_CACHE_FLUSH(from, to) \
     cacheflush((long)(from), (long)(to), 0)
 
-#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. */
@@ -549,6 +539,14 @@
 SLJIT_API_FUNC_ATTRIBUTE void sljit_free_unused_memory_exec(void);
 #define SLJIT_MALLOC_EXEC(size) sljit_malloc_exec(size)
 #define SLJIT_FREE_EXEC(ptr) sljit_free_exec(ptr)
+
+#if (defined SLJIT_PROT_EXECUTABLE_ALLOCATOR && SLJIT_PROT_EXECUTABLE_ALLOCATOR)
+SLJIT_API_FUNC_ATTRIBUTE sljit_sw sljit_exec_offset(void* ptr);
+#define SLJIT_EXEC_OFFSET(ptr) sljit_exec_offset(ptr)
+#else
+#define SLJIT_EXEC_OFFSET(ptr) 0
+#endif
+
 #endif
 
 /**********************************************/
@@ -557,13 +555,13 @@
 
 #if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
 
-#define SLJIT_NUMBER_OF_REGISTERS 10
-#define SLJIT_NUMBER_OF_SAVED_REGISTERS 7
+#define SLJIT_NUMBER_OF_REGISTERS 12
+#define SLJIT_NUMBER_OF_SAVED_REGISTERS 9
 #if (defined SLJIT_X86_32_FASTCALL && SLJIT_X86_32_FASTCALL)
-#define SLJIT_LOCALS_OFFSET_BASE ((2 + 4) * sizeof(sljit_sw))
+#define SLJIT_LOCALS_OFFSET_BASE (compiler->locals_offset)
 #else
 /* Maximum 3 arguments are passed on the stack, +1 for double alignment. */
-#define SLJIT_LOCALS_OFFSET_BASE ((3 + 1 + 4) * sizeof(sljit_sw))
+#define SLJIT_LOCALS_OFFSET_BASE (compiler->locals_offset)
 #endif /* SLJIT_X86_32_FASTCALL */
 
 #elif (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
@@ -571,23 +569,23 @@
 #ifndef _WIN64
 #define SLJIT_NUMBER_OF_REGISTERS 12
 #define SLJIT_NUMBER_OF_SAVED_REGISTERS 6
-#define SLJIT_LOCALS_OFFSET_BASE (sizeof(sljit_sw))
+#define SLJIT_LOCALS_OFFSET_BASE 0
 #else
 #define SLJIT_NUMBER_OF_REGISTERS 12
 #define SLJIT_NUMBER_OF_SAVED_REGISTERS 8
-#define SLJIT_LOCALS_OFFSET_BASE ((4 + 2) * sizeof(sljit_sw))
+#define SLJIT_LOCALS_OFFSET_BASE (compiler->locals_offset)
 #endif /* _WIN64 */
 
 #elif (defined SLJIT_CONFIG_ARM_V5 && SLJIT_CONFIG_ARM_V5) || (defined SLJIT_CONFIG_ARM_V7 && SLJIT_CONFIG_ARM_V7)
 
-#define SLJIT_NUMBER_OF_REGISTERS 11
+#define SLJIT_NUMBER_OF_REGISTERS 12
 #define SLJIT_NUMBER_OF_SAVED_REGISTERS 8
 #define SLJIT_LOCALS_OFFSET_BASE 0
 
 #elif (defined SLJIT_CONFIG_ARM_THUMB2 && SLJIT_CONFIG_ARM_THUMB2)
 
-#define SLJIT_NUMBER_OF_REGISTERS 11
-#define SLJIT_NUMBER_OF_SAVED_REGISTERS 7
+#define SLJIT_NUMBER_OF_REGISTERS 12
+#define SLJIT_NUMBER_OF_SAVED_REGISTERS 8
 #define SLJIT_LOCALS_OFFSET_BASE 0
 
 #elif (defined SLJIT_CONFIG_ARM_64 && SLJIT_CONFIG_ARM_64)
@@ -611,7 +609,7 @@
 
 #elif (defined SLJIT_CONFIG_MIPS && SLJIT_CONFIG_MIPS)
 
-#define SLJIT_NUMBER_OF_REGISTERS 17
+#define SLJIT_NUMBER_OF_REGISTERS 21
 #define SLJIT_NUMBER_OF_SAVED_REGISTERS 8
 #if (defined SLJIT_CONFIG_MIPS_32 && SLJIT_CONFIG_MIPS_32)
 #define SLJIT_LOCALS_OFFSET_BASE (4 * sizeof(sljit_sw))
@@ -671,19 +669,26 @@
 
 #if (defined SLJIT_DEBUG && SLJIT_DEBUG)
 
-#if !defined(SLJIT_ASSERT) || !defined(SLJIT_ASSERT_STOP)
+#if !defined(SLJIT_ASSERT) || !defined(SLJIT_UNREACHABLE)
 
 /* SLJIT_HALT_PROCESS must halt the process. */
 #ifndef SLJIT_HALT_PROCESS
+#ifdef _KERNEL
+#define SLJIT_HALT_PROCESS() \
+       panic("sljit halt");
+#else
 #include <stdlib.h>
 
 #define SLJIT_HALT_PROCESS() \
        abort();
+#endif
 #endif /* !SLJIT_HALT_PROCESS */
 
+#ifndef _KERNEL
 #include <stdio.h>
+#endif
 
-#endif /* !SLJIT_ASSERT || !SLJIT_ASSERT_STOP */
+#endif /* !SLJIT_ASSERT || !SLJIT_UNREACHABLE */
 
 /* Feel free to redefine these two macros. */
 #ifndef SLJIT_ASSERT
@@ -695,34 +700,33 @@
 
 #endif /* !SLJIT_ASSERT */
 
-#ifndef SLJIT_ASSERT_STOP
+#ifndef SLJIT_UNREACHABLE
 
-#define SLJIT_ASSERT_STOP() \
+#define SLJIT_UNREACHABLE() \
        do { \
                printf("Should never been reached " __FILE__ ":%d\n", __LINE__); \
                SLJIT_HALT_PROCESS(); \
        } while (0)
 
-#endif /* !SLJIT_ASSERT_STOP */
+#endif /* !SLJIT_UNREACHABLE */
 
 #else /* (defined SLJIT_DEBUG && SLJIT_DEBUG) */
 



Home | Main Index | Thread Index | Old Index