/[pcre]/code/trunk/sljit/sljitLir.c
ViewVC logotype

Diff of /code/trunk/sljit/sljitLir.c

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

revision 1181 by zherczeg, Sat Oct 20 21:33:38 2012 UTC revision 1182 by zherczeg, Sun Oct 28 05:22:32 2012 UTC
# Line 280  SLJIT_API_FUNC_ATTRIBUTE struct sljit_co Line 280  SLJIT_API_FUNC_ATTRIBUTE struct sljit_co
280                  sizeof(sljit_b) == 1 && sizeof(sljit_ub) == 1                  sizeof(sljit_b) == 1 && sizeof(sljit_ub) == 1
281                  && sizeof(sljit_h) == 2 && sizeof(sljit_uh) == 2                  && sizeof(sljit_h) == 2 && sizeof(sljit_uh) == 2
282                  && sizeof(sljit_i) == 4 && sizeof(sljit_ui) == 4                  && sizeof(sljit_i) == 4 && sizeof(sljit_ui) == 4
283                  && ((sizeof(sljit_w) == 4 && sizeof(sljit_uw) == 4) || (sizeof(sljit_w) == 8 && sizeof(sljit_uw) == 8)),                  && (sizeof(sljit_p) == 4 || sizeof(sljit_p) == 8)
284                    && (sizeof(sljit_w) == 4 || sizeof(sljit_w) == 8)
285                    && (sizeof(sljit_uw) == 4 || sizeof(sljit_uw) == 8),
286                  invalid_integer_types);                  invalid_integer_types);
287    
288          /* Only the non-zero members must be set. */          /* Only the non-zero members must be set. */
# Line 609  static SLJIT_INLINE void set_const(struc Line 611  static SLJIT_INLINE void set_const(struc
611                  SLJIT_ASSERT_STOP();                  SLJIT_ASSERT_STOP();
612    
613  #define FUNCTION_CHECK_OP1() \  #define FUNCTION_CHECK_OP1() \
614          if (GET_OPCODE(op) >= SLJIT_MOV && GET_OPCODE(op) <= SLJIT_MOVU_SI) { \          if (GET_OPCODE(op) >= SLJIT_MOV && GET_OPCODE(op) <= SLJIT_MOVU_P) { \
615                  SLJIT_ASSERT(!GET_ALL_FLAGS(op)); \                  SLJIT_ASSERT(!GET_ALL_FLAGS(op)); \
616          } \          } \
617          if (GET_OPCODE(op) >= SLJIT_MOVU && GET_OPCODE(op) <= SLJIT_MOVU_SI) { \          if (GET_OPCODE(op) >= SLJIT_MOVU && GET_OPCODE(op) <= SLJIT_MOVU_P) { \
618                  SLJIT_ASSERT(!(src & SLJIT_MEM) || (src & 0xf) != SLJIT_LOCALS_REG); \                  SLJIT_ASSERT(!(src & SLJIT_MEM) || (src & 0xf) != SLJIT_LOCALS_REG); \
619                  SLJIT_ASSERT(!(dst & SLJIT_MEM) || (dst & 0xf) != SLJIT_LOCALS_REG); \                  SLJIT_ASSERT(!(dst & SLJIT_MEM) || (dst & 0xf) != SLJIT_LOCALS_REG); \
620                  if ((src & SLJIT_MEM) && (src & 0xf)) \                  if ((src & SLJIT_MEM) && (src & 0xf)) \
# Line 697  static SLJIT_CONST char* op_names[] = { Line 699  static SLJIT_CONST char* op_names[] = {
699          (char*)"umul", (char*)"smul", (char*)"udiv", (char*)"sdiv",          (char*)"umul", (char*)"smul", (char*)"udiv", (char*)"sdiv",
700          /* op1 */          /* op1 */
701          (char*)"mov", (char*)"mov.ub", (char*)"mov.sb", (char*)"mov.uh",          (char*)"mov", (char*)"mov.ub", (char*)"mov.sb", (char*)"mov.uh",
702          (char*)"mov.sh", (char*)"mov.ui", (char*)"mov.si", (char*)"movu",          (char*)"mov.sh", (char*)"mov.ui", (char*)"mov.si", (char*)"mov.p",
703          (char*)"movu.ub", (char*)"movu.sb", (char*)"movu.uh", (char*)"movu.sh",          (char*)"movu", (char*)"movu.ub", (char*)"movu.sb", (char*)"movu.uh",
704          (char*)"movu.ui", (char*)"movu.si", (char*)"not", (char*)"neg",          (char*)"movu.sh", (char*)"movu.ui", (char*)"movu.si", (char*)"movu.p",
705          (char*)"clz",          (char*)"not", (char*)"neg", (char*)"clz",
706          /* op2 */          /* op2 */
707          (char*)"add", (char*)"addc", (char*)"sub", (char*)"subc",          (char*)"add", (char*)"addc", (char*)"sub", (char*)"subc",
708          (char*)"mul", (char*)"and", (char*)"or", (char*)"xor",          (char*)"mul", (char*)"and", (char*)"or", (char*)"xor",
# Line 809  static SLJIT_INLINE void check_sljit_emi Line 811  static SLJIT_INLINE void check_sljit_emi
811    
812  #if (defined SLJIT_DEBUG && SLJIT_DEBUG)  #if (defined SLJIT_DEBUG && SLJIT_DEBUG)
813          if (op != SLJIT_UNUSED) {          if (op != SLJIT_UNUSED) {
814                  SLJIT_ASSERT(op >= SLJIT_MOV && op <= SLJIT_MOV_SI);                  SLJIT_ASSERT(op >= SLJIT_MOV && op <= SLJIT_MOV_P);
815                  FUNCTION_CHECK_SRC(src, srcw);                  FUNCTION_CHECK_SRC(src, srcw);
816          }          }
817          else          else
# Line 1231  static SLJIT_INLINE int emit_mov_before_ Line 1233  static SLJIT_INLINE int emit_mov_before_
1233                  return SLJIT_SUCCESS;                  return SLJIT_SUCCESS;
1234    
1235  #if (defined SLJIT_64BIT_ARCHITECTURE && SLJIT_64BIT_ARCHITECTURE)  #if (defined SLJIT_64BIT_ARCHITECTURE && SLJIT_64BIT_ARCHITECTURE)
1236          if (src == SLJIT_RETURN_REG && op == SLJIT_MOV)          /* At the moment the pointer size is always equal to sljit_w. May be changed in the future. */
1237            if (src == SLJIT_RETURN_REG && (op == SLJIT_MOV || op == SLJIT_MOV_P))
1238                  return SLJIT_SUCCESS;                  return SLJIT_SUCCESS;
1239  #else  #else
1240          if (src == SLJIT_RETURN_REG && (op == SLJIT_MOV || op == SLJIT_MOV_UI || op == SLJIT_MOV_SI))          if (src == SLJIT_RETURN_REG && (op == SLJIT_MOV || op == SLJIT_MOV_UI || op == SLJIT_MOV_SI || op == SLJIT_MOV_P))
1241                  return SLJIT_SUCCESS;                  return SLJIT_SUCCESS;
1242  #endif  #endif
1243    

Legend:
Removed from v.1181  
changed lines
  Added in v.1182

  ViewVC Help
Powered by ViewVC 1.1.5