Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/TNF]: src/sys/external/bsd/sljit/dist Update sljit to version 0.93 (svn ...
details: https://anonhg.NetBSD.org/src/rev/15a4f144a844
branches: TNF
changeset: 447668:15a4f144a844
user: alnsn <alnsn%NetBSD.org@localhost>
date: Sun Jan 20 22:44:25 2019 +0000
description:
Update sljit to version 0.93 (svn revision r333).
Changes since the last import:
r333 More x86 fixes and a new stack test.
r332 Improve stack allocation on x86.
r331 Make sljit_free_unused_memory_exec public, PPC flush takes priority.
r330 Reverse the stack utility to top-down.
r329 Add sljit_set_current_flags function.
r328 Add two more virtual registers to x86/32, ARM-32 refactor.
r327 Remove value caching on ARM-32.
r326 Remove value caching on ARM-Thumb2.
r325 Move with update rework.
r324 Arm32 store fixes.
r323 Update macros and remove copyright years.
r322 Reworking flags, removing keep flags.
r321 Quick fix for regexjit.
r320 Improve protected executable allocator. Patch insipred by Christian Persch.
r319 Fully support dynamic code modifications again.
r318 Support protected allocator on all architectures except TILEGX.
r317 Rework protected allocator, only x86 linux is supported now.
r316 Add protected executable allocator.
r315 Remove SLJIT_MEMMOVE.
r314 Fix unaligned accesses on x86. Patch by Marc Mutz.
diffstat:
sys/external/bsd/sljit/dist/API_CHANGES | 15 +
sys/external/bsd/sljit/dist/Makefile | 2 +-
sys/external/bsd/sljit/dist/README | 2 +
sys/external/bsd/sljit/dist/regex_src/regexJIT.c | 16 +-
sys/external/bsd/sljit/dist/regex_src/regexJIT.h | 2 +-
sys/external/bsd/sljit/dist/regex_src/regexMain.c | 6 +-
sys/external/bsd/sljit/dist/sljit_src/sljitConfig.h | 16 +-
sys/external/bsd/sljit/dist/sljit_src/sljitConfigInternal.h | 73 +-
sys/external/bsd/sljit/dist/sljit_src/sljitExecAllocator.c | 12 +-
sys/external/bsd/sljit/dist/sljit_src/sljitLir.c | 405 ++-
sys/external/bsd/sljit/dist/sljit_src/sljitLir.h | 488 ++-
sys/external/bsd/sljit/dist/sljit_src/sljitNativeARM_32.c | 1072 +++------
sys/external/bsd/sljit/dist/sljit_src/sljitNativeARM_64.c | 74 +-
sys/external/bsd/sljit/dist/sljit_src/sljitNativeARM_T2_32.c | 655 ++---
sys/external/bsd/sljit/dist/sljit_src/sljitNativeMIPS_32.c | 271 +-
sys/external/bsd/sljit/dist/sljit_src/sljitNativeMIPS_64.c | 274 +-
sys/external/bsd/sljit/dist/sljit_src/sljitNativeMIPS_common.c | 325 +--
sys/external/bsd/sljit/dist/sljit_src/sljitNativePPC_32.c | 60 +-
sys/external/bsd/sljit/dist/sljit_src/sljitNativePPC_64.c | 77 +-
sys/external/bsd/sljit/dist/sljit_src/sljitNativePPC_common.c | 227 +-
sys/external/bsd/sljit/dist/sljit_src/sljitNativeSPARC_32.c | 22 +-
sys/external/bsd/sljit/dist/sljit_src/sljitNativeSPARC_common.c | 44 +-
sys/external/bsd/sljit/dist/sljit_src/sljitNativeTILEGX-encoder.c | 2 +-
sys/external/bsd/sljit/dist/sljit_src/sljitNativeTILEGX_64.c | 30 +-
sys/external/bsd/sljit/dist/sljit_src/sljitNativeX86_32.c | 166 +-
sys/external/bsd/sljit/dist/sljit_src/sljitNativeX86_64.c | 152 +-
sys/external/bsd/sljit/dist/sljit_src/sljitNativeX86_common.c | 348 +-
sys/external/bsd/sljit/dist/sljit_src/sljitProtExecAllocator.c | 421 +++
sys/external/bsd/sljit/dist/sljit_src/sljitUtils.c | 69 +-
sys/external/bsd/sljit/dist/test_src/sljitTest.c | 718 ++++--
30 files changed, 3242 insertions(+), 2802 deletions(-)
diffs (truncated from 11575 to 300 lines):
diff -r 49bc53d40d3c -r 15a4f144a844 sys/external/bsd/sljit/dist/API_CHANGES
--- a/sys/external/bsd/sljit/dist/API_CHANGES Sun May 29 17:00:35 2016 +0000
+++ b/sys/external/bsd/sljit/dist/API_CHANGES Sun Jan 20 22:44:25 2019 +0000
@@ -1,5 +1,20 @@
This file is the short summary of the API changes:
+27.03.2017 - Non-backward compatible
+ JIT stack is changed from bottom-up to top-town.
+
+15.01.2017 - Non-backward compatible
+ Move with update may modifiy flags, the base register
+ can only be used once and [reg+reg<<shift] addressing
+ mode where shift > 0 is not supported anymore.
+
+12.01.2017 - Non-backward compatible
+ Introducing a new flag mechanism which provides better
+ compatibility with CPUs without flags. Only two flags
+ remain: zero and variable. The current type of the
+ variable flag is specified by the arithmetic operator.
+ The SLJIT_KEEP_FLAGS is removed.
+
29.02.2016 - Non-backward compatible
Several types and instructions are renamed to improve
readability. In general byte, half, and int are renamed
diff -r 49bc53d40d3c -r 15a4f144a844 sys/external/bsd/sljit/dist/Makefile
--- a/sys/external/bsd/sljit/dist/Makefile Sun May 29 17:00:35 2016 +0000
+++ b/sys/external/bsd/sljit/dist/Makefile Sun Jan 20 22:44:25 2019 +0000
@@ -2,7 +2,7 @@
CC = $(CROSS_COMPILER)
else
ifndef CC
-# default compier
+# default compiler
CC = gcc
endif
endif
diff -r 49bc53d40d3c -r 15a4f144a844 sys/external/bsd/sljit/dist/README
--- a/sys/external/bsd/sljit/dist/README Sun May 29 17:00:35 2016 +0000
+++ b/sys/external/bsd/sljit/dist/README Sun Jan 20 22:44:25 2019 +0000
@@ -24,9 +24,11 @@
Special thanks:
Alexander Nasonov
+ Christian Persch
Daniel Richard G.
Giuseppe D'Angelo
Jiong Wang (TileGX support)
+ Marc Mutz
Michael McConville
Walter Lee
Wen Xichang
diff -r 49bc53d40d3c -r 15a4f144a844 sys/external/bsd/sljit/dist/regex_src/regexJIT.c
--- a/sys/external/bsd/sljit/dist/regex_src/regexJIT.c Sun May 29 17:00:35 2016 +0000
+++ b/sys/external/bsd/sljit/dist/regex_src/regexJIT.c Sun Jan 20 22:44:25 2019 +0000
@@ -1,7 +1,7 @@
/*
* Stack-less Just-In-Time compiler
*
- * Copyright 2009-2010 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:
@@ -27,6 +27,8 @@
#include "sljitLir.h"
#include "regexJIT.h"
+#include <stdlib.h>
+
#ifdef REGEX_MATCH_VERBOSE
#include <stdio.h>
#endif
@@ -1449,9 +1451,9 @@
EMIT_LABEL(label1);
sljit_set_label(jump1, label1);
- EMIT_OP2(SLJIT_SUB | SLJIT_SET_U, SLJIT_UNUSED, 0, SLJIT_MEM1(R_NEXT_STATE), offset + 2 * sizeof(sljit_sw), R_TEMP, 0);
+ EMIT_OP2(SLJIT_SUB | SLJIT_SET_Z | SLJIT_SET_LESS, SLJIT_UNUSED, 0, SLJIT_MEM1(R_NEXT_STATE), offset + 2 * sizeof(sljit_sw), R_TEMP, 0);
EMIT_JUMP(jump1, SLJIT_LESS);
- EMIT_JUMP(jump3, SLJIT_GREATER);
+ EMIT_JUMP(jump3, SLJIT_NOT_EQUAL); /* Greater. */
/* Old index == index. */
EMIT_OP1(SLJIT_MOV, R_TEMP, 0, SLJIT_MEM1(R_CURR_STATE), TERM_OFFSET_OF(curr_index, 3));
@@ -1463,7 +1465,7 @@
sljit_set_label(jump4, label1);
}
- EMIT_OP2(SLJIT_SUB | SLJIT_SET_U, SLJIT_UNUSED, 0, SLJIT_MEM1(R_NEXT_STATE), offset + 3 * sizeof(sljit_sw), R_TEMP, 0);
+ EMIT_OP2(SLJIT_SUB | SLJIT_SET_GREATER_EQUAL, SLJIT_UNUSED, 0, SLJIT_MEM1(R_NEXT_STATE), offset + 3 * sizeof(sljit_sw), R_TEMP, 0);
EMIT_JUMP(jump4, SLJIT_GREATER_EQUAL);
EMIT_JUMP(jump5, SLJIT_JUMP);
@@ -2022,7 +2024,7 @@
}
/* Loading the next character. */
- EMIT_OP2(SLJIT_SUB | SLJIT_SET_E, R_LENGTH, 0, R_LENGTH, 0, SLJIT_IMM, 1);
+ EMIT_OP2(SLJIT_SUB | SLJIT_SET_Z, R_LENGTH, 0, R_LENGTH, 0, SLJIT_IMM, 1);
EMIT_JUMP(length_is_zero_jump, SLJIT_EQUAL);
EMIT_OP1(SLJIT_MOV, R_TEMP, 0, R_STRING, 0);
@@ -2110,7 +2112,7 @@
/* Fast forward mainloop. */
EMIT_LABEL(label);
- EMIT_OP2(SLJIT_SUB | SLJIT_SET_E, R_NEXT_STATE, 0, R_NEXT_STATE, 0, SLJIT_IMM, 1);
+ EMIT_OP2(SLJIT_SUB | SLJIT_SET_Z, R_NEXT_STATE, 0, R_NEXT_STATE, 0, SLJIT_IMM, 1);
EMIT_JUMP(fast_forward_jump, SLJIT_EQUAL);
#ifdef REGEX_USE_8BIT_CHARS
@@ -2378,7 +2380,7 @@
break;
default:
- SLJIT_ASSERT_STOP();
+ SLJIT_UNREACHABLE();
break;
}
diff -r 49bc53d40d3c -r 15a4f144a844 sys/external/bsd/sljit/dist/regex_src/regexJIT.h
--- a/sys/external/bsd/sljit/dist/regex_src/regexJIT.h Sun May 29 17:00:35 2016 +0000
+++ b/sys/external/bsd/sljit/dist/regex_src/regexJIT.h Sun Jan 20 22:44:25 2019 +0000
@@ -1,7 +1,7 @@
/*
* Stack-less Just-In-Time compiler
*
- * Copyright 2009-2010 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:
diff -r 49bc53d40d3c -r 15a4f144a844 sys/external/bsd/sljit/dist/regex_src/regexMain.c
--- a/sys/external/bsd/sljit/dist/regex_src/regexMain.c Sun May 29 17:00:35 2016 +0000
+++ b/sys/external/bsd/sljit/dist/regex_src/regexMain.c Sun Jan 20 22:44:25 2019 +0000
@@ -1,7 +1,7 @@
/*
* Stack-less Just-In-Time compiler
*
- * Copyright 2009-2010 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:
@@ -25,6 +25,7 @@
*/
/* Must be the first one. Must not depend on any other include. */
+#include "sljitLir.h"
#include "regexJIT.h"
#include <stdio.h>
@@ -325,5 +326,8 @@
/* verbose_test("((a|b|c)*(xy)+)+", "asbcxyxy"); */
run_tests(tests, has_arg && argv[1][1] == 'v', has_arg && argv[1][1] == 's');
+
+ sljit_free_unused_memory_exec();
+
return 0;
}
diff -r 49bc53d40d3c -r 15a4f144a844 sys/external/bsd/sljit/dist/sljit_src/sljitConfig.h
--- a/sys/external/bsd/sljit/dist/sljit_src/sljitConfig.h Sun May 29 17:00:35 2016 +0000
+++ b/sys/external/bsd/sljit/dist/sljit_src/sljitConfig.h Sun Jan 20 22:44:25 2019 +0000
@@ -1,7 +1,7 @@
/*
* 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:
@@ -82,7 +82,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
@@ -90,10 +90,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 49bc53d40d3c -r 15a4f144a844 sys/external/bsd/sljit/dist/sljit_src/sljitConfigInternal.h
--- a/sys/external/bsd/sljit/dist/sljit_src/sljitConfigInternal.h Sun May 29 17:00:35 2016 +0000
+++ b/sys/external/bsd/sljit/dist/sljit_src/sljitConfigInternal.h Sun Jan 20 22:44:25 2019 +0000
@@ -1,7 +1,7 @@
/*
* 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:
@@ -187,14 +187,6 @@
/* External function definitions. */
/**********************************/
-#if !(defined SLJIT_STD_MACROS_DEFINED && SLJIT_STD_MACROS_DEFINED)
-
-/* These libraries are needed for the macros below. */
-#include <stdlib.h>
-#include <string.h>
-
-#endif /* SLJIT_STD_MACROS_DEFINED */
-
/* General macros:
Note: SLJIT is designed to be independent from them as possible.
@@ -210,8 +202,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
@@ -304,6 +296,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) \
@@ -316,13 +315,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. */
@@ -545,6 +537,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
/**********************************************/
@@ -553,13 +553,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)
Home |
Main Index |
Thread Index |
Old Index