/[pcre]/code/tags/pcre-8.38/pcre_jit_compile.c
ViewVC logotype

Diff of /code/tags/pcre-8.38/pcre_jit_compile.c

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

revision 836 by ph10, Wed Dec 28 17:16:11 2011 UTC revision 847 by zherczeg, Tue Jan 3 17:49:03 2012 UTC
# Line 322  typedef struct compare_context { Line 322  typedef struct compare_context {
322    int ucharptr;    int ucharptr;
323    union {    union {
324      sljit_i asint;      sljit_i asint;
325      sljit_h asshort;      sljit_uh asushort;
326  #ifdef COMPILE_PCRE8  #ifdef COMPILE_PCRE8
327      sljit_ub asbyte;      sljit_ub asbyte;
328      sljit_ub asuchars[4];      sljit_ub asuchars[4];
# Line 334  typedef struct compare_context { Line 334  typedef struct compare_context {
334    } c;    } c;
335    union {    union {
336      sljit_i asint;      sljit_i asint;
337      sljit_h asshort;      sljit_uh asushort;
338  #ifdef COMPILE_PCRE8  #ifdef COMPILE_PCRE8
339      sljit_ub asbyte;      sljit_ub asbyte;
340      sljit_ub asuchars[4];      sljit_ub asuchars[4];
# Line 2493  if (context->sourcereg == -1) Line 2493  if (context->sourcereg == -1)
2493    if (context->length >= 4)    if (context->length >= 4)
2494      OP1(SLJIT_MOV_SI, TMP1, 0, SLJIT_MEM1(STR_PTR), -context->length);      OP1(SLJIT_MOV_SI, TMP1, 0, SLJIT_MEM1(STR_PTR), -context->length);
2495    else if (context->length >= 2)    else if (context->length >= 2)
2496      OP1(SLJIT_MOV_SH, TMP1, 0, SLJIT_MEM1(STR_PTR), -context->length);      OP1(SLJIT_MOV_UH, TMP1, 0, SLJIT_MEM1(STR_PTR), -context->length);
2497    else    else
2498  #endif  #endif
2499      OP1(SLJIT_MOV_UB, TMP1, 0, SLJIT_MEM1(STR_PTR), -context->length);      OP1(SLJIT_MOV_UB, TMP1, 0, SLJIT_MEM1(STR_PTR), -context->length);
# Line 2504  if (context->sourcereg == -1) Line 2504  if (context->sourcereg == -1)
2504      OP1(SLJIT_MOV_SI, TMP1, 0, SLJIT_MEM1(STR_PTR), -context->length);      OP1(SLJIT_MOV_SI, TMP1, 0, SLJIT_MEM1(STR_PTR), -context->length);
2505    else    else
2506  #endif  #endif
2507      OP1(SLJIT_MOV_SH, TMP1, 0, SLJIT_MEM1(STR_PTR), -context->length);      OP1(SLJIT_MOV_UH, TMP1, 0, SLJIT_MEM1(STR_PTR), -context->length);
2508  #endif  #endif
2509  #endif /* COMPILE_PCRE8 */  #endif /* COMPILE_PCRE8 */
2510    context->sourcereg = TMP2;    context->sourcereg = TMP2;
# Line 2545  do Line 2545  do
2545        OP1(SLJIT_MOV_SI, context->sourcereg, 0, SLJIT_MEM1(STR_PTR), -context->length);        OP1(SLJIT_MOV_SI, context->sourcereg, 0, SLJIT_MEM1(STR_PTR), -context->length);
2546  #ifdef COMPILE_PCRE8  #ifdef COMPILE_PCRE8
2547      else if (context->length >= 2)      else if (context->length >= 2)
2548        OP1(SLJIT_MOV_SH, context->sourcereg, 0, SLJIT_MEM1(STR_PTR), -context->length);        OP1(SLJIT_MOV_UH, context->sourcereg, 0, SLJIT_MEM1(STR_PTR), -context->length);
2549      else if (context->length >= 1)      else if (context->length >= 1)
2550        OP1(SLJIT_MOV_UB, context->sourcereg, 0, SLJIT_MEM1(STR_PTR), -context->length);        OP1(SLJIT_MOV_UB, context->sourcereg, 0, SLJIT_MEM1(STR_PTR), -context->length);
2551  #else  #else
2552      else if (context->length >= 2)      else if (context->length >= 2)
2553        OP1(SLJIT_MOV_SH, context->sourcereg, 0, SLJIT_MEM1(STR_PTR), -context->length);        OP1(SLJIT_MOV_UH, context->sourcereg, 0, SLJIT_MEM1(STR_PTR), -context->length);
2554  #endif  #endif
2555      context->sourcereg = context->sourcereg == TMP1 ? TMP2 : TMP1;      context->sourcereg = context->sourcereg == TMP1 ? TMP2 : TMP1;
2556    
# Line 2563  do Line 2563  do
2563        break;        break;
2564    
2565        case 2 / sizeof(pcre_uchar):        case 2 / sizeof(pcre_uchar):
2566        if (context->oc.asshort != 0)        if (context->oc.asushort != 0)
2567          OP2(SLJIT_OR, context->sourcereg, 0, context->sourcereg, 0, SLJIT_IMM, context->oc.asshort);          OP2(SLJIT_OR, context->sourcereg, 0, context->sourcereg, 0, SLJIT_IMM, context->oc.asushort);
2568        add_jump(compiler, fallbacks, CMP(SLJIT_C_NOT_EQUAL, context->sourcereg, 0, SLJIT_IMM, context->c.asshort | context->oc.asshort));        add_jump(compiler, fallbacks, CMP(SLJIT_C_NOT_EQUAL, context->sourcereg, 0, SLJIT_IMM, context->c.asushort | context->oc.asushort));
2569        break;        break;
2570    
2571  #ifdef COMPILE_PCRE8  #ifdef COMPILE_PCRE8

Legend:
Removed from v.836  
changed lines
  Added in v.847

  ViewVC Help
Powered by ViewVC 1.1.5