[Pcre-svn] [839] code/trunk: endianness fixes and JIT compil…

Startseite
Nachricht löschen
Autor: Subversion repository
Datum:  
To: pcre-svn
Betreff: [Pcre-svn] [839] code/trunk: endianness fixes and JIT compiler update
Revision: 839
          http://vcs.pcre.org/viewvc?view=rev&revision=839
Author:   zherczeg
Date:     2011-12-30 13:22:28 +0000 (Fri, 30 Dec 2011)


Log Message:
-----------
endianness fixes and JIT compiler update

Modified Paths:
--------------
    code/trunk/pcre_byte_order.c
    code/trunk/pcretest.c
    code/trunk/sljit/sljitConfigInternal.h
    code/trunk/sljit/sljitLir.c
    code/trunk/sljit/sljitLir.h
    code/trunk/sljit/sljitNativeARM_Thumb2.c
    code/trunk/sljit/sljitNativeARM_v5.c
    code/trunk/sljit/sljitNativeMIPS_common.c
    code/trunk/sljit/sljitNativePPC_common.c
    code/trunk/sljit/sljitNativeX86_common.c
    code/trunk/testdata/testinput14
    code/trunk/testdata/testinput17
    code/trunk/testdata/testinput18
    code/trunk/testdata/testoutput14
    code/trunk/testdata/testoutput17
    code/trunk/testdata/testoutput18


Added Paths:
-----------
    code/trunk/testdata/saved16BE-1
    code/trunk/testdata/saved16BE-2
    code/trunk/testdata/saved16LE-1
    code/trunk/testdata/saved16LE-2


Modified: code/trunk/pcre_byte_order.c
===================================================================
--- code/trunk/pcre_byte_order.c    2011-12-29 18:27:07 UTC (rev 838)
+++ code/trunk/pcre_byte_order.c    2011-12-30 13:22:28 UTC (rev 839)
@@ -139,7 +139,7 @@
 re->ref_count = swap_uint16(re->ref_count);
 re->tables = tables;


