/[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 860 by zherczeg, Mon Jan 9 20:12:58 2012 UTC revision 867 by zherczeg, Fri Jan 13 13:34:07 2012 UTC
# Line 895  static SLJIT_INLINE void check_sljit_emi Line 895  static SLJIT_INLINE void check_sljit_emi
895          int dst, sljit_w dstw,          int dst, sljit_w dstw,
896          int src, sljit_w srcw)          int src, sljit_w srcw)
897  {  {
898    #if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) || (defined SLJIT_DEBUG && SLJIT_DEBUG)
899            if (SLJIT_UNLIKELY(compiler->skip_checks)) {
900                    compiler->skip_checks = 0;
901                    return;
902            }
903    #endif
904    
905          /* If debug and verbose are disabled, all arguments are unused. */          /* If debug and verbose are disabled, all arguments are unused. */
906          SLJIT_UNUSED_ARG(compiler);          SLJIT_UNUSED_ARG(compiler);
907          SLJIT_UNUSED_ARG(op);          SLJIT_UNUSED_ARG(op);
# Line 1018  static SLJIT_INLINE void check_sljit_emi Line 1025  static SLJIT_INLINE void check_sljit_emi
1025  #endif  #endif
1026  }  }
1027    
1028    static SLJIT_INLINE void check_sljit_emit_fcmp(struct sljit_compiler *compiler, int type,
1029            int src1, sljit_w src1w,
1030            int src2, sljit_w src2w)
1031    {
1032            SLJIT_UNUSED_ARG(compiler);
1033            SLJIT_UNUSED_ARG(type);
1034            SLJIT_UNUSED_ARG(src1);
1035            SLJIT_UNUSED_ARG(src1w);
1036            SLJIT_UNUSED_ARG(src2);
1037            SLJIT_UNUSED_ARG(src2w);
1038    
1039            SLJIT_ASSERT(sljit_is_fpu_available());
1040            SLJIT_ASSERT(!(type & ~(0xff | SLJIT_REWRITABLE_JUMP)));
1041            SLJIT_ASSERT((type & 0xff) >= SLJIT_C_FLOAT_EQUAL && (type & 0xff) <= SLJIT_C_FLOAT_NOT_NAN);
1042    #if (defined SLJIT_DEBUG && SLJIT_DEBUG)
1043            FUNCTION_FCHECK(src1, src1w);
1044            FUNCTION_FCHECK(src2, src2w);
1045    #endif
1046    #if (defined SLJIT_VERBOSE && SLJIT_VERBOSE)
1047            if (SLJIT_UNLIKELY(!!compiler->verbose)) {
1048                    fprintf(compiler->verbose, "  fcmp%s <%s> ", !(type & SLJIT_REWRITABLE_JUMP) ? "" : "R", jump_names[type & 0xff]);
1049                    sljit_verbose_fparam(src1, src1w);
1050                    fprintf(compiler->verbose, ", ");
1051                    sljit_verbose_fparam(src2, src2w);
1052                    fprintf(compiler->verbose, "\n");
1053            }
1054    #endif
1055    }
1056    
1057  static SLJIT_INLINE void check_sljit_emit_ijump(struct sljit_compiler *compiler, int type, int src, sljit_w srcw)  static SLJIT_INLINE void check_sljit_emit_ijump(struct sljit_compiler *compiler, int type, int src, sljit_w srcw)
1058  {  {
1059          /* If debug and verbose are disabled, all arguments are unused. */          /* If debug and verbose are disabled, all arguments are unused. */
# Line 1103  static SLJIT_INLINE void check_sljit_emi Line 1139  static SLJIT_INLINE void check_sljit_emi
1139  #endif  #endif
1140    
1141  #if !(defined SLJIT_CONFIG_MIPS_32 && SLJIT_CONFIG_MIPS_32)  #if !(defined SLJIT_CONFIG_MIPS_32 && SLJIT_CONFIG_MIPS_32)
1142    
1143  SLJIT_API_FUNC_ATTRIBUTE struct sljit_jump* sljit_emit_cmp(struct sljit_compiler *compiler, int type,  SLJIT_API_FUNC_ATTRIBUTE struct sljit_jump* sljit_emit_cmp(struct sljit_compiler *compiler, int type,
1144          int src1, sljit_w src1w,          int src1, sljit_w src1w,
1145          int src2, sljit_w src2w)          int src2, sljit_w src2w)
# Line 1169  SLJIT_API_FUNC_ATTRIBUTE struct sljit_ju Line 1206  SLJIT_API_FUNC_ATTRIBUTE struct sljit_ju
1206  #endif  #endif
1207          return sljit_emit_jump(compiler, condition | (type & SLJIT_REWRITABLE_JUMP));          return sljit_emit_jump(compiler, condition | (type & SLJIT_REWRITABLE_JUMP));
1208  }  }
1209    
1210    SLJIT_API_FUNC_ATTRIBUTE struct sljit_jump* sljit_emit_fcmp(struct sljit_compiler *compiler, int type,
1211            int src1, sljit_w src1w,
1212            int src2, sljit_w src2w)
1213    {
1214            int flags, condition;
1215    
1216            check_sljit_emit_fcmp(compiler, type, src1, src1w, src2, src2w);
1217    
1218            condition = type & 0xff;
1219            if (condition <= SLJIT_C_FLOAT_NOT_EQUAL)
1220                    flags = SLJIT_SET_E;
1221            else
1222                    flags = SLJIT_SET_S;
1223    
1224    #if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) || (defined SLJIT_DEBUG && SLJIT_DEBUG)
1225            compiler->skip_checks = 1;
1226    #endif
1227            sljit_emit_fop1(compiler, SLJIT_FCMP | flags, src1, src1w, src2, src2w);
1228    
1229    #if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) || (defined SLJIT_DEBUG && SLJIT_DEBUG)
1230            compiler->skip_checks = 1;
1231    #endif
1232            return sljit_emit_jump(compiler, condition | (type & SLJIT_REWRITABLE_JUMP));
1233    }
1234    
1235  #endif  #endif
1236    
1237  #else /* SLJIT_CONFIG_UNSUPPORTED */  #else /* SLJIT_CONFIG_UNSUPPORTED */
# Line 1369  SLJIT_API_FUNC_ATTRIBUTE struct sljit_ju Line 1432  SLJIT_API_FUNC_ATTRIBUTE struct sljit_ju
1432          int src1, sljit_w src1w,          int src1, sljit_w src1w,
1433          int src2, sljit_w src2w)          int src2, sljit_w src2w)
1434  {  {
1435            SLJIT_UNUSED_ARG(compiler);
1436            SLJIT_UNUSED_ARG(type);
1437            SLJIT_UNUSED_ARG(src1);
1438            SLJIT_UNUSED_ARG(src1w);
1439            SLJIT_UNUSED_ARG(src2);
1440            SLJIT_UNUSED_ARG(src2w);
1441            SLJIT_ASSERT_STOP();
1442            return NULL;
1443    }
1444    
1445    SLJIT_API_FUNC_ATTRIBUTE struct sljit_jump* sljit_emit_fcmp(struct sljit_compiler *compiler, int type,
1446            int src1, sljit_w src1w,
1447            int src2, sljit_w src2w)
1448    {
1449          SLJIT_UNUSED_ARG(compiler);          SLJIT_UNUSED_ARG(compiler);
1450          SLJIT_UNUSED_ARG(type);          SLJIT_UNUSED_ARG(type);
1451          SLJIT_UNUSED_ARG(src1);          SLJIT_UNUSED_ARG(src1);

Legend:
Removed from v.860  
changed lines
  Added in v.867

  ViewVC Help
Powered by ViewVC 1.1.5