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 Import sljit 0.91 (svn r257).



details:   https://anonhg.NetBSD.org/src/rev/a03056045252
branches:  trunk
changeset: 796773:a03056045252
user:      alnsn <alnsn%NetBSD.org@localhost>
date:      Tue Jun 17 15:37:40 2014 +0000

description:
Import sljit 0.91 (svn r257).

The changes since the last import are:

r257: Add missing ADJUST_LOCAL_OFFSET for ARM64.
r256: Move incorrectly placed array definitions.
r255: More work on testing environment.
r254: Refactor test default output.
r253: Pass entry adress in r12 on PPC-LE.
r252: Optimize calls on MIPS-64.
r251: Several minor fixes.
r250: Add missing SLJIT_IS_FPU_AVAILABLE checks and reorder U and S flags.
r249: Optimize jumps on ARM-64.
r248: Optimize jumps on PowerPC.
r247: MIPS64 support is mostly finished.
r246: MIPS arithmetic.
r245: Start working on MIPS64.
r244: Uniform names for TILE-Gx.
r243: Uniform the names of ARM compilers.
r242: Change ll to l on x86 and rename some instructions on ARM-64.
r241: Improved memory access in PPC and reordering the parameter type flags.
r240: Prepare for more registers on ARM-Thumb2 and renaming TMP_REGISTER to TMP_REG1 on x86.
r239: Prepare for more registers on ARMv5.
r238: Prepare for more registers on TILE-Gx.
r237: Prepare for more registers on MIPS and SPARC.
r236: Prepare for more registers on PPC.
r235: Prepare for more registers on x86.
r234: Most tests are pass on ARM-64 now.
r233: Around 25 test cases are now pass on ARM-64.
r232: More progress on ARM-64 and Thumb2 refactoring.
r231: Some progress an ARM-64 and ARM-T2 refactoring.
r230: Thumb2 code refactoring.
r229: Start working on ARM-64.
r228: Little endian PowerPC systems are supported now by the JIT compiler.
r227: TileGX architecture is now supported. Patch made by Jiong Wang.
r226: Cache flush for android. Patch by  Giuseppe D'Angelo.
r225: Add support for forcibly freeing unused executable memory. Inspired by Carsten Klein.
r224: Few typo fixes.
r223: Reorder madvise and posix_madvise.
r222: The missing sljit_get_float_register_index function is added.
r221: Remove an invalid shift on ARM.
r220: JIT compiler now supports 32 bit Macs thanks to Lawrence Velazquez.
r219: Better code size statistics.
r218: Improvements for x86 and LIR dump.
r217: ICC and SunPro C fixes
r216: A new file for tracking internal changes are added.
r215: Less GNU dependnet Makefile and Intel style assemby for x86-64 systems.
r214: Switch from stdcall to cdecl in x86-32.
r213: Upstreaming minor fixes. Thanks for Daniel Richard G.
r212: Documentation update and a fix for a locking issue.
r211: Renaming temporaries to scratches to match the new name of the register. Does not affect compatibility.
r210: Improving assertions.
r209: Port sljit to SunPro C compiler. Patch by Daniel Richard G.
r208: SLJIT_TEMPORARY_REGx registers are renamed to SLJIT_SCRATCH_REGx.
r207: Removing unused checks.
r206: Optimizations for arm.
r205: Some optimizations on powerpc, mips and sparc.
r204: Rename sljit_emit_cond_value to sljit_emit_op_flags.
r203: Small x86 optimization.
r202: Finish cond_value with AND and INT_OP.
r201: More x86 fixes and improvements.
r200: Rename buf and code to inst.
r199: Replacing constants with instruction names in x86. Greatly improves maintainability.
r198: Only xmm0-xmm5 is volatile on Win64, so xmm6 must be saved.
r197: PowerPC shift right always modifies the carry flag. We may need to restore it.
r196: Rename SLJIT_F* functions to SLJIT_*D
r195: SLJIT_INT_OP works in the same way as SLJIT_SINGLE_OP: the input register arguments must be generated by the output of another instruction with SLJIT_INT_OP flag
r194: Renaming sljit_w to sljit_sw, sljit_i to sljit_si, sljit_h to sljit_sh, and sljit_b to sljit_sb.
r193: ARM single precision support.
r192: Single precision support added for ppc, mips and sparc.
r191: Add single precision support. Only works on x86 now.
r190: Relace C types with sljit types. No functionality change.
r189: Change 0 to NULL for mmap.
r188: Support environments where MAP_ANON is not available.
r187: Adding type descriptors for pointers and doubles (preparing for x32 ABIs and single precision support).