-if (extra_data != NULL && (re->flags & PCRE_EXTRA_STUDY_DATA) != 0)
+if (extra_data != NULL && (extra_data->flags & PCRE_EXTRA_STUDY_DATA) != 0)
{
study = (pcre_study_data *)extra_data->study_data;
study->size = swap_uint32(study->size);

Modified: code/trunk/pcretest.c
===================================================================
--- code/trunk/pcretest.c    2011-12-29 18:27:07 UTC (rev 838)
+++ code/trunk/pcretest.c    2011-12-30 13:22:28 UTC (rev 839)
@@ -259,8 +259,8 @@
 #define PCRE_GET_SUBSTRING_LIST8(rc, bptr, offsets, count, listptr) \
   rc = pcre_get_substring_list((const char *)bptr, offsets, count, listptr)


-#define PCRE_PATTERN_TO_HOST_BYTE_ORDER8(re, extra, tables) \
- pcre_pattern_to_host_byte_order(re, extra, tables)
+#define PCRE_PATTERN_TO_HOST_BYTE_ORDER8(rc, re, extra, tables) \
+ rc = pcre_pattern_to_host_byte_order(re, extra, tables)

 #define PCRE_PRINTINT8(re, outfile, debug_lengths) \
   pcre_printint(re, outfile, debug_lengths)
@@ -336,8 +336,8 @@
   rc = pcre16_get_substring_list((PCRE_SPTR16)bptr, offsets, count, \
     (PCRE_SPTR16 **)(void*)listptr)


-#define PCRE_PATTERN_TO_HOST_BYTE_ORDER16(re, extra, tables) \
- pcre16_pattern_to_host_byte_order(re, extra, tables)
+#define PCRE_PATTERN_TO_HOST_BYTE_ORDER16(rc, re, extra, tables) \
+ rc = pcre16_pattern_to_host_byte_order(re, extra, tables)

#define PCRE_PRINTINT16(re, outfile, debug_lengths) \
pcre16_printint(re, outfile, debug_lengths)
@@ -476,11 +476,11 @@
#define PCRE_MAKETABLES \
(use_pcre16? pcre16_maketables() : pcre_maketables())

-#define PCRE_PATTERN_TO_HOST_BYTE_ORDER(re, extra, tables) \
+#define PCRE_PATTERN_TO_HOST_BYTE_ORDER(rc, re, extra, tables) \
   if (use_pcre16) \
-    PCRE_PATTERN_TO_HOST_BYTE_ORDER16(re, extra, tables); \
+    PCRE_PATTERN_TO_HOST_BYTE_ORDER16(rc, re, extra, tables); \
   else \
-    PCRE_PATTERN_TO_HOST_BYTE_ORDER8(re, extra, tables)
+    PCRE_PATTERN_TO_HOST_BYTE_ORDER8(rc, re, extra, tables)


#define PCRE_PRINTINT(re, outfile, debug_lengths) \
if (use_pcre16) \
@@ -625,6 +625,9 @@
#error LINK_SIZE must be either 2, 3, or 4
#endif

+#undef IMM2_SIZE
+#define IMM2_SIZE 1
+
#endif /* SUPPORT_PCRE8 */

 static const pcre_uint16 OP_lengths16[] = { OP_LENGTHS };
@@ -1913,25 +1916,25 @@
     break;


     case OP_XCLASS:
+    /* LINK_SIZE can be 1 or 2 in 16 bit mode. */
+    if (LINK_SIZE > 1)
+      length = (int)((((unsigned int)(ptr[0]) << 16) | (unsigned int)(ptr[1]))
+        - (1 + LINK_SIZE + 1));
+    else
+      length = (int)((unsigned int)(ptr[0]) - (1 + LINK_SIZE + 1));
+
     /* Reverse the size of the XCLASS instance. */
+    *ptr = swap_uint16(*ptr);
     ptr++;
-    *ptr = swap_uint16(*ptr);
     if (LINK_SIZE > 1)
       {
-      /* LINK_SIZE can be 1 or 2 in 16 bit mode. */
+      *ptr = swap_uint16(*ptr);
       ptr++;
-      *ptr = swap_uint16(*ptr);
       }
-    ptr++;


-    if (LINK_SIZE > 1)
-      length = ((ptr[-LINK_SIZE] << 16) | ptr[-LINK_SIZE + 1]) -
-        (1 + LINK_SIZE + 1);
-    else
-      length = ptr[-LINK_SIZE] - (1 + LINK_SIZE + 1);
-
     op = *ptr;
     *ptr = swap_uint16(op);
+    ptr++;
     if ((op & XCL_MAP) != 0)
       {
       /* Skip the character bit map. */
@@ -2082,6 +2085,7 @@
 printf("     utf          Unicode Transformation Format supported [0, 1]\n");
 printf("     ucp          Unicode Properties supported [0, 1]\n");
 printf("     jit          Just-in-time compiler supported [0, 1]\n");
+printf("     newline      Newline type [CR, LF, CRLF, ANYCRLF, ANY, ???]\n");
 printf("  -d       debug: show compiled code and information (-b and -i)\n");
 #if !defined NODFA
 printf("  -dfa     force DFA matching for all subjects\n");
@@ -2523,6 +2527,13 @@
     FILE *f;


     p++;
+    if (*p == '!')
+      {
+      do_debug = TRUE;
+      do_showinfo = TRUE;
+      p++;
+      }
+
     pp = p + (int)strlen((char *)p);
     while (isspace(pp[-1])) pp--;
     *pp = 0;
@@ -2534,6 +2545,7 @@
       continue;
       }


+    first_gotten_store = 0;
     if (fread(sbuf, 1, 8, f) != 8) goto FAIL_READ;


     true_size =
@@ -2561,8 +2573,9 @@
         }
       }


+    /* We hide the byte-invert info for little and big endian tests. */
     fprintf(outfile, "Compiled pattern%s loaded from %s\n",
-      do_flip? " (byte-inverted)" : "", p);
+      do_flip && (p[-1] == '<') ? " (byte-inverted)" : "", p);


     /* Now see if there is any following study data. */


@@ -2596,7 +2609,17 @@
     /* Flip the necessary bytes. */
     if (do_flip)
       {
-      PCRE_PATTERN_TO_HOST_BYTE_ORDER(re, extra, NULL);
+      int rc;
+      PCRE_PATTERN_TO_HOST_BYTE_ORDER(rc, re, extra, NULL);
+      if (rc == PCRE_ERROR_BADMODE)
+        {
+        /* Simulate the result of the function call below. */
+        fprintf(outfile, "Error %d from pcre%s_fullinfo(%d)\n", rc,
+          use_pcre16? "16" : "", PCRE_INFO_OPTIONS);
+        fprintf(outfile, "Running in %s-bit mode but pattern was compiled in "
+          "%s-bit mode\n", use_pcre16? "16":"8", use_pcre16? "8":"16");
+        continue;
+        }
       }


     /* Need to know if UTF-8 for printing data strings. */


