/[pcre]/code/trunk/pcre_jit_compile.c
ViewVC logotype

Diff of /code/trunk/pcre_jit_compile.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1379 by ph10, Mon Oct 14 13:54:07 2013 UTC revision 1402 by zherczeg, Fri Nov 15 12:04:55 2013 UTC
# Line 4027  const pcre_uint32 *other_cases; Line 4027  const pcre_uint32 *other_cases;
4027  struct sljit_jump *jump = NULL;  struct sljit_jump *jump = NULL;
4028  pcre_uchar *ccbegin;  pcre_uchar *ccbegin;
4029  int compares, invertcmp, numberofcmps;  int compares, invertcmp, numberofcmps;
4030    
4031  #ifdef SUPPORT_UCP  #ifdef SUPPORT_UCP
4032  BOOL needstype = FALSE, needsscript = FALSE, needschar = FALSE;  BOOL needstype = FALSE, needsscript = FALSE, needschar = FALSE;
4033  BOOL charsaved = FALSE;  BOOL charsaved = FALSE;
# Line 4126  while (*cc != XCL_END) Line 4127  while (*cc != XCL_END)
4127        case PT_SPACE:        case PT_SPACE:
4128        case PT_PXSPACE:        case PT_PXSPACE:
4129        case PT_WORD:        case PT_WORD:
4130          case PT_PXGRAPH:
4131          case PT_PXPRINT:
4132          case PT_PXPUNCT:
4133        needstype = TRUE;        needstype = TRUE;
4134        needschar = TRUE;        needschar = TRUE;
4135        break;        break;
# Line 4413  while (*cc != XCL_END) Line 4417  while (*cc != XCL_END)
4417        OP_FLAGS(SLJIT_OR | SLJIT_SET_E, TMP2, 0, TMP2, 0, SLJIT_C_GREATER_EQUAL);        OP_FLAGS(SLJIT_OR | SLJIT_SET_E, TMP2, 0, TMP2, 0, SLJIT_C_GREATER_EQUAL);
4418        jump = JUMP(SLJIT_C_NOT_ZERO ^ invertcmp);        jump = JUMP(SLJIT_C_NOT_ZERO ^ invertcmp);
4419        break;        break;
4420    
4421          case PT_PXGRAPH:
4422          /* C and Z groups are the farthest two groups. */
4423          SET_TYPE_OFFSET(ucp_Ll);
4424          OP2(SLJIT_SUB | SLJIT_SET_U, SLJIT_UNUSED, 0, typereg, 0, SLJIT_IMM, ucp_So - ucp_Ll);
4425          OP_FLAGS(SLJIT_MOV, TMP2, 0, SLJIT_UNUSED, 0, SLJIT_C_GREATER);
4426    
4427          jump = CMP(SLJIT_C_NOT_EQUAL, typereg, 0, SLJIT_IMM, ucp_Cf - ucp_Ll);
4428    
4429          /* In case of ucp_Cf, we overwrite the result. */
4430          SET_CHAR_OFFSET(0x2066);
4431          OP2(SLJIT_SUB | SLJIT_SET_U, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0x2069 - 0x2066);
4432          OP_FLAGS(SLJIT_MOV, TMP2, 0, SLJIT_UNUSED, 0, SLJIT_C_LESS_EQUAL);
4433    
4434          OP2(SLJIT_SUB | SLJIT_SET_U, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0x061c - 0x2066);
4435          OP_FLAGS(SLJIT_OR, TMP2, 0, TMP2, 0, SLJIT_C_EQUAL);
4436    
4437          OP2(SLJIT_SUB | SLJIT_SET_U, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0x180e - 0x2066);
4438          OP_FLAGS(SLJIT_OR, TMP2, 0, TMP2, 0, SLJIT_C_EQUAL);
4439    
4440          JUMPHERE(jump);
4441          jump = CMP(SLJIT_C_ZERO ^ invertcmp, TMP2, 0, SLJIT_IMM, 0);
4442          break;
4443    
4444          case PT_PXPRINT:
4445          /* C and Z groups are the farthest two groups. */
4446          SET_TYPE_OFFSET(ucp_Ll);
4447          OP2(SLJIT_SUB | SLJIT_SET_U, SLJIT_UNUSED, 0, typereg, 0, SLJIT_IMM, ucp_So - ucp_Ll);
4448          OP_FLAGS(SLJIT_MOV, TMP2, 0, SLJIT_UNUSED, 0, SLJIT_C_GREATER);
4449    
4450          OP2(SLJIT_SUB | SLJIT_SET_U, SLJIT_UNUSED, 0, typereg, 0, SLJIT_IMM, ucp_Zs - ucp_Ll);
4451          OP_FLAGS(SLJIT_AND, TMP2, 0, TMP2, 0, SLJIT_C_NOT_EQUAL);
4452    
4453          jump = CMP(SLJIT_C_NOT_EQUAL, typereg, 0, SLJIT_IMM, ucp_Cf - ucp_Ll);
4454    
4455          /* In case of ucp_Cf, we overwrite the result. */
4456          SET_CHAR_OFFSET(0x2066);
4457          OP2(SLJIT_SUB | SLJIT_SET_U, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0x2069 - 0x2066);
4458          OP_FLAGS(SLJIT_MOV, TMP2, 0, SLJIT_UNUSED, 0, SLJIT_C_LESS_EQUAL);
4459    
4460          OP2(SLJIT_SUB | SLJIT_SET_U, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0x061c - 0x2066);
4461          OP_FLAGS(SLJIT_OR, TMP2, 0, TMP2, 0, SLJIT_C_EQUAL);
4462    
4463          JUMPHERE(jump);
4464          jump = CMP(SLJIT_C_ZERO ^ invertcmp, TMP2, 0, SLJIT_IMM, 0);
4465          break;
4466    
4467          case PT_PXPUNCT:
4468          SET_TYPE_OFFSET(ucp_Sc);
4469          OP2(SLJIT_SUB | SLJIT_SET_U, SLJIT_UNUSED, 0, typereg, 0, SLJIT_IMM, ucp_So - ucp_Sc);
4470          OP_FLAGS(SLJIT_MOV, TMP2, 0, SLJIT_UNUSED, 0, SLJIT_C_LESS_EQUAL);
4471    
4472          SET_CHAR_OFFSET(0);
4473          OP2(SLJIT_SUB | SLJIT_SET_U, SLJIT_UNUSED, 0, TMP1, 0, SLJIT_IMM, 0xff);
4474          OP_FLAGS(SLJIT_AND, TMP2, 0, TMP2, 0, SLJIT_C_LESS_EQUAL);
4475    
4476          SET_TYPE_OFFSET(ucp_Pc);
4477          OP2(SLJIT_SUB | SLJIT_SET_U, SLJIT_UNUSED, 0, typereg, 0, SLJIT_IMM, ucp_Ps - ucp_Pc);
4478          OP_FLAGS(SLJIT_OR | SLJIT_SET_E, TMP2, 0, TMP2, 0, SLJIT_C_LESS_EQUAL);
4479          jump = JUMP(SLJIT_C_NOT_ZERO ^ invertcmp);
4480          break;
4481        }        }
4482      cc += 2;      cc += 2;
4483      }      }

Legend:
Removed from v.1379  
changed lines
  Added in v.1402

  ViewVC Help
Powered by ViewVC 1.1.5