diffstat:

 sys/external/bsd/sljit/dist/API_CHANGES                           |     53 +
 sys/external/bsd/sljit/dist/INTERNAL_CHANGES                      |      8 +
 sys/external/bsd/sljit/dist/Makefile                              |     49 +-
 sys/external/bsd/sljit/dist/README                                |     17 +-
 sys/external/bsd/sljit/dist/regex_src/regexJIT.c                  |    154 +-
 sys/external/bsd/sljit/dist/regex_src/regexMain.c                 |     51 +-
 sys/external/bsd/sljit/dist/sljit_src/sljitLir.h                  |    630 +-
 sys/external/bsd/sljit/dist/sljit_src/sljitNativeARM_32.c         |   2524 ++
 sys/external/bsd/sljit/dist/sljit_src/sljitNativeARM_64.c         |   1902 +
 sys/external/bsd/sljit/dist/sljit_src/sljitNativeARM_T2_32.c      |   2007 +
 sys/external/bsd/sljit/dist/sljit_src/sljitNativeMIPS_32.c        |    133 +-
 sys/external/bsd/sljit/dist/sljit_src/sljitNativeMIPS_64.c        |    469 +
 sys/external/bsd/sljit/dist/sljit_src/sljitNativeMIPS_common.c    |    750 +-
 sys/external/bsd/sljit/dist/sljit_src/sljitNativePPC_32.c         |     25 +-
 sys/external/bsd/sljit/dist/sljit_src/sljitNativePPC_64.c         |     39 +-
 sys/external/bsd/sljit/dist/sljit_src/sljitNativeSPARC_32.c       |     11 +-
 sys/external/bsd/sljit/dist/sljit_src/sljitNativeSPARC_common.c   |    449 +-
 sys/external/bsd/sljit/dist/sljit_src/sljitNativeTILEGX-encoder.c |  10159 ++++++++++
 sys/external/bsd/sljit/dist/sljit_src/sljitNativeTILEGX_64.c      |   2580 ++
 sys/external/bsd/sljit/dist/sljit_src/sljitNativeX86_64.c         |    537 +-
 20 files changed, 21339 insertions(+), 1208 deletions(-)

diffs (truncated from 25547 to 300 lines):

diff -r 084ced2aa64c -r a03056045252 sys/external/bsd/sljit/dist/API_CHANGES
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/external/bsd/sljit/dist/API_CHANGES   Tue Jun 17 15:37:40 2014 +0000
@@ -0,0 +1,53 @@
+This file is the short summary of the API changes:
+
+05.03.2014 - Backward compatible
+    The sljit_set_target now supports those jumps, which
+    does not created with SLJIT_REWRITABLE_JUMP flag.
+    Reason: sljit_emit_ijump does not support conditional
+    jumps.
+
+03.03.2014 - Non-backward compatible
+    SLJIT_MOV_UI cannot be combined with SLJIT_INT_OP.
+    Reason: SLJIT_INT_OP flag is not recommended to use
+    directly, and SLJIT_IMOV has no sign bit.
+
+29.01.2014 - Backward compatible
+    Bits assigned to SLJIT_MEM and SLJIT_IMM flags are changed.
+    Reason: the most common cases are fits into one byte now,
+    and more registers can be supported in the future.
+
+08.11.2012 - Non-backward compatible
+    SLJIT_TEMPORARY_REGx registers are renamed to SLJIT_SCRATCH_REGx.
+
+07.11.2012 - Non-backward compatible
+    sljit_emit_cond_value is renamed to sljit_emit_op_flags. An
+    extra source argument is added which will be used in the future.
+
+05.11.2012 - Backward compatible
+    sljit_emit_cond_value now supports SLJIT_AND and SLJIT_INT_OP
+    flags, which makes this function complete.
+
+01.11.2012 - Non-backward compatible
+    SLJIT_F* opcodes are renamed to SLJIT_*D to show that
+    they are double precision operators. Furthermore
+    SLJIT_*S single precision opcodes are added.
+
+01.11.2012 - Non-backward compatible
+    Register arguments of operations with SLJIT_INT_OP flag
+    must be computed by another operation with SLJIT_INT_OP flag.
+    The same way as SLJIT_SINGLE_OP flag works with floating point
+    numbers. See the description of SLJIT_INT_OP.
+
+01.11.2012 - Backward compatible
+    All operations whose support the SLJIT_INT_OP flag, have an
+    alternate name now, which includes the SLJIT_INT_OP. These
+    names starting with I.
+
+31.10.2012 - Non-backward compatible
+    Renaming sljit_w to sljit_sw, sljit_i to sljit_si, sljit_h
+    to sljit_sh, and sljit_b to sljit_sb. Reason: their sign
+    bit is part of the type now.
+
+20.10.2012 - Non-backward compatible
+    Renaming SLJIT_C_FLOAT_NAN to SLJIT_C_FLOAT_UNORDERED.
+    Reason: all architectures call these unordered comparions.
diff -r 084ced2aa64c -r a03056045252 sys/external/bsd/sljit/dist/INTERNAL_CHANGES
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/external/bsd/sljit/dist/INTERNAL_CHANGES      Tue Jun 17 15:37:40 2014 +0000
@@ -0,0 +1,8 @@
+This file is the short summary of the internal changes:
+
+18.11.2012
+    Switching from stdcall to cdecl on x86-32. Fastcall is still the default
+    on GCC and MSVC. Now Intel C compilers are supported.
+
+20.10.2012
+    Supporting Sparc-32 CPUs.
diff -r 084ced2aa64c -r a03056045252 sys/external/bsd/sljit/dist/Makefile
--- a/sys/external/bsd/sljit/dist/Makefile      Tue Jun 17 14:25:17 2014 +0000
+++ b/sys/external/bsd/sljit/dist/Makefile      Tue Jun 17 15:37:40 2014 +0000
@@ -1,17 +1,22 @@
+ifndef CROSS_COMPILER
 # default compier
 CC = gcc