Modified: code/trunk/sljit/sljitConfigInternal.h
===================================================================
--- code/trunk/sljit/sljitConfigInternal.h    2011-12-29 18:27:07 UTC (rev 838)
+++ code/trunk/sljit/sljitConfigInternal.h    2011-12-30 13:22:28 UTC (rev 839)
@@ -28,21 +28,25 @@
 #define _SLJIT_CONFIG_INTERNAL_H_


 /*
-   SLJIT defines the following variables itself depending on the configuration:
-   sljit_b, sljit_ub : signed and unsigned 8 bit byte
-   sljit_h, sljit_uh : signed and unsigned 16 bit half-word (short) type
-   sljit_i, sljit_ui : signed and unsigned 32 bit integer type
-   sljit_w, sljit_uw : signed and unsigned machine word, enough to store a pointer (same as intptr_t)
-   SLJIT_CALL : C calling convention for both calling JIT and C callbacks from JIT
+   SLJIT defines the following macros depending on the target architecture:
+
+   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_w/sljit_uw array by index
    SLJIT_FLOAT_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_LITTLE_ENDIAN : little endian architecture
-   SLJIT_INDIRECT_CALL : see SLJIT_FUNC_OFFSET()
-   SLJIT_W : for defining 64 bit constants on 64 bit architectures (compiler workaround)
-   SLJIT_UNALIGNED : allows unaligned memory accesses for integer arithmetic (only!)
+   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_b, sljit_ub : signed and unsigned 8 bit byte
+   sljit_h, sljit_uh : signed and unsigned 16 bit half-word (short) type
+   sljit_i, sljit_ui : signed and unsigned 32 bit integer type
+   sljit_w, sljit_uw : signed and unsigned machine word, enough to store a pointer (same as intptr_t)
+   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)
 */


#if !((defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32) \

Modified: code/trunk/sljit/sljitLir.c
===================================================================
--- code/trunk/sljit/sljitLir.c    2011-12-29 18:27:07 UTC (rev 838)
+++ code/trunk/sljit/sljitLir.c    2011-12-30 13:22:28 UTC (rev 839)
@@ -874,6 +874,21 @@
 #endif
 }


+static SLJIT_INLINE void check_sljit_get_register_index(int reg)
+{
+    SLJIT_UNUSED_ARG(reg);
+    SLJIT_ASSERT(reg > 0 && reg <= SLJIT_NO_REGISTERS);
+}
+
+static SLJIT_INLINE void check_sljit_emit_op_custom(struct sljit_compiler *compiler,
+    void *instruction, int size)
+{
+    SLJIT_UNUSED_ARG(compiler);
+    SLJIT_UNUSED_ARG(instruction);
+    SLJIT_UNUSED_ARG(size);
+    SLJIT_ASSERT(instruction);
+}
+
 static SLJIT_INLINE void check_sljit_emit_fop1(struct sljit_compiler *compiler, int op,
     int dst, sljit_w dstw,
     int src, sljit_w srcw)


Modified: code/trunk/sljit/sljitLir.h
===================================================================
--- code/trunk/sljit/sljitLir.h    2011-12-29 18:27:07 UTC (rev 838)
+++ code/trunk/sljit/sljitLir.h    2011-12-30 13:22:28 UTC (rev 839)
@@ -64,6 +64,11 @@
 #if !(defined SLJIT_NO_DEFAULT_CONFIG && SLJIT_NO_DEFAULT_CONFIG)
 #include "sljitConfig.h"
 #endif
+
+/* The following header file defines useful macros for fine tuning
+sljit based code generators. They are listed in the begining
+of sljitConfigInternal.h */
+
 #include "sljitConfigInternal.h"


 /* --------------------------------------------------------------------- */
@@ -525,6 +530,30 @@
     int src1, sljit_w src1w,
     int src2, sljit_w src2w);


