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

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

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

revision 662 by ph10, Mon Aug 22 14:35:22 2011 UTC revision 860 by zherczeg, Mon Jan 9 20:12:58 2012 UTC
# Line 1  Line 1 
1  /*  /*
2   *    Stack-less Just-In-Time compiler   *    Stack-less Just-In-Time compiler
3   *   *
4   *    Copyright 2009-2010 Zoltan Herczeg (hzmester@freemail.hu). All rights reserved.   *    Copyright 2009-2012 Zoltan Herczeg (hzmester@freemail.hu). All rights reserved.
5   *   *
6   * Redistribution and use in source and binary forms, with or without modification, are   * Redistribution and use in source and binary forms, with or without modification, are
7   * permitted provided that the following conditions are met:   * permitted provided that the following conditions are met:
# 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          return "arm-thumb2";          return "arm-thumb2";
30  }  }
# Line 38  SLJIT_CONST char* sljit_get_platform_nam Line 38  SLJIT_CONST char* sljit_get_platform_nam
38  #define TMP_FREG1       (SLJIT_FLOAT_REG4 + 1)  #define TMP_FREG1       (SLJIT_FLOAT_REG4 + 1)
39  #define TMP_FREG2       (SLJIT_FLOAT_REG4 + 2)  #define TMP_FREG2       (SLJIT_FLOAT_REG4 + 2)
40    
41  /* See sljit_emit_enter if you want to change them. */  /* See sljit_emit_enter and sljit_emit_op0 if you want to change them. */
42  static SLJIT_CONST sljit_ub reg_map[SLJIT_NO_REGISTERS + 5] = {  static SLJIT_CONST sljit_ub reg_map[SLJIT_NO_REGISTERS + 5] = {
43    0, 0, 1, 2, 12, 5, 6, 7, 8, 10, 11, 13, 3, 4, 14, 15    0, 0, 1, 2, 12, 5, 6, 7, 8, 10, 11, 13, 3, 4, 14, 15
44  };  };
# Line 122  typedef sljit_ui sljit_ins; Line 122  typedef sljit_ui sljit_ins;
122  #define LSR_W           0xfa20f000  #define LSR_W           0xfa20f000
123  #define LSR_WI          0xea4f0010  #define LSR_WI          0xea4f0010
124  #define MOV             0x4600  #define MOV             0x4600
125    #define MOVS            0x0000
126  #define MOVSI           0x2000  #define MOVSI           0x2000
127  #define MOVT            0xf2c00000  #define MOVT            0xf2c00000
128  #define MOVW            0xf2400000  #define MOVW            0xf2400000
129    #define MOV_W           0xea4f0000
130  #define MOV_WI          0xf04f0000  #define MOV_WI          0xf04f0000
131  #define MUL             0xfb00f000  #define MUL             0xfb00f000
132  #define MVNS            0x43c0  #define MVNS            0x43c0
# Line 158  typedef sljit_ui sljit_ins; Line 160  typedef sljit_ui sljit_ins;
160  #define SXTH            0xb200  #define SXTH            0xb200
161  #define SXTH_W          0xfa0ff080  #define SXTH_W          0xfa0ff080
162  #define TST             0x4200  #define TST             0x4200
163    #define UMULL           0xfba00000
164  #define UXTB            0xb2c0  #define UXTB            0xb2c0
165  #define UXTB_W          0xfa5ff080  #define UXTB_W          0xfa5ff080
166  #define UXTH            0xb280  #define UXTH            0xb280
# Line 340  static SLJIT_INLINE void set_jump_instru Line 343  static SLJIT_INLINE void set_jump_instru
343                  SLJIT_ASSERT_STOP();                  SLJIT_ASSERT_STOP();
344  }  }
345    
346  void* sljit_generate_code(struct sljit_compiler *compiler)  SLJIT_API_FUNC_ATTRIBUTE void* sljit_generate_code(struct sljit_compiler *compiler)
347  {  {
348          struct sljit_memory_fragment *buf;          struct sljit_memory_fragment *buf;
349          sljit_uh *code;          sljit_uh *code;
# Line 416  void* sljit_generate_code(struct sljit_c Line 419  void* sljit_generate_code(struct sljit_c
419    
420          SLJIT_CACHE_FLUSH(code, code_ptr);          SLJIT_CACHE_FLUSH(code, code_ptr);
421          compiler->error = SLJIT_ERR_COMPILED;          compiler->error = SLJIT_ERR_COMPILED;
422            compiler->executable_size = compiler->size * sizeof(sljit_uh);
423          /* Set thumb mode flag. */          /* Set thumb mode flag. */
424          return (void*)((sljit_uw)code | 0x1);          return (void*)((sljit_uw)code | 0x1);
425  }  }
# Line 615  static int emit_op_imm(struct sljit_comp Line 619  static int emit_op_imm(struct sljit_comp
619                  case SLJIT_SHL:                  case SLJIT_SHL:
620                          if (flags & ARG2_IMM) {                          if (flags & ARG2_IMM) {
621                                  imm &= 0x1f;                                  imm &= 0x1f;
622                                    if (imm == 0) {
623                                            if (!(flags & SET_FLAGS))
624                                                    return push_inst16(compiler, MOV | SET_REGS44(dst, reg));
625                                            if (IS_2_LO_REGS(dst, reg))
626                                                    return push_inst16(compiler, MOVS | RD3(dst) | RN3(reg));
627                                            return push_inst32(compiler, MOV_W | SET_FLAGS | RD4(dst) | RM4(reg));
628                                    }
629                                  if (!(flags & KEEP_FLAGS) && IS_2_LO_REGS(dst, reg))                                  if (!(flags & KEEP_FLAGS) && IS_2_LO_REGS(dst, reg))
630                                          return push_inst16(compiler, LSLSI | RD3(dst) | RN3(reg) | (imm << 6));                                          return push_inst16(compiler, LSLSI | RD3(dst) | RN3(reg) | (imm << 6));
631                                  return push_inst32(compiler, LSL_WI | (flags & SET_FLAGS) | RD4(dst) | RM4(reg) | IMM5(imm));                                  return push_inst32(compiler, LSL_WI | (flags & SET_FLAGS) | RD4(dst) | RM4(reg) | IMM5(imm));
# Line 623  static int emit_op_imm(struct sljit_comp Line 634  static int emit_op_imm(struct sljit_comp
634                  case SLJIT_LSHR:                  case SLJIT_LSHR:
635                          if (flags & ARG2_IMM) {                          if (flags & ARG2_IMM) {
636                                  imm &= 0x1f;                                  imm &= 0x1f;
637                                    if (imm == 0) {
638                                            if (!(flags & SET_FLAGS))
639                                                    return push_inst16(compiler, MOV | SET_REGS44(dst, reg));
640                                            if (IS_2_LO_REGS(dst, reg))
641                                                    return push_inst16(compiler, MOVS | RD3(dst) | RN3(reg));
642                                            return push_inst32(compiler, MOV_W | SET_FLAGS | RD4(dst) | RM4(reg));
643                                    }
644                                  if (!(flags & KEEP_FLAGS) && IS_2_LO_REGS(dst, reg))                                  if (!(flags & KEEP_FLAGS) && IS_2_LO_REGS(dst, reg))
645                                          return push_inst16(compiler, LSRSI | RD3(dst) | RN3(reg) | (imm << 6));                                          return push_inst16(compiler, LSRSI | RD3(dst) | RN3(reg) | (imm << 6));
646                                  return push_inst32(compiler, LSR_WI | (flags & SET_FLAGS) | RD4(dst) | RM4(reg) | IMM5(imm));                                  return push_inst32(compiler, LSR_WI | (flags & SET_FLAGS) | RD4(dst) | RM4(reg) | IMM5(imm));
# Line 631  static int emit_op_imm(struct sljit_comp Line 649  static int emit_op_imm(struct sljit_comp
649                  case SLJIT_ASHR:                  case SLJIT_ASHR:
650                          if (flags & ARG2_IMM) {                          if (flags & ARG2_IMM) {
651                                  imm &= 0x1f;                                  imm &= 0x1f;
652                                    if (imm == 0) {
653                                            if (!(flags & SET_FLAGS))
654                                                    return push_inst16(compiler, MOV | SET_REGS44(dst, reg));
655                                            if (IS_2_LO_REGS(dst, reg))
656                                                    return push_inst16(compiler, MOVS | RD3(dst) | RN3(reg));
657                                            return push_inst32(compiler, MOV_W | SET_FLAGS | RD4(dst) | RM4(reg));
658                                    }
659                                  if (!(flags & KEEP_FLAGS) && IS_2_LO_REGS(dst, reg))                                  if (!(flags & KEEP_FLAGS) && IS_2_LO_REGS(dst, reg))
660                                          return push_inst16(compiler, ASRSI | RD3(dst) | RN3(reg) | (imm << 6));                                          return push_inst16(compiler, ASRSI | RD3(dst) | RN3(reg) | (imm << 6));
661                                  return push_inst32(compiler, ASR_WI | (flags & SET_FLAGS) | RD4(dst) | RM4(reg) | IMM5(imm));                                  return push_inst32(compiler, ASR_WI | (flags & SET_FLAGS) | RD4(dst) | RM4(reg) | IMM5(imm));
# Line 1076  static SLJIT_INLINE int emit_op_mem(stru Line 1101  static SLJIT_INLINE int emit_op_mem(stru
1101          return getput_arg(compiler, flags, reg, arg, argw, 0, 0);          return getput_arg(compiler, flags, reg, arg, argw, 0, 0);
1102  }  }
1103    
1104  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)
1105  {  {
1106          int size;          int size;
1107          sljit_ins push;          sljit_ins push;
# Line 1127  int sljit_emit_enter(struct sljit_compil Line 1152  int sljit_emit_enter(struct sljit_compil
1152          return SLJIT_SUCCESS;          return SLJIT_SUCCESS;
1153  }  }
1154    
1155  void sljit_fake_enter(struct sljit_compiler *compiler, int args, int temporaries, int generals, int local_size)  SLJIT_API_FUNC_ATTRIBUTE void sljit_set_context(struct sljit_compiler *compiler, int args, int temporaries, int generals, int local_size)
1156  {  {
1157          int size;          int size;
1158    
1159          CHECK_ERROR_VOID();          CHECK_ERROR_VOID();
1160          check_sljit_fake_enter(compiler, args, temporaries, generals, local_size);          check_sljit_set_context(compiler, args, temporaries, generals, local_size);
1161    
1162          compiler->temporaries = temporaries;          compiler->temporaries = temporaries;
1163          compiler->generals = generals;          compiler->generals = generals;
# Line 1144  void sljit_fake_enter(struct sljit_compi Line 1169  void sljit_fake_enter(struct sljit_compi
1169          compiler->local_size = local_size;          compiler->local_size = local_size;
1170  }  }
1171    
1172  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)
1173  {  {
1174          sljit_ins pop;          sljit_ins pop;
1175    
# Line 1187  int sljit_emit_return(struct sljit_compi Line 1212  int sljit_emit_return(struct sljit_compi
1212  /*  Operators                                                            */  /*  Operators                                                            */
1213  /* --------------------------------------------------------------------- */  /* --------------------------------------------------------------------- */
1214    
1215  int sljit_emit_op0(struct sljit_compiler *compiler, int op)  #ifdef __cplusplus
1216    extern "C" {
1217    #endif
1218    
1219    #if defined(__GNUC__)
1220    extern unsigned int __aeabi_uidivmod(unsigned numerator, unsigned denominator);
1221    extern unsigned int __aeabi_idivmod(unsigned numerator, unsigned denominator);
1222    #else
1223    #error "Software divmod functions are needed"
1224    #endif
1225    
1226    #ifdef __cplusplus
1227    }
1228    #endif
1229    
1230    SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_op0(struct sljit_compiler *compiler, int op)
1231  {  {
1232          CHECK_ERROR();          CHECK_ERROR();
1233          check_sljit_emit_op0(compiler, op);          check_sljit_emit_op0(compiler, op);
# Line 1200  int sljit_emit_op0(struct sljit_compiler Line 1240  int sljit_emit_op0(struct sljit_compiler
1240          case SLJIT_NOP:          case SLJIT_NOP:
1241                  push_inst16(compiler, NOP);                  push_inst16(compiler, NOP);
1242                  break;                  break;
1243            case SLJIT_UMUL:
1244            case SLJIT_SMUL:
1245                    return push_inst32(compiler, (op == SLJIT_UMUL ? UMULL : SMULL)
1246                            | (reg_map[SLJIT_TEMPORARY_REG2] << 8)
1247                            | (reg_map[SLJIT_TEMPORARY_REG1] << 12)
1248                            | (reg_map[SLJIT_TEMPORARY_REG1] << 16)
1249                            | reg_map[SLJIT_TEMPORARY_REG2]);
1250            case SLJIT_UDIV:
1251            case SLJIT_SDIV:
1252                    if (compiler->temporaries >= 4) {
1253                            FAIL_IF(push_inst32(compiler, 0xf84d2d04 /* str r2, [sp, #-4]! */));
1254                            FAIL_IF(push_inst32(compiler, 0xf84dcd04 /* str ip, [sp, #-4]! */));
1255                    } else if (compiler->temporaries >= 3)
1256                            FAIL_IF(push_inst32(compiler, 0xf84d2d08 /* str r2, [sp, #-8]! */));
1257    #if defined(__GNUC__)
1258                    FAIL_IF(sljit_emit_ijump(compiler, SLJIT_FAST_CALL, SLJIT_IMM,
1259                            (op == SLJIT_UDIV ? SLJIT_FUNC_OFFSET(__aeabi_uidivmod) : SLJIT_FUNC_OFFSET(__aeabi_idivmod))));
1260    #else
1261    #error "Software divmod functions are needed"
1262    #endif
1263                    if (compiler->temporaries >= 4) {
1264                            FAIL_IF(push_inst32(compiler, 0xf85dcb04 /* ldr ip, [sp], #4 */));
1265                            return push_inst32(compiler, 0xf85d2b04 /* ldr r2, [sp], #4 */);
1266                    } else if (compiler->temporaries >= 3)
1267                            return push_inst32(compiler, 0xf85d2b08 /* ldr r2, [sp], #8 */);
1268                    return SLJIT_SUCCESS;
1269          }          }
1270    
1271          return SLJIT_SUCCESS;          return SLJIT_SUCCESS;
1272  }  }
1273    
1274  int sljit_emit_op1(struct sljit_compiler *compiler, int op,  SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_op1(struct sljit_compiler *compiler, int op,
1275          int dst, sljit_w dstw,          int dst, sljit_w dstw,
1276          int src, sljit_w srcw)          int src, sljit_w srcw)
1277  {  {
# Line 1332  int sljit_emit_op1(struct sljit_compiler Line 1398  int sljit_emit_op1(struct sljit_compiler
1398          return SLJIT_SUCCESS;          return SLJIT_SUCCESS;
1399  }  }
1400    
1401  int sljit_emit_op2(struct sljit_compiler *compiler, int op,  SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_op2(struct sljit_compiler *compiler, int op,
1402          int dst, sljit_w dstw,          int dst, sljit_w dstw,
1403          int src1, sljit_w src1w,          int src1, sljit_w src1w,
1404          int src2, sljit_w src2w)          int src2, sljit_w src2w)
# Line 1411  int sljit_emit_op2(struct sljit_compiler Line 1477  int sljit_emit_op2(struct sljit_compiler
1477          return SLJIT_SUCCESS;          return SLJIT_SUCCESS;
1478  }  }
1479    
1480    SLJIT_API_FUNC_ATTRIBUTE int sljit_get_register_index(int reg)
1481    {
1482            check_sljit_get_register_index(reg);
1483            return reg_map[reg];
1484    }
1485    
1486    SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_op_custom(struct sljit_compiler *compiler,
1487            void *instruction, int size)
1488    {
1489            CHECK_ERROR();
1490            check_sljit_emit_op_custom(compiler, instruction, size);
1491            SLJIT_ASSERT(size == 2 || size == 4);
1492    
1493            if (size == 2)
1494                    return push_inst16(compiler, *(sljit_uh*)instruction);
1495            return push_inst32(compiler, *(sljit_ins*)instruction);
1496    }
1497    
1498  /* --------------------------------------------------------------------- */  /* --------------------------------------------------------------------- */
1499  /*  Floating point operators                                             */  /*  Floating point operators                                             */
1500  /* --------------------------------------------------------------------- */  /* --------------------------------------------------------------------- */
1501    
1502  int sljit_is_fpu_available(void)  SLJIT_API_FUNC_ATTRIBUTE int sljit_is_fpu_available(void)
1503  {  {
1504          return 1;          return 1;
1505  }  }
# Line 1470  static int emit_fop_mem(struct sljit_com Line 1554  static int emit_fop_mem(struct sljit_com
1554          return push_inst32(compiler, inst | 0x800000 | RN4(TMP_REG3) | DD4(reg));          return push_inst32(compiler, inst | 0x800000 | RN4(TMP_REG3) | DD4(reg));
1555  }  }
1556    
1557  int sljit_emit_fop1(struct sljit_compiler *compiler, int op,  SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_fop1(struct sljit_compiler *compiler, int op,
1558          int dst, sljit_w dstw,          int dst, sljit_w dstw,
1559          int src, sljit_w srcw)          int src, sljit_w srcw)
1560  {  {
# Line 1519  int sljit_emit_fop1(struct sljit_compile Line 1603  int sljit_emit_fop1(struct sljit_compile
1603          return SLJIT_SUCCESS;          return SLJIT_SUCCESS;
1604  }  }
1605    
1606  int sljit_emit_fop2(struct sljit_compiler *compiler, int op,  SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_fop2(struct sljit_compiler *compiler, int op,
1607          int dst, sljit_w dstw,          int dst, sljit_w dstw,
1608          int src1, sljit_w src1w,          int src1, sljit_w src1w,
1609          int src2, sljit_w src2w)          int src2, sljit_w src2w)
# Line 1566  int sljit_emit_fop2(struct sljit_compile Line 1650  int sljit_emit_fop2(struct sljit_compile
1650  /*  Other instructions                                                   */  /*  Other instructions                                                   */
1651  /* --------------------------------------------------------------------- */  /* --------------------------------------------------------------------- */
1652    
1653  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)
1654  {  {
1655          int size;          int size;
1656    
# Line 1596  int sljit_emit_fast_enter(struct sljit_c Line 1680  int sljit_emit_fast_enter(struct sljit_c
1680          return SLJIT_SUCCESS;          return SLJIT_SUCCESS;
1681  }  }
1682    
1683  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)
1684  {  {
1685          CHECK_ERROR();          CHECK_ERROR();
1686          check_sljit_emit_fast_return(compiler, src, srcw);          check_sljit_emit_fast_return(compiler, src, srcw);
# Line 1676  static sljit_uw get_cc(int type) Line 1760  static sljit_uw get_cc(int type)
1760          }          }
1761  }  }
1762    
1763  struct sljit_label* sljit_emit_label(struct sljit_compiler *compiler)  SLJIT_API_FUNC_ATTRIBUTE struct sljit_label* sljit_emit_label(struct sljit_compiler *compiler)
1764  {  {
1765          struct sljit_label *label;          struct sljit_label *label;
1766    
# Line 1692  struct sljit_label* sljit_emit_label(str Line 1776  struct sljit_label* sljit_emit_label(str
1776          return label;          return label;
1777  }  }
1778    
1779  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)
1780  {  {
1781          struct sljit_jump *jump;          struct sljit_jump *jump;
1782          int cc;          int cc;
# Line 1725  struct sljit_jump* sljit_emit_jump(struc Line 1809  struct sljit_jump* sljit_emit_jump(struc
1809          return jump;          return jump;
1810  }  }
1811    
1812  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)
1813  {  {
1814          struct sljit_jump *jump;          struct sljit_jump *jump;
1815    
# Line 1736  int sljit_emit_ijump(struct sljit_compil Line 1820  int sljit_emit_ijump(struct sljit_compil
1820          if (src & SLJIT_IMM) {          if (src & SLJIT_IMM) {
1821                  jump = (struct sljit_jump*)ensure_abuf(compiler, sizeof(struct sljit_jump));                  jump = (struct sljit_jump*)ensure_abuf(compiler, sizeof(struct sljit_jump));
1822                  FAIL_IF(!jump);                  FAIL_IF(!jump);
1823                  set_jump(jump, compiler, JUMP_ADDR | ((type >= SLJIT_CALL0) ? IS_BL : 0));                  set_jump(jump, compiler, JUMP_ADDR | ((type >= SLJIT_FAST_CALL) ? IS_BL : 0));
1824                  jump->u.target = srcw;                  jump->u.target = srcw;
1825    
1826                  FAIL_IF(emit_imm32_const(compiler, TMP_REG1, 0));                  FAIL_IF(emit_imm32_const(compiler, TMP_REG1, 0));
1827                  jump->addr = compiler->size;                  jump->addr = compiler->size;
1828                  if (type <= SLJIT_JUMP)                  FAIL_IF(push_inst16(compiler, (type <= SLJIT_JUMP ? BX : BLX) | RN3(TMP_REG1)));
                         FAIL_IF(push_inst16(compiler, BX | RN3(TMP_REG1)));  
                 else  
                         FAIL_IF(push_inst16(compiler, BLX | RN3(TMP_REG1)));  
1829          }          }
1830          else {          else {
1831                  if (src >= SLJIT_TEMPORARY_REG1 && src <= SLJIT_NO_REGISTERS) {                  if (src >= SLJIT_TEMPORARY_REG1 && src <= SLJIT_NO_REGISTERS)
1832                          if (type <= SLJIT_JUMP)                          return push_inst16(compiler, (type <= SLJIT_JUMP ? BX : BLX) | RN3(src));
                                 return push_inst16(compiler, BX | RN3(src));  
                         else  
                                 return push_inst16(compiler, BLX | RN3(src));  
                 }  
1833    
1834                  FAIL_IF(emit_op_mem(compiler, WORD_SIZE, type <= SLJIT_JUMP ? TMP_PC : TMP_REG1, src, srcw));                  FAIL_IF(emit_op_mem(compiler, WORD_SIZE, type <= SLJIT_JUMP ? TMP_PC : TMP_REG1, src, srcw));
1835                  if (type >= SLJIT_CALL0)                  if (type >= SLJIT_FAST_CALL)
1836                          return push_inst16(compiler, BLX | RN3(TMP_REG1));                          return push_inst16(compiler, BLX | RN3(TMP_REG1));
1837          }          }
1838          return SLJIT_SUCCESS;          return SLJIT_SUCCESS;
1839  }  }
1840    
1841  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)
1842  {  {
1843          int dst_r;          int dst_r;
1844          sljit_uw cc;          sljit_uw cc;
# Line 1808  int sljit_emit_cond_value(struct sljit_c Line 1885  int sljit_emit_cond_value(struct sljit_c
1885          return SLJIT_SUCCESS;          return SLJIT_SUCCESS;
1886  }  }
1887    
1888  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)
1889  {  {
1890          struct sljit_const *const_;          struct sljit_const *const_;
1891          int dst_r;          int dst_r;
# Line 1828  struct sljit_const* sljit_emit_const(str Line 1905  struct sljit_const* sljit_emit_const(str
1905          return const_;          return const_;
1906  }  }
1907    
1908  void sljit_set_jump_addr(sljit_uw addr, sljit_uw new_addr)  SLJIT_API_FUNC_ATTRIBUTE void sljit_set_jump_addr(sljit_uw addr, sljit_uw new_addr)
1909  {  {
1910          inline_set_jump_addr(addr, new_addr, 1);          inline_set_jump_addr(addr, new_addr, 1);
1911  }  }
1912    
1913  void sljit_set_const(sljit_uw addr, sljit_w new_constant)  SLJIT_API_FUNC_ATTRIBUTE void sljit_set_const(sljit_uw addr, sljit_w new_constant)
1914  {  {
1915          sljit_uh* inst = (sljit_uh*)addr;          sljit_uh* inst = (sljit_uh*)addr;
1916          modify_imm32_const(inst, new_constant);          modify_imm32_const(inst, new_constant);

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

  ViewVC Help
Powered by ViewVC 1.1.5