+else
+CC = $(CROSS_COMPILER)
+endif
 
-# Cross compiler for ARM
-#CC = arm-linux-gcc
+ifndef EXTRA_CPPFLAGS
+EXTRA_CPPFLAGS=
+endif
 
-# Cross compiler for PPC
-#CC = powerpc-linux-gnu-gcc
+ifndef EXTRA_LDFLAGS
+EXTRA_LDFLAGS=
+endif
 
-# Cross compiler for PPC-64
-#CC = powerpc64-unknown-linux-gnu-gcc
-
-CFLAGS = -O2 -Wall -DSLJIT_CONFIG_AUTO=1
-LDFLAGS=
+CPPFLAGS = $(EXTRA_CPPFLAGS) -DSLJIT_CONFIG_AUTO=1 -Isljit_src
+CFLAGS = -O2 -Wall
+REGEX_CFLAGS = -fshort-wchar
+LDFLAGS = $(EXTRA_LDFLAGS)
 
 TARGET = sljit_test regex_test
 
@@ -20,17 +25,15 @@
 TESTDIR = test_src
 REGEXDIR = regex_src
 
-CFLAGS += -Isljit_src
-REGEX_CFLAGS = -fshort-wchar
-
 SLJIT_HEADERS = $(SRCDIR)/sljitLir.h $(SRCDIR)/sljitConfig.h $(SRCDIR)/sljitConfigInternal.h
 
 SLJIT_LIR_FILES = $(SRCDIR)/sljitLir.c $(SRCDIR)/sljitExecAllocator.c $(SRCDIR)/sljitUtils.c \
-       $(SRCDIR)/sljitNativeX86_common.c $(SRCDIR)/sljitNativeX86_32.c $(SRCDIR)/sljitNativeX86_64.c \
-       $(SRCDIR)/sljitNativeARM_v5.c $(SRCDIR)/sljitNativeARM_Thumb2.c \
+       $(SRCDIR)/sljitNativeARM_32.c $(SRCDIR)/sljitNativeARM_T2_32.c $(SRCDIR)/sljitNativeARM_64.c \
+       $(SRCDIR)/sljitNativeMIPS_common.c $(SRCDIR)/sljitNativeMIPS_32.c $(SRCDIR)/sljitNativeMIPS_64.c \
        $(SRCDIR)/sljitNativePPC_common.c $(SRCDIR)/sljitNativePPC_32.c $(SRCDIR)/sljitNativePPC_64.c \
-       $(SRCDIR)/sljitNativeMIPS_common.c $(SRCDIR)/sljitNativeMIPS_32.c \
-       $(SRCDIR)/sljitNativeSPARC_common.c $(SRCDIR)/sljitNativeSPARC_32.c
+       $(SRCDIR)/sljitNativeSPARC_common.c $(SRCDIR)/sljitNativeSPARC_32.c \
+       $(SRCDIR)/sljitNativeTILEGX_64.c \
+       $(SRCDIR)/sljitNativeX86_common.c $(SRCDIR)/sljitNativeX86_32.c $(SRCDIR)/sljitNativeX86_64.c
 
 all: $(BINDIR) $(TARGET)
 