+/* The following function is a helper function for sljit_emit_op_custom.
+   It returns with the real machine register index of any SLJIT_TEMPORARY
+   SLJIT_GENERAL or SLJIT_LOCALS register.
+   Note: it returns with -1 for virtual registers (all EREGs on x86-32).
+   Note: register returned by SLJIT_LOCALS_REG is not necessary the real
+         stack pointer register of the target architecture. */
+
+SLJIT_API_FUNC_ATTRIBUTE int sljit_get_register_index(int reg);
+
+/* Any instruction can be inserted into the instruction stream by
+   sljit_emit_op_custom. It has a similar purpose as inline assembly.
+   The size parameter must match to the instruction size of the target
+   architecture:
+
+         x86: 0 < size <= 15. The instruction argument can be byte aligned.
+      Thumb2: if size == 2, the instruction argument must be 2 byte aligned.
+              if size == 4, the instruction argument must be 4 byte aligned.
+   Otherwise: size must be 4 and instruction argument must be 4 byte aligned. */
+
+SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_op_custom(struct sljit_compiler *compiler,
+    void *instruction, int size);
+
+/* Returns with non-zero if fpu is available. */
+
 SLJIT_API_FUNC_ATTRIBUTE int sljit_is_fpu_available(void);


/* Note: dst is the left and src is the right operand for SLJIT_FCMP.

Modified: code/trunk/sljit/sljitNativeARM_Thumb2.c
===================================================================
--- code/trunk/sljit/sljitNativeARM_Thumb2.c    2011-12-29 18:27:07 UTC (rev 838)
+++ code/trunk/sljit/sljitNativeARM_Thumb2.c    2011-12-30 13:22:28 UTC (rev 839)
@@ -1412,6 +1412,24 @@
     return SLJIT_SUCCESS;
 }


+SLJIT_API_FUNC_ATTRIBUTE int sljit_get_register_index(int reg)
+{
+    check_sljit_get_register_index(reg);
+    return reg_map[reg];
+}
+
+SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_op_custom(struct sljit_compiler *compiler,
+    void *instruction, int size)
+{
+    CHECK_ERROR();
+    check_sljit_emit_op_custom(compiler, instruction, size);
+    SLJIT_ASSERT(size == 2 || size == 4);
+
+    if (size == 2)
+        return push_inst16(compiler, *(sljit_uh*)instruction);
+    return push_inst32(compiler, *(sljit_ins*)instruction);
+}
+
 /* --------------------------------------------------------------------- */
 /*  Floating point operators                                             */
 /* --------------------------------------------------------------------- */


Modified: code/trunk/sljit/sljitNativeARM_v5.c
===================================================================
--- code/trunk/sljit/sljitNativeARM_v5.c    2011-12-29 18:27:07 UTC (rev 838)
+++ code/trunk/sljit/sljitNativeARM_v5.c    2011-12-30 13:22:28 UTC (rev 839)
@@ -1870,6 +1870,22 @@
     return SLJIT_SUCCESS;
 }


+SLJIT_API_FUNC_ATTRIBUTE int sljit_get_register_index(int reg)
+{
+    check_sljit_get_register_index(reg);
+    return reg_map[reg];
+}
+
+SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_op_custom(struct sljit_compiler *compiler,
+    void *instruction, int size)
+{
+    CHECK_ERROR();
+    check_sljit_emit_op_custom(compiler, instruction, size);
+    SLJIT_ASSERT(size == 4);
+
+    return push_inst(compiler, *(sljit_uw*)instruction);
+}
+
 /* --------------------------------------------------------------------- */
 /*  Floating point operators                                             */
 /* --------------------------------------------------------------------- */


Modified: code/trunk/sljit/sljitNativeMIPS_common.c
===================================================================
--- code/trunk/sljit/sljitNativeMIPS_common.c    2011-12-29 18:27:07 UTC (rev 838)
+++ code/trunk/sljit/sljitNativeMIPS_common.c    2011-12-30 13:22:28 UTC (rev 839)
@@ -1054,6 +1054,22 @@
 #endif
 }


