[Pcre-svn] [1222] code/trunk/src/pcre2_jit_compile.c: Remove…

Kezdőlap
Üzenet törlése
Szerző: Subversion repository
Dátum:  
Címzett: pcre-svn
Tárgy: [Pcre-svn] [1222] code/trunk/src/pcre2_jit_compile.c: Remove hackings in JIT.
Revision: 1222
          http://www.exim.org/viewvc/pcre2?view=rev&revision=1222
Author:   zherczeg
Date:     2020-02-20 08:57:39 +0000 (Thu, 20 Feb 2020)
Log Message:
-----------
Remove hackings in JIT.


Modified Paths:
--------------
    code/trunk/src/pcre2_jit_compile.c


Modified: code/trunk/src/pcre2_jit_compile.c
===================================================================
--- code/trunk/src/pcre2_jit_compile.c    2020-02-20 07:42:47 UTC (rev 1221)
+++ code/trunk/src/pcre2_jit_compile.c    2020-02-20 08:57:39 UTC (rev 1222)
@@ -7316,17 +7316,12 @@
   /* Before anything else, we deal with scripts. */
   if (needsscript)
     {
-// PH hacking
-      OP2(SLJIT_SHL, TMP1, 0, TMP2, 0, SLJIT_IMM, 2);
-      OP2(SLJIT_SHL, TMP2, 0, TMP2, 0, SLJIT_IMM, 3);
-      OP2(SLJIT_ADD, TMP2, 0, TMP2, 0, TMP1, 0);
+    OP2(SLJIT_SHL, TMP1, 0, TMP2, 0, SLJIT_IMM, 3);
+    OP2(SLJIT_SHL, TMP2, 0, TMP2, 0, SLJIT_IMM, 2);
+    OP2(SLJIT_ADD, TMP1, 0, TMP1, 0, TMP2, 0);


-    OP1(SLJIT_MOV, TMP1, 0, SLJIT_IMM, (sljit_sw)PRIV(ucd_records) + SLJIT_OFFSETOF(ucd_record, script));
+    OP1(SLJIT_MOV_U8, TMP1, 0, SLJIT_MEM1(TMP1), (sljit_sw)PRIV(ucd_records) + SLJIT_OFFSETOF(ucd_record, script));


-      OP1(SLJIT_MOV_U8, TMP1, 0, SLJIT_MEM2(TMP1, TMP2), 0);
-
-    // OP1(SLJIT_MOV_U8, TMP1, 0, SLJIT_MEM2(TMP1, TMP2), 3);
-
     ccbegin = cc;


     while (*cc != XCL_END)
@@ -7369,28 +7364,19 @@
     {
     if (!needschar)
       {
-// PH hacking
-  OP2(SLJIT_SHL, TMP1, 0, TMP2, 0, SLJIT_IMM, 2);
-  OP2(SLJIT_SHL, TMP2, 0, TMP2, 0, SLJIT_IMM, 3);
-  OP2(SLJIT_ADD, TMP2, 0, TMP2, 0, TMP1, 0);
-  OP2(SLJIT_ADD, TMP1, 0, TMP2, 0, TMP1, 0);
+      OP2(SLJIT_SHL, TMP1, 0, TMP2, 0, SLJIT_IMM, 3);
+      OP2(SLJIT_SHL, TMP2, 0, TMP2, 0, SLJIT_IMM, 2);
+      OP2(SLJIT_ADD, TMP1, 0, TMP1, 0, TMP2, 0);


-      OP1(SLJIT_MOV, TMP1, 0, SLJIT_IMM, (sljit_sw)PRIV(ucd_records) + SLJIT_OFFSETOF(ucd_record, chartype));
-
-  OP1(SLJIT_MOV_U8, TMP1, 0, SLJIT_MEM2(TMP1, TMP2), 0);
-
-//      OP1(SLJIT_MOV_U8, TMP1, 0, SLJIT_MEM2(TMP1, TMP2), 3);
+      OP1(SLJIT_MOV_U8, TMP1, 0, SLJIT_MEM1(TMP1), (sljit_sw)PRIV(ucd_records) + SLJIT_OFFSETOF(ucd_record, chartype));
       }
     else
       {
-// PH hacking
-  OP2(SLJIT_SHL, TMP1, 0, TMP2, 0, SLJIT_IMM, 2);
-
+      OP2(SLJIT_SHL, TMP1, 0, TMP2, 0, SLJIT_IMM, 2);
       OP2(SLJIT_SHL, TMP2, 0, TMP2, 0, SLJIT_IMM, 3);
+      OP2(SLJIT_ADD, TMP2, 0, TMP2, 0, TMP1, 0);


-  OP2(SLJIT_ADD, TMP2, 0, TMP2, 0, TMP1, 0);
-  OP1(SLJIT_MOV, TMP1, 0, RETURN_ADDR, 0);
-
+      OP1(SLJIT_MOV, TMP1, 0, RETURN_ADDR, 0);
       OP1(SLJIT_MOV_U8, RETURN_ADDR, 0, SLJIT_MEM1(TMP2), (sljit_sw)PRIV(ucd_records) + SLJIT_OFFSETOF(ucd_record, chartype));
       typereg = RETURN_ADDR;
       }
@@ -8769,17 +8755,14 @@


CMPTO(SLJIT_EQUAL, TMP1, 0, char1_reg, 0, loop);

-// PH hacking
OP1(SLJIT_MOV, TMP3, 0, TMP1, 0);

add_jump(compiler, &common->getucd, JUMP(SLJIT_FAST_CALL));

-    OP2(SLJIT_SHL, TMP1, 0, TMP2, 0, SLJIT_IMM, 2);
-
+  OP2(SLJIT_SHL, TMP1, 0, TMP2, 0, SLJIT_IMM, 2);
   OP2(SLJIT_SHL, TMP2, 0, TMP2, 0, SLJIT_IMM, 3);
+  OP2(SLJIT_ADD, TMP2, 0, TMP2, 0, TMP1, 0);


-    OP2(SLJIT_ADD, TMP2, 0, TMP2, 0, TMP1, 0);
-
   OP2(SLJIT_ADD, TMP2, 0, TMP2, 0, SLJIT_IMM, (sljit_sw)PRIV(ucd_records));


OP1(SLJIT_MOV_S32, TMP1, 0, SLJIT_MEM1(TMP2), SLJIT_OFFSETOF(ucd_record, other_case));