@@ -38,25 +41,25 @@
        mkdir $(BINDIR)
 
 $(BINDIR)/sljitLir.o : $(BINDIR) $(SLJIT_LIR_FILES) $(SLJIT_HEADERS)
-       $(CC) $(CFLAGS) -c -o $@ $(SRCDIR)/sljitLir.c
+       $(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $(SRCDIR)/sljitLir.c
 
 $(BINDIR)/sljitMain.o : $(TESTDIR)/sljitMain.c $(BINDIR) $(SLJIT_HEADERS)
-       $(CC) $(CFLAGS) -c -o $@ $(TESTDIR)/sljitMain.c
+       $(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $(TESTDIR)/sljitMain.c
 
 $(BINDIR)/sljitTest.o : $(TESTDIR)/sljitTest.c $(BINDIR) $(SLJIT_HEADERS)
-       $(CC) $(CFLAGS) -c -o $@ $(TESTDIR)/sljitTest.c
+       $(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $(TESTDIR)/sljitTest.c
 
 $(BINDIR)/regexMain.o : $(REGEXDIR)/regexMain.c $(BINDIR) $(SLJIT_HEADERS)
-       $(CC) $(CFLAGS) $(REGEX_CFLAGS) -c -o $@ $(REGEXDIR)/regexMain.c
+       $(CC) $(CPPFLAGS) $(CFLAGS) $(REGEX_CFLAGS) -c -o $@ $(REGEXDIR)/regexMain.c
 
 $(BINDIR)/regexJIT.o : $(REGEXDIR)/regexJIT.c $(BINDIR) $(SLJIT_HEADERS) $(REGEXDIR)/regexJIT.h
-       $(CC) $(CFLAGS) $(REGEX_CFLAGS) -c -o $@ $(REGEXDIR)/regexJIT.c
+       $(CC) $(CPPFLAGS) $(CFLAGS) $(REGEX_CFLAGS) -c -o $@ $(REGEXDIR)/regexJIT.c
 
 clean:
        rm -f $(BINDIR)/*.o $(BINDIR)/sljit_test $(BINDIR)/regex_test
 
 sljit_test: $(BINDIR)/sljitMain.o $(BINDIR)/sljitTest.o $(BINDIR)/sljitLir.o
-       $(CC) $(LDFLAGS) $(BINDIR)/sljitMain.o $(BINDIR)/sljitTest.o $(BINDIR)/sljitLir.o -o $(BINDIR)/$@ -lm -lpthread
+       $(CC) $(CFLAGS) $(LDFLAGS) $(BINDIR)/sljitMain.o $(BINDIR)/sljitTest.o $(BINDIR)/sljitLir.o -o $(BINDIR)/$@ -lm -lpthread
 
 regex_test: $(BINDIR)/regexMain.o $(BINDIR)/regexJIT.o $(BINDIR)/sljitLir.o
-       $(CC) $(LDFLAGS) $(BINDIR)/regexMain.o $(BINDIR)/regexJIT.o $(BINDIR)/sljitLir.o -o $(BINDIR)/$@ -lm -lpthread
+       $(CC) $(CFLAGS) $(LDFLAGS) $(BINDIR)/regexMain.o $(BINDIR)/regexJIT.o $(BINDIR)/sljitLir.o -o $(BINDIR)/$@ -lm -lpthread
diff -r 084ced2aa64c -r a03056045252 sys/external/bsd/sljit/dist/README
--- a/sys/external/bsd/sljit/dist/README        Tue Jun 17 14:25:17 2014 +0000
+++ b/sys/external/bsd/sljit/dist/README        Tue Jun 17 15:37:40 2014 +0000
@@ -2,18 +2,19 @@
                      SLJIT - Stack Less JIT Compiler
 
 Purpose:
-  A simple machine independent JIT, which suitable for interpreters and
-  other dynamic tools. See sljitLir.h for more information.
+  A simple, machine independent JIT compiler, which suitable for
+  translating interpreted byte code to machine code. The sljitLir.h
+  describes the LIR (low-level intermediate representation) of SLJIT.
 
 Compatible:
   Any C (C++) compiler. At least I hope so.
 
 Using sljit:
-  Copy sljitLir.c sljitLir.h sljitConfig.h sljitExecAllocator.c and sljitNative*.c
-  files into your project. Add sljitLir.c into your project. The other files are
-  included by sljitLir.c (when required). Define the machine by SLJIT_CONFIG_*
-  selector. See sljitConfig.h for all possible values. For C++ compilers, rename
-  sljitLir.c to sljitLir.cpp.
+  Copy the content of sljit_src directory into your project source directory.
+  Add sljitLir.c source file to your build environment. All other files are
+  included by sljitLir.c (if required). Define the machine by SLJIT_CONFIG_*
+  selector. See sljitConfig.h for all possible values. For C++ compilers,
+  rename sljitLir.c to sljitLir.cpp.
 
 More info:
   http://sljit.sourceforge.net/
@@ -24,3 +25,5 @@
 Special thanks:
   Alexander Nasonov
   Daniel Richard G.
+  Giuseppe D'Angelo
+  Jiong Wang (TileGX support)
diff -r 084ced2aa64c -r a03056045252 sys/external/bsd/sljit/dist/regex_src/regexJIT.c
--- a/sys/external/bsd/sljit/dist/regex_src/regexJIT.c  Tue Jun 17 14:25:17 2014 +0000
+++ b/sys/external/bsd/sljit/dist/regex_src/regexJIT.c  Tue Jun 17 15:37:40 2014 +0000
@@ -53,13 +53,13 @@
        /* flags. */
        int flags;
        /* Number of state descriptors for one term. */
-       sljit_w no_states;
+       sljit_sw no_states;
        /* Total size. */
-       sljit_w size;
+       sljit_sw size;
 
        union {
                void *init_match;
-               sljit_w (SLJIT_CALL *call_init)(void *next, void* match);
+               sljit_sw (SLJIT_CALL *call_init)(void *next, void* match);
        } u;
 #if (defined SLJIT_INDIRECT_CALL && SLJIT_INDIRECT_CALL)
        struct sljit_function_context context;
@@ -74,19 +74,19 @@
 struct regex_match
 {
        /* Current and next state array. */
-       sljit_w *current;
-       sljit_w *next;
+       sljit_sw *current;
+       sljit_sw *next;
        /* Starting. */
-       sljit_w head;
+       sljit_sw head;
        /* String character index (ever increasing). */
-       sljit_w index;
+       sljit_sw index;
        /* Best match found so far (members in priority order). */
-       sljit_w best_begin;
-       sljit_w best_end;
-       sljit_w best_id;
+       sljit_sw best_begin;
+       sljit_sw best_end;
+       sljit_sw best_id;
        /* Bool flags (encoded as word). */
-       sljit_w fast_quit;
-       sljit_w fast_forward;
+       sljit_sw fast_quit;
+       sljit_sw fast_forward;
        /* Machine. */
        struct regex_machine *machine;
 
@@ -96,7 +96,7 @@
        } u;
 
        /* Variable sized array to contain the state arrays. */
-       sljit_w states[1];
+       sljit_sw states[1];
 };
 
 /* State vector
@@ -117,11 +117,11 @@
 /* String fragment length. */
 #define R_LENGTH       SLJIT_SAVED_EREG2
 /* 'struct regex_match*' */
-#define R_REGEX_MATCH  SLJIT_TEMPORARY_REG1
+#define R_REGEX_MATCH  SLJIT_SCRATCH_REG1
 /* Current character. */
-#define R_CURR_CHAR    SLJIT_TEMPORARY_REG2
+#define R_CURR_CHAR    SLJIT_SCRATCH_REG2
 /* Temporary register. */
-#define R_TEMP         SLJIT_TEMPORARY_REG3
+#define R_TEMP         SLJIT_SCRATCH_REG3
 /* Caches the regex_match->best_begin. */
 #define R_BEST_BEGIN   SLJIT_TEMPORARY_EREG1
 /* Current character index. */
@@ -379,13 +379,13 @@
        /* REGEX_ flags. */
        int flags;
        /* Encoded size of the dfa representation. */
-       sljit_w dfa_size;
+       sljit_sw dfa_size;
        /* Number of terms. */
-       sljit_w terms_size;
+       sljit_sw terms_size;
        /* Number of state descriptors for one term (same as machine->no_states). */
-       sljit_w no_states;
+       sljit_sw no_states;
        /* Number of type_rng_(char|left)-s in the longest character range. */
-       sljit_w longest_range_size;
+       sljit_sw longest_range_size;
 
        /* DFA linear representation (size: dfa_size). */
        struct stack_item *dfa_transitions;
@@ -555,7 +555,7 @@
        return len;
 }
 
-static int parse_iterator(const regex_char_t *regex_string, int length, struct stack *stack, sljit_w *dfa_size, int begin)
+static int parse_iterator(const regex_char_t *regex_string, int length, struct stack *stack, sljit_sw *dfa_size, int begin)
 {
        /* We only know that *regex_string == { . */
        int val1, val2;
@@ -1281,8 +1281,8 @@
 /*  Code generator                                                       */
 /* --------------------------------------------------------------------- */
 



Home | Main Index | Thread Index | Old Index