+SLJIT_API_FUNC_ATTRIBUTE int sljit_get_register_index(int reg)
+{
+    check_sljit_get_register_index(reg);
+    return reg_map[reg];
+}
+
+SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_op_custom(struct sljit_compiler *compiler,
+    void *instruction, int size)
+{
+    CHECK_ERROR();
+    check_sljit_emit_op_custom(compiler, instruction, size);
+    SLJIT_ASSERT(size == 4);
+
+    return push_inst(compiler, *(sljit_ins*)instruction, UNMOVABLE_INS);
+}
+
 /* --------------------------------------------------------------------- */
 /*  Floating point operators                                             */
 /* --------------------------------------------------------------------- */


Modified: code/trunk/sljit/sljitNativePPC_common.c
===================================================================
--- code/trunk/sljit/sljitNativePPC_common.c    2011-12-29 18:27:07 UTC (rev 838)
+++ code/trunk/sljit/sljitNativePPC_common.c    2011-12-30 13:22:28 UTC (rev 839)
@@ -1324,6 +1324,22 @@
     return SLJIT_SUCCESS;
 }


+SLJIT_API_FUNC_ATTRIBUTE int sljit_get_register_index(int reg)
+{
+    check_sljit_get_register_index(reg);
+    return reg_map[reg];
+}
+
+SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_op_custom(struct sljit_compiler *compiler,
+    void *instruction, int size)
+{
+    CHECK_ERROR();
+    check_sljit_emit_op_custom(compiler, instruction, size);
+    SLJIT_ASSERT(size == 4);
+
+    return push_inst(compiler, *(sljit_ins*)instruction);
+}
+
 /* --------------------------------------------------------------------- */
 /*  Floating point operators                                             */
 /* --------------------------------------------------------------------- */


Modified: code/trunk/sljit/sljitNativeX86_common.c
===================================================================
--- code/trunk/sljit/sljitNativeX86_common.c    2011-12-29 18:27:07 UTC (rev 838)
+++ code/trunk/sljit/sljitNativeX86_common.c    2011-12-30 13:22:28 UTC (rev 839)
@@ -1837,6 +1837,33 @@
     return SLJIT_SUCCESS;
 }


+SLJIT_API_FUNC_ATTRIBUTE int sljit_get_register_index(int reg)
+{
+    check_sljit_get_register_index(reg);
+#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
+    if (reg == SLJIT_TEMPORARY_EREG1 || reg == SLJIT_TEMPORARY_EREG2
+            || reg == SLJIT_GENERAL_EREG1 || reg == SLJIT_GENERAL_EREG2)
+        return -1;
+#endif
+    return reg_map[reg];
+}
+
+SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_op_custom(struct sljit_compiler *compiler,
+    void *instruction, int size)
+{
+    sljit_ub *buf;
+
+    CHECK_ERROR();
+    check_sljit_emit_op_custom(compiler, instruction, size);
+    SLJIT_ASSERT(size > 0 && size < 16);
+
+    buf = (sljit_ub*)ensure_buf(compiler, 1 + size);
+    FAIL_IF(!buf);
+    INC_SIZE(size);
+    SLJIT_MEMMOVE(buf, instruction, size);
+    return SLJIT_SUCCESS;
+}
+
 /* --------------------------------------------------------------------- */
 /*  Floating point operators                                             */
 /* --------------------------------------------------------------------- */


Added: code/trunk/testdata/saved16BE-1
===================================================================
(Binary files differ)


Property changes on: code/trunk/testdata/saved16BE-1
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream

Added: code/trunk/testdata/saved16BE-2
===================================================================
(Binary files differ)


Property changes on: code/trunk/testdata/saved16BE-2
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream

Added: code/trunk/testdata/saved16LE-1
===================================================================
(Binary files differ)


Property changes on: code/trunk/testdata/saved16LE-1
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream

Added: code/trunk/testdata/saved16LE-2
===================================================================
(Binary files differ)


Property changes on: code/trunk/testdata/saved16LE-2
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream

Modified: code/trunk/testdata/testinput14
===================================================================
--- code/trunk/testdata/testinput14    2011-12-29 18:27:07 UTC (rev 838)
+++ code/trunk/testdata/testinput14    2011-12-30 13:22:28 UTC (rev 839)
@@ -283,7 +283,7 @@
 \)  )*                       # optional trailing comment
 /xSI


-<testdata/saved16
+<!testdata/saved16

/\h/SI


