/[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 1182 by zherczeg, Sun Oct 28 05:22:32 2012 UTC revision 1451 by zherczeg, Tue Jan 21 01:49:14 2014 UTC
# Line 89  Line 89 
89          ((op) & (SLJIT_SET_E | SLJIT_SET_S | SLJIT_SET_U | SLJIT_SET_O | SLJIT_SET_C))          ((op) & (SLJIT_SET_E | SLJIT_SET_S | SLJIT_SET_U | SLJIT_SET_O | SLJIT_SET_C))
90    
91  #define GET_ALL_FLAGS(op) \  #define GET_ALL_FLAGS(op) \
92          ((op) & (SLJIT_SET_E | SLJIT_SET_S | SLJIT_SET_U | SLJIT_SET_O | SLJIT_SET_C | SLJIT_KEEP_FLAGS))          ((op) & (SLJIT_INT_OP | SLJIT_SET_E | SLJIT_SET_S | SLJIT_SET_U | SLJIT_SET_O | SLJIT_SET_C | SLJIT_KEEP_FLAGS))
93    
94    #define TYPE_CAST_NEEDED(op) \
95            (((op) >= SLJIT_MOV_UB && (op) <= SLJIT_MOV_SH) || ((op) >= SLJIT_MOVU_UB && (op) <= SLJIT_MOVU_SH))
96    
97  #define BUF_SIZE        4096  #define BUF_SIZE        4096
98    
# Line 105  Line 108 
108  /* SLJIT_REWRITABLE_JUMP is 0x1000. */  /* SLJIT_REWRITABLE_JUMP is 0x1000. */
109    
110  #if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32) || (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)  #if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32) || (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
111          #define PATCH_MB        0x4  #       define PATCH_MB 0x4
112          #define PATCH_MW        0x8  #       define PATCH_MW 0x8
113  #if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)  #if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
114          #define PATCH_MD        0x10  #       define PATCH_MD 0x10
115  #endif  #endif
116  #endif  #endif
117    
118  #if (defined SLJIT_CONFIG_ARM_V5 && SLJIT_CONFIG_ARM_V5) || (defined SLJIT_CONFIG_ARM_V7 && SLJIT_CONFIG_ARM_V7)  #if (defined SLJIT_CONFIG_ARM_V5 && SLJIT_CONFIG_ARM_V5) || (defined SLJIT_CONFIG_ARM_V7 && SLJIT_CONFIG_ARM_V7)
119          #define IS_BL           0x4  #       define IS_BL            0x4
120          #define PATCH_B         0x8  #       define PATCH_B          0x8
121  #endif  #endif
122    
123  #if (defined SLJIT_CONFIG_ARM_V5 && SLJIT_CONFIG_ARM_V5)  #if (defined SLJIT_CONFIG_ARM_V5 && SLJIT_CONFIG_ARM_V5)
124          #define CPOOL_SIZE      512  #       define CPOOL_SIZE       512
125  #endif  #endif
126    
127  #if (defined SLJIT_CONFIG_ARM_THUMB2 && SLJIT_CONFIG_ARM_THUMB2)  #if (defined SLJIT_CONFIG_ARM_THUMB2 && SLJIT_CONFIG_ARM_THUMB2)
128          #define IS_COND         0x04  #       define IS_COND          0x04
129          #define IS_BL           0x08  #       define IS_BL            0x08
130          /* cannot be encoded as branch */          /* cannot be encoded as branch */
131          #define B_TYPE0         0x00  #       define B_TYPE0          0x00
132          /* conditional + imm8 */          /* conditional + imm8 */
133          #define B_TYPE1         0x10  #       define B_TYPE1          0x10
134          /* conditional + imm20 */          /* conditional + imm20 */
135          #define B_TYPE2         0x20  #       define B_TYPE2          0x20
136          /* IT + imm24 */          /* IT + imm24 */
137          #define B_TYPE3         0x30  #       define B_TYPE3          0x30
138          /* imm11 */          /* imm11 */
139          #define B_TYPE4         0x40  #       define B_TYPE4          0x40
140          /* imm24 */          /* imm24 */
141          #define B_TYPE5         0x50  #       define B_TYPE5          0x50
142          /* BL + imm24 */          /* BL + imm24 */
143          #define BL_TYPE6        0x60  #       define BL_TYPE6 0x60
144          /* 0xf00 cc code for branches */          /* 0xf00 cc code for branches */
145  #endif  #endif
146    
147  #if (defined SLJIT_CONFIG_PPC_32 && SLJIT_CONFIG_PPC_32) || (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64)  #if (defined SLJIT_CONFIG_PPC_32 && SLJIT_CONFIG_PPC_32) || (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64)
148          #define UNCOND_B        0x04  #       define UNCOND_B 0x04
149          #define PATCH_B         0x08  #       define PATCH_B          0x08
150          #define ABSOLUTE_B      0x10  #       define ABSOLUTE_B       0x10
151  #endif  #endif
152    
153  #if (defined SLJIT_CONFIG_MIPS_32 && SLJIT_CONFIG_MIPS_32)  #if (defined SLJIT_CONFIG_MIPS_32 && SLJIT_CONFIG_MIPS_32)
154          #define IS_MOVABLE      0x04  #       define IS_MOVABLE       0x04
155          #define IS_JAL          0x08  #       define IS_JAL           0x08
156          #define IS_BIT26_COND   0x10  #       define IS_BIT26_COND    0x10
157          #define IS_BIT16_COND   0x20  #       define IS_BIT16_COND    0x20
158    
159          #define IS_COND         (IS_BIT26_COND | IS_BIT16_COND)  #       define IS_COND          (IS_BIT26_COND | IS_BIT16_COND)
160    
161          #define PATCH_B         0x40  #       define PATCH_B          0x40
162          #define PATCH_J         0x80  #       define PATCH_J          0x80
163    
164          /* instruction types */          /* instruction types */
165          #define MOVABLE_INS     0  #       define MOVABLE_INS      0
166          /* 1 - 31 last destination register */          /* 1 - 31 last destination register */
167          /* no destination (i.e: store) */          /* no destination (i.e: store) */
168          #define UNMOVABLE_INS   32  #       define UNMOVABLE_INS    32
169          /* FPU status register */          /* FPU status register */
170          #define FCSR_FCC        33  #       define FCSR_FCC 33
171    #endif
172    
173    #if (defined SLJIT_CONFIG_TILEGX && SLJIT_CONFIG_TILEGX)
174    #       define IS_JAL           0x04
175    #       define IS_COND          0x08
176    
177    #       define PATCH_B          0x10
178    #       define PATCH_J          0x20
179  #endif  #endif
180    
181  #if (defined SLJIT_CONFIG_SPARC_32 && SLJIT_CONFIG_SPARC_32)  #if (defined SLJIT_CONFIG_SPARC_32 && SLJIT_CONFIG_SPARC_32)
182          #define IS_MOVABLE      0x04  #       define IS_MOVABLE       0x04
183          #define IS_COND         0x08  #       define IS_COND          0x08
184          #define IS_CALL         0x10  #       define IS_CALL          0x10
185    
186          #define PATCH_B         0x20  #       define PATCH_B          0x20
187          #define PATCH_CALL      0x40  #       define PATCH_CALL       0x40
188    
189          /* instruction types */          /* instruction types */
190          #define MOVABLE_INS     0  #       define MOVABLE_INS      0
191          /* 1 - 31 last destination register */          /* 1 - 31 last destination register */
192          /* no destination (i.e: store) */          /* no destination (i.e: store) */
193          #define UNMOVABLE_INS   32  #       define UNMOVABLE_INS    32
194    
195          #define DST_INS_MASK    0xff  #       define DST_INS_MASK     0xff
196    
197          /* ICC_SET is the same as SET_FLAGS. */          /* ICC_SET is the same as SET_FLAGS. */
198          #define ICC_IS_SET      (1 << 23)  #       define ICC_IS_SET       (1 << 23)
199          #define FCC_IS_SET      (1 << 24)  #       define FCC_IS_SET       (1 << 24)
200  #endif  #endif
201    
202  #if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)  #if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
203  #define SLJIT_HAS_VARIABLE_LOCALS_OFFSET 1  #define SLJIT_HAS_VARIABLE_LOCALS_OFFSET 1
204    #if !(defined SLJIT_X86_32_FASTCALL && SLJIT_X86_32_FASTCALL)
205    #define FIXED_LOCALS_OFFSET (3 * sizeof(sljit_sw))
206    #endif
207  #endif  #endif
208    
209  #if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)  #if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
210  #define SLJIT_HAS_FIXED_LOCALS_OFFSET 1  #define SLJIT_HAS_FIXED_LOCALS_OFFSET 1
211  #ifdef _WIN64  #ifdef _WIN64
212  #define FIXED_LOCALS_OFFSET (4 * sizeof(sljit_w))  #define FIXED_LOCALS_OFFSET ((4 + 2) * sizeof(sljit_sw))
213  #else  #else
214  #define FIXED_LOCALS_OFFSET (sizeof(sljit_w))  #define FIXED_LOCALS_OFFSET (sizeof(sljit_sw))
215  #endif  #endif
216  #endif  #endif
217    
218  #if (defined SLJIT_CONFIG_PPC_32 && SLJIT_CONFIG_PPC_32)  #if (defined SLJIT_CONFIG_PPC_32 && SLJIT_CONFIG_PPC_32)
219  #define SLJIT_HAS_FIXED_LOCALS_OFFSET 1  #define SLJIT_HAS_FIXED_LOCALS_OFFSET 1
220  #if (defined SLJIT_INDIRECT_CALL && SLJIT_INDIRECT_CALL)  #ifdef _AIX
221  #define FIXED_LOCALS_OFFSET ((6 + 8) * sizeof(sljit_w))  #define FIXED_LOCALS_OFFSET ((6 + 8) * sizeof(sljit_sw))
222  #else  #else
223  #define FIXED_LOCALS_OFFSET (2 * sizeof(sljit_w))  #define FIXED_LOCALS_OFFSET (2 * sizeof(sljit_sw))
224  #endif  #endif
225  #endif  #endif
226    
227  #if (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64)  #if (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64)
228  #define SLJIT_HAS_FIXED_LOCALS_OFFSET 1  #define SLJIT_HAS_FIXED_LOCALS_OFFSET 1
229  #define FIXED_LOCALS_OFFSET ((6 + 8) * sizeof(sljit_w))  #define FIXED_LOCALS_OFFSET ((6 + 8) * sizeof(sljit_sw))
230  #endif  #endif
231    
232  #if (defined SLJIT_CONFIG_MIPS_32 && SLJIT_CONFIG_MIPS_32)  #if (defined SLJIT_CONFIG_MIPS_32 && SLJIT_CONFIG_MIPS_32)
233  #define SLJIT_HAS_FIXED_LOCALS_OFFSET 1  #define SLJIT_HAS_FIXED_LOCALS_OFFSET 1
234  #define FIXED_LOCALS_OFFSET (4 * sizeof(sljit_w))  #define FIXED_LOCALS_OFFSET (4 * sizeof(sljit_sw))
235  #endif  #endif
236    
237  #if (defined SLJIT_CONFIG_SPARC_32 && SLJIT_CONFIG_SPARC_32)  #if (defined SLJIT_CONFIG_SPARC_32 && SLJIT_CONFIG_SPARC_32)
238  #define SLJIT_HAS_FIXED_LOCALS_OFFSET 1  #define SLJIT_HAS_FIXED_LOCALS_OFFSET 1
239  #define FIXED_LOCALS_OFFSET (23 * sizeof(sljit_w))  #define FIXED_LOCALS_OFFSET (23 * sizeof(sljit_sw))
240  #endif  #endif
241    
242  #if (defined SLJIT_HAS_VARIABLE_LOCALS_OFFSET && SLJIT_HAS_VARIABLE_LOCALS_OFFSET)  #if (defined SLJIT_HAS_VARIABLE_LOCALS_OFFSET && SLJIT_HAS_VARIABLE_LOCALS_OFFSET)
# Line 264  Line 278 
278    
279  #if (defined SLJIT_CONFIG_ARM_V5 && SLJIT_CONFIG_ARM_V5) || ((defined SLJIT_SSE2 && SLJIT_SSE2) && ((defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32) || (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)))  #if (defined SLJIT_CONFIG_ARM_V5 && SLJIT_CONFIG_ARM_V5) || ((defined SLJIT_SSE2 && SLJIT_SSE2) && ((defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32) || (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)))
280  #define SLJIT_NEEDS_COMPILER_INIT 1  #define SLJIT_NEEDS_COMPILER_INIT 1
281  static int compiler_initialized = 0;  static sljit_si compiler_initialized = 0;
282  /* A thread safe initialization. */  /* A thread safe initialization. */
283  static void init_compiler(void);  static void init_compiler(void);
284  #endif  #endif
# Line 277  SLJIT_API_FUNC_ATTRIBUTE struct sljit_co Line 291  SLJIT_API_FUNC_ATTRIBUTE struct sljit_co
291          SLJIT_ZEROMEM(compiler, sizeof(struct sljit_compiler));          SLJIT_ZEROMEM(compiler, sizeof(struct sljit_compiler));
292    
293          SLJIT_COMPILE_ASSERT(          SLJIT_COMPILE_ASSERT(
294                  sizeof(sljit_b) == 1 && sizeof(sljit_ub) == 1                  sizeof(sljit_sb) == 1 && sizeof(sljit_ub) == 1
295                  && sizeof(sljit_h) == 2 && sizeof(sljit_uh) == 2                  && sizeof(sljit_sh) == 2 && sizeof(sljit_uh) == 2
296                  && sizeof(sljit_i) == 4 && sizeof(sljit_ui) == 4                  && sizeof(sljit_si) == 4 && sizeof(sljit_ui) == 4
297                  && (sizeof(sljit_p) == 4 || sizeof(sljit_p) == 8)                  && (sizeof(sljit_p) == 4 || sizeof(sljit_p) == 8)
298                  && (sizeof(sljit_w) == 4 || sizeof(sljit_w) == 8)                  && sizeof(sljit_p) <= sizeof(sljit_sw)
299                    && (sizeof(sljit_sw) == 4 || sizeof(sljit_sw) == 8)
300                  && (sizeof(sljit_uw) == 4 || sizeof(sljit_uw) == 8),                  && (sizeof(sljit_uw) == 4 || sizeof(sljit_uw) == 8),
301                  invalid_integer_types);                  invalid_integer_types);
302            SLJIT_COMPILE_ASSERT(SLJIT_INT_OP == SLJIT_SINGLE_OP,
303                    int_op_and_single_op_must_be_the_same);
304            SLJIT_COMPILE_ASSERT(SLJIT_REWRITABLE_JUMP != SLJIT_SINGLE_OP,
305                    rewritable_jump_and_single_op_must_not_be_the_same);
306    
307          /* Only the non-zero members must be set. */          /* Only the non-zero members must be set. */
308          compiler->error = SLJIT_SUCCESS;          compiler->error = SLJIT_SUCCESS;
# Line 305  SLJIT_API_FUNC_ATTRIBUTE struct sljit_co Line 324  SLJIT_API_FUNC_ATTRIBUTE struct sljit_co
324          compiler->abuf->next = NULL;          compiler->abuf->next = NULL;
325          compiler->abuf->used_size = 0;          compiler->abuf->used_size = 0;
326    
327          compiler->temporaries = -1;          compiler->scratches = -1;
328          compiler->saveds = -1;          compiler->saveds = -1;
329    
330  #if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)  #if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
# Line 411  SLJIT_API_FUNC_ATTRIBUTE void sljit_set_ Line 430  SLJIT_API_FUNC_ATTRIBUTE void sljit_set_
430  /*  Private functions                                                    */  /*  Private functions                                                    */
431  /* --------------------------------------------------------------------- */  /* --------------------------------------------------------------------- */
432    
433  static void* ensure_buf(struct sljit_compiler *compiler, int size)  static void* ensure_buf(struct sljit_compiler *compiler, sljit_uw size)
434  {  {
435          sljit_ub *ret;          sljit_ub *ret;
436          struct sljit_memory_fragment *new_frag;          struct sljit_memory_fragment *new_frag;
437    
438          if (compiler->buf->used_size + size <= (int)(BUF_SIZE - sizeof(sljit_uw) - sizeof(void*))) {          SLJIT_ASSERT(size <= 256);
439            if (compiler->buf->used_size + size <= (BUF_SIZE - (sljit_uw)SLJIT_OFFSETOF(struct sljit_memory_fragment, memory))) {
440                  ret = compiler->buf->memory + compiler->buf->used_size;                  ret = compiler->buf->memory + compiler->buf->used_size;
441                  compiler->buf->used_size += size;                  compiler->buf->used_size += size;
442                  return ret;                  return ret;
# Line 429  static void* ensure_buf(struct sljit_com Line 449  static void* ensure_buf(struct sljit_com
449          return new_frag->memory;          return new_frag->memory;
450  }  }
451    
452  static void* ensure_abuf(struct sljit_compiler *compiler, int size)  static void* ensure_abuf(struct sljit_compiler *compiler, sljit_uw size)
453  {  {
454          sljit_ub *ret;          sljit_ub *ret;
455          struct sljit_memory_fragment *new_frag;          struct sljit_memory_fragment *new_frag;
456    
457          if (compiler->abuf->used_size + size <= (int)(ABUF_SIZE - sizeof(sljit_uw) - sizeof(void*))) {          SLJIT_ASSERT(size <= 256);
458            if (compiler->abuf->used_size + size <= (ABUF_SIZE - (sljit_uw)SLJIT_OFFSETOF(struct sljit_memory_fragment, memory))) {
459                  ret = compiler->abuf->memory + compiler->abuf->used_size;                  ret = compiler->abuf->memory + compiler->abuf->used_size;
460                  compiler->abuf->used_size += size;                  compiler->abuf->used_size += size;
461                  return ret;                  return ret;
# Line 447  static void* ensure_abuf(struct sljit_co Line 468  static void* ensure_abuf(struct sljit_co
468          return new_frag->memory;          return new_frag->memory;
469  }  }
470    
471  SLJIT_API_FUNC_ATTRIBUTE void* sljit_alloc_memory(struct sljit_compiler *compiler, int size)  SLJIT_API_FUNC_ATTRIBUTE void* sljit_alloc_memory(struct sljit_compiler *compiler, sljit_si size)
472  {  {
473          CHECK_ERROR_PTR();          CHECK_ERROR_PTR();
474    
# Line 490  static SLJIT_INLINE void set_label(struc Line 511  static SLJIT_INLINE void set_label(struc
511          compiler->last_label = label;          compiler->last_label = label;
512  }  }
513    
514  static SLJIT_INLINE void set_jump(struct sljit_jump *jump, struct sljit_compiler *compiler, int flags)  static SLJIT_INLINE void set_jump(struct sljit_jump *jump, struct sljit_compiler *compiler, sljit_si flags)
515  {  {
516          jump->next = NULL;          jump->next = NULL;
517          jump->flags = flags;          jump->flags = flags;
# Line 535  static SLJIT_INLINE void set_const(struc Line 556  static SLJIT_INLINE void set_const(struc
556          case SLJIT_MUL: \          case SLJIT_MUL: \
557                  SLJIT_ASSERT(!(op & (SLJIT_SET_E | SLJIT_SET_S | SLJIT_SET_U | SLJIT_SET_C))); \                  SLJIT_ASSERT(!(op & (SLJIT_SET_E | SLJIT_SET_S | SLJIT_SET_U | SLJIT_SET_C))); \
558                  break; \                  break; \
559          case SLJIT_FCMP: \          case SLJIT_CMPD: \
560                  SLJIT_ASSERT(!(op & (SLJIT_INT_OP | SLJIT_SET_U | SLJIT_SET_O | SLJIT_SET_C | SLJIT_KEEP_FLAGS))); \                  SLJIT_ASSERT(!(op & (SLJIT_SET_U | SLJIT_SET_O | SLJIT_SET_C | SLJIT_KEEP_FLAGS))); \
561                  SLJIT_ASSERT((op & (SLJIT_SET_E | SLJIT_SET_S))); \                  SLJIT_ASSERT((op & (SLJIT_SET_E | SLJIT_SET_S))); \
562                  break; \                  break; \
563          case SLJIT_ADD: \          case SLJIT_ADD: \
# Line 548  static SLJIT_INLINE void set_const(struc Line 569  static SLJIT_INLINE void set_const(struc
569          case SLJIT_SUBC: \          case SLJIT_SUBC: \
570                  SLJIT_ASSERT(!(op & (SLJIT_SET_E | SLJIT_SET_S | SLJIT_SET_U | SLJIT_SET_O))); \                  SLJIT_ASSERT(!(op & (SLJIT_SET_E | SLJIT_SET_S | SLJIT_SET_U | SLJIT_SET_O))); \
571                  break; \                  break; \
572          default: \          case SLJIT_BREAKPOINT: \
573            case SLJIT_NOP: \
574            case SLJIT_UMUL: \
575            case SLJIT_SMUL: \
576            case SLJIT_MOV: \
577            case SLJIT_MOV_P: \
578            case SLJIT_MOVU: \
579            case SLJIT_MOVU_P: \
580                  /* Nothing allowed */ \                  /* Nothing allowed */ \
581                  SLJIT_ASSERT(!(op & (SLJIT_INT_OP | SLJIT_SET_E | SLJIT_SET_S | SLJIT_SET_U | SLJIT_SET_O | SLJIT_SET_C | SLJIT_KEEP_FLAGS))); \                  SLJIT_ASSERT(!(op & (SLJIT_INT_OP | SLJIT_SET_E | SLJIT_SET_S | SLJIT_SET_U | SLJIT_SET_O | SLJIT_SET_C | SLJIT_KEEP_FLAGS))); \
582                  break; \                  break; \
583            default: \
584                    /* Only SLJIT_INT_OP or SLJIT_SINGLE_OP is allowed. */ \
585                    SLJIT_ASSERT(!(op & (SLJIT_SET_E | SLJIT_SET_S | SLJIT_SET_U | SLJIT_SET_O | SLJIT_SET_C | SLJIT_KEEP_FLAGS))); \
586                    break; \
587          }          }
588    
589  #define FUNCTION_CHECK_IS_REG(r) \  #define FUNCTION_CHECK_IS_REG(r) \
590          ((r) == SLJIT_UNUSED || \          ((r) == SLJIT_UNUSED || \
591          ((r) >= SLJIT_TEMPORARY_REG1 && (r) <= SLJIT_TEMPORARY_REG1 - 1 + compiler->temporaries) || \          ((r) >= SLJIT_SCRATCH_REG1 && (r) <= SLJIT_SCRATCH_REG1 - 1 + compiler->scratches) || \
592          ((r) >= SLJIT_SAVED_REG1 && (r) <= SLJIT_SAVED_REG1 - 1 + compiler->saveds))          ((r) >= SLJIT_SAVED_REG1 && (r) <= SLJIT_SAVED_REG1 - 1 + compiler->saveds))
593    
594  #define FUNCTION_CHECK_SRC(p, i) \  #define FUNCTION_CHECK_SRC(p, i) \
595          SLJIT_ASSERT(compiler->temporaries != -1 && compiler->saveds != -1); \          SLJIT_ASSERT(compiler->scratches != -1 && compiler->saveds != -1); \
596          if (FUNCTION_CHECK_IS_REG(p)) \          if (FUNCTION_CHECK_IS_REG(p)) \
597                  SLJIT_ASSERT((i) == 0 && (p) != SLJIT_UNUSED); \                  SLJIT_ASSERT((i) == 0 && (p) != SLJIT_UNUSED); \
598          else if ((p) == SLJIT_IMM) \          else if ((p) == SLJIT_IMM) \
# Line 579  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_DST(p, i) \  #define FUNCTION_CHECK_DST(p, i) \
614          SLJIT_ASSERT(compiler->temporaries != -1 && compiler->saveds != -1); \          SLJIT_ASSERT(compiler->scratches != -1 && compiler->saveds != -1); \
615          if (FUNCTION_CHECK_IS_REG(p)) \          if (FUNCTION_CHECK_IS_REG(p)) \
616                  SLJIT_ASSERT((i) == 0); \                  SLJIT_ASSERT((i) == 0); \
617          else if ((p) == (SLJIT_MEM1(SLJIT_LOCALS_REG))) \          else if ((p) == (SLJIT_MEM1(SLJIT_LOCALS_REG))) \
# Line 596  static SLJIT_INLINE void set_const(struc Line 628  static SLJIT_INLINE void set_const(struc
628                  SLJIT_ASSERT_STOP();                  SLJIT_ASSERT_STOP();
629    
630  #define FUNCTION_FCHECK(p, i) \  #define FUNCTION_FCHECK(p, i) \
631          if ((p) >= SLJIT_FLOAT_REG1 && (p) <= SLJIT_FLOAT_REG4) \          if ((p) >= SLJIT_FLOAT_REG1 && (p) <= SLJIT_FLOAT_REG6) \
632                  SLJIT_ASSERT(i == 0); \                  SLJIT_ASSERT(i == 0); \
633          else if ((p) & SLJIT_MEM) { \          else if ((p) & SLJIT_MEM) { \
634                  SLJIT_ASSERT(FUNCTION_CHECK_IS_REG((p) & 0xf)); \                  SLJIT_ASSERT(FUNCTION_CHECK_IS_REG((p) & 0xf)); \
# Line 611  static SLJIT_INLINE void set_const(struc Line 643  static SLJIT_INLINE void set_const(struc
643                  SLJIT_ASSERT_STOP();                  SLJIT_ASSERT_STOP();
644    
645  #define FUNCTION_CHECK_OP1() \  #define FUNCTION_CHECK_OP1() \
646          if (GET_OPCODE(op) >= SLJIT_MOV && GET_OPCODE(op) <= SLJIT_MOVU_P) { \          if (GET_OPCODE(op) >= SLJIT_MOVU && GET_OPCODE(op) <= SLJIT_MOVU_P) { \
                 SLJIT_ASSERT(!GET_ALL_FLAGS(op)); \  
         } \  
         if (GET_OPCODE(op) >= SLJIT_MOVU && GET_OPCODE(op) <= SLJIT_MOVU_P) { \  
647                  SLJIT_ASSERT(!(src & SLJIT_MEM) || (src & 0xf) != SLJIT_LOCALS_REG); \                  SLJIT_ASSERT(!(src & SLJIT_MEM) || (src & 0xf) != SLJIT_LOCALS_REG); \
648                  SLJIT_ASSERT(!(dst & SLJIT_MEM) || (dst & 0xf) != SLJIT_LOCALS_REG); \                  SLJIT_ASSERT(!(dst & SLJIT_MEM) || (dst & 0xf) != SLJIT_LOCALS_REG); \
649                  if ((src & SLJIT_MEM) && (src & 0xf)) \                  if ((src & SLJIT_MEM) && (src & 0xf)) \
# Line 631  SLJIT_API_FUNC_ATTRIBUTE void sljit_comp Line 660  SLJIT_API_FUNC_ATTRIBUTE void sljit_comp
660  }  }
661    
662  static char* reg_names[] = {  static char* reg_names[] = {
663          (char*)"<noreg>", (char*)"t1", (char*)"t2", (char*)"t3",          (char*)"unused", (char*)"s1", (char*)"s2", (char*)"s3",
664          (char*)"te1", (char*)"te2", (char*)"s1", (char*)"s2",          (char*)"se1", (char*)"se2", (char*)"p1", (char*)"p2",
665          (char*)"s3", (char*)"se1", (char*)"se2", (char*)"lcr"          (char*)"p3", (char*)"pe1", (char*)"pe2", (char*)"lc"
666  };  };
667    
668  static char* freg_names[] = {  static char* freg_names[] = {
669          (char*)"<noreg>", (char*)"float_r1", (char*)"float_r2", (char*)"float_r3", (char*)"float_r4"          (char*)"unused", (char*)"f1", (char*)"f2", (char*)"f3",
670            (char*)"f4", (char*)"f5", (char*)"f6"
671  };  };
672    
673  #if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64) || (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64)  #if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64) || (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64)
674  #ifdef _WIN64  #ifdef _WIN64
675          #define SLJIT_PRINT_D   "I64"  #       define SLJIT_PRINT_D    "I64"
676  #else  #else
677          #define SLJIT_PRINT_D   "l"  #       define SLJIT_PRINT_D    "l"
678  #endif  #endif
679  #else  #else
680          #define SLJIT_PRINT_D   ""  #       define SLJIT_PRINT_D    ""
681  #endif  #endif
682    
683  #define sljit_verbose_param(p, i) \  #define sljit_verbose_param(p, i) \
# Line 708  static SLJIT_CONST char* op_names[] = { Line 738  static SLJIT_CONST char* op_names[] = {
738          (char*)"mul", (char*)"and", (char*)"or", (char*)"xor",          (char*)"mul", (char*)"and", (char*)"or", (char*)"xor",
739          (char*)"shl", (char*)"lshr", (char*)"ashr",          (char*)"shl", (char*)"lshr", (char*)"ashr",
740          /* fop1 */          /* fop1 */
741          (char*)"fcmp", (char*)"fmov", (char*)"fneg", (char*)"fabs",          (char*)"cmp", (char*)"mov", (char*)"neg", (char*)"abs",
742          /* fop2 */          /* fop2 */
743          (char*)"fadd", (char*)"fsub", (char*)"fmul", (char*)"fdiv"          (char*)"add", (char*)"sub", (char*)"mul", (char*)"div"
744  };  };
745    
746  static char* jump_names[] = {  static char* jump_names[] = {
747          (char*)"c_equal", (char*)"c_not_equal",          (char*)"equal", (char*)"not_equal",
748          (char*)"c_less", (char*)"c_greater_equal",          (char*)"less", (char*)"greater_equal",
749          (char*)"c_greater", (char*)"c_less_equal",          (char*)"greater", (char*)"less_equal",
750          (char*)"c_sig_less", (char*)"c_sig_greater_equal",          (char*)"sig_less", (char*)"sig_greater_equal",
751          (char*)"c_sig_greater", (char*)"c_sig_less_equal",          (char*)"sig_greater", (char*)"sig_less_equal",
752          (char*)"c_overflow", (char*)"c_not_overflow",          (char*)"overflow", (char*)"not_overflow",
753          (char*)"c_mul_overflow", (char*)"c_mul_not_overflow",          (char*)"mul_overflow", (char*)"mul_not_overflow",
754          (char*)"c_float_equal", (char*)"c_float_not_equal",          (char*)"float_equal", (char*)"float_not_equal",
755          (char*)"c_float_less", (char*)"c_float_greater_equal",          (char*)"float_less", (char*)"float_greater_equal",
756          (char*)"c_float_greater", (char*)"c_float_less_equal",          (char*)"float_greater", (char*)"float_less_equal",
757          (char*)"c_float_nan", (char*)"c_float_not_nan",          (char*)"float_unordered", (char*)"float_ordered",
758          (char*)"jump", (char*)"fast_call",          (char*)"jump", (char*)"fast_call",
759          (char*)"call0", (char*)"call1", (char*)"call2", (char*)"call3"          (char*)"call0", (char*)"call1", (char*)"call2", (char*)"call3"
760  };  };
# Line 754  static SLJIT_INLINE void check_sljit_gen Line 784  static SLJIT_INLINE void check_sljit_gen
784  #endif  #endif
785  }  }
786    
787  static SLJIT_INLINE void check_sljit_emit_enter(struct sljit_compiler *compiler, int args, int temporaries, int saveds, int local_size)  static SLJIT_INLINE void check_sljit_emit_enter(struct sljit_compiler *compiler, sljit_si args, sljit_si scratches, sljit_si saveds, sljit_si local_size)
788  {  {
789          /* If debug and verbose are disabled, all arguments are unused. */          /* If debug and verbose are disabled, all arguments are unused. */
790          SLJIT_UNUSED_ARG(compiler);          SLJIT_UNUSED_ARG(compiler);
791          SLJIT_UNUSED_ARG(args);          SLJIT_UNUSED_ARG(args);
792          SLJIT_UNUSED_ARG(temporaries);          SLJIT_UNUSED_ARG(scratches);
793          SLJIT_UNUSED_ARG(saveds);          SLJIT_UNUSED_ARG(saveds);
794          SLJIT_UNUSED_ARG(local_size);          SLJIT_UNUSED_ARG(local_size);
795    
796          SLJIT_ASSERT(args >= 0 && args <= 3);          SLJIT_ASSERT(args >= 0 && args <= 3);
797          SLJIT_ASSERT(temporaries >= 0 && temporaries <= SLJIT_NO_TMP_REGISTERS);          SLJIT_ASSERT(scratches >= 0 && scratches <= SLJIT_NO_TMP_REGISTERS);
798          SLJIT_ASSERT(saveds >= 0 && saveds <= SLJIT_NO_GEN_REGISTERS);          SLJIT_ASSERT(saveds >= 0 && saveds <= SLJIT_NO_GEN_REGISTERS);
799          SLJIT_ASSERT(args <= saveds);          SLJIT_ASSERT(args <= saveds);
800          SLJIT_ASSERT(local_size >= 0 && local_size <= SLJIT_MAX_LOCAL_SIZE);          SLJIT_ASSERT(local_size >= 0 && local_size <= SLJIT_MAX_LOCAL_SIZE);
801  #if (defined SLJIT_VERBOSE && SLJIT_VERBOSE)  #if (defined SLJIT_VERBOSE && SLJIT_VERBOSE)
802          if (SLJIT_UNLIKELY(!!compiler->verbose))          if (SLJIT_UNLIKELY(!!compiler->verbose))
803                  fprintf(compiler->verbose, "  enter args=%d temporaries=%d saveds=%d local_size=%d\n", args, temporaries, saveds, local_size);                  fprintf(compiler->verbose, "  enter args=%d scratches=%d saveds=%d local_size=%d\n", args, scratches, saveds, local_size);
804  #endif  #endif
805  }  }
806    
807  static SLJIT_INLINE void check_sljit_set_context(struct sljit_compiler *compiler, int args, int temporaries, int saveds, int local_size)  static SLJIT_INLINE void check_sljit_set_context(struct sljit_compiler *compiler, sljit_si args, sljit_si scratches, sljit_si saveds, sljit_si local_size)
808  {  {
809          /* If debug and verbose are disabled, all arguments are unused. */          /* If debug and verbose are disabled, all arguments are unused. */
810          SLJIT_UNUSED_ARG(compiler);          SLJIT_UNUSED_ARG(compiler);
811          SLJIT_UNUSED_ARG(args);          SLJIT_UNUSED_ARG(args);
812          SLJIT_UNUSED_ARG(temporaries);          SLJIT_UNUSED_ARG(scratches);
813          SLJIT_UNUSED_ARG(saveds);          SLJIT_UNUSED_ARG(saveds);
814          SLJIT_UNUSED_ARG(local_size);          SLJIT_UNUSED_ARG(local_size);
815    
# Line 791  static SLJIT_INLINE void check_sljit_set Line 821  static SLJIT_INLINE void check_sljit_set
821  #endif  #endif
822    
823          SLJIT_ASSERT(args >= 0 && args <= 3);          SLJIT_ASSERT(args >= 0 && args <= 3);
824          SLJIT_ASSERT(temporaries >= 0 && temporaries <= SLJIT_NO_TMP_REGISTERS);          SLJIT_ASSERT(scratches >= 0 && scratches <= SLJIT_NO_TMP_REGISTERS);
825          SLJIT_ASSERT(saveds >= 0 && saveds <= SLJIT_NO_GEN_REGISTERS);          SLJIT_ASSERT(saveds >= 0 && saveds <= SLJIT_NO_GEN_REGISTERS);
826          SLJIT_ASSERT(args <= saveds);          SLJIT_ASSERT(args <= saveds);
827          SLJIT_ASSERT(local_size >= 0 && local_size <= SLJIT_MAX_LOCAL_SIZE);          SLJIT_ASSERT(local_size >= 0 && local_size <= SLJIT_MAX_LOCAL_SIZE);
828  #if (defined SLJIT_VERBOSE && SLJIT_VERBOSE)  #if (defined SLJIT_VERBOSE && SLJIT_VERBOSE)
829          if (SLJIT_UNLIKELY(!!compiler->verbose))          if (SLJIT_UNLIKELY(!!compiler->verbose))
830                  fprintf(compiler->verbose, "  set_context args=%d temporaries=%d saveds=%d local_size=%d\n", args, temporaries, saveds, local_size);                  fprintf(compiler->verbose, "  set_context args=%d scratches=%d saveds=%d local_size=%d\n", args, scratches, saveds, local_size);
831  #endif  #endif
832  }  }
833    
834  static SLJIT_INLINE void check_sljit_emit_return(struct sljit_compiler *compiler, int op, int src, sljit_w srcw)  static SLJIT_INLINE void check_sljit_emit_return(struct sljit_compiler *compiler, sljit_si op, sljit_si src, sljit_sw srcw)
835  {  {
836          /* If debug and verbose are disabled, all arguments are unused. */          /* If debug and verbose are disabled, all arguments are unused. */
837          SLJIT_UNUSED_ARG(compiler);          SLJIT_UNUSED_ARG(compiler);
# Line 830  static SLJIT_INLINE void check_sljit_emi Line 860  static SLJIT_INLINE void check_sljit_emi
860  #endif  #endif
861  }  }
862    
863  static SLJIT_INLINE void check_sljit_emit_fast_enter(struct sljit_compiler *compiler, int dst, sljit_w dstw)  static SLJIT_INLINE void check_sljit_emit_fast_enter(struct sljit_compiler *compiler, sljit_si dst, sljit_sw dstw)
864  {  {
865          /* If debug and verbose are disabled, all arguments are unused. */          /* If debug and verbose are disabled, all arguments are unused. */
866          SLJIT_UNUSED_ARG(compiler);          SLJIT_UNUSED_ARG(compiler);
# Line 849  static SLJIT_INLINE void check_sljit_emi Line 879  static SLJIT_INLINE void check_sljit_emi
879  #endif  #endif
880  }  }
881    
882  static SLJIT_INLINE void check_sljit_emit_fast_return(struct sljit_compiler *compiler, int src, sljit_w srcw)  static SLJIT_INLINE void check_sljit_emit_fast_return(struct sljit_compiler *compiler, sljit_si src, sljit_sw srcw)
883  {  {
884          /* If debug and verbose are disabled, all arguments are unused. */          /* If debug and verbose are disabled, all arguments are unused. */
885          SLJIT_UNUSED_ARG(compiler);          SLJIT_UNUSED_ARG(compiler);
# Line 868  static SLJIT_INLINE void check_sljit_emi Line 898  static SLJIT_INLINE void check_sljit_emi
898  #endif  #endif
899  }  }
900    
901  static SLJIT_INLINE void check_sljit_emit_op0(struct sljit_compiler *compiler, int op)  static SLJIT_INLINE void check_sljit_emit_op0(struct sljit_compiler *compiler, sljit_si op)
902  {  {
903          /* If debug and verbose are disabled, all arguments are unused. */          /* If debug and verbose are disabled, all arguments are unused. */
904          SLJIT_UNUSED_ARG(compiler);          SLJIT_UNUSED_ARG(compiler);
# Line 882  static SLJIT_INLINE void check_sljit_emi Line 912  static SLJIT_INLINE void check_sljit_emi
912  #endif  #endif
913  }  }
914    
915  static SLJIT_INLINE void check_sljit_emit_op1(struct sljit_compiler *compiler, int op,  static SLJIT_INLINE void check_sljit_emit_op1(struct sljit_compiler *compiler, sljit_si op,
916          int dst, sljit_w dstw,          sljit_si dst, sljit_sw dstw,
917          int src, sljit_w srcw)          sljit_si src, sljit_sw srcw)
918  {  {
919          /* If debug and verbose are disabled, all arguments are unused. */          /* If debug and verbose are disabled, all arguments are unused. */
920          SLJIT_UNUSED_ARG(compiler);          SLJIT_UNUSED_ARG(compiler);
# Line 911  static SLJIT_INLINE void check_sljit_emi Line 941  static SLJIT_INLINE void check_sljit_emi
941  #if (defined SLJIT_VERBOSE && SLJIT_VERBOSE)  #if (defined SLJIT_VERBOSE && SLJIT_VERBOSE)
942          if (SLJIT_UNLIKELY(!!compiler->verbose)) {          if (SLJIT_UNLIKELY(!!compiler->verbose)) {
943                  fprintf(compiler->verbose, "  %s%s%s%s%s%s%s%s ", !(op & SLJIT_INT_OP) ? "" : "i", op_names[GET_OPCODE(op)],                  fprintf(compiler->verbose, "  %s%s%s%s%s%s%s%s ", !(op & SLJIT_INT_OP) ? "" : "i", op_names[GET_OPCODE(op)],
944                          !(op & SLJIT_SET_E) ? "" : "E", !(op & SLJIT_SET_S) ? "" : "S", !(op & SLJIT_SET_U) ? "" : "U", !(op & SLJIT_SET_O) ? "" : "O", !(op & SLJIT_SET_C) ? "" : "C", !(op & SLJIT_KEEP_FLAGS) ? "" : "K");                          !(op & SLJIT_SET_E) ? "" : ".e", !(op & SLJIT_SET_S) ? "" : ".s", !(op & SLJIT_SET_U) ? "" : ".u",
945                            !(op & SLJIT_SET_O) ? "" : ".o", !(op & SLJIT_SET_C) ? "" : ".c", !(op & SLJIT_KEEP_FLAGS) ? "" : ".k");
946                  sljit_verbose_param(dst, dstw);                  sljit_verbose_param(dst, dstw);
947                  fprintf(compiler->verbose, ", ");                  fprintf(compiler->verbose, ", ");
948                  sljit_verbose_param(src, srcw);                  sljit_verbose_param(src, srcw);
# Line 920  static SLJIT_INLINE void check_sljit_emi Line 951  static SLJIT_INLINE void check_sljit_emi
951  #endif  #endif
952  }  }
953    
954  static SLJIT_INLINE void check_sljit_emit_op2(struct sljit_compiler *compiler, int op,  static SLJIT_INLINE void check_sljit_emit_op2(struct sljit_compiler *compiler, sljit_si op,
955          int dst, sljit_w dstw,          sljit_si dst, sljit_sw dstw,
956          int src1, sljit_w src1w,          sljit_si src1, sljit_sw src1w,
957          int src2, sljit_w src2w)          sljit_si src2, sljit_sw src2w)
958  {  {
959          /* If debug and verbose are disabled, all arguments are unused. */          /* If debug and verbose are disabled, all arguments are unused. */
960          SLJIT_UNUSED_ARG(compiler);          SLJIT_UNUSED_ARG(compiler);
# Line 952  static SLJIT_INLINE void check_sljit_emi Line 983  static SLJIT_INLINE void check_sljit_emi
983  #if (defined SLJIT_VERBOSE && SLJIT_VERBOSE)  #if (defined SLJIT_VERBOSE && SLJIT_VERBOSE)
984          if (SLJIT_UNLIKELY(!!compiler->verbose)) {          if (SLJIT_UNLIKELY(!!compiler->verbose)) {
985                  fprintf(compiler->verbose, "  %s%s%s%s%s%s%s%s ", !(op & SLJIT_INT_OP) ? "" : "i", op_names[GET_OPCODE(op)],                  fprintf(compiler->verbose, "  %s%s%s%s%s%s%s%s ", !(op & SLJIT_INT_OP) ? "" : "i", op_names[GET_OPCODE(op)],
986                          !(op & SLJIT_SET_E) ? "" : "E", !(op & SLJIT_SET_S) ? "" : "S", !(op & SLJIT_SET_U) ? "" : "U", !(op & SLJIT_SET_O) ? "" : "O", !(op & SLJIT_SET_C) ? "" : "C", !(op & SLJIT_KEEP_FLAGS) ? "" : "K");                          !(op & SLJIT_SET_E) ? "" : ".e", !(op & SLJIT_SET_S) ? "" : ".s", !(op & SLJIT_SET_U) ? "" : ".u",
987                            !(op & SLJIT_SET_O) ? "" : ".o", !(op & SLJIT_SET_C) ? "" : ".c", !(op & SLJIT_KEEP_FLAGS) ? "" : ".k");
988                  sljit_verbose_param(dst, dstw);                  sljit_verbose_param(dst, dstw);
989                  fprintf(compiler->verbose, ", ");                  fprintf(compiler->verbose, ", ");
990                  sljit_verbose_param(src1, src1w);                  sljit_verbose_param(src1, src1w);
# Line 963  static SLJIT_INLINE void check_sljit_emi Line 995  static SLJIT_INLINE void check_sljit_emi
995  #endif  #endif
996  }  }
997    
998  static SLJIT_INLINE void check_sljit_get_register_index(int reg)  static SLJIT_INLINE void check_sljit_get_register_index(sljit_si reg)
999  {  {
1000          SLJIT_UNUSED_ARG(reg);          SLJIT_UNUSED_ARG(reg);
1001          SLJIT_ASSERT(reg > 0 && reg <= SLJIT_NO_REGISTERS);          SLJIT_ASSERT(reg > 0 && reg <= SLJIT_NO_REGISTERS);
1002  }  }
1003    
1004    static SLJIT_INLINE void check_sljit_get_float_register_index(sljit_si reg)
1005    {
1006            SLJIT_UNUSED_ARG(reg);
1007            SLJIT_ASSERT(reg > 0 && reg <= SLJIT_NO_FLOAT_REGISTERS);
1008    }
1009    
1010  static SLJIT_INLINE void check_sljit_emit_op_custom(struct sljit_compiler *compiler,  static SLJIT_INLINE void check_sljit_emit_op_custom(struct sljit_compiler *compiler,
1011          void *instruction, int size)          void *instruction, sljit_si size)
1012  {  {
1013          SLJIT_UNUSED_ARG(compiler);          SLJIT_UNUSED_ARG(compiler);
1014          SLJIT_UNUSED_ARG(instruction);          SLJIT_UNUSED_ARG(instruction);
# Line 978  static SLJIT_INLINE void check_sljit_emi Line 1016  static SLJIT_INLINE void check_sljit_emi
1016          SLJIT_ASSERT(instruction);          SLJIT_ASSERT(instruction);
1017  }  }
1018    
1019  static SLJIT_INLINE void check_sljit_emit_fop1(struct sljit_compiler *compiler, int op,  static SLJIT_INLINE void check_sljit_emit_fop1(struct sljit_compiler *compiler, sljit_si op,
1020          int dst, sljit_w dstw,          sljit_si dst, sljit_sw dstw,
1021          int src, sljit_w srcw)          sljit_si src, sljit_sw srcw)
1022  {  {
1023          /* If debug and verbose are disabled, all arguments are unused. */          /* If debug and verbose are disabled, all arguments are unused. */
1024          SLJIT_UNUSED_ARG(compiler);          SLJIT_UNUSED_ARG(compiler);
# Line 998  static SLJIT_INLINE void check_sljit_emi Line 1036  static SLJIT_INLINE void check_sljit_emi
1036  #endif  #endif
1037    
1038          SLJIT_ASSERT(sljit_is_fpu_available());          SLJIT_ASSERT(sljit_is_fpu_available());
1039          SLJIT_ASSERT(GET_OPCODE(op) >= SLJIT_FCMP && GET_OPCODE(op) <= SLJIT_FABS);          SLJIT_ASSERT(GET_OPCODE(op) >= SLJIT_CMPD && GET_OPCODE(op) <= SLJIT_ABSD);
1040  #if (defined SLJIT_DEBUG && SLJIT_DEBUG)  #if (defined SLJIT_DEBUG && SLJIT_DEBUG)
1041          FUNCTION_CHECK_OP();          FUNCTION_CHECK_OP();
1042          FUNCTION_FCHECK(src, srcw);          FUNCTION_FCHECK(src, srcw);
# Line 1006  static SLJIT_INLINE void check_sljit_emi Line 1044  static SLJIT_INLINE void check_sljit_emi
1044  #endif  #endif
1045  #if (defined SLJIT_VERBOSE && SLJIT_VERBOSE)  #if (defined SLJIT_VERBOSE && SLJIT_VERBOSE)
1046          if (SLJIT_UNLIKELY(!!compiler->verbose)) {          if (SLJIT_UNLIKELY(!!compiler->verbose)) {
1047                  fprintf(compiler->verbose, "  %s%s%s ", op_names[GET_OPCODE(op)],                  fprintf(compiler->verbose, "  %s%s%s%s ", op_names[GET_OPCODE(op)], (op & SLJIT_SINGLE_OP) ? "s" : "d",
1048                          !(op & SLJIT_SET_E) ? "" : "E", !(op & SLJIT_SET_S) ? "" : "S");                          !(op & SLJIT_SET_E) ? "" : ".e", !(op & SLJIT_SET_S) ? "" : ".s");
1049                  sljit_verbose_fparam(dst, dstw);                  sljit_verbose_fparam(dst, dstw);
1050                  fprintf(compiler->verbose, ", ");                  fprintf(compiler->verbose, ", ");
1051                  sljit_verbose_fparam(src, srcw);                  sljit_verbose_fparam(src, srcw);
# Line 1016  static SLJIT_INLINE void check_sljit_emi Line 1054  static SLJIT_INLINE void check_sljit_emi
1054  #endif  #endif
1055  }  }
1056    
1057  static SLJIT_INLINE void check_sljit_emit_fop2(struct sljit_compiler *compiler, int op,  static SLJIT_INLINE void check_sljit_emit_fop2(struct sljit_compiler *compiler, sljit_si op,
1058          int dst, sljit_w dstw,          sljit_si dst, sljit_sw dstw,
1059          int src1, sljit_w src1w,          sljit_si src1, sljit_sw src1w,
1060          int src2, sljit_w src2w)          sljit_si src2, sljit_sw src2w)
1061  {  {
1062          /* If debug and verbose are disabled, all arguments are unused. */          /* If debug and verbose are disabled, all arguments are unused. */
1063          SLJIT_UNUSED_ARG(compiler);          SLJIT_UNUSED_ARG(compiler);
# Line 1032  static SLJIT_INLINE void check_sljit_emi Line 1070  static SLJIT_INLINE void check_sljit_emi
1070          SLJIT_UNUSED_ARG(src2w);          SLJIT_UNUSED_ARG(src2w);
1071    
1072          SLJIT_ASSERT(sljit_is_fpu_available());          SLJIT_ASSERT(sljit_is_fpu_available());
1073          SLJIT_ASSERT(GET_OPCODE(op) >= SLJIT_FADD && GET_OPCODE(op) <= SLJIT_FDIV);          SLJIT_ASSERT(GET_OPCODE(op) >= SLJIT_ADDD && GET_OPCODE(op) <= SLJIT_DIVD);
1074  #if (defined SLJIT_DEBUG && SLJIT_DEBUG)  #if (defined SLJIT_DEBUG && SLJIT_DEBUG)
1075          FUNCTION_CHECK_OP();          FUNCTION_CHECK_OP();
1076          FUNCTION_FCHECK(src1, src1w);          FUNCTION_FCHECK(src1, src1w);
# Line 1041  static SLJIT_INLINE void check_sljit_emi Line 1079  static SLJIT_INLINE void check_sljit_emi
1079  #endif  #endif
1080  #if (defined SLJIT_VERBOSE && SLJIT_VERBOSE)  #if (defined SLJIT_VERBOSE && SLJIT_VERBOSE)
1081          if (SLJIT_UNLIKELY(!!compiler->verbose)) {          if (SLJIT_UNLIKELY(!!compiler->verbose)) {
1082                  fprintf(compiler->verbose, "  %s ", op_names[GET_OPCODE(op)]);                  fprintf(compiler->verbose, "  %s%s ", op_names[GET_OPCODE(op)], (op & SLJIT_SINGLE_OP) ? "s" : "d");
1083                  sljit_verbose_fparam(dst, dstw);                  sljit_verbose_fparam(dst, dstw);
1084                  fprintf(compiler->verbose, ", ");                  fprintf(compiler->verbose, ", ");
1085                  sljit_verbose_fparam(src1, src1w);                  sljit_verbose_fparam(src1, src1w);
# Line 1063  static SLJIT_INLINE void check_sljit_emi Line 1101  static SLJIT_INLINE void check_sljit_emi
1101  #endif  #endif
1102  }  }
1103    
1104  static SLJIT_INLINE void check_sljit_emit_jump(struct sljit_compiler *compiler, int type)  static SLJIT_INLINE void check_sljit_emit_jump(struct sljit_compiler *compiler, sljit_si type)
1105  {  {
1106          /* If debug and verbose are disabled, all arguments are unused. */          /* If debug and verbose are disabled, all arguments are unused. */
1107          SLJIT_UNUSED_ARG(compiler);          SLJIT_UNUSED_ARG(compiler);
# Line 1080  static SLJIT_INLINE void check_sljit_emi Line 1118  static SLJIT_INLINE void check_sljit_emi
1118          SLJIT_ASSERT((type & 0xff) >= SLJIT_C_EQUAL && (type & 0xff) <= SLJIT_CALL3);          SLJIT_ASSERT((type & 0xff) >= SLJIT_C_EQUAL && (type & 0xff) <= SLJIT_CALL3);
1119  #if (defined SLJIT_VERBOSE && SLJIT_VERBOSE)  #if (defined SLJIT_VERBOSE && SLJIT_VERBOSE)
1120          if (SLJIT_UNLIKELY(!!compiler->verbose))          if (SLJIT_UNLIKELY(!!compiler->verbose))
1121                  fprintf(compiler->verbose, "  jump%s <%s>\n", !(type & SLJIT_REWRITABLE_JUMP) ? "" : "R", jump_names[type & 0xff]);                  fprintf(compiler->verbose, "  jump%s.%s\n", !(type & SLJIT_REWRITABLE_JUMP) ? "" : ".r", jump_names[type & 0xff]);
1122  #endif  #endif
1123  }  }
1124    
1125  static SLJIT_INLINE void check_sljit_emit_cmp(struct sljit_compiler *compiler, int type,  static SLJIT_INLINE void check_sljit_emit_cmp(struct sljit_compiler *compiler, sljit_si type,
1126          int src1, sljit_w src1w,          sljit_si src1, sljit_sw src1w,
1127          int src2, sljit_w src2w)          sljit_si src2, sljit_sw src2w)
1128  {  {
1129          SLJIT_UNUSED_ARG(compiler);          SLJIT_UNUSED_ARG(compiler);
1130          SLJIT_UNUSED_ARG(type);          SLJIT_UNUSED_ARG(type);
# Line 1095  static SLJIT_INLINE void check_sljit_emi Line 1133  static SLJIT_INLINE void check_sljit_emi
1133          SLJIT_UNUSED_ARG(src2);          SLJIT_UNUSED_ARG(src2);
1134          SLJIT_UNUSED_ARG(src2w);          SLJIT_UNUSED_ARG(src2w);
1135    
1136          SLJIT_ASSERT(!(type & ~(0xff | SLJIT_INT_OP | SLJIT_REWRITABLE_JUMP)));          SLJIT_ASSERT(!(type & ~(0xff | SLJIT_REWRITABLE_JUMP | SLJIT_INT_OP)));
1137          SLJIT_ASSERT((type & 0xff) >= SLJIT_C_EQUAL && (type & 0xff) <= SLJIT_C_SIG_LESS_EQUAL);          SLJIT_ASSERT((type & 0xff) >= SLJIT_C_EQUAL && (type & 0xff) <= SLJIT_C_SIG_LESS_EQUAL);
1138  #if (defined SLJIT_DEBUG && SLJIT_DEBUG)  #if (defined SLJIT_DEBUG && SLJIT_DEBUG)
1139          FUNCTION_CHECK_SRC(src1, src1w);          FUNCTION_CHECK_SRC(src1, src1w);
# Line 1103  static SLJIT_INLINE void check_sljit_emi Line 1141  static SLJIT_INLINE void check_sljit_emi
1141  #endif  #endif
1142  #if (defined SLJIT_VERBOSE && SLJIT_VERBOSE)  #if (defined SLJIT_VERBOSE && SLJIT_VERBOSE)
1143          if (SLJIT_UNLIKELY(!!compiler->verbose)) {          if (SLJIT_UNLIKELY(!!compiler->verbose)) {
1144                  fprintf(compiler->verbose, "  %scmp%s <%s> ", !(type & SLJIT_INT_OP) ? "" : "i", !(type & SLJIT_REWRITABLE_JUMP) ? "" : "R", jump_names[type & 0xff]);                  fprintf(compiler->verbose, "  %scmp%s.%s ", !(type & SLJIT_INT_OP) ? "" : "i", !(type & SLJIT_REWRITABLE_JUMP) ? "" : ".r", jump_names[type & 0xff]);
1145                  sljit_verbose_param(src1, src1w);                  sljit_verbose_param(src1, src1w);
1146                  fprintf(compiler->verbose, ", ");                  fprintf(compiler->verbose, ", ");
1147                  sljit_verbose_param(src2, src2w);                  sljit_verbose_param(src2, src2w);
# Line 1112  static SLJIT_INLINE void check_sljit_emi Line 1150  static SLJIT_INLINE void check_sljit_emi
1150  #endif  #endif
1151  }  }
1152    
1153  static SLJIT_INLINE void check_sljit_emit_fcmp(struct sljit_compiler *compiler, int type,  static SLJIT_INLINE void check_sljit_emit_fcmp(struct sljit_compiler *compiler, sljit_si type,
1154          int src1, sljit_w src1w,          sljit_si src1, sljit_sw src1w,
1155          int src2, sljit_w src2w)          sljit_si src2, sljit_sw src2w)
1156  {  {
1157          SLJIT_UNUSED_ARG(compiler);          SLJIT_UNUSED_ARG(compiler);
1158          SLJIT_UNUSED_ARG(type);          SLJIT_UNUSED_ARG(type);
# Line 1124  static SLJIT_INLINE void check_sljit_emi Line 1162  static SLJIT_INLINE void check_sljit_emi
1162          SLJIT_UNUSED_ARG(src2w);          SLJIT_UNUSED_ARG(src2w);
1163    
1164          SLJIT_ASSERT(sljit_is_fpu_available());          SLJIT_ASSERT(sljit_is_fpu_available());
1165          SLJIT_ASSERT(!(type & ~(0xff | SLJIT_REWRITABLE_JUMP)));          SLJIT_ASSERT(!(type & ~(0xff | SLJIT_REWRITABLE_JUMP | SLJIT_SINGLE_OP)));
1166          SLJIT_ASSERT((type & 0xff) >= SLJIT_C_FLOAT_EQUAL && (type & 0xff) <= SLJIT_C_FLOAT_ORDERED);          SLJIT_ASSERT((type & 0xff) >= SLJIT_C_FLOAT_EQUAL && (type & 0xff) <= SLJIT_C_FLOAT_ORDERED);
1167  #if (defined SLJIT_DEBUG && SLJIT_DEBUG)  #if (defined SLJIT_DEBUG && SLJIT_DEBUG)
1168          FUNCTION_FCHECK(src1, src1w);          FUNCTION_FCHECK(src1, src1w);
# Line 1132  static SLJIT_INLINE void check_sljit_emi Line 1170  static SLJIT_INLINE void check_sljit_emi
1170  #endif  #endif
1171  #if (defined SLJIT_VERBOSE && SLJIT_VERBOSE)  #if (defined SLJIT_VERBOSE && SLJIT_VERBOSE)
1172          if (SLJIT_UNLIKELY(!!compiler->verbose)) {          if (SLJIT_UNLIKELY(!!compiler->verbose)) {
1173                  fprintf(compiler->verbose, "  fcmp%s <%s> ", !(type & SLJIT_REWRITABLE_JUMP) ? "" : "R", jump_names[type & 0xff]);                  fprintf(compiler->verbose, "  %scmp%s.%s ", (type & SLJIT_SINGLE_OP) ? "s" : "d",
1174                            !(type & SLJIT_REWRITABLE_JUMP) ? "" : ".r", jump_names[type & 0xff]);
1175                  sljit_verbose_fparam(src1, src1w);                  sljit_verbose_fparam(src1, src1w);
1176                  fprintf(compiler->verbose, ", ");                  fprintf(compiler->verbose, ", ");
1177                  sljit_verbose_fparam(src2, src2w);                  sljit_verbose_fparam(src2, src2w);
# Line 1141  static SLJIT_INLINE void check_sljit_emi Line 1180  static SLJIT_INLINE void check_sljit_emi
1180  #endif  #endif
1181  }  }
1182    
1183  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, sljit_si type, sljit_si src, sljit_sw srcw)
1184  {  {
1185          /* If debug and verbose are disabled, all arguments are unused. */          /* If debug and verbose are disabled, all arguments are unused. */
1186          SLJIT_UNUSED_ARG(compiler);          SLJIT_UNUSED_ARG(compiler);
# Line 1149  static SLJIT_INLINE void check_sljit_emi Line 1188  static SLJIT_INLINE void check_sljit_emi
1188          SLJIT_UNUSED_ARG(src);          SLJIT_UNUSED_ARG(src);
1189          SLJIT_UNUSED_ARG(srcw);          SLJIT_UNUSED_ARG(srcw);
1190    
1191    #if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) || (defined SLJIT_DEBUG && SLJIT_DEBUG)
1192            if (SLJIT_UNLIKELY(compiler->skip_checks)) {
1193                    compiler->skip_checks = 0;
1194                    return;
1195            }
1196    #endif
1197    
1198          SLJIT_ASSERT(type >= SLJIT_JUMP && type <= SLJIT_CALL3);          SLJIT_ASSERT(type >= SLJIT_JUMP && type <= SLJIT_CALL3);
1199  #if (defined SLJIT_DEBUG && SLJIT_DEBUG)  #if (defined SLJIT_DEBUG && SLJIT_DEBUG)
1200          FUNCTION_CHECK_SRC(src, srcw);          FUNCTION_CHECK_SRC(src, srcw);
1201  #endif  #endif
1202  #if (defined SLJIT_VERBOSE && SLJIT_VERBOSE)  #if (defined SLJIT_VERBOSE && SLJIT_VERBOSE)
1203          if (SLJIT_UNLIKELY(!!compiler->verbose)) {          if (SLJIT_UNLIKELY(!!compiler->verbose)) {
1204                  fprintf(compiler->verbose, "  ijump <%s> ", jump_names[type]);                  fprintf(compiler->verbose, "  ijump.%s ", jump_names[type]);
1205                  sljit_verbose_param(src, srcw);                  sljit_verbose_param(src, srcw);
1206                  fprintf(compiler->verbose, "\n");                  fprintf(compiler->verbose, "\n");
1207          }          }
1208  #endif  #endif
1209  }  }
1210    
1211  static SLJIT_INLINE void check_sljit_emit_cond_value(struct sljit_compiler *compiler, int op, int dst, sljit_w dstw, int type)  static SLJIT_INLINE void check_sljit_emit_op_flags(struct sljit_compiler *compiler, sljit_si op,
1212            sljit_si dst, sljit_sw dstw,
1213            sljit_si src, sljit_sw srcw,
1214            sljit_si type)
1215  {  {
1216          /* If debug and verbose are disabled, all arguments are unused. */          /* If debug and verbose are disabled, all arguments are unused. */
1217          SLJIT_UNUSED_ARG(compiler);          SLJIT_UNUSED_ARG(compiler);
1218          SLJIT_UNUSED_ARG(op);          SLJIT_UNUSED_ARG(op);
1219          SLJIT_UNUSED_ARG(dst);          SLJIT_UNUSED_ARG(dst);
1220          SLJIT_UNUSED_ARG(dstw);          SLJIT_UNUSED_ARG(dstw);
1221            SLJIT_UNUSED_ARG(src);
1222            SLJIT_UNUSED_ARG(srcw);
1223          SLJIT_UNUSED_ARG(type);          SLJIT_UNUSED_ARG(type);
1224    
1225          SLJIT_ASSERT(type >= SLJIT_C_EQUAL && type < SLJIT_JUMP);          SLJIT_ASSERT(type >= SLJIT_C_EQUAL && type < SLJIT_JUMP);
1226          SLJIT_ASSERT(op == SLJIT_MOV || GET_OPCODE(op) == SLJIT_OR);          SLJIT_ASSERT(op == SLJIT_MOV || GET_OPCODE(op) == SLJIT_MOV_UI || GET_OPCODE(op) == SLJIT_MOV_SI
1227          SLJIT_ASSERT(GET_ALL_FLAGS(op) == 0 || GET_ALL_FLAGS(op) == SLJIT_SET_E || GET_ALL_FLAGS(op) == SLJIT_KEEP_FLAGS);                  || (GET_OPCODE(op) >= SLJIT_AND && GET_OPCODE(op) <= SLJIT_XOR));
1228            SLJIT_ASSERT((op & (SLJIT_SET_S | SLJIT_SET_U | SLJIT_SET_O | SLJIT_SET_C)) == 0);
1229            SLJIT_ASSERT((op & (SLJIT_SET_E | SLJIT_KEEP_FLAGS)) != (SLJIT_SET_E | SLJIT_KEEP_FLAGS));
1230  #if (defined SLJIT_DEBUG && SLJIT_DEBUG)  #if (defined SLJIT_DEBUG && SLJIT_DEBUG)
1231            if (GET_OPCODE(op) < SLJIT_ADD) {
1232                    SLJIT_ASSERT(src == SLJIT_UNUSED && srcw == 0);
1233            } else {
1234                    SLJIT_ASSERT(src == dst && srcw == dstw);
1235            }
1236          FUNCTION_CHECK_DST(dst, dstw);          FUNCTION_CHECK_DST(dst, dstw);
1237  #endif  #endif
1238  #if (defined SLJIT_VERBOSE && SLJIT_VERBOSE)  #if (defined SLJIT_VERBOSE && SLJIT_VERBOSE)
1239          if (SLJIT_UNLIKELY(!!compiler->verbose)) {          if (SLJIT_UNLIKELY(!!compiler->verbose)) {
1240                  fprintf(compiler->verbose, "  cond_set%s%s <%s> ", !(op & SLJIT_SET_E) ? "" : "E",                  fprintf(compiler->verbose, "  %sflags.%s%s%s ", !(op & SLJIT_INT_OP) ? "" : "i",
1241                          !(op & SLJIT_KEEP_FLAGS) ? "" : "K", op_names[GET_OPCODE(op)]);                          op_names[GET_OPCODE(op)], !(op & SLJIT_SET_E) ? "" : ".e", !(op & SLJIT_KEEP_FLAGS) ? "" : ".k");
1242                  sljit_verbose_param(dst, dstw);                  sljit_verbose_param(dst, dstw);
1243                  fprintf(compiler->verbose, ", <%s>\n", jump_names[type]);                  if (src != SLJIT_UNUSED) {
1244                            fprintf(compiler->verbose, ", ");
1245                            sljit_verbose_param(src, srcw);
1246                    }
1247                    fprintf(compiler->verbose, ", %s\n", jump_names[type]);
1248          }          }
1249  #endif  #endif
1250  }  }
1251    
1252  static SLJIT_INLINE void check_sljit_get_local_base(struct sljit_compiler *compiler, int dst, sljit_w dstw, sljit_w offset)  static SLJIT_INLINE void check_sljit_get_local_base(struct sljit_compiler *compiler, sljit_si dst, sljit_sw dstw, sljit_sw offset)
1253  {  {
1254          SLJIT_UNUSED_ARG(compiler);          SLJIT_UNUSED_ARG(compiler);
1255          SLJIT_UNUSED_ARG(dst);          SLJIT_UNUSED_ARG(dst);
# Line 1206  static SLJIT_INLINE void check_sljit_get Line 1268  static SLJIT_INLINE void check_sljit_get
1268  #endif  #endif
1269  }  }
1270    
1271  static SLJIT_INLINE void check_sljit_emit_const(struct sljit_compiler *compiler, int dst, sljit_w dstw, sljit_w init_value)  static SLJIT_INLINE void check_sljit_emit_const(struct sljit_compiler *compiler, sljit_si dst, sljit_sw dstw, sljit_sw init_value)
1272  {  {
1273          /* If debug and verbose are disabled, all arguments are unused. */          /* If debug and verbose are disabled, all arguments are unused. */
1274          SLJIT_UNUSED_ARG(compiler);          SLJIT_UNUSED_ARG(compiler);
# Line 1226  static SLJIT_INLINE void check_sljit_emi Line 1288  static SLJIT_INLINE void check_sljit_emi
1288  #endif  #endif
1289  }  }
1290    
1291  static SLJIT_INLINE int emit_mov_before_return(struct sljit_compiler *compiler, int op, int src, sljit_w srcw)  static SLJIT_INLINE sljit_si emit_mov_before_return(struct sljit_compiler *compiler, sljit_si op, sljit_si src, sljit_sw srcw)
1292  {  {
1293          /* Return if don't need to do anything. */          /* Return if don't need to do anything. */
1294          if (op == SLJIT_UNUSED)          if (op == SLJIT_UNUSED)
1295                  return SLJIT_SUCCESS;                  return SLJIT_SUCCESS;
1296    
1297  #if (defined SLJIT_64BIT_ARCHITECTURE && SLJIT_64BIT_ARCHITECTURE)  #if (defined SLJIT_64BIT_ARCHITECTURE && SLJIT_64BIT_ARCHITECTURE)
1298          /* At the moment the pointer size is always equal to sljit_w. May be changed in the future. */          /* At the moment the pointer size is always equal to sljit_sw. May be changed in the future. */
1299          if (src == SLJIT_RETURN_REG && (op == SLJIT_MOV || op == SLJIT_MOV_P))          if (src == SLJIT_RETURN_REG && (op == SLJIT_MOV || op == SLJIT_MOV_P))
1300                  return SLJIT_SUCCESS;                  return SLJIT_SUCCESS;
1301  #else  #else
# Line 1274  static SLJIT_INLINE int emit_mov_before_ Line 1336  static SLJIT_INLINE int emit_mov_before_
1336  #define SLJIT_CPUINFO SLJIT_CPUINFO_PART1 SLJIT_CPUINFO_PART2 SLJIT_CPUINFO_PART3  #define SLJIT_CPUINFO SLJIT_CPUINFO_PART1 SLJIT_CPUINFO_PART2 SLJIT_CPUINFO_PART3
1337    
1338  #if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)  #if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32)
1339          #include "sljitNativeX86_common.c"  #       include "sljitNativeX86_common.c"
1340  #elif (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)  #elif (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
1341          #include "sljitNativeX86_common.c"  #       include "sljitNativeX86_common.c"
1342  #elif (defined SLJIT_CONFIG_ARM_V5 && SLJIT_CONFIG_ARM_V5)  #elif (defined SLJIT_CONFIG_ARM_V5 && SLJIT_CONFIG_ARM_V5)
1343          #include "sljitNativeARM_v5.c"  #       include "sljitNativeARM_v5.c"
1344  #elif (defined SLJIT_CONFIG_ARM_V7 && SLJIT_CONFIG_ARM_V7)  #elif (defined SLJIT_CONFIG_ARM_V7 && SLJIT_CONFIG_ARM_V7)
1345          #include "sljitNativeARM_v5.c"  #       include "sljitNativeARM_v5.c"
1346  #elif (defined SLJIT_CONFIG_ARM_THUMB2 && SLJIT_CONFIG_ARM_THUMB2)  #elif (defined SLJIT_CONFIG_ARM_THUMB2 && SLJIT_CONFIG_ARM_THUMB2)
1347          #include "sljitNativeARM_Thumb2.c"  #       include "sljitNativeARM_Thumb2.c"
1348  #elif (defined SLJIT_CONFIG_PPC_32 && SLJIT_CONFIG_PPC_32)  #elif (defined SLJIT_CONFIG_PPC_32 && SLJIT_CONFIG_PPC_32)
1349          #include "sljitNativePPC_common.c"  #       include "sljitNativePPC_common.c"
1350  #elif (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64)  #elif (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64)
1351          #include "sljitNativePPC_common.c"  #       include "sljitNativePPC_common.c"
1352  #elif (defined SLJIT_CONFIG_MIPS_32 && SLJIT_CONFIG_MIPS_32)  #elif (defined SLJIT_CONFIG_MIPS_32 && SLJIT_CONFIG_MIPS_32)
1353          #include "sljitNativeMIPS_common.c"  #       include "sljitNativeMIPS_common.c"
1354  #elif (defined SLJIT_CONFIG_SPARC_32 && SLJIT_CONFIG_SPARC_32)  #elif (defined SLJIT_CONFIG_SPARC_32 && SLJIT_CONFIG_SPARC_32)
1355          #include "sljitNativeSPARC_common.c"  #       include "sljitNativeSPARC_common.c"
1356    #elif (defined SLJIT_CONFIG_TILEGX && SLJIT_CONFIG_TILEGX)
1357    #       include "sljitNativeTILEGX.c"
1358  #endif  #endif
1359    
1360  #if !(defined SLJIT_CONFIG_MIPS_32 && SLJIT_CONFIG_MIPS_32)  #if !(defined SLJIT_CONFIG_MIPS_32 && SLJIT_CONFIG_MIPS_32)
1361    
1362  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, sljit_si type,
1363          int src1, sljit_w src1w,          sljit_si src1, sljit_sw src1w,
1364          int src2, sljit_w src2w)          sljit_si src2, sljit_sw src2w)
1365  {  {
1366          /* Default compare for most architectures. */          /* Default compare for most architectures. */
1367          int flags, tmp_src, condition;          sljit_si flags, tmp_src, condition;
1368          sljit_w tmp_srcw;          sljit_sw tmp_srcw;
1369    
1370          CHECK_ERROR_PTR();          CHECK_ERROR_PTR();
1371          check_sljit_emit_cmp(compiler, type, src1, src1w, src2, src2w);          check_sljit_emit_cmp(compiler, type, src1, src1w, src2, src2w);
# Line 1362  SLJIT_API_FUNC_ATTRIBUTE struct sljit_ju Line 1426  SLJIT_API_FUNC_ATTRIBUTE struct sljit_ju
1426          return sljit_emit_jump(compiler, condition | (type & SLJIT_REWRITABLE_JUMP));          return sljit_emit_jump(compiler, condition | (type & SLJIT_REWRITABLE_JUMP));
1427  }  }
1428    
1429  SLJIT_API_FUNC_ATTRIBUTE struct sljit_jump* sljit_emit_fcmp(struct sljit_compiler *compiler, int type,  SLJIT_API_FUNC_ATTRIBUTE struct sljit_jump* sljit_emit_fcmp(struct sljit_compiler *compiler, sljit_si type,
1430          int src1, sljit_w src1w,          sljit_si src1, sljit_sw src1w,
1431          int src2, sljit_w src2w)          sljit_si src2, sljit_sw src2w)
1432  {  {
1433          int flags, condition;          sljit_si flags, condition;
1434    
1435          check_sljit_emit_fcmp(compiler, type, src1, src1w, src2, src2w);          check_sljit_emit_fcmp(compiler, type, src1, src1w, src2, src2w);
1436    
1437          condition = type & 0xff;          condition = type & 0xff;
1438          if (condition <= SLJIT_C_FLOAT_NOT_EQUAL)          flags = (condition <= SLJIT_C_FLOAT_NOT_EQUAL) ? SLJIT_SET_E : SLJIT_SET_S;
1439                  flags = SLJIT_SET_E;          if (type & SLJIT_SINGLE_OP)
1440          else                  flags |= SLJIT_SINGLE_OP;
                 flags = SLJIT_SET_S;  
1441    
1442  #if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) || (defined SLJIT_DEBUG && SLJIT_DEBUG)  #if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) || (defined SLJIT_DEBUG && SLJIT_DEBUG)
1443          compiler->skip_checks = 1;          compiler->skip_checks = 1;
1444  #endif  #endif
1445          sljit_emit_fop1(compiler, SLJIT_FCMP | flags, src1, src1w, src2, src2w);          sljit_emit_fop1(compiler, SLJIT_CMPD | flags, src1, src1w, src2, src2w);
1446    
1447  #if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) || (defined SLJIT_DEBUG && SLJIT_DEBUG)  #if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) || (defined SLJIT_DEBUG && SLJIT_DEBUG)
1448          compiler->skip_checks = 1;          compiler->skip_checks = 1;
# Line 1391  SLJIT_API_FUNC_ATTRIBUTE struct sljit_ju Line 1454  SLJIT_API_FUNC_ATTRIBUTE struct sljit_ju
1454    
1455  #if !(defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32) && !(defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)  #if !(defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32) && !(defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64)
1456    
1457  SLJIT_API_FUNC_ATTRIBUTE int sljit_get_local_base(struct sljit_compiler *compiler, int dst, sljit_w dstw, sljit_w offset)  SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_get_local_base(struct sljit_compiler *compiler, sljit_si dst, sljit_sw dstw, sljit_sw offset)
1458  {  {
1459          CHECK_ERROR();          CHECK_ERROR();
1460          check_sljit_get_local_base(compiler, dst, dstw, offset);          check_sljit_get_local_base(compiler, dst, dstw, offset);
# Line 1428  SLJIT_API_FUNC_ATTRIBUTE void sljit_free Line 1491  SLJIT_API_FUNC_ATTRIBUTE void sljit_free
1491          SLJIT_ASSERT_STOP();          SLJIT_ASSERT_STOP();
1492  }  }
1493    
1494  SLJIT_API_FUNC_ATTRIBUTE void* sljit_alloc_memory(struct sljit_compiler *compiler, int size)  SLJIT_API_FUNC_ATTRIBUTE void* sljit_alloc_memory(struct sljit_compiler *compiler, sljit_si size)
1495  {  {
1496          SLJIT_UNUSED_ARG(compiler);          SLJIT_UNUSED_ARG(compiler);
1497          SLJIT_UNUSED_ARG(size);          SLJIT_UNUSED_ARG(size);
# Line 1458  SLJIT_API_FUNC_ATTRIBUTE void sljit_free Line 1521  SLJIT_API_FUNC_ATTRIBUTE void sljit_free
1521          SLJIT_ASSERT_STOP();          SLJIT_ASSERT_STOP();
1522  }  }
1523    
1524  SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_enter(struct sljit_compiler *compiler, int args, int temporaries, int saveds, int local_size)  SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_enter(struct sljit_compiler *compiler, sljit_si args, sljit_si scratches, sljit_si saveds, sljit_si local_size)
1525  {  {
1526          SLJIT_UNUSED_ARG(compiler);          SLJIT_UNUSED_ARG(compiler);
1527          SLJIT_UNUSED_ARG(args);          SLJIT_UNUSED_ARG(args);
1528          SLJIT_UNUSED_ARG(temporaries);          SLJIT_UNUSED_ARG(scratches);
1529          SLJIT_UNUSED_ARG(saveds);          SLJIT_UNUSED_ARG(saveds);
1530          SLJIT_UNUSED_ARG(local_size);          SLJIT_UNUSED_ARG(local_size);
1531          SLJIT_ASSERT_STOP();          SLJIT_ASSERT_STOP();
1532          return SLJIT_ERR_UNSUPPORTED;          return SLJIT_ERR_UNSUPPORTED;
1533  }  }
1534    
1535  SLJIT_API_FUNC_ATTRIBUTE void sljit_set_context(struct sljit_compiler *compiler, int args, int temporaries, int saveds, int local_size)  SLJIT_API_FUNC_ATTRIBUTE void sljit_set_context(struct sljit_compiler *compiler, sljit_si args, sljit_si scratches, sljit_si saveds, sljit_si local_size)
1536  {  {
1537          SLJIT_UNUSED_ARG(compiler);          SLJIT_UNUSED_ARG(compiler);
1538          SLJIT_UNUSED_ARG(args);          SLJIT_UNUSED_ARG(args);
1539          SLJIT_UNUSED_ARG(temporaries);          SLJIT_UNUSED_ARG(scratches);
1540          SLJIT_UNUSED_ARG(saveds);          SLJIT_UNUSED_ARG(saveds);
1541          SLJIT_UNUSED_ARG(local_size);          SLJIT_UNUSED_ARG(local_size);
1542          SLJIT_ASSERT_STOP();          SLJIT_ASSERT_STOP();
1543  }  }
1544    
1545  SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_return(struct sljit_compiler *compiler, int op, int src, sljit_w srcw)  SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_return(struct sljit_compiler *compiler, sljit_si op, sljit_si src, sljit_sw srcw)
1546  {  {
1547          SLJIT_UNUSED_ARG(compiler);          SLJIT_UNUSED_ARG(compiler);
1548          SLJIT_UNUSED_ARG(op);          SLJIT_UNUSED_ARG(op);
# Line 1489  SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_ Line 1552  SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_
1552          return SLJIT_ERR_UNSUPPORTED;          return SLJIT_ERR_UNSUPPORTED;
1553  }  }
1554    
1555  SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_fast_enter(struct sljit_compiler *compiler, int dst, sljit_w dstw, int args, int temporaries, int saveds, int local_size)  SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_fast_enter(struct sljit_compiler *compiler, sljit_si dst, sljit_sw dstw)
1556  {  {
1557          SLJIT_UNUSED_ARG(compiler);          SLJIT_UNUSED_ARG(compiler);
1558          SLJIT_UNUSED_ARG(dst);          SLJIT_UNUSED_ARG(dst);
1559          SLJIT_UNUSED_ARG(dstw);          SLJIT_UNUSED_ARG(dstw);
         SLJIT_UNUSED_ARG(args);  
         SLJIT_UNUSED_ARG(temporaries);  
         SLJIT_UNUSED_ARG(saveds);  
         SLJIT_UNUSED_ARG(local_size);  
1560          SLJIT_ASSERT_STOP();          SLJIT_ASSERT_STOP();
1561          return SLJIT_ERR_UNSUPPORTED;          return SLJIT_ERR_UNSUPPORTED;
1562  }  }
1563    
1564  SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_fast_return(struct sljit_compiler *compiler, int src, sljit_w srcw)  SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_fast_return(struct sljit_compiler *compiler, sljit_si src, sljit_sw srcw)
1565  {  {
1566          SLJIT_UNUSED_ARG(compiler);          SLJIT_UNUSED_ARG(compiler);
1567          SLJIT_UNUSED_ARG(src);          SLJIT_UNUSED_ARG(src);
# Line 1511  SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_ Line 1570  SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_
1570          return SLJIT_ERR_UNSUPPORTED;          return SLJIT_ERR_UNSUPPORTED;
1571  }  }
1572    
1573  SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_op0(struct sljit_compiler *compiler, int op)  SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_op0(struct sljit_compiler *compiler, sljit_si op)
1574  {  {
1575          SLJIT_UNUSED_ARG(compiler);          SLJIT_UNUSED_ARG(compiler);
1576          SLJIT_UNUSED_ARG(op);          SLJIT_UNUSED_ARG(op);
# Line 1519  SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_ Line 1578  SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_
1578          return SLJIT_ERR_UNSUPPORTED;          return SLJIT_ERR_UNSUPPORTED;
1579  }  }
1580    
1581  SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_op1(struct sljit_compiler *compiler, int op,  SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_op1(struct sljit_compiler *compiler, sljit_si op,
1582          int dst, sljit_w dstw,          sljit_si dst, sljit_sw dstw,
1583          int src, sljit_w srcw)          sljit_si src, sljit_sw srcw)
1584  {  {
1585          SLJIT_UNUSED_ARG(compiler);          SLJIT_UNUSED_ARG(compiler);
1586          SLJIT_UNUSED_ARG(op);          SLJIT_UNUSED_ARG(op);
# Line 1533  SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_ Line 1592  SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_
1592          return SLJIT_ERR_UNSUPPORTED;          return SLJIT_ERR_UNSUPPORTED;
1593  }  }
1594    
1595  SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_op2(struct sljit_compiler *compiler, int op,  SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_op2(struct sljit_compiler *compiler, sljit_si op,
1596          int dst, sljit_w dstw,          sljit_si dst, sljit_sw dstw,
1597          int src1, sljit_w src1w,          sljit_si src1, sljit_sw src1w,
1598          int src2, sljit_w src2w)          sljit_si src2, sljit_sw src2w)
1599  {  {
1600          SLJIT_UNUSED_ARG(compiler);          SLJIT_UNUSED_ARG(compiler);
1601          SLJIT_UNUSED_ARG(op);          SLJIT_UNUSED_ARG(op);
# Line 1550  SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_ Line 1609  SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_
1609          return SLJIT_ERR_UNSUPPORTED;          return SLJIT_ERR_UNSUPPORTED;
1610  }  }
1611    
1612  SLJIT_API_FUNC_ATTRIBUTE int sljit_get_register_index(int reg)  SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_get_register_index(sljit_si reg)
1613  {  {
1614          SLJIT_ASSERT_STOP();          SLJIT_ASSERT_STOP();
1615          return reg;          return reg;
1616  }  }
1617    
1618  SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_op_custom(struct sljit_compiler *compiler,  SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_op_custom(struct sljit_compiler *compiler,
1619          void *instruction, int size)          void *instruction, sljit_si size)
1620  {  {
1621          SLJIT_UNUSED_ARG(compiler);          SLJIT_UNUSED_ARG(compiler);
1622          SLJIT_UNUSED_ARG(instruction);          SLJIT_UNUSED_ARG(instruction);
# Line 1566  SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_ Line 1625  SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_
1625          return SLJIT_ERR_UNSUPPORTED;          return SLJIT_ERR_UNSUPPORTED;
1626  }  }
1627    
1628  SLJIT_API_FUNC_ATTRIBUTE int sljit_is_fpu_available(void)  SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_is_fpu_available(void)
1629  {  {
1630          SLJIT_ASSERT_STOP();          SLJIT_ASSERT_STOP();
1631          return 0;          return 0;
1632  }  }
1633    
1634  SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_fop1(struct sljit_compiler *compiler, int op,  SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_fop1(struct sljit_compiler *compiler, sljit_si op,
1635          int dst, sljit_w dstw,          sljit_si dst, sljit_sw dstw,
1636          int src, sljit_w srcw)          sljit_si src, sljit_sw srcw)
1637  {  {
1638          SLJIT_UNUSED_ARG(compiler);          SLJIT_UNUSED_ARG(compiler);
1639          SLJIT_UNUSED_ARG(op);          SLJIT_UNUSED_ARG(op);
# Line 1586  SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_ Line 1645  SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_
1645          return SLJIT_ERR_UNSUPPORTED;          return SLJIT_ERR_UNSUPPORTED;
1646  }  }
1647    
1648  SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_fop2(struct sljit_compiler *compiler, int op,  SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_fop2(struct sljit_compiler *compiler, sljit_si op,
1649          int dst, sljit_w dstw,          sljit_si dst, sljit_sw dstw,
1650          int src1, sljit_w src1w,          sljit_si src1, sljit_sw src1w,
1651          int src2, sljit_w src2w)          sljit_si src2, sljit_sw src2w)
1652  {  {
1653          SLJIT_UNUSED_ARG(compiler);          SLJIT_UNUSED_ARG(compiler);
1654          SLJIT_UNUSED_ARG(op);          SLJIT_UNUSED_ARG(op);
# Line 1610  SLJIT_API_FUNC_ATTRIBUTE struct sljit_la Line 1669  SLJIT_API_FUNC_ATTRIBUTE struct sljit_la
1669          return NULL;          return NULL;
1670  }  }
1671    
1672  SLJIT_API_FUNC_ATTRIBUTE 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, sljit_si type)
1673  {  {
1674          SLJIT_UNUSED_ARG(compiler);          SLJIT_UNUSED_ARG(compiler);
1675          SLJIT_UNUSED_ARG(type);          SLJIT_UNUSED_ARG(type);
# Line 1618  SLJIT_API_FUNC_ATTRIBUTE struct sljit_ju Line 1677  SLJIT_API_FUNC_ATTRIBUTE struct sljit_ju
1677          return NULL;          return NULL;
1678  }  }
1679    
1680  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, sljit_si type,
1681          int src1, sljit_w src1w,          sljit_si src1, sljit_sw src1w,
1682          int src2, sljit_w src2w)          sljit_si src2, sljit_sw src2w)
1683  {  {
1684          SLJIT_UNUSED_ARG(compiler);          SLJIT_UNUSED_ARG(compiler);
1685          SLJIT_UNUSED_ARG(type);          SLJIT_UNUSED_ARG(type);
# Line 1632  SLJIT_API_FUNC_ATTRIBUTE struct sljit_ju Line 1691  SLJIT_API_FUNC_ATTRIBUTE struct sljit_ju
1691          return NULL;          return NULL;
1692  }  }
1693    
1694  SLJIT_API_FUNC_ATTRIBUTE struct sljit_jump* sljit_emit_fcmp(struct sljit_compiler *compiler, int type,  SLJIT_API_FUNC_ATTRIBUTE struct sljit_jump* sljit_emit_fcmp(struct sljit_compiler *compiler, sljit_si type,
1695          int src1, sljit_w src1w,          sljit_si src1, sljit_sw src1w,
1696          int src2, sljit_w src2w)          sljit_si src2, sljit_sw src2w)
1697  {  {
1698          SLJIT_UNUSED_ARG(compiler);          SLJIT_UNUSED_ARG(compiler);
1699          SLJIT_UNUSED_ARG(type);          SLJIT_UNUSED_ARG(type);
# Line 1660  SLJIT_API_FUNC_ATTRIBUTE void sljit_set_ Line 1719  SLJIT_API_FUNC_ATTRIBUTE void sljit_set_
1719          SLJIT_ASSERT_STOP();          SLJIT_ASSERT_STOP();
1720  }  }
1721    
1722  SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_ijump(struct sljit_compiler *compiler, int type, int src, sljit_w srcw)  SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_ijump(struct sljit_compiler *compiler, sljit_si type, sljit_si src, sljit_sw srcw)
1723  {  {
1724          SLJIT_UNUSED_ARG(compiler);          SLJIT_UNUSED_ARG(compiler);
1725          SLJIT_UNUSED_ARG(type);          SLJIT_UNUSED_ARG(type);
# Line 1670  SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_ Line 1729  SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_
1729          return SLJIT_ERR_UNSUPPORTED;          return SLJIT_ERR_UNSUPPORTED;
1730  }  }
1731    
1732  SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_cond_value(struct sljit_compiler *compiler, int op, int dst, sljit_w dstw, int type)  SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_emit_op_flags(struct sljit_compiler *compiler, sljit_si op,
1733            sljit_si dst, sljit_sw dstw,
1734            sljit_si src, sljit_sw srcw,
1735            sljit_si type)
1736  {  {
1737          SLJIT_UNUSED_ARG(compiler);          SLJIT_UNUSED_ARG(compiler);
1738          SLJIT_UNUSED_ARG(op);          SLJIT_UNUSED_ARG(op);
1739          SLJIT_UNUSED_ARG(dst);          SLJIT_UNUSED_ARG(dst);
1740          SLJIT_UNUSED_ARG(dstw);          SLJIT_UNUSED_ARG(dstw);
1741            SLJIT_UNUSED_ARG(src);
1742            SLJIT_UNUSED_ARG(srcw);
1743          SLJIT_UNUSED_ARG(type);          SLJIT_UNUSED_ARG(type);
1744          SLJIT_ASSERT_STOP();          SLJIT_ASSERT_STOP();
1745          return SLJIT_ERR_UNSUPPORTED;          return SLJIT_ERR_UNSUPPORTED;
1746  }  }
1747    
1748  SLJIT_API_FUNC_ATTRIBUTE int sljit_get_local_base(struct sljit_compiler *compiler, int dst, sljit_w dstw, sljit_w offset)  SLJIT_API_FUNC_ATTRIBUTE sljit_si sljit_get_local_base(struct sljit_compiler *compiler, sljit_si dst, sljit_sw dstw, sljit_sw offset)
1749  {  {
1750          SLJIT_UNUSED_ARG(compiler);          SLJIT_UNUSED_ARG(compiler);
1751          SLJIT_UNUSED_ARG(dst);          SLJIT_UNUSED_ARG(dst);
# Line 1691  SLJIT_API_FUNC_ATTRIBUTE int sljit_get_l Line 1755  SLJIT_API_FUNC_ATTRIBUTE int sljit_get_l
1755          return SLJIT_ERR_UNSUPPORTED;          return SLJIT_ERR_UNSUPPORTED;
1756  }  }
1757    
1758  SLJIT_API_FUNC_ATTRIBUTE struct sljit_const* sljit_emit_const(struct sljit_compiler *compiler, int dst, sljit_w dstw, sljit_w initval)  SLJIT_API_FUNC_ATTRIBUTE struct sljit_const* sljit_emit_const(struct sljit_compiler *compiler, sljit_si dst, sljit_sw dstw, sljit_sw initval)
1759  {  {
1760          SLJIT_UNUSED_ARG(compiler);          SLJIT_UNUSED_ARG(compiler);
1761          SLJIT_UNUSED_ARG(dst);          SLJIT_UNUSED_ARG(dst);
# Line 1708  SLJIT_API_FUNC_ATTRIBUTE void sljit_set_ Line 1772  SLJIT_API_FUNC_ATTRIBUTE void sljit_set_
1772          SLJIT_ASSERT_STOP();          SLJIT_ASSERT_STOP();
1773  }  }
1774    
1775  SLJIT_API_FUNC_ATTRIBUTE void sljit_set_const(sljit_uw addr, sljit_w new_constant)  SLJIT_API_FUNC_ATTRIBUTE void sljit_set_const(sljit_uw addr, sljit_sw new_constant)
1776  {  {
1777          SLJIT_UNUSED_ARG(addr);          SLJIT_UNUSED_ARG(addr);
1778          SLJIT_UNUSED_ARG(new_constant);          SLJIT_UNUSED_ARG(new_constant);

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

  ViewVC Help
Powered by ViewVC 1.1.5