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

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

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

revision 722 by zherczeg, Fri Oct 7 19:18:55 2011 UTC revision 740 by zherczeg, Mon Oct 31 06:10:14 2011 UTC
# Line 24  Line 24 
24   * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.   * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25   */   */
26    
27  SLJIT_CONST char* sljit_get_platform_name()  SLJIT_API_FUNC_ATTRIBUTE SLJIT_CONST char* sljit_get_platform_name()
28  {  {
29  #if (defined SLJIT_CONFIG_MIPS_32 && SLJIT_CONFIG_MIPS_32)  #if (defined SLJIT_CONFIG_MIPS_32 && SLJIT_CONFIG_MIPS_32)
30          return "mips-32";          return "mips-32";
# Line 290  static __attribute__ ((noinline)) void s Line 290  static __attribute__ ((noinline)) void s
290  }  }
291  #endif  #endif
292    
293  void* sljit_generate_code(struct sljit_compiler *compiler)  SLJIT_API_FUNC_ATTRIBUTE void* sljit_generate_code(struct sljit_compiler *compiler)
294  {  {
295          struct sljit_memory_fragment *buf;          struct sljit_memory_fragment *buf;
296          sljit_ins *code;          sljit_ins *code;
# Line 454  static int emit_op(struct sljit_compiler Line 454  static int emit_op(struct sljit_compiler
454          int src1, sljit_w src1w,          int src1, sljit_w src1w,
455          int src2, sljit_w src2w);          int src2, sljit_w src2w);
456    
457  int sljit_emit_enter(struct sljit_compiler *compiler, int args, int temporaries, int generals, int local_size)  SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_enter(struct sljit_compiler *compiler, int args, int temporaries, int generals, int local_size)
458  {  {
459          sljit_ins base;          sljit_ins base;
460    
# Line 509  int sljit_emit_enter(struct sljit_compil Line 509  int sljit_emit_enter(struct sljit_compil
509          return SLJIT_SUCCESS;          return SLJIT_SUCCESS;
510  }  }
511    
512  void sljit_fake_enter(struct sljit_compiler *compiler, int args, int temporaries, int generals, int local_size)  SLJIT_API_FUNC_ATTRIBUTE void sljit_fake_enter(struct sljit_compiler *compiler, int args, int temporaries, int generals, int local_size)
513  {  {
514          CHECK_ERROR_VOID();          CHECK_ERROR_VOID();
515          check_sljit_fake_enter(compiler, args, temporaries, generals, local_size);          check_sljit_fake_enter(compiler, args, temporaries, generals, local_size);
# Line 522  void sljit_fake_enter(struct sljit_compi Line 522  void sljit_fake_enter(struct sljit_compi
522          compiler->local_size = (local_size + 15) & ~0xf;          compiler->local_size = (local_size + 15) & ~0xf;
523  }  }
524    
525  int sljit_emit_return(struct sljit_compiler *compiler, int src, sljit_w srcw)  SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_return(struct sljit_compiler *compiler, int src, sljit_w srcw)
526  {  {
527          int local_size;          int local_size;
528          sljit_ins base;          sljit_ins base;
# Line 917  static int emit_op(struct sljit_compiler Line 917  static int emit_op(struct sljit_compiler
917          return SLJIT_SUCCESS;          return SLJIT_SUCCESS;
918  }  }
919    
920  int sljit_emit_op0(struct sljit_compiler *compiler, int op)  SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_op0(struct sljit_compiler *compiler, int op)
921  {  {
922          CHECK_ERROR();          CHECK_ERROR();
923          check_sljit_emit_op0(compiler, op);          check_sljit_emit_op0(compiler, op);
# Line 933  int sljit_emit_op0(struct sljit_compiler Line 933  int sljit_emit_op0(struct sljit_compiler
933          return SLJIT_SUCCESS;          return SLJIT_SUCCESS;
934  }  }
935    
936  int sljit_emit_op1(struct sljit_compiler *compiler, int op,  SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_op1(struct sljit_compiler *compiler, int op,
937          int dst, sljit_w dstw,          int dst, sljit_w dstw,
938          int src, sljit_w srcw)          int src, sljit_w srcw)
939  {  {
# Line 944  int sljit_emit_op1(struct sljit_compiler Line 944  int sljit_emit_op1(struct sljit_compiler
944          CHECK_ERROR();          CHECK_ERROR();
945          check_sljit_emit_op1(compiler, op, dst, dstw, src, srcw);          check_sljit_emit_op1(compiler, op, dst, dstw, src, srcw);
946    
947          SLJIT_ASSERT(SLJIT_MOV + 7 == SLJIT_MOVU);          SLJIT_COMPILE_ASSERT(SLJIT_MOV + 7 == SLJIT_MOVU, movu_offset);
948    
949          switch (GET_OPCODE(op)) {          switch (GET_OPCODE(op)) {
950          case SLJIT_MOV:          case SLJIT_MOV:
# Line 1005  int sljit_emit_op1(struct sljit_compiler Line 1005  int sljit_emit_op1(struct sljit_compiler
1005  #endif  #endif
1006  }  }
1007    
1008  int sljit_emit_op2(struct sljit_compiler *compiler, int op,  SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_op2(struct sljit_compiler *compiler, int op,
1009          int dst, sljit_w dstw,          int dst, sljit_w dstw,
1010          int src1, sljit_w src1w,          int src1, sljit_w src1w,
1011          int src2, sljit_w src2w)          int src2, sljit_w src2w)
# Line 1057  int sljit_emit_op2(struct sljit_compiler Line 1057  int sljit_emit_op2(struct sljit_compiler
1057  /*  Floating point operators                                             */  /*  Floating point operators                                             */
1058  /* --------------------------------------------------------------------- */  /* --------------------------------------------------------------------- */
1059    
1060  int sljit_is_fpu_available(void)  SLJIT_API_FUNC_ATTRIBUTE int sljit_is_fpu_available(void)
1061  {  {
1062  #if (defined SLJIT_QEMU && SLJIT_QEMU)  #if (defined SLJIT_QEMU && SLJIT_QEMU)
1063          /* Qemu says fir is 0 by default. */          /* Qemu says fir is 0 by default. */
# Line 1109  static int emit_fpu_data_transfer(struct Line 1109  static int emit_fpu_data_transfer(struct
1109          return push_inst(compiler, (load ? LDC1 : SDC1) | S(TMP_REG3) | FT(fpu_reg) | IMM(0), MOVABLE_INS);          return push_inst(compiler, (load ? LDC1 : SDC1) | S(TMP_REG3) | FT(fpu_reg) | IMM(0), MOVABLE_INS);
1110  }  }
1111    
1112  int sljit_emit_fop1(struct sljit_compiler *compiler, int op,  SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_fop1(struct sljit_compiler *compiler, int op,
1113          int dst, sljit_w dstw,          int dst, sljit_w dstw,
1114          int src, sljit_w srcw)          int src, sljit_w srcw)
1115  {  {
# Line 1178  int sljit_emit_fop1(struct sljit_compile Line 1178  int sljit_emit_fop1(struct sljit_compile
1178          return SLJIT_SUCCESS;          return SLJIT_SUCCESS;
1179  }  }
1180    
1181  int sljit_emit_fop2(struct sljit_compiler *compiler, int op,  SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_fop2(struct sljit_compiler *compiler, int op,
1182          int dst, sljit_w dstw,          int dst, sljit_w dstw,
1183          int src1, sljit_w src1w,          int src1, sljit_w src1w,
1184          int src2, sljit_w src2w)          int src2, sljit_w src2w)
# Line 1231  int sljit_emit_fop2(struct sljit_compile Line 1231  int sljit_emit_fop2(struct sljit_compile
1231  /*  Other instructions                                                   */  /*  Other instructions                                                   */
1232  /* --------------------------------------------------------------------- */  /* --------------------------------------------------------------------- */
1233    
1234  int sljit_emit_fast_enter(struct sljit_compiler *compiler, int dst, sljit_w dstw, int args, int temporaries, int generals, int local_size)  SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_fast_enter(struct sljit_compiler *compiler, int dst, sljit_w dstw, int args, int temporaries, int generals, int local_size)
1235  {  {
1236          CHECK_ERROR();          CHECK_ERROR();
1237          check_sljit_emit_fast_enter(compiler, dst, dstw, args, temporaries, generals, local_size);          check_sljit_emit_fast_enter(compiler, dst, dstw, args, temporaries, generals, local_size);
# Line 1250  int sljit_emit_fast_enter(struct sljit_c Line 1250  int sljit_emit_fast_enter(struct sljit_c
1250          return SLJIT_SUCCESS;          return SLJIT_SUCCESS;
1251  }  }
1252    
1253  int sljit_emit_fast_return(struct sljit_compiler *compiler, int src, sljit_w srcw)  SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_fast_return(struct sljit_compiler *compiler, int src, sljit_w srcw)
1254  {  {
1255          CHECK_ERROR();          CHECK_ERROR();
1256          check_sljit_emit_fast_return(compiler, src, srcw);          check_sljit_emit_fast_return(compiler, src, srcw);
# Line 1270  int sljit_emit_fast_return(struct sljit_ Line 1270  int sljit_emit_fast_return(struct sljit_
1270  /*  Conditional instructions                                             */  /*  Conditional instructions                                             */
1271  /* --------------------------------------------------------------------- */  /* --------------------------------------------------------------------- */
1272    
1273  struct sljit_label* sljit_emit_label(struct sljit_compiler *compiler)  SLJIT_API_FUNC_ATTRIBUTE struct sljit_label* sljit_emit_label(struct sljit_compiler *compiler)
1274  {  {
1275          struct sljit_label *label;          struct sljit_label *label;
1276    
# Line 1313  struct sljit_label* sljit_emit_label(str Line 1313  struct sljit_label* sljit_emit_label(str
1313          flags = IS_BIT16_COND; \          flags = IS_BIT16_COND; \
1314          delay_check = FCSR_FCC;          delay_check = FCSR_FCC;
1315    
1316  struct sljit_jump* sljit_emit_jump(struct sljit_compiler *compiler, int type)  SLJIT_API_FUNC_ATTRIBUTE struct sljit_jump* sljit_emit_jump(struct sljit_compiler *compiler, int type)
1317  {  {
1318          struct sljit_jump *jump;          struct sljit_jump *jump;
1319          sljit_ins inst;          sljit_ins inst;
# Line 1429  struct sljit_jump* sljit_emit_jump(struc Line 1429  struct sljit_jump* sljit_emit_jump(struc
1429                          src2 = 0; \                          src2 = 0; \
1430          }          }
1431    
1432  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,
1433          int src1, sljit_w src1w,          int src1, sljit_w src1w,
1434          int src2, sljit_w src2w)          int src2, sljit_w src2w)
1435  {  {
# Line 1560  struct sljit_jump* sljit_emit_cmp(struct Line 1560  struct sljit_jump* sljit_emit_cmp(struct
1560  #undef BR_T  #undef BR_T
1561  #undef BR_F  #undef BR_F
1562    
1563  int sljit_emit_ijump(struct sljit_compiler *compiler, int type, int src, sljit_w srcw)  SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_ijump(struct sljit_compiler *compiler, int type, int src, sljit_w srcw)
1564  {  {
1565          int src_r = TMP_REG2;          int src_r = TMP_REG2;
1566          struct sljit_jump *jump = NULL;          struct sljit_jump *jump = NULL;
# Line 1617  int sljit_emit_ijump(struct sljit_compil Line 1617  int sljit_emit_ijump(struct sljit_compil
1617          return SLJIT_SUCCESS;          return SLJIT_SUCCESS;
1618  }  }
1619    
1620  int sljit_emit_cond_value(struct sljit_compiler *compiler, int op, int dst, sljit_w dstw, int type)  SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_cond_value(struct sljit_compiler *compiler, int op, int dst, sljit_w dstw, int type)
1621  {  {
1622          int sugg_dst_ar, dst_ar;          int sugg_dst_ar, dst_ar;
1623    
# Line 1703  int sljit_emit_cond_value(struct sljit_c Line 1703  int sljit_emit_cond_value(struct sljit_c
1703          return SLJIT_SUCCESS;          return SLJIT_SUCCESS;
1704  }  }
1705    
1706  struct sljit_const* sljit_emit_const(struct sljit_compiler *compiler, int dst, sljit_w dstw, sljit_w init_value)  SLJIT_API_FUNC_ATTRIBUTE struct sljit_const* sljit_emit_const(struct sljit_compiler *compiler, int dst, sljit_w dstw, sljit_w init_value)
1707  {  {
1708          struct sljit_const *const_;          struct sljit_const *const_;
1709          int reg;          int reg;

Legend:
Removed from v.722  
changed lines
  Added in v.740

  ViewVC Help
Powered by ViewVC 1.1.5