Modified: code/trunk/testdata/testinput17
===================================================================
--- code/trunk/testdata/testinput17    2011-12-29 18:27:07 UTC (rev 838)
+++ code/trunk/testdata/testinput17    2011-12-30 13:22:28 UTC (rev 839)
@@ -213,7 +213,7 @@
 \)  )*                       # optional trailing comment
 /xSI


-<testdata/saved8
+<!testdata/saved8

 /[\h]/BZ
     >\x09<
@@ -274,4 +274,10 @@
 /\x{d800}\x{d7ff}\x{dc00}\x{dc00}\x{dcff}\x{dd00}/I
     \x{d800}\x{d7ff}\x{dc00}\x{dc00}\x{dcff}\x{dd00}


+/-- Generated from: ^[aL](?P<name>(?:[AaLl]+)[^xX-]*?)(?P<other>[\x{150}-\x{250}\x{300}]|[^\x{800}aAs-uS-U\x{d800}-\x{dfff}])++[^#\b\x{500}\x{1000}]{3,5}$ --/
+
+<!testdata/saved16LE-1
+
+<!testdata/saved16BE-1
+
/-- End of testinput17 --/

Modified: code/trunk/testdata/testinput18
===================================================================
--- code/trunk/testdata/testinput18    2011-12-29 18:27:07 UTC (rev 838)
+++ code/trunk/testdata/testinput18    2011-12-30 13:22:28 UTC (rev 839)
@@ -238,4 +238,10 @@
     \x{10000}ab\>4
     \x{10000}ab\>5


+/-- Generated from: (?P<cbra1>[aZ\x{400}-\x{10ffff}]{4,}[\x{f123}\x{10039}\x{20000}-\x{21234}]?|[A-Cx-z\x{100000}-\x{1000a7}\x{101234}])(?<cb2>[^az]) --/
+
+<!testdata/saved16LE-2
+
+<!testdata/saved16BE-2
+
/-- End of testinput18 --/

Modified: code/trunk/testdata/testoutput14
===================================================================
--- code/trunk/testdata/testoutput14    2011-12-29 18:27:07 UTC (rev 838)
+++ code/trunk/testdata/testoutput14    2011-12-30 13:22:28 UTC (rev 839)
@@ -355,7 +355,7 @@
   9 = ? A B C D E F G H I J K L M N O P Q R S T U V W X Y Z ^ _ ` a b c d e 
   f g h i j k l m n o p q r s t u v w x y z { | } ~ \x7f 


-<testdata/saved16
+<!testdata/saved16
Compiled pattern loaded from testdata/saved16
No study data
Error -28 from pcre_fullinfo(0)

Modified: code/trunk/testdata/testoutput17
===================================================================
--- code/trunk/testdata/testoutput17    2011-12-29 18:27:07 UTC (rev 838)
+++ code/trunk/testdata/testoutput17    2011-12-30 13:22:28 UTC (rev 839)
@@ -240,7 +240,7 @@
   9 = ? A B C D E F G H I J K L M N O P Q R S T U V W X Y Z ^ _ ` a b c d e 
   f g h i j k l m n o p q r s t u v w x y z { | } ~ \x7f \xff 


-<testdata/saved8
+<!testdata/saved8
 Compiled pattern loaded from testdata/saved8
 No study data
 Error -28 from pcre16_fullinfo(0)
@@ -454,4 +454,72 @@
     \x{d800}\x{d7ff}\x{dc00}\x{dc00}\x{dcff}\x{dd00}
  0: \x{d800}\x{d7ff}\x{dc00}\x{dc00}\x{dcff}\x{dd00}


+/-- Generated from: ^[aL](?P<name>(?:[AaLl]+)[^xX-]*?)(?P<other>[\x{150}-\x{250}\x{300}]|[^\x{800}aAs-uS-U\x{d800}-\x{dfff}])++[^#\b\x{500}\x{1000}]{3,5}$ --/
+
+<!testdata/saved16LE-1
+Compiled pattern loaded from testdata/saved16LE-1
+Study data loaded from testdata/saved16LE-1
+------------------------------------------------------------------
+  0 134 Bra
+  2     ^
+  3     [La]
+ 20  43 CBra 1
+ 23  20 Bra
+ 25     [ALal]+
+ 43  20 Ket
+ 45     [\x00-,.-WY-wy-\xff] (neg)*?
+ 63  43 Ket
+ 65  12 CBraPos 2
+ 68     [\x{150}-\x{250}\x{300}]
+ 77  27 Alt
+ 79     [^AS-Uas-u\x{800}\x{d800}-\x{dfff}]
+104  39 KetRpos
+106     [^\x08#\x{500}\x{1000}]{3,5}
+133     $
+134 134 Ket
+136     End
+------------------------------------------------------------------
+Capturing subpattern count = 2
+Named capturing subpatterns:
+  name    1
+  other   2
+Options: anchored
+No first char
+No need char
+Subject length lower bound = 6
+No set of starting bytes
+
+<!testdata/saved16BE-1
+Compiled pattern loaded from testdata/saved16BE-1
+Study data loaded from testdata/saved16BE-1
+------------------------------------------------------------------
+  0 134 Bra
+  2     ^
+  3     [La]
+ 20  43 CBra 1
+ 23  20 Bra
+ 25     [ALal]+
+ 43  20 Ket
+ 45     [\x00-,.-WY-wy-\xff] (neg)*?
+ 63  43 Ket
+ 65  12 CBraPos 2
+ 68     [\x{150}-\x{250}\x{300}]
+ 77  27 Alt
+ 79     [^AS-Uas-u\x{800}\x{d800}-\x{dfff}]
+104  39 KetRpos
+106     [^\x08#\x{500}\x{1000}]{3,5}
+133     $
+134 134 Ket
+136     End
+------------------------------------------------------------------
+Capturing subpattern count = 2
+Named capturing subpatterns:
+  name    1
+  other   2
+Options: anchored
+No first char
+No need char
+Subject length lower bound = 6
+No set of starting bytes
+
 /-- End of testinput17 --/


Modified: code/trunk/testdata/testoutput18
===================================================================
--- code/trunk/testdata/testoutput18    2011-12-29 18:27:07 UTC (rev 838)
+++ code/trunk/testdata/testoutput18    2011-12-30 13:22:28 UTC (rev 839)
@@ -842,4 +842,61 @@
     \x{10000}ab\>5
 Error -24 (bad offset value)


+/-- Generated from: (?P<cbra1>[aZ\x{400}-\x{10ffff}]{4,}[\x{f123}\x{10039}\x{20000}-\x{21234}]?|[A-Cx-z\x{100000}-\x{1000a7}\x{101234}])(?<cb2>[^az]) --/
+Failed: character value in \x{...} sequence is too large at offset 49
+
+<!testdata/saved16LE-2
+Compiled pattern loaded from testdata/saved16LE-2
+Study data loaded from testdata/saved16LE-2
+------------------------------------------------------------------
+  0 101 Bra
+  2  45 CBra 1
+  5     [Za\x{400}-\x{10ffff}]{4,}
+ 32     [\x{f123}\x{10039}\x{20000}-\x{21234}]?
+ 47  30 Alt
+ 49     [A-Cx-z\x{100000}-\x{1000a7}\x{101234}]
+ 77  75 Ket
+ 79  20 CBra 2
+ 82     [\x00-`b-y{-\xff] (neg)
+ 99  20 Ket
+101 101 Ket
+103     End
+------------------------------------------------------------------
+Capturing subpattern count = 2
+Named capturing subpatterns:
+  cb2     2
+  cbra1   1
+Options: utf
+No first char
+No need char
+Subject length lower bound = 2
+No set of starting bytes
+
+<!testdata/saved16BE-2
+Compiled pattern loaded from testdata/saved16BE-2
+Study data loaded from testdata/saved16BE-2
+------------------------------------------------------------------
+  0 101 Bra
+  2  45 CBra 1
+  5     [Za\x{400}-\x{10ffff}]{4,}
+ 32     [\x{f123}\x{10039}\x{20000}-\x{21234}]?
+ 47  30 Alt
+ 49     [A-Cx-z\x{100000}-\x{1000a7}\x{101234}]
+ 77  75 Ket
+ 79  20 CBra 2
+ 82     [\x00-`b-y{-\xff] (neg)
+ 99  20 Ket
+101 101 Ket
+103     End
+------------------------------------------------------------------
+Capturing subpattern count = 2
+Named capturing subpatterns:
+  cb2     2
+  cbra1   1
+Options: utf
+No first char
+No need char
+Subject length lower bound = 2
+No set of starting bytes
+
 /-- End of testinput18 --/