../3rdparty/pcre/sljit/sljitLir.c

Source codeSwitch to Preprocessed file
LineSource CodeCoverage
1/* -
2 * Stack-less Just-In-Time compiler -
3 * -
4 * 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 -
7 * permitted provided that the following conditions are met: -
8 * -
9 * 1. Redistributions of source code must retain the above copyright notice, this list of -
10 * conditions and the following disclaimer. -
11 * -
12 * 2. Redistributions in binary form must reproduce the above copyright notice, this list -
13 * of conditions and the following disclaimer in the documentation and/or other materials -
14 * provided with the distribution. -
15 * -
16 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) AND CONTRIBUTORS ``AS IS'' AND ANY -
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -
18 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT -
19 * SHALL THE COPYRIGHT HOLDER(S) OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -
20 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -
21 * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -
22 * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -
23 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -
24 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -
25 */ -
26 -
27#include "sljitLir.h" -
28 -
29#define CHECK_ERROR() \ -
30 do { \ -
31 if (SLJIT_UNLIKELY(compiler->error)) \ -
32 return compiler->error; \ -
33 } while (0) -
34 -
35#define CHECK_ERROR_PTR() \ -
36 do { \ -
37 if (SLJIT_UNLIKELY(compiler->error)) \ -
38 return NULL; \ -
39 } while (0) -
40 -
41#define CHECK_ERROR_VOID() \ -
42 do { \ -
43 if (SLJIT_UNLIKELY(compiler->error)) \ -
44 return; \ -
45 } while (0) -
46 -
47#define FAIL_IF(expr) \ -
48 do { \ -
49 if (SLJIT_UNLIKELY(expr)) \ -
50 return compiler->error; \ -
51 } while (0) -
52 -
53#define PTR_FAIL_IF(expr) \ -
54 do { \ -
55 if (SLJIT_UNLIKELY(expr)) \ -
56 return NULL; \ -
57 } while (0) -
58 -
59#define FAIL_IF_NULL(ptr) \ -
60 do { \ -
61 if (SLJIT_UNLIKELY(!(ptr))) { \ -
62 compiler->error = SLJIT_ERR_ALLOC_FAILED; \ -
63 return SLJIT_ERR_ALLOC_FAILED; \ -
64 } \ -
65 } while (0) -
66 -
67#define PTR_FAIL_IF_NULL(ptr) \ -
68 do { \ -
69 if (SLJIT_UNLIKELY(!(ptr))) { \ -
70 compiler->error = SLJIT_ERR_ALLOC_FAILED; \ -
71 return NULL; \ -
72 } \ -
73 } while (0) -
74 -
75#define PTR_FAIL_WITH_EXEC_IF(ptr) \ -
76 do { \ -
77 if (SLJIT_UNLIKELY(!(ptr))) { \ -
78 compiler->error = SLJIT_ERR_EX_ALLOC_FAILED; \ -
79 return NULL; \ -
80 } \ -
81 } while (0) -
82 -
83#if !(defined SLJIT_CONFIG_UNSUPPORTED && SLJIT_CONFIG_UNSUPPORTED) -
84 -
85#define GET_OPCODE(op) \ -
86 ((op) & ~(SLJIT_INT_OP | SLJIT_SET_E | SLJIT_SET_S | SLJIT_SET_U | SLJIT_SET_O | SLJIT_SET_C | SLJIT_KEEP_FLAGS)) -
87 -
88#define GET_FLAGS(op) \ -
89 ((op) & (SLJIT_SET_E | SLJIT_SET_S | SLJIT_SET_U | SLJIT_SET_O | SLJIT_SET_C)) -
90 -
91#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)) -
93 -
94#define BUF_SIZE 4096 -
95 -
96#if (defined SLJIT_32BIT_ARCHITECTURE && SLJIT_32BIT_ARCHITECTURE) -
97#define ABUF_SIZE 2048 -
98#else -
99#define ABUF_SIZE 4096 -
100#endif -
101 -
102/* Jump flags. */ -
103#define JUMP_LABEL 0x1 -
104#define JUMP_ADDR 0x2 -
105/* SLJIT_REWRITABLE_JUMP is 0x1000. */ -
106 -
107#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32) || (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64) -
108 #define PATCH_MB 0x4 -
109 #define PATCH_MW 0x8 -
110#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64) -
111 #define PATCH_MD 0x10 -
112#endif -
113#endif -
114 -
115#if (defined SLJIT_CONFIG_ARM_V5 && SLJIT_CONFIG_ARM_V5) || (defined SLJIT_CONFIG_ARM_V7 && SLJIT_CONFIG_ARM_V7) -
116 #define IS_BL 0x4 -
117 #define PATCH_B 0x8 -
118#endif -
119 -
120#if (defined SLJIT_CONFIG_ARM_V5 && SLJIT_CONFIG_ARM_V5) -
121 #define CPOOL_SIZE 512 -
122#endif -
123 -
124#if (defined SLJIT_CONFIG_ARM_THUMB2 && SLJIT_CONFIG_ARM_THUMB2) -
125 #define IS_CONDITIONAL 0x04 -
126 #define IS_BL 0x08 -
127 /* cannot be encoded as branch */ -
128 #define B_TYPE0 0x00 -
129 /* conditional + imm8 */ -
130 #define B_TYPE1 0x10 -
131 /* conditional + imm20 */ -
132 #define B_TYPE2 0x20 -
133 /* IT + imm24 */ -
134 #define B_TYPE3 0x30 -
135 /* imm11 */ -
136 #define B_TYPE4 0x40 -
137 /* imm24 */ -
138 #define B_TYPE5 0x50 -
139 /* BL + imm24 */ -
140 #define BL_TYPE6 0x60 -
141 /* 0xf00 cc code for branches */ -
142#endif -
143 -
144#if (defined SLJIT_CONFIG_PPC_32 && SLJIT_CONFIG_PPC_32) || (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64) -
145 #define UNCOND_B 0x04 -
146 #define PATCH_B 0x08 -
147 #define ABSOLUTE_B 0x10 -
148#endif -
149 -
150#if (defined SLJIT_CONFIG_MIPS_32 && SLJIT_CONFIG_MIPS_32) -
151 #define IS_MOVABLE 0x04 -
152 #define IS_JAL 0x08 -
153 #define IS_BIT26_COND 0x10 -
154 #define IS_BIT16_COND 0x20 -
155 -
156 #define IS_COND (IS_BIT26_COND | IS_BIT16_COND) -
157 -
158 #define PATCH_B 0x40 -
159 #define PATCH_J 0x80 -
160 -
161 /* instruction types */ -
162 #define UNMOVABLE_INS 0 -
163 /* 1 - 31 last destination register */ -
164 #define FCSR_FCC 32 -
165 /* no destination (i.e: store) */ -
166 #define MOVABLE_INS 33 -
167#endif -
168 -
169#endif /* !(defined SLJIT_CONFIG_UNSUPPORTED && SLJIT_CONFIG_UNSUPPORTED) */ -
170 -
171/* Utils can still be used even if SLJIT_CONFIG_UNSUPPORTED is set. */ -
172#include "sljitUtils.c" -
173 -
174#if !(defined SLJIT_CONFIG_UNSUPPORTED && SLJIT_CONFIG_UNSUPPORTED) -
175 -
176#if (defined SLJIT_EXECUTABLE_ALLOCATOR && SLJIT_EXECUTABLE_ALLOCATOR) -
177#include "sljitExecAllocator.c" -
178#endif -
179 -
180#if (defined SLJIT_SSE2_AUTO && SLJIT_SSE2_AUTO) && !(defined SLJIT_SSE2 && SLJIT_SSE2) -
181#error SLJIT_SSE2_AUTO cannot be enabled without SLJIT_SSE2 -
182#endif -
183 -
184/* --------------------------------------------------------------------- */ -
185/* Public functions */ -
186/* --------------------------------------------------------------------- */ -
187 -
188#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))) -
189#define SLJIT_NEEDS_COMPILER_INIT 1 -
190static int compiler_initialized = 0; -
191/* A thread safe initialization. */ -
192static void init_compiler(void); -
193#endif -
194 -
195 -
196SLJIT_API_FUNC_ATTRIBUTE struct sljit_compiler* sljit_create_compiler(void) -
197{ -
198 struct sljit_compiler *compiler = (struct sljit_compiler*)SLJIT_MALLOC(sizeof(struct sljit_compiler));
executed (the execution status of this line is deduced): struct sljit_compiler *compiler = (struct sljit_compiler*)(pcre16_malloc)(sizeof(struct sljit_compiler));
-
199 if (!compiler)
partially evaluated: !compiler
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:15
0-15
200 return NULL;
never executed: return ((void *)0);
0
201 SLJIT_ZEROMEM(compiler, sizeof(struct sljit_compiler));
executed (the execution status of this line is deduced): memset(compiler, 0, sizeof(struct sljit_compiler));
-
202 -
203 SLJIT_COMPILE_ASSERT(
executed: }
Execution Count:15
partially evaluated: 0
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:15
0-15
204 sizeof(sljit_b) == 1 && sizeof(sljit_ub) == 1 -
205 && sizeof(sljit_h) == 2 && sizeof(sljit_uh) == 2 -
206 && sizeof(sljit_i) == 4 && sizeof(sljit_ui) == 4 -
207 && ((sizeof(sljit_w) == 4 && sizeof(sljit_uw) == 4) || (sizeof(sljit_w) == 8 && sizeof(sljit_uw) == 8)), -
208 invalid_integer_types); -
209 -
210 /* Only the non-zero members must be set. */ -
211 compiler->error = SLJIT_SUCCESS;
executed (the execution status of this line is deduced): compiler->error = 0;
-
212 -
213 compiler->buf = (struct sljit_memory_fragment*)SLJIT_MALLOC(BUF_SIZE);
executed (the execution status of this line is deduced): compiler->buf = (struct sljit_memory_fragment*)(pcre16_malloc)(4096);
-
214 compiler->abuf = (struct sljit_memory_fragment*)SLJIT_MALLOC(ABUF_SIZE);
executed (the execution status of this line is deduced): compiler->abuf = (struct sljit_memory_fragment*)(pcre16_malloc)(4096);
-
215 -
216 if (!compiler->buf || !compiler->abuf) {
partially evaluated: !compiler->buf
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:15
partially evaluated: !compiler->abuf
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:15
0-15
217 if (compiler->buf)
never evaluated: compiler->buf
0
218 SLJIT_FREE(compiler->buf);
never executed: (pcre16_free)(compiler->buf);
0
219 if (compiler->abuf)
never evaluated: compiler->abuf
0
220 SLJIT_FREE(compiler->abuf);
never executed: (pcre16_free)(compiler->abuf);
0
221 SLJIT_FREE(compiler);
never executed (the execution status of this line is deduced): (pcre16_free)(compiler);
-
222 return NULL;
never executed: return ((void *)0);
0
223 } -
224 -
225 compiler->buf->next = NULL;
executed (the execution status of this line is deduced): compiler->buf->next = ((void *)0);
-
226 compiler->buf->used_size = 0;
executed (the execution status of this line is deduced): compiler->buf->used_size = 0;
-
227 compiler->abuf->next = NULL;
executed (the execution status of this line is deduced): compiler->abuf->next = ((void *)0);
-
228 compiler->abuf->used_size = 0;
executed (the execution status of this line is deduced): compiler->abuf->used_size = 0;
-
229 -
230 compiler->temporaries = -1;
executed (the execution status of this line is deduced): compiler->temporaries = -1;
-
231 compiler->saveds = -1;
executed (the execution status of this line is deduced): compiler->saveds = -1;
-
232 -
233#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32) -
234 compiler->args = -1; -
235#endif -
236 -
237#if (defined SLJIT_CONFIG_ARM_V5 && SLJIT_CONFIG_ARM_V5) -
238 compiler->cpool = (sljit_uw*)SLJIT_MALLOC(CPOOL_SIZE * sizeof(sljit_uw) + CPOOL_SIZE * sizeof(sljit_ub)); -
239 if (!compiler->cpool) { -
240 SLJIT_FREE(compiler->buf); -
241 SLJIT_FREE(compiler->abuf); -
242 SLJIT_FREE(compiler); -
243 return NULL; -
244 } -
245 compiler->cpool_unique = (sljit_ub*)(compiler->cpool + CPOOL_SIZE); -
246 compiler->cpool_diff = 0xffffffff; -
247#endif -
248 -
249#if (defined SLJIT_CONFIG_MIPS_32 && SLJIT_CONFIG_MIPS_32) -
250 compiler->delay_slot = UNMOVABLE_INS; -
251#endif -
252 -
253#if (defined SLJIT_NEEDS_COMPILER_INIT && SLJIT_NEEDS_COMPILER_INIT) -
254 if (!compiler_initialized) {
evaluated: !compiler_initialized
TRUEFALSE
yes
Evaluation Count:2
yes
Evaluation Count:13
2-13
255 init_compiler();
executed (the execution status of this line is deduced): init_compiler();
-
256 compiler_initialized = 1;
executed (the execution status of this line is deduced): compiler_initialized = 1;
-
257 }
executed: }
Execution Count:2
2
258#endif -
259 -
260 return compiler;
executed: return compiler;
Execution Count:15
15
261} -
262 -
263SLJIT_API_FUNC_ATTRIBUTE void sljit_free_compiler(struct sljit_compiler *compiler) -
264{ -
265 struct sljit_memory_fragment *buf;
executed (the execution status of this line is deduced): struct sljit_memory_fragment *buf;
-
266 struct sljit_memory_fragment *curr;
executed (the execution status of this line is deduced): struct sljit_memory_fragment *curr;
-
267 -
268 buf = compiler->buf;
executed (the execution status of this line is deduced): buf = compiler->buf;
-
269 while (buf) {
evaluated: buf
TRUEFALSE
yes
Evaluation Count:15
yes
Evaluation Count:15
15
270 curr = buf;
executed (the execution status of this line is deduced): curr = buf;
-
271 buf = buf->next;
executed (the execution status of this line is deduced): buf = buf->next;
-
272 SLJIT_FREE(curr);
executed (the execution status of this line is deduced): (pcre16_free)(curr);
-
273 }
executed: }
Execution Count:15
15
274 -
275 buf = compiler->abuf;
executed (the execution status of this line is deduced): buf = compiler->abuf;
-
276 while (buf) {
evaluated: buf
TRUEFALSE
yes
Evaluation Count:15
yes
Evaluation Count:15
15
277 curr = buf;
executed (the execution status of this line is deduced): curr = buf;
-
278 buf = buf->next;
executed (the execution status of this line is deduced): buf = buf->next;
-
279 SLJIT_FREE(curr);
executed (the execution status of this line is deduced): (pcre16_free)(curr);
-
280 }
executed: }
Execution Count:15
15
281 -
282#if (defined SLJIT_CONFIG_ARM_V5 && SLJIT_CONFIG_ARM_V5) -
283 SLJIT_FREE(compiler->cpool); -
284#endif -
285 SLJIT_FREE(compiler);
executed (the execution status of this line is deduced): (pcre16_free)(compiler);
-
286}
executed: }
Execution Count:15
15
287 -
288#if (defined SLJIT_CONFIG_ARM_THUMB2 && SLJIT_CONFIG_ARM_THUMB2) -
289SLJIT_API_FUNC_ATTRIBUTE void sljit_free_code(void* code) -
290{ -
291 /* Remove thumb mode flag. */ -
292 SLJIT_FREE_EXEC((void*)((sljit_uw)code & ~0x1)); -
293} -
294#elif (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64) -
295SLJIT_API_FUNC_ATTRIBUTE void sljit_free_code(void* code) -
296{ -
297 /* Resolve indirection. */ -
298 code = (void*)(*(sljit_uw*)code); -
299 SLJIT_FREE_EXEC(code); -
300} -
301#else -
302SLJIT_API_FUNC_ATTRIBUTE void sljit_free_code(void* code) -
303{ -
304 SLJIT_FREE_EXEC(code);
executed (the execution status of this line is deduced): sljit_free_exec(code);
-
305}
executed: }
Execution Count:15
15
306#endif -
307 -
308SLJIT_API_FUNC_ATTRIBUTE void sljit_set_label(struct sljit_jump *jump, struct sljit_label* label) -
309{ -
310 if (SLJIT_LIKELY(!!jump) && SLJIT_LIKELY(!!label)) {
partially evaluated: __builtin_expect((!!jump), 1)
TRUEFALSE
yes
Evaluation Count:401
no
Evaluation Count:0
partially evaluated: __builtin_expect((!!label), 1)
TRUEFALSE
yes
Evaluation Count:401
no
Evaluation Count:0
0-401
311 jump->flags &= ~JUMP_ADDR;
executed (the execution status of this line is deduced): jump->flags &= ~0x2;
-
312 jump->flags |= JUMP_LABEL;
executed (the execution status of this line is deduced): jump->flags |= 0x1;
-
313 jump->u.label = label;
executed (the execution status of this line is deduced): jump->u.label = label;
-
314 }
executed: }
Execution Count:401
401
315}
executed: }
Execution Count:401
401
316 -
317SLJIT_API_FUNC_ATTRIBUTE void sljit_set_target(struct sljit_jump *jump, sljit_uw target) -
318{ -
319 if (SLJIT_LIKELY(!!jump)) {
never evaluated: __builtin_expect((!!jump), 1)
0
320 SLJIT_ASSERT(jump->flags & SLJIT_REWRITABLE_JUMP);
never executed: }
never evaluated: 0
0
321 -
322 jump->flags &= ~JUMP_LABEL;
never executed (the execution status of this line is deduced): jump->flags &= ~0x1;
-
323 jump->flags |= JUMP_ADDR;
never executed (the execution status of this line is deduced): jump->flags |= 0x2;
-
324 jump->u.target = target;
never executed (the execution status of this line is deduced): jump->u.target = target;
-
325 }
never executed: }
0
326}
never executed: }
0
327 -
328/* --------------------------------------------------------------------- */ -
329/* Private functions */ -
330/* --------------------------------------------------------------------- */ -
331 -
332static void* ensure_buf(struct sljit_compiler *compiler, int size) -
333{ -
334 sljit_ub *ret;
executed (the execution status of this line is deduced): sljit_ub *ret;
-
335 struct sljit_memory_fragment *new_frag;
executed (the execution status of this line is deduced): struct sljit_memory_fragment *new_frag;
-
336 -
337 if (compiler->buf->used_size + size <= (int)(BUF_SIZE - sizeof(sljit_uw) - sizeof(void*))) {
partially evaluated: compiler->buf->used_size + size <= (int)(4096 - sizeof(sljit_uw) - sizeof(void*))
TRUEFALSE
yes
Evaluation Count:2354
no
Evaluation Count:0
0-2354
338 ret = compiler->buf->memory + compiler->buf->used_size;
executed (the execution status of this line is deduced): ret = compiler->buf->memory + compiler->buf->used_size;
-
339 compiler->buf->used_size += size;
executed (the execution status of this line is deduced): compiler->buf->used_size += size;
-
340 return ret;
executed: return ret;
Execution Count:2354
2354
341 } -
342 new_frag = (struct sljit_memory_fragment*)SLJIT_MALLOC(BUF_SIZE);
never executed (the execution status of this line is deduced): new_frag = (struct sljit_memory_fragment*)(pcre16_malloc)(4096);
-
343 PTR_FAIL_IF_NULL(new_frag);
never executed: return ((void *)0);
never executed: }
never evaluated: __builtin_expect((!(new_frag)), 0)
never evaluated: 0
0
344 new_frag->next = compiler->buf;
never executed (the execution status of this line is deduced): new_frag->next = compiler->buf;
-
345 compiler->buf = new_frag;
never executed (the execution status of this line is deduced): compiler->buf = new_frag;
-
346 new_frag->used_size = size;
never executed (the execution status of this line is deduced): new_frag->used_size = size;
-
347 return new_frag->memory;
never executed: return new_frag->memory;
0
348} -
349 -
350static void* ensure_abuf(struct sljit_compiler *compiler, int size) -
351{ -
352 sljit_ub *ret;
executed (the execution status of this line is deduced): sljit_ub *ret;
-
353 struct sljit_memory_fragment *new_frag;
executed (the execution status of this line is deduced): struct sljit_memory_fragment *new_frag;
-
354 -
355 if (compiler->abuf->used_size + size <= (int)(ABUF_SIZE - sizeof(sljit_uw) - sizeof(void*))) {
partially evaluated: compiler->abuf->used_size + size <= (int)(4096 - sizeof(sljit_uw) - sizeof(void*))
TRUEFALSE
yes
Evaluation Count:787
no
Evaluation Count:0
0-787
356 ret = compiler->abuf->memory + compiler->abuf->used_size;
executed (the execution status of this line is deduced): ret = compiler->abuf->memory + compiler->abuf->used_size;
-
357 compiler->abuf->used_size += size;
executed (the execution status of this line is deduced): compiler->abuf->used_size += size;
-
358 return ret;
executed: return ret;
Execution Count:787
787
359 } -
360 new_frag = (struct sljit_memory_fragment*)SLJIT_MALLOC(ABUF_SIZE);
never executed (the execution status of this line is deduced): new_frag = (struct sljit_memory_fragment*)(pcre16_malloc)(4096);
-
361 PTR_FAIL_IF_NULL(new_frag);
never executed: return ((void *)0);
never executed: }
never evaluated: __builtin_expect((!(new_frag)), 0)
never evaluated: 0
0
362 new_frag->next = compiler->abuf;
never executed (the execution status of this line is deduced): new_frag->next = compiler->abuf;
-
363 compiler->abuf = new_frag;
never executed (the execution status of this line is deduced): compiler->abuf = new_frag;
-
364 new_frag->used_size = size;
never executed (the execution status of this line is deduced): new_frag->used_size = size;
-
365 return new_frag->memory;
never executed: return new_frag->memory;
0
366} -
367 -
368SLJIT_API_FUNC_ATTRIBUTE void* sljit_alloc_memory(struct sljit_compiler *compiler, int size) -
369{ -
370 CHECK_ERROR_PTR();
never executed: return ((void *)0);
executed: }
Execution Count:100
partially evaluated: __builtin_expect((compiler->error), 0)
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:100
partially evaluated: 0
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:100
0-100
371 -
372#if (defined SLJIT_64BIT_ARCHITECTURE && SLJIT_64BIT_ARCHITECTURE) -
373 if (size <= 0 || size > 128)
partially evaluated: size <= 0
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:100
partially evaluated: size > 128
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:100
0-100
374 return NULL;
never executed: return ((void *)0);
0
375 size = (size + 7) & ~7;
executed (the execution status of this line is deduced): size = (size + 7) & ~7;
-
376#else -
377 if (size <= 0 || size > 64) -
378 return NULL; -
379 size = (size + 3) & ~3; -
380#endif -
381 return ensure_abuf(compiler, size);
executed: return ensure_abuf(compiler, size);
Execution Count:100
100
382} -
383 -
384static SLJIT_INLINE void reverse_buf(struct sljit_compiler *compiler) -
385{ -
386 struct sljit_memory_fragment *buf = compiler->buf;
executed (the execution status of this line is deduced): struct sljit_memory_fragment *buf = compiler->buf;
-
387 struct sljit_memory_fragment *prev = NULL;
executed (the execution status of this line is deduced): struct sljit_memory_fragment *prev = ((void *)0);
-
388 struct sljit_memory_fragment *tmp;
executed (the execution status of this line is deduced): struct sljit_memory_fragment *tmp;
-
389 -
390 do { -
391 tmp = buf->next;
executed (the execution status of this line is deduced): tmp = buf->next;
-
392 buf->next = prev;
executed (the execution status of this line is deduced): buf->next = prev;
-
393 prev = buf;
executed (the execution status of this line is deduced): prev = buf;
-
394 buf = tmp;
executed (the execution status of this line is deduced): buf = tmp;
-
395 } while (buf != NULL);
executed: }
Execution Count:15
partially evaluated: buf != ((void *)0)
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:15
0-15
396 -
397 compiler->buf = prev;
executed (the execution status of this line is deduced): compiler->buf = prev;
-
398}
executed: }
Execution Count:15
15
399 -
400static SLJIT_INLINE void set_label(struct sljit_label *label, struct sljit_compiler *compiler) -
401{ -
402 label->next = NULL;
executed (the execution status of this line is deduced): label->next = ((void *)0);
-
403 label->size = compiler->size;
executed (the execution status of this line is deduced): label->size = compiler->size;
-
404 if (compiler->last_label)
evaluated: compiler->last_label
TRUEFALSE
yes
Evaluation Count:256
yes
Evaluation Count:15
15-256
405 compiler->last_label->next = label;
executed: compiler->last_label->next = label;
Execution Count:256
256
406 else -
407 compiler->labels = label;
executed: compiler->labels = label;
Execution Count:15
15
408 compiler->last_label = label;
executed (the execution status of this line is deduced): compiler->last_label = label;
-
409}
executed: }
Execution Count:271
271
410 -
411static SLJIT_INLINE void set_jump(struct sljit_jump *jump, struct sljit_compiler *compiler, int flags) -
412{ -
413 jump->next = NULL;
executed (the execution status of this line is deduced): jump->next = ((void *)0);
-
414 jump->flags = flags;
executed (the execution status of this line is deduced): jump->flags = flags;
-
415 if (compiler->last_jump)
evaluated: compiler->last_jump
TRUEFALSE
yes
Evaluation Count:401
yes
Evaluation Count:15
15-401
416 compiler->last_jump->next = jump;
executed: compiler->last_jump->next = jump;
Execution Count:401
401
417 else -
418 compiler->jumps = jump;
executed: compiler->jumps = jump;
Execution Count:15
15
419 compiler->last_jump = jump;
executed (the execution status of this line is deduced): compiler->last_jump = jump;
-
420}
executed: }
Execution Count:416
416
421 -
422static SLJIT_INLINE void set_const(struct sljit_const *const_, struct sljit_compiler *compiler) -
423{ -
424 const_->next = NULL;
never executed (the execution status of this line is deduced): const_->next = ((void *)0);
-
425 const_->addr = compiler->size;
never executed (the execution status of this line is deduced): const_->addr = compiler->size;
-
426 if (compiler->last_const)
never evaluated: compiler->last_const
0
427 compiler->last_const->next = const_;
never executed: compiler->last_const->next = const_;
0
428 else -
429 compiler->consts = const_;
never executed: compiler->consts = const_;
0
430 compiler->last_const = const_;
never executed (the execution status of this line is deduced): compiler->last_const = const_;
-
431}
never executed: }
0
432 -
433#define ADDRESSING_DEPENDS_ON(exp, reg) \ -
434 (((exp) & SLJIT_MEM) && (((exp) & 0xf) == reg || (((exp) >> 4) & 0xf) == reg)) -
435 -
436#if (defined SLJIT_DEBUG && SLJIT_DEBUG) -
437#define FUNCTION_CHECK_OP() \ -
438 SLJIT_ASSERT(!GET_FLAGS(op) || !(op & SLJIT_KEEP_FLAGS)); \ -
439 switch (GET_OPCODE(op)) { \ -
440 case SLJIT_NOT: \ -
441 case SLJIT_CLZ: \ -
442 case SLJIT_AND: \ -
443 case SLJIT_OR: \ -
444 case SLJIT_XOR: \ -
445 case SLJIT_SHL: \ -
446 case SLJIT_LSHR: \ -
447 case SLJIT_ASHR: \ -
448 SLJIT_ASSERT(!(op & (SLJIT_SET_S | SLJIT_SET_U | SLJIT_SET_O | SLJIT_SET_C))); \ -
449 break; \ -
450 case SLJIT_NEG: \ -
451 SLJIT_ASSERT(!(op & (SLJIT_SET_S | SLJIT_SET_U | SLJIT_SET_C))); \ -
452 break; \ -
453 case SLJIT_MUL: \ -
454 SLJIT_ASSERT(!(op & (SLJIT_SET_E | SLJIT_SET_S | SLJIT_SET_U | SLJIT_SET_C))); \ -
455 break; \ -
456 case SLJIT_FCMP: \ -
457 SLJIT_ASSERT(!(op & (SLJIT_INT_OP | SLJIT_SET_U | SLJIT_SET_O | SLJIT_SET_C | SLJIT_KEEP_FLAGS))); \ -
458 SLJIT_ASSERT((op & (SLJIT_SET_E | SLJIT_SET_S))); \ -
459 break; \ -
460 case SLJIT_ADD: \ -
461 SLJIT_ASSERT(!(op & (SLJIT_SET_S | SLJIT_SET_U))); \ -
462 break; \ -
463 case SLJIT_SUB: \ -
464 break; \ -
465 case SLJIT_ADDC: \ -
466 case SLJIT_SUBC: \ -
467 SLJIT_ASSERT(!(op & (SLJIT_SET_E | SLJIT_SET_S | SLJIT_SET_U | SLJIT_SET_O))); \ -
468 break; \ -
469 default: \ -
470 /* Nothing allowed */ \ -
471 SLJIT_ASSERT(!(op & (SLJIT_INT_OP | SLJIT_SET_E | SLJIT_SET_S | SLJIT_SET_U | SLJIT_SET_O | SLJIT_SET_C | SLJIT_KEEP_FLAGS))); \ -
472 break; \ -
473 } -
474 -
475#define FUNCTION_CHECK_IS_REG(r) \ -
476 ((r) == SLJIT_UNUSED || (r) == SLJIT_LOCALS_REG || \ -
477 ((r) >= SLJIT_TEMPORARY_REG1 && (r) <= SLJIT_TEMPORARY_REG3 && (r) <= SLJIT_TEMPORARY_REG1 - 1 + compiler->temporaries) || \ -
478 ((r) >= SLJIT_SAVED_REG1 && (r) <= SLJIT_SAVED_REG3 && (r) <= SLJIT_SAVED_REG1 - 1 + compiler->saveds)) \ -
479 -
480#define FUNCTION_CHECK_SRC(p, i) \ -
481 SLJIT_ASSERT(compiler->temporaries != -1 && compiler->saveds != -1); \ -
482 if (((p) >= SLJIT_TEMPORARY_REG1 && (p) <= SLJIT_TEMPORARY_REG1 - 1 + compiler->temporaries) || \ -
483 ((p) >= SLJIT_SAVED_REG1 && (p) <= SLJIT_SAVED_REG1 - 1 + compiler->saveds) || \ -
484 (p) == SLJIT_LOCALS_REG) \ -
485 SLJIT_ASSERT(i == 0); \ -
486 else if ((p) == SLJIT_IMM) \ -
487 ; \ -
488 else if ((p) & SLJIT_MEM) { \ -
489 SLJIT_ASSERT(FUNCTION_CHECK_IS_REG((p) & 0xf)); \ -
490 if ((p) & 0xf0) { \ -
491 SLJIT_ASSERT(FUNCTION_CHECK_IS_REG(((p) >> 4) & 0xf)); \ -
492 SLJIT_ASSERT(((p) & 0xf0) != (SLJIT_LOCALS_REG << 4) && !(i & ~0x3)); \ -
493 } else \ -
494 SLJIT_ASSERT((((p) >> 4) & 0xf) == 0); \ -
495 SLJIT_ASSERT(((p) >> 9) == 0); \ -
496 } \ -
497 else \ -
498 SLJIT_ASSERT_STOP(); -
499 -
500#define FUNCTION_CHECK_DST(p, i) \ -
501 SLJIT_ASSERT(compiler->temporaries != -1 && compiler->saveds != -1); \ -
502 if (((p) >= SLJIT_TEMPORARY_REG1 && (p) <= SLJIT_TEMPORARY_REG1 - 1 + compiler->temporaries) || \ -
503 ((p) >= SLJIT_SAVED_REG1 && (p) <= SLJIT_SAVED_REG1 - 1 + compiler->saveds) || \ -
504 (p) == SLJIT_UNUSED) \ -
505 SLJIT_ASSERT(i == 0); \ -
506 else if ((p) & SLJIT_MEM) { \ -
507 SLJIT_ASSERT(FUNCTION_CHECK_IS_REG((p) & 0xf)); \ -
508 if ((p) & 0xf0) { \ -
509 SLJIT_ASSERT(FUNCTION_CHECK_IS_REG(((p) >> 4) & 0xf)); \ -
510 SLJIT_ASSERT(((p) & 0xf0) != (SLJIT_LOCALS_REG << 4) && !(i & ~0x3)); \ -
511 } else \ -
512 SLJIT_ASSERT((((p) >> 4) & 0xf) == 0); \ -
513 SLJIT_ASSERT(((p) >> 9) == 0); \ -
514 } \ -
515 else \ -
516 SLJIT_ASSERT_STOP(); -
517 -
518#define FUNCTION_FCHECK(p, i) \ -
519 if ((p) >= SLJIT_FLOAT_REG1 && (p) <= SLJIT_FLOAT_REG4) \ -
520 SLJIT_ASSERT(i == 0); \ -
521 else if ((p) & SLJIT_MEM) { \ -
522 SLJIT_ASSERT(FUNCTION_CHECK_IS_REG((p) & 0xf)); \ -
523 if ((p) & 0xf0) { \ -
524 SLJIT_ASSERT(FUNCTION_CHECK_IS_REG(((p) >> 4) & 0xf)); \ -
525 SLJIT_ASSERT(((p) & 0xf0) != (SLJIT_LOCALS_REG << 4) && !(i & ~0x3)); \ -
526 } else \ -
527 SLJIT_ASSERT((((p) >> 4) & 0xf) == 0); \ -
528 SLJIT_ASSERT(((p) >> 9) == 0); \ -
529 } \ -
530 else \ -
531 SLJIT_ASSERT_STOP(); -
532 -
533#define FUNCTION_CHECK_OP1() \ -
534 if (GET_OPCODE(op) >= SLJIT_MOV && GET_OPCODE(op) <= SLJIT_MOVU_SI) { \ -
535 SLJIT_ASSERT(!GET_ALL_FLAGS(op)); \ -
536 } \ -
537 if (GET_OPCODE(op) >= SLJIT_MOVU && GET_OPCODE(op) <= SLJIT_MOVU_SI) { \ -
538 SLJIT_ASSERT(!(src & SLJIT_MEM) || (src & 0xf) != SLJIT_LOCALS_REG); \ -
539 SLJIT_ASSERT(!(dst & SLJIT_MEM) || (dst & 0xf) != SLJIT_LOCALS_REG); \ -
540 if ((src & SLJIT_MEM) && (src & 0xf)) \ -
541 SLJIT_ASSERT((dst & 0xf) != (src & 0xf) && ((dst >> 4) & 0xf) != (src & 0xf)); \ -
542 } -
543 -
544#endif -
545 -
546#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) -
547 -
548SLJIT_API_FUNC_ATTRIBUTE void sljit_compiler_verbose(struct sljit_compiler *compiler, FILE* verbose) -
549{ -
550 compiler->verbose = verbose; -
551} -
552 -
553static char* reg_names[] = { -
554 (char*)"<noreg>", (char*)"t1", (char*)"t2", (char*)"t3", -
555 (char*)"te1", (char*)"te2", (char*)"s1", (char*)"s2", -
556 (char*)"s3", (char*)"se1", (char*)"se2", (char*)"lcr" -
557}; -
558 -
559static char* freg_names[] = { -
560 (char*)"<noreg>", (char*)"float_r1", (char*)"float_r2", (char*)"float_r3", (char*)"float_r4" -
561}; -
562 -
563#if (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64) || (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64) -
564#ifdef _WIN64 -
565 #define SLJIT_PRINT_D "I64" -
566#else -
567 #define SLJIT_PRINT_D "l" -
568#endif -
569#else -
570 #define SLJIT_PRINT_D "" -
571#endif -
572 -
573#define sljit_verbose_param(p, i) \ -
574 if ((p) & SLJIT_IMM) \ -
575 fprintf(compiler->verbose, "#%"SLJIT_PRINT_D"d", (i)); \ -
576 else if ((p) & SLJIT_MEM) { \ -
577 if ((p) & 0xf) { \ -
578 if (i) { \ -
579 if (((p) >> 4) & 0xf) \ -
580 fprintf(compiler->verbose, "[%s + %s * %d]", reg_names[(p) & 0xF], reg_names[((p) >> 4)& 0xF], 1 << (i)); \ -
581 else \ -
582 fprintf(compiler->verbose, "[%s + #%"SLJIT_PRINT_D"d]", reg_names[(p) & 0xF], (i)); \ -
583 } \ -
584 else { \ -
585 if (((p) >> 4) & 0xf) \ -
586 fprintf(compiler->verbose, "[%s + %s]", reg_names[(p) & 0xF], reg_names[((p) >> 4)& 0xF]); \ -
587 else \ -
588 fprintf(compiler->verbose, "[%s]", reg_names[(p) & 0xF]); \ -
589 } \ -
590 } \ -
591 else \ -
592 fprintf(compiler->verbose, "[#%"SLJIT_PRINT_D"d]", (i)); \ -
593 } else \ -
594 fprintf(compiler->verbose, "%s", reg_names[p]); -
595#define sljit_verbose_fparam(p, i) \ -
596 if ((p) & SLJIT_MEM) { \ -
597 if ((p) & 0xf) { \ -
598 if (i) { \ -
599 if (((p) >> 4) & 0xf) \ -
600 fprintf(compiler->verbose, "[%s + %s * %d]", reg_names[(p) & 0xF], reg_names[((p) >> 4)& 0xF], 1 << (i)); \ -
601 else \ -
602 fprintf(compiler->verbose, "[%s + #%"SLJIT_PRINT_D"d]", reg_names[(p) & 0xF], (i)); \ -
603 } \ -
604 else { \ -
605 if (((p) >> 4) & 0xF) \ -
606 fprintf(compiler->verbose, "[%s + %s]", reg_names[(p) & 0xF], reg_names[((p) >> 4)& 0xF]); \ -
607 else \ -
608 fprintf(compiler->verbose, "[%s]", reg_names[(p) & 0xF]); \ -
609 } \ -
610 } \ -
611 else \ -
612 fprintf(compiler->verbose, "[#%"SLJIT_PRINT_D"d]", (i)); \ -
613 } else \ -
614 fprintf(compiler->verbose, "%s", freg_names[p]); -
615 -
616static SLJIT_CONST char* op_names[] = { -
617 /* op0 */ -
618 (char*)"breakpoint", (char*)"nop", -
619 (char*)"umul", (char*)"smul", (char*)"udiv", (char*)"sdiv", -
620 /* op1 */ -
621 (char*)"mov", (char*)"mov.ub", (char*)"mov.sb", (char*)"mov.uh", -
622 (char*)"mov.sh", (char*)"mov.ui", (char*)"mov.si", (char*)"movu", -
623 (char*)"movu.ub", (char*)"movu.sb", (char*)"movu.uh", (char*)"movu.sh", -
624 (char*)"movu.ui", (char*)"movu.si", (char*)"not", (char*)"neg", -
625 (char*)"clz", -
626 /* op2 */ -
627 (char*)"add", (char*)"addc", (char*)"sub", (char*)"subc", -
628 (char*)"mul", (char*)"and", (char*)"or", (char*)"xor", -
629 (char*)"shl", (char*)"lshr", (char*)"ashr", -
630 /* fop1 */ -
631 (char*)"fcmp", (char*)"fmov", (char*)"fneg", (char*)"fabs", -
632 /* fop2 */ -
633 (char*)"fadd", (char*)"fsub", (char*)"fmul", (char*)"fdiv" -
634}; -
635 -
636static char* jump_names[] = { -
637 (char*)"c_equal", (char*)"c_not_equal", -
638 (char*)"c_less", (char*)"c_greater_equal", -
639 (char*)"c_greater", (char*)"c_less_equal", -
640 (char*)"c_sig_less", (char*)"c_sig_greater_equal", -
641 (char*)"c_sig_greater", (char*)"c_sig_less_equal", -
642 (char*)"c_overflow", (char*)"c_not_overflow", -
643 (char*)"c_mul_overflow", (char*)"c_mul_not_overflow", -
644 (char*)"c_float_equal", (char*)"c_float_not_equal", -
645 (char*)"c_float_less", (char*)"c_float_greater_equal", -
646 (char*)"c_float_greater", (char*)"c_float_less_equal", -
647 (char*)"c_float_nan", (char*)"c_float_not_nan", -
648 (char*)"jump", (char*)"fast_call", -
649 (char*)"call0", (char*)"call1", (char*)"call2", (char*)"call3" -
650}; -
651 -
652#endif -
653 -
654/* --------------------------------------------------------------------- */ -
655/* Arch dependent */ -
656/* --------------------------------------------------------------------- */ -
657 -
658static SLJIT_INLINE void check_sljit_generate_code(struct sljit_compiler *compiler) -
659{ -
660#if (defined SLJIT_DEBUG && SLJIT_DEBUG) -
661 struct sljit_jump *jump; -
662#endif -
663 /* If debug and verbose are disabled, all arguments are unused. */ -
664 SLJIT_UNUSED_ARG(compiler);
executed (the execution status of this line is deduced): (void)compiler;
-
665 -
666 SLJIT_ASSERT(compiler->size > 0);
executed: }
Execution Count:15
partially evaluated: 0
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:15
0-15
667#if (defined SLJIT_DEBUG && SLJIT_DEBUG) -
668 jump = compiler->jumps; -
669 while (jump) { -
670 /* All jumps have target. */ -
671 SLJIT_ASSERT(jump->flags & (JUMP_LABEL | JUMP_ADDR)); -
672 jump = jump->next; -
673 } -
674#endif -
675}
executed: }
Execution Count:15
15
676 -
677static SLJIT_INLINE void check_sljit_emit_enter(struct sljit_compiler *compiler, int args, int temporaries, int saveds, int local_size) -
678{ -
679 /* If debug and verbose are disabled, all arguments are unused. */ -
680 SLJIT_UNUSED_ARG(compiler);
executed (the execution status of this line is deduced): (void)compiler;
-
681 SLJIT_UNUSED_ARG(args);
executed (the execution status of this line is deduced): (void)args;
-
682 SLJIT_UNUSED_ARG(temporaries);
executed (the execution status of this line is deduced): (void)temporaries;
-
683 SLJIT_UNUSED_ARG(saveds);
executed (the execution status of this line is deduced): (void)saveds;
-
684 SLJIT_UNUSED_ARG(local_size);
executed (the execution status of this line is deduced): (void)local_size;
-
685 -
686 SLJIT_ASSERT(args >= 0 && args <= 3);
executed: }
Execution Count:15
partially evaluated: 0
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:15
0-15
687 SLJIT_ASSERT(temporaries >= 0 && temporaries <= SLJIT_NO_TMP_REGISTERS);
executed: }
Execution Count:15
partially evaluated: 0
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:15
0-15
688 SLJIT_ASSERT(saveds >= 0 && saveds <= SLJIT_NO_GEN_REGISTERS);
executed: }
Execution Count:15
partially evaluated: 0
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:15
0-15
689 SLJIT_ASSERT(args <= saveds);
executed: }
Execution Count:15
partially evaluated: 0
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:15
0-15
690 SLJIT_ASSERT(local_size >= 0 && local_size <= SLJIT_MAX_LOCAL_SIZE);
executed: }
Execution Count:15
partially evaluated: 0
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:15
0-15
691#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) -
692 if (SLJIT_UNLIKELY(!!compiler->verbose)) -
693 fprintf(compiler->verbose, " enter args=%d temporaries=%d saveds=%d local_size=%d\n", args, temporaries, saveds, local_size); -
694#endif -
695}
executed: }
Execution Count:15
15
696 -
697static SLJIT_INLINE void check_sljit_set_context(struct sljit_compiler *compiler, int args, int temporaries, int saveds, int local_size) -
698{ -
699 /* If debug and verbose are disabled, all arguments are unused. */ -
700 SLJIT_UNUSED_ARG(compiler);
never executed (the execution status of this line is deduced): (void)compiler;
-
701 SLJIT_UNUSED_ARG(args);
never executed (the execution status of this line is deduced): (void)args;
-
702 SLJIT_UNUSED_ARG(temporaries);
never executed (the execution status of this line is deduced): (void)temporaries;
-
703 SLJIT_UNUSED_ARG(saveds);
never executed (the execution status of this line is deduced): (void)saveds;
-
704 SLJIT_UNUSED_ARG(local_size);
never executed (the execution status of this line is deduced): (void)local_size;
-
705 -
706 SLJIT_ASSERT(args >= 0 && args <= 3);
never executed: }
never evaluated: 0
0
707 SLJIT_ASSERT(temporaries >= 0 && temporaries <= SLJIT_NO_TMP_REGISTERS);
never executed: }
never evaluated: 0
0
708 SLJIT_ASSERT(saveds >= 0 && saveds <= SLJIT_NO_GEN_REGISTERS);
never executed: }
never evaluated: 0
0
709 SLJIT_ASSERT(args <= saveds);
never executed: }
never evaluated: 0
0
710 SLJIT_ASSERT(local_size >= 0 && local_size <= SLJIT_MAX_LOCAL_SIZE);
never executed: }
never evaluated: 0
0
711#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) -
712 if (SLJIT_UNLIKELY(!!compiler->verbose)) -
713 fprintf(compiler->verbose, " fake_enter args=%d temporaries=%d saveds=%d local_size=%d\n", args, temporaries, saveds, local_size); -
714#endif -
715}
never executed: }
0
716 -
717static SLJIT_INLINE void check_sljit_emit_return(struct sljit_compiler *compiler, int op, int src, sljit_w srcw) -
718{ -
719 /* If debug and verbose are disabled, all arguments are unused. */ -
720 SLJIT_UNUSED_ARG(compiler);
executed (the execution status of this line is deduced): (void)compiler;
-
721 SLJIT_UNUSED_ARG(op);
executed (the execution status of this line is deduced): (void)op;
-
722 SLJIT_UNUSED_ARG(src);
executed (the execution status of this line is deduced): (void)src;
-
723 SLJIT_UNUSED_ARG(srcw);
executed (the execution status of this line is deduced): (void)srcw;
-
724 -
725#if (defined SLJIT_DEBUG && SLJIT_DEBUG) -
726 if (op != SLJIT_UNUSED) { -
727 SLJIT_ASSERT(op >= SLJIT_MOV && op <= SLJIT_MOV_SI); -
728 FUNCTION_CHECK_SRC(src, srcw); -
729 } -
730 else -
731 SLJIT_ASSERT(src == 0 && srcw == 0); -
732#endif -
733#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) -
734 if (SLJIT_UNLIKELY(!!compiler->verbose)) { -
735 if (op == SLJIT_UNUSED) -
736 fprintf(compiler->verbose, " return\n"); -
737 else { -
738 fprintf(compiler->verbose, " return %s ", op_names[op]); -
739 sljit_verbose_param(src, srcw); -
740 fprintf(compiler->verbose, "\n"); -
741 } -
742 } -
743#endif -
744}
executed: }
Execution Count:15
15
745 -
746static SLJIT_INLINE void check_sljit_emit_fast_enter(struct sljit_compiler *compiler, int dst, sljit_w dstw, int args, int temporaries, int saveds, int local_size) -
747{ -
748 /* If debug and verbose are disabled, all arguments are unused. */ -
749 SLJIT_UNUSED_ARG(compiler);
executed (the execution status of this line is deduced): (void)compiler;
-
750 SLJIT_UNUSED_ARG(dst);
executed (the execution status of this line is deduced): (void)dst;
-
751 SLJIT_UNUSED_ARG(dstw);
executed (the execution status of this line is deduced): (void)dstw;
-
752 SLJIT_UNUSED_ARG(args);
executed (the execution status of this line is deduced): (void)args;
-
753 SLJIT_UNUSED_ARG(temporaries);
executed (the execution status of this line is deduced): (void)temporaries;
-
754 SLJIT_UNUSED_ARG(saveds);
executed (the execution status of this line is deduced): (void)saveds;
-
755 SLJIT_UNUSED_ARG(local_size);
executed (the execution status of this line is deduced): (void)local_size;
-
756 -
757 SLJIT_ASSERT(args >= 0 && args <= 3);
executed: }
Execution Count:23
partially evaluated: 0
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:23
0-23
758 SLJIT_ASSERT(temporaries >= 0 && temporaries <= SLJIT_NO_TMP_REGISTERS);
executed: }
Execution Count:23
partially evaluated: 0
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:23
0-23
759 SLJIT_ASSERT(saveds >= 0 && saveds <= SLJIT_NO_GEN_REGISTERS);
executed: }
Execution Count:23
partially evaluated: 0
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:23
0-23
760 SLJIT_ASSERT(args <= saveds);
executed: }
Execution Count:23
partially evaluated: 0
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:23
0-23
761 SLJIT_ASSERT(local_size >= 0 && local_size <= SLJIT_MAX_LOCAL_SIZE);
executed: }
Execution Count:23
partially evaluated: 0
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:23
0-23
762#if (defined SLJIT_DEBUG && SLJIT_DEBUG) -
763 compiler->temporaries = temporaries; -
764 compiler->saveds = saveds; -
765 FUNCTION_CHECK_DST(dst, dstw); -
766 compiler->temporaries = -1; -
767 compiler->saveds = -1; -
768#endif -
769#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) -
770 if (SLJIT_UNLIKELY(!!compiler->verbose)) { -
771 fprintf(compiler->verbose, " fast_enter "); -
772 sljit_verbose_param(dst, dstw); -
773 fprintf(compiler->verbose, " args=%d temporaries=%d saveds=%d local_size=%d\n", args, temporaries, saveds, local_size); -
774 } -
775#endif -
776}
executed: }
Execution Count:23
23
777 -
778static SLJIT_INLINE void check_sljit_emit_fast_return(struct sljit_compiler *compiler, int src, sljit_w srcw) -
779{ -
780 /* If debug and verbose are disabled, all arguments are unused. */ -
781 SLJIT_UNUSED_ARG(compiler);
executed (the execution status of this line is deduced): (void)compiler;
-
782 SLJIT_UNUSED_ARG(src);
executed (the execution status of this line is deduced): (void)src;
-
783 SLJIT_UNUSED_ARG(srcw);
executed (the execution status of this line is deduced): (void)srcw;
-
784 -
785#if (defined SLJIT_DEBUG && SLJIT_DEBUG) -
786 FUNCTION_CHECK_SRC(src, srcw); -
787#endif -
788#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) -
789 if (SLJIT_UNLIKELY(!!compiler->verbose)) { -
790 fprintf(compiler->verbose, " fast_return "); -
791 sljit_verbose_param(src, srcw); -
792 fprintf(compiler->verbose, "\n"); -
793 } -
794#endif -
795}
executed: }
Execution Count:30
30
796 -
797static SLJIT_INLINE void check_sljit_emit_op0(struct sljit_compiler *compiler, int op) -
798{ -
799 /* If debug and verbose are disabled, all arguments are unused. */ -
800 SLJIT_UNUSED_ARG(compiler);
never executed (the execution status of this line is deduced): (void)compiler;
-
801 SLJIT_UNUSED_ARG(op);
never executed (the execution status of this line is deduced): (void)op;
-
802 -
803 SLJIT_ASSERT((op >= SLJIT_BREAKPOINT && op <= SLJIT_SMUL)
never executed: }
never evaluated: 0
0
804 || ((op & ~SLJIT_INT_OP) >= SLJIT_UDIV && (op & ~SLJIT_INT_OP) <= SLJIT_SDIV)); -
805#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) -
806 if (SLJIT_UNLIKELY(!!compiler->verbose)) -
807 fprintf(compiler->verbose, " %s%s\n", !(op & SLJIT_INT_OP) ? "" : "i", op_names[GET_OPCODE(op)]); -
808#endif -
809}
never executed: }
0
810 -
811static SLJIT_INLINE void check_sljit_emit_op1(struct sljit_compiler *compiler, int op, -
812 int dst, sljit_w dstw, -
813 int src, sljit_w srcw) -
814{ -
815 /* If debug and verbose are disabled, all arguments are unused. */ -
816 SLJIT_UNUSED_ARG(compiler);
executed (the execution status of this line is deduced): (void)compiler;
-
817 SLJIT_UNUSED_ARG(op);
executed (the execution status of this line is deduced): (void)op;
-
818 SLJIT_UNUSED_ARG(dst);
executed (the execution status of this line is deduced): (void)dst;
-
819 SLJIT_UNUSED_ARG(dstw);
executed (the execution status of this line is deduced): (void)dstw;
-
820 SLJIT_UNUSED_ARG(src);
executed (the execution status of this line is deduced): (void)src;
-
821 SLJIT_UNUSED_ARG(srcw);
executed (the execution status of this line is deduced): (void)srcw;
-
822 -
823#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) || (defined SLJIT_DEBUG && SLJIT_DEBUG) -
824 if (SLJIT_UNLIKELY(compiler->skip_checks)) { -
825 compiler->skip_checks = 0; -
826 return; -
827 } -
828#endif -
829 -
830 SLJIT_ASSERT(GET_OPCODE(op) >= SLJIT_MOV && GET_OPCODE(op) <= SLJIT_CLZ);
executed: }
Execution Count:720
partially evaluated: 0
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:720
0-720
831#if (defined SLJIT_DEBUG && SLJIT_DEBUG) -
832 FUNCTION_CHECK_OP(); -
833 FUNCTION_CHECK_SRC(src, srcw); -
834 FUNCTION_CHECK_DST(dst, dstw); -
835 FUNCTION_CHECK_OP1(); -
836#endif -
837#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) -
838 if (SLJIT_UNLIKELY(!!compiler->verbose)) { -
839 fprintf(compiler->verbose, " %s%s%s%s%s%s%s%s ", !(op & SLJIT_INT_OP) ? "" : "i", op_names[GET_OPCODE(op)], -
840 !(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"); -
841 sljit_verbose_param(dst, dstw); -
842 fprintf(compiler->verbose, ", "); -
843 sljit_verbose_param(src, srcw); -
844 fprintf(compiler->verbose, "\n"); -
845 } -
846#endif -
847}
executed: }
Execution Count:720
720
848 -
849static SLJIT_INLINE void check_sljit_emit_op2(struct sljit_compiler *compiler, int op, -
850 int dst, sljit_w dstw, -
851 int src1, sljit_w src1w, -
852 int src2, sljit_w src2w) -
853{ -
854 /* If debug and verbose are disabled, all arguments are unused. */ -
855 SLJIT_UNUSED_ARG(compiler);
executed (the execution status of this line is deduced): (void)compiler;
-
856 SLJIT_UNUSED_ARG(op);
executed (the execution status of this line is deduced): (void)op;
-
857 SLJIT_UNUSED_ARG(dst);
executed (the execution status of this line is deduced): (void)dst;
-
858 SLJIT_UNUSED_ARG(dstw);
executed (the execution status of this line is deduced): (void)dstw;
-
859 SLJIT_UNUSED_ARG(src1);
executed (the execution status of this line is deduced): (void)src1;
-
860 SLJIT_UNUSED_ARG(src1w);
executed (the execution status of this line is deduced): (void)src1w;
-
861 SLJIT_UNUSED_ARG(src2);
executed (the execution status of this line is deduced): (void)src2;
-
862 SLJIT_UNUSED_ARG(src2w);
executed (the execution status of this line is deduced): (void)src2w;
-
863 -
864#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) || (defined SLJIT_DEBUG && SLJIT_DEBUG) -
865 if (SLJIT_UNLIKELY(compiler->skip_checks)) { -
866 compiler->skip_checks = 0; -
867 return; -
868 } -
869#endif -
870 -
871 SLJIT_ASSERT(GET_OPCODE(op) >= SLJIT_ADD && GET_OPCODE(op) <= SLJIT_ASHR);
executed: }
Execution Count:667
partially evaluated: 0
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:667
0-667
872#if (defined SLJIT_DEBUG && SLJIT_DEBUG) -
873 FUNCTION_CHECK_OP(); -
874 FUNCTION_CHECK_SRC(src1, src1w); -
875 FUNCTION_CHECK_SRC(src2, src2w); -
876 FUNCTION_CHECK_DST(dst, dstw); -
877#endif -
878#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) -
879 if (SLJIT_UNLIKELY(!!compiler->verbose)) { -
880 fprintf(compiler->verbose, " %s%s%s%s%s%s%s%s ", !(op & SLJIT_INT_OP) ? "" : "i", op_names[GET_OPCODE(op)], -
881 !(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"); -
882 sljit_verbose_param(dst, dstw); -
883 fprintf(compiler->verbose, ", "); -
884 sljit_verbose_param(src1, src1w); -
885 fprintf(compiler->verbose, ", "); -
886 sljit_verbose_param(src2, src2w); -
887 fprintf(compiler->verbose, "\n"); -
888 } -
889#endif -
890}
executed: }
Execution Count:667
667
891 -
892static SLJIT_INLINE void check_sljit_get_register_index(int reg) -
893{ -
894 SLJIT_UNUSED_ARG(reg);
never executed (the execution status of this line is deduced): (void)reg;
-
895 SLJIT_ASSERT(reg > 0 && reg <= SLJIT_NO_REGISTERS);
never executed: }
never evaluated: 0
0
896}
never executed: }
0
897 -
898static SLJIT_INLINE void check_sljit_emit_op_custom(struct sljit_compiler *compiler, -
899 void *instruction, int size) -
900{ -
901 SLJIT_UNUSED_ARG(compiler);
never executed (the execution status of this line is deduced): (void)compiler;
-
902 SLJIT_UNUSED_ARG(instruction);
never executed (the execution status of this line is deduced): (void)instruction;
-
903 SLJIT_UNUSED_ARG(size);
never executed (the execution status of this line is deduced): (void)size;
-
904 SLJIT_ASSERT(instruction);
never executed: }
never evaluated: 0
0
905}
never executed: }
0
906 -
907static SLJIT_INLINE void check_sljit_emit_fop1(struct sljit_compiler *compiler, int op, -
908 int dst, sljit_w dstw, -
909 int src, sljit_w srcw) -
910{ -
911 /* If debug and verbose are disabled, all arguments are unused. */ -
912 SLJIT_UNUSED_ARG(compiler);
never executed (the execution status of this line is deduced): (void)compiler;
-
913 SLJIT_UNUSED_ARG(op);
never executed (the execution status of this line is deduced): (void)op;
-
914 SLJIT_UNUSED_ARG(dst);
never executed (the execution status of this line is deduced): (void)dst;
-
915 SLJIT_UNUSED_ARG(dstw);
never executed (the execution status of this line is deduced): (void)dstw;
-
916 SLJIT_UNUSED_ARG(src);
never executed (the execution status of this line is deduced): (void)src;
-
917 SLJIT_UNUSED_ARG(srcw);
never executed (the execution status of this line is deduced): (void)srcw;
-
918 -
919#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) || (defined SLJIT_DEBUG && SLJIT_DEBUG) -
920 if (SLJIT_UNLIKELY(compiler->skip_checks)) { -
921 compiler->skip_checks = 0; -
922 return; -
923 } -
924#endif -
925 -
926 SLJIT_ASSERT(sljit_is_fpu_available());
never executed: }
never evaluated: 0
0
927 SLJIT_ASSERT(GET_OPCODE(op) >= SLJIT_FCMP && GET_OPCODE(op) <= SLJIT_FABS);
never executed: }
never evaluated: 0
0
928#if (defined SLJIT_DEBUG && SLJIT_DEBUG) -
929 FUNCTION_CHECK_OP(); -
930 FUNCTION_FCHECK(src, srcw); -
931 FUNCTION_FCHECK(dst, dstw); -
932#endif -
933#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) -
934 if (SLJIT_UNLIKELY(!!compiler->verbose)) { -
935 fprintf(compiler->verbose, " %s%s%s ", op_names[GET_OPCODE(op)], -
936 !(op & SLJIT_SET_E) ? "" : "E", !(op & SLJIT_SET_S) ? "" : "S"); -
937 sljit_verbose_fparam(dst, dstw); -
938 fprintf(compiler->verbose, ", "); -
939 sljit_verbose_fparam(src, srcw); -
940 fprintf(compiler->verbose, "\n"); -
941 } -
942#endif -
943}
never executed: }
0
944 -
945static SLJIT_INLINE void check_sljit_emit_fop2(struct sljit_compiler *compiler, int op, -
946 int dst, sljit_w dstw, -
947 int src1, sljit_w src1w, -
948 int src2, sljit_w src2w) -
949{ -
950 /* If debug and verbose are disabled, all arguments are unused. */ -
951 SLJIT_UNUSED_ARG(compiler);
never executed (the execution status of this line is deduced): (void)compiler;
-
952 SLJIT_UNUSED_ARG(op);
never executed (the execution status of this line is deduced): (void)op;
-
953 SLJIT_UNUSED_ARG(dst);
never executed (the execution status of this line is deduced): (void)dst;
-
954 SLJIT_UNUSED_ARG(dstw);
never executed (the execution status of this line is deduced): (void)dstw;
-
955 SLJIT_UNUSED_ARG(src1);
never executed (the execution status of this line is deduced): (void)src1;
-
956 SLJIT_UNUSED_ARG(src1w);
never executed (the execution status of this line is deduced): (void)src1w;
-
957 SLJIT_UNUSED_ARG(src2);
never executed (the execution status of this line is deduced): (void)src2;
-
958 SLJIT_UNUSED_ARG(src2w);
never executed (the execution status of this line is deduced): (void)src2w;
-
959 -
960 SLJIT_ASSERT(sljit_is_fpu_available());
never executed: }
never evaluated: 0
0
961 SLJIT_ASSERT(GET_OPCODE(op) >= SLJIT_FADD && GET_OPCODE(op) <= SLJIT_FDIV);
never executed: }
never evaluated: 0
0
962#if (defined SLJIT_DEBUG && SLJIT_DEBUG) -
963 FUNCTION_CHECK_OP(); -
964 FUNCTION_FCHECK(src1, src1w); -
965 FUNCTION_FCHECK(src2, src2w); -
966 FUNCTION_FCHECK(dst, dstw); -
967#endif -
968#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) -
969 if (SLJIT_UNLIKELY(!!compiler->verbose)) { -
970 fprintf(compiler->verbose, " %s ", op_names[GET_OPCODE(op)]); -
971 sljit_verbose_fparam(dst, dstw); -
972 fprintf(compiler->verbose, ", "); -
973 sljit_verbose_fparam(src1, src1w); -
974 fprintf(compiler->verbose, ", "); -
975 sljit_verbose_fparam(src2, src2w); -
976 fprintf(compiler->verbose, "\n"); -
977 } -
978#endif -
979}
never executed: }
0
980 -
981static SLJIT_INLINE void check_sljit_emit_label(struct sljit_compiler *compiler) -
982{ -
983 /* If debug and verbose are disabled, all arguments are unused. */ -
984 SLJIT_UNUSED_ARG(compiler);
executed (the execution status of this line is deduced): (void)compiler;
-
985 -
986#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) -
987 if (SLJIT_UNLIKELY(!!compiler->verbose)) -
988 fprintf(compiler->verbose, "label:\n"); -
989#endif -
990}
executed: }
Execution Count:340
340
991 -
992static SLJIT_INLINE void check_sljit_emit_jump(struct sljit_compiler *compiler, int type) -
993{ -
994 /* If debug and verbose are disabled, all arguments are unused. */ -
995 SLJIT_UNUSED_ARG(compiler);
executed (the execution status of this line is deduced): (void)compiler;
-
996 SLJIT_UNUSED_ARG(type);
executed (the execution status of this line is deduced): (void)type;
-
997 -
998#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) || (defined SLJIT_DEBUG && SLJIT_DEBUG) -
999 if (SLJIT_UNLIKELY(compiler->skip_checks)) { -
1000 compiler->skip_checks = 0; -
1001 return; -
1002 } -
1003#endif -
1004 -
1005 SLJIT_ASSERT(!(type & ~(0xff | SLJIT_REWRITABLE_JUMP)));
executed: }
Execution Count:401
partially evaluated: 0
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:401
0-401
1006 SLJIT_ASSERT((type & 0xff) >= SLJIT_C_EQUAL && (type & 0xff) <= SLJIT_CALL3);
executed: }
Execution Count:401
partially evaluated: 0
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:401
0-401
1007#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) -
1008 if (SLJIT_UNLIKELY(!!compiler->verbose)) -
1009 fprintf(compiler->verbose, " jump%s <%s>\n", !(type & SLJIT_REWRITABLE_JUMP) ? "" : "R", jump_names[type & 0xff]); -
1010#endif -
1011}
executed: }
Execution Count:401
401
1012 -
1013static SLJIT_INLINE void check_sljit_emit_cmp(struct sljit_compiler *compiler, int type, -
1014 int src1, sljit_w src1w, -
1015 int src2, sljit_w src2w) -
1016{ -
1017 SLJIT_UNUSED_ARG(compiler);
executed (the execution status of this line is deduced): (void)compiler;
-
1018 SLJIT_UNUSED_ARG(type);
executed (the execution status of this line is deduced): (void)type;
-
1019 SLJIT_UNUSED_ARG(src1);
executed (the execution status of this line is deduced): (void)src1;
-
1020 SLJIT_UNUSED_ARG(src1w);
executed (the execution status of this line is deduced): (void)src1w;
-
1021 SLJIT_UNUSED_ARG(src2);
executed (the execution status of this line is deduced): (void)src2;
-
1022 SLJIT_UNUSED_ARG(src2w);
executed (the execution status of this line is deduced): (void)src2w;
-
1023 -
1024 SLJIT_ASSERT(!(type & ~(0xff | SLJIT_INT_OP | SLJIT_REWRITABLE_JUMP)));
executed: }
Execution Count:239
partially evaluated: 0
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:239
0-239
1025 SLJIT_ASSERT((type & 0xff) >= SLJIT_C_EQUAL && (type & 0xff) <= SLJIT_C_SIG_LESS_EQUAL);
executed: }
Execution Count:239
partially evaluated: 0
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:239
0-239
1026#if (defined SLJIT_DEBUG && SLJIT_DEBUG) -
1027 FUNCTION_CHECK_SRC(src1, src1w); -
1028 FUNCTION_CHECK_SRC(src2, src2w); -
1029#endif -
1030#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) -
1031 if (SLJIT_UNLIKELY(!!compiler->verbose)) { -
1032 fprintf(compiler->verbose, " %scmp%s <%s> ", !(type & SLJIT_INT_OP) ? "" : "i", !(type & SLJIT_REWRITABLE_JUMP) ? "" : "R", jump_names[type & 0xff]); -
1033 sljit_verbose_param(src1, src1w); -
1034 fprintf(compiler->verbose, ", "); -
1035 sljit_verbose_param(src2, src2w); -
1036 fprintf(compiler->verbose, "\n"); -
1037 } -
1038#endif -
1039}
executed: }
Execution Count:239
239
1040 -
1041static SLJIT_INLINE void check_sljit_emit_fcmp(struct sljit_compiler *compiler, int type, -
1042 int src1, sljit_w src1w, -
1043 int src2, sljit_w src2w) -
1044{ -
1045 SLJIT_UNUSED_ARG(compiler);
never executed (the execution status of this line is deduced): (void)compiler;
-
1046 SLJIT_UNUSED_ARG(type);
never executed (the execution status of this line is deduced): (void)type;
-
1047 SLJIT_UNUSED_ARG(src1);
never executed (the execution status of this line is deduced): (void)src1;
-
1048 SLJIT_UNUSED_ARG(src1w);
never executed (the execution status of this line is deduced): (void)src1w;
-
1049 SLJIT_UNUSED_ARG(src2);
never executed (the execution status of this line is deduced): (void)src2;
-
1050 SLJIT_UNUSED_ARG(src2w);
never executed (the execution status of this line is deduced): (void)src2w;
-
1051 -
1052 SLJIT_ASSERT(sljit_is_fpu_available());
never executed: }
never evaluated: 0
0
1053 SLJIT_ASSERT(!(type & ~(0xff | SLJIT_REWRITABLE_JUMP)));
never executed: }
never evaluated: 0
0
1054 SLJIT_ASSERT((type & 0xff) >= SLJIT_C_FLOAT_EQUAL && (type & 0xff) <= SLJIT_C_FLOAT_NOT_NAN);
never executed: }
never evaluated: 0
0
1055#if (defined SLJIT_DEBUG && SLJIT_DEBUG) -
1056 FUNCTION_FCHECK(src1, src1w); -
1057 FUNCTION_FCHECK(src2, src2w); -
1058#endif -
1059#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) -
1060 if (SLJIT_UNLIKELY(!!compiler->verbose)) { -
1061 fprintf(compiler->verbose, " fcmp%s <%s> ", !(type & SLJIT_REWRITABLE_JUMP) ? "" : "R", jump_names[type & 0xff]); -
1062 sljit_verbose_fparam(src1, src1w); -
1063 fprintf(compiler->verbose, ", "); -
1064 sljit_verbose_fparam(src2, src2w); -
1065 fprintf(compiler->verbose, "\n"); -
1066 } -
1067#endif -
1068}
never executed: }
0
1069 -
1070static SLJIT_INLINE void check_sljit_emit_ijump(struct sljit_compiler *compiler, int type, int src, sljit_w srcw) -
1071{ -
1072 /* If debug and verbose are disabled, all arguments are unused. */ -
1073 SLJIT_UNUSED_ARG(compiler);
executed (the execution status of this line is deduced): (void)compiler;
-
1074 SLJIT_UNUSED_ARG(type);
executed (the execution status of this line is deduced): (void)type;
-
1075 SLJIT_UNUSED_ARG(src);
executed (the execution status of this line is deduced): (void)src;
-
1076 SLJIT_UNUSED_ARG(srcw);
executed (the execution status of this line is deduced): (void)srcw;
-
1077 -
1078 SLJIT_ASSERT(type >= SLJIT_JUMP && type <= SLJIT_CALL3);
executed: }
Execution Count:15
partially evaluated: 0
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:15
0-15
1079#if (defined SLJIT_DEBUG && SLJIT_DEBUG) -
1080 FUNCTION_CHECK_SRC(src, srcw); -
1081#endif -
1082#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) -
1083 if (SLJIT_UNLIKELY(!!compiler->verbose)) { -
1084 fprintf(compiler->verbose, " ijump <%s> ", jump_names[type]); -
1085 sljit_verbose_param(src, srcw); -
1086 fprintf(compiler->verbose, "\n"); -
1087 } -
1088#endif -
1089}
executed: }
Execution Count:15
15
1090 -
1091static SLJIT_INLINE void check_sljit_emit_cond_value(struct sljit_compiler *compiler, int op, int dst, sljit_w dstw, int type) -
1092{ -
1093 /* If debug and verbose are disabled, all arguments are unused. */ -
1094 SLJIT_UNUSED_ARG(compiler);
executed (the execution status of this line is deduced): (void)compiler;
-
1095 SLJIT_UNUSED_ARG(op);
executed (the execution status of this line is deduced): (void)op;
-
1096 SLJIT_UNUSED_ARG(dst);
executed (the execution status of this line is deduced): (void)dst;
-
1097 SLJIT_UNUSED_ARG(dstw);
executed (the execution status of this line is deduced): (void)dstw;
-
1098 SLJIT_UNUSED_ARG(type);
executed (the execution status of this line is deduced): (void)type;
-
1099 -
1100 SLJIT_ASSERT(type >= SLJIT_C_EQUAL && type < SLJIT_JUMP);
executed: }
Execution Count:43
partially evaluated: 0
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:43
0-43
1101 SLJIT_ASSERT(op == SLJIT_MOV || GET_OPCODE(op) == SLJIT_OR);
executed: }
Execution Count:43
partially evaluated: 0
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:43
0-43
1102 SLJIT_ASSERT(GET_ALL_FLAGS(op) == 0 || GET_ALL_FLAGS(op) == SLJIT_SET_E || GET_ALL_FLAGS(op) == SLJIT_KEEP_FLAGS);
executed: }
Execution Count:43
partially evaluated: 0
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:43
0-43
1103#if (defined SLJIT_DEBUG && SLJIT_DEBUG) -
1104 FUNCTION_CHECK_DST(dst, dstw); -
1105#endif -
1106#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) -
1107 if (SLJIT_UNLIKELY(!!compiler->verbose)) { -
1108 fprintf(compiler->verbose, " cond_set%s%s <%s> ", !(op & SLJIT_SET_E) ? "" : "E", -
1109 !(op & SLJIT_KEEP_FLAGS) ? "" : "K", op_names[GET_OPCODE(op)]); -
1110 sljit_verbose_param(dst, dstw); -
1111 fprintf(compiler->verbose, ", <%s>\n", jump_names[type]); -
1112 } -
1113#endif -
1114}
executed: }
Execution Count:43
43
1115 -
1116static SLJIT_INLINE void check_sljit_emit_const(struct sljit_compiler *compiler, int dst, sljit_w dstw, sljit_w init_value) -
1117{ -
1118 /* If debug and verbose are disabled, all arguments are unused. */ -
1119 SLJIT_UNUSED_ARG(compiler);
never executed (the execution status of this line is deduced): (void)compiler;
-
1120 SLJIT_UNUSED_ARG(dst);
never executed (the execution status of this line is deduced): (void)dst;
-
1121 SLJIT_UNUSED_ARG(dstw);
never executed (the execution status of this line is deduced): (void)dstw;
-
1122 SLJIT_UNUSED_ARG(init_value);
never executed (the execution status of this line is deduced): (void)init_value;
-
1123 -
1124#if (defined SLJIT_DEBUG && SLJIT_DEBUG) -
1125 FUNCTION_CHECK_DST(dst, dstw); -
1126#endif -
1127#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) -
1128 if (SLJIT_UNLIKELY(!!compiler->verbose)) { -
1129 fprintf(compiler->verbose, " const "); -
1130 sljit_verbose_param(dst, dstw); -
1131 fprintf(compiler->verbose, ", #%"SLJIT_PRINT_D"d\n", init_value); -
1132 } -
1133#endif -
1134}
never executed: }
0
1135 -
1136static SLJIT_INLINE int emit_mov_before_return(struct sljit_compiler *compiler, int op, int src, sljit_w srcw) -
1137{ -
1138 /* Return if don't need to do anything. */ -
1139 if (op == SLJIT_UNUSED)
partially evaluated: op == 0
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:15
0-15
1140 return SLJIT_SUCCESS;
never executed: return 0;
0
1141 -
1142#if (defined SLJIT_64BIT_ARCHITECTURE && SLJIT_64BIT_ARCHITECTURE) -
1143 if (src == SLJIT_RETURN_REG && op == SLJIT_MOV)
partially evaluated: src == 1
TRUEFALSE
yes
Evaluation Count:15
no
Evaluation Count:0
partially evaluated: op == 6
TRUEFALSE
yes
Evaluation Count:15
no
Evaluation Count:0
0-15
1144 return SLJIT_SUCCESS;
executed: return 0;
Execution Count:15
15
1145#else -
1146 if (src == SLJIT_RETURN_REG && (op == SLJIT_MOV || op == SLJIT_MOV_UI || op == SLJIT_MOV_SI)) -
1147 return SLJIT_SUCCESS; -
1148#endif -
1149 -
1150#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) || (defined SLJIT_DEBUG && SLJIT_DEBUG) -
1151 compiler->skip_checks = 1; -
1152#endif -
1153 return sljit_emit_op1(compiler, op, SLJIT_RETURN_REG, 0, src, srcw);
never executed: return sljit_emit_op1(compiler, op, 1, 0, src, srcw);
0
1154} -
1155 -
1156/* CPU description section */ -
1157 -
1158#if (defined SLJIT_32BIT_ARCHITECTURE && SLJIT_32BIT_ARCHITECTURE) -
1159#define SLJIT_CPUINFO_PART1 " 32bit (" -
1160#elif (defined SLJIT_64BIT_ARCHITECTURE && SLJIT_64BIT_ARCHITECTURE) -
1161#define SLJIT_CPUINFO_PART1 " 64bit (" -
1162#else -
1163#error "Internal error: CPU type info missing" -
1164#endif -
1165 -
1166#if (defined SLJIT_LITTLE_ENDIAN && SLJIT_LITTLE_ENDIAN) -
1167#define SLJIT_CPUINFO_PART2 "little endian + " -
1168#elif (defined SLJIT_BIG_ENDIAN && SLJIT_BIG_ENDIAN) -
1169#define SLJIT_CPUINFO_PART2 "big endian + " -
1170#else -
1171#error "Internal error: CPU type info missing" -
1172#endif -
1173 -
1174#if (defined SLJIT_UNALIGNED && SLJIT_UNALIGNED) -
1175#define SLJIT_CPUINFO_PART3 "unaligned)" -
1176#else -
1177#define SLJIT_CPUINFO_PART3 "aligned)" -
1178#endif -
1179 -
1180#define SLJIT_CPUINFO SLJIT_CPUINFO_PART1 SLJIT_CPUINFO_PART2 SLJIT_CPUINFO_PART3 -
1181 -
1182#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32) -
1183 #include "sljitNativeX86_common.c" -
1184#elif (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64) -
1185 #include "sljitNativeX86_common.c" -
1186#elif (defined SLJIT_CONFIG_ARM_V5 && SLJIT_CONFIG_ARM_V5) -
1187 #include "sljitNativeARM_v5.c" -
1188#elif (defined SLJIT_CONFIG_ARM_V7 && SLJIT_CONFIG_ARM_V7) -
1189 #include "sljitNativeARM_v5.c" -
1190#elif (defined SLJIT_CONFIG_ARM_THUMB2 && SLJIT_CONFIG_ARM_THUMB2) -
1191 #include "sljitNativeARM_Thumb2.c" -
1192#elif (defined SLJIT_CONFIG_PPC_32 && SLJIT_CONFIG_PPC_32) -
1193 #include "sljitNativePPC_common.c" -
1194#elif (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64) -
1195 #include "sljitNativePPC_common.c" -
1196#elif (defined SLJIT_CONFIG_MIPS_32 && SLJIT_CONFIG_MIPS_32) -
1197 #include "sljitNativeMIPS_common.c" -
1198#endif -
1199 -
1200#if !(defined SLJIT_CONFIG_MIPS_32 && SLJIT_CONFIG_MIPS_32) -
1201 -
1202SLJIT_API_FUNC_ATTRIBUTE struct sljit_jump* sljit_emit_cmp(struct sljit_compiler *compiler, int type, -
1203 int src1, sljit_w src1w, -
1204 int src2, sljit_w src2w) -
1205{ -
1206 /* Default compare for most architectures. */ -
1207 int flags, tmp_src, condition;
executed (the execution status of this line is deduced): int flags, tmp_src, condition;
-
1208 sljit_w tmp_srcw;
executed (the execution status of this line is deduced): sljit_w tmp_srcw;
-
1209 -
1210 CHECK_ERROR_PTR();
never executed: return ((void *)0);
executed: }
Execution Count:239
partially evaluated: __builtin_expect((compiler->error), 0)
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:239
partially evaluated: 0
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:239
0-239
1211 check_sljit_emit_cmp(compiler, type, src1, src1w, src2, src2w);
executed (the execution status of this line is deduced): check_sljit_emit_cmp(compiler, type, src1, src1w, src2, src2w);
-
1212 -
1213 condition = type & 0xff;
executed (the execution status of this line is deduced): condition = type & 0xff;
-
1214 if (SLJIT_UNLIKELY((src1 & SLJIT_IMM) && !(src2 & SLJIT_IMM))) {
partially evaluated: __builtin_expect(((src1 & 0x200) && !(src2 & 0x200)), 0)
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:239
0-239
1215 /* Immediate is prefered as second argument by most architectures. */ -
1216 switch (condition) { -
1217 case SLJIT_C_LESS: -
1218 condition = SLJIT_C_GREATER;
never executed (the execution status of this line is deduced): condition = 4;
-
1219 break;
never executed: break;
0
1220 case SLJIT_C_GREATER_EQUAL: -
1221 condition = SLJIT_C_LESS_EQUAL;
never executed (the execution status of this line is deduced): condition = 5;
-
1222 break;
never executed: break;
0
1223 case SLJIT_C_GREATER: -
1224 condition = SLJIT_C_LESS;
never executed (the execution status of this line is deduced): condition = 2;
-
1225 break;
never executed: break;
0
1226 case SLJIT_C_LESS_EQUAL: -
1227 condition = SLJIT_C_GREATER_EQUAL;
never executed (the execution status of this line is deduced): condition = 3;
-
1228 break;
never executed: break;
0
1229 case SLJIT_C_SIG_LESS: -
1230 condition = SLJIT_C_SIG_GREATER;
never executed (the execution status of this line is deduced): condition = 8;
-
1231 break;
never executed: break;
0
1232 case SLJIT_C_SIG_GREATER_EQUAL: -
1233 condition = SLJIT_C_SIG_LESS_EQUAL;
never executed (the execution status of this line is deduced): condition = 9;
-
1234 break;
never executed: break;
0
1235 case SLJIT_C_SIG_GREATER: -
1236 condition = SLJIT_C_SIG_LESS;
never executed (the execution status of this line is deduced): condition = 6;
-
1237 break;
never executed: break;
0
1238 case SLJIT_C_SIG_LESS_EQUAL: -
1239 condition = SLJIT_C_SIG_GREATER_EQUAL;
never executed (the execution status of this line is deduced): condition = 7;
-
1240 break;
never executed: break;
0
1241 } -
1242 type = condition | (type & (SLJIT_INT_OP | SLJIT_REWRITABLE_JUMP));
never executed (the execution status of this line is deduced): type = condition | (type & (0x100 | 0x1000));
-
1243 tmp_src = src1;
never executed (the execution status of this line is deduced): tmp_src = src1;
-
1244 src1 = src2;
never executed (the execution status of this line is deduced): src1 = src2;
-
1245 src2 = tmp_src;
never executed (the execution status of this line is deduced): src2 = tmp_src;
-
1246 tmp_srcw = src1w;
never executed (the execution status of this line is deduced): tmp_srcw = src1w;
-
1247 src1w = src2w;
never executed (the execution status of this line is deduced): src1w = src2w;
-
1248 src2w = tmp_srcw;
never executed (the execution status of this line is deduced): src2w = tmp_srcw;
-
1249 }
never executed: }
0
1250 -
1251 if (condition <= SLJIT_C_NOT_ZERO)
evaluated: condition <= 1
TRUEFALSE
yes
Evaluation Count:122
yes
Evaluation Count:117
117-122
1252 flags = SLJIT_SET_E;
executed: flags = 0x0200;
Execution Count:122
122
1253 else if (condition <= SLJIT_C_LESS_EQUAL)
partially evaluated: condition <= 5
TRUEFALSE
yes
Evaluation Count:117
no
Evaluation Count:0
0-117
1254 flags = SLJIT_SET_U;
executed: flags = 0x0800;
Execution Count:117
117
1255 else -
1256 flags = SLJIT_SET_S;
never executed: flags = 0x0400;
0
1257 -
1258#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) || (defined SLJIT_DEBUG && SLJIT_DEBUG) -
1259 compiler->skip_checks = 1; -
1260#endif -
1261 PTR_FAIL_IF(sljit_emit_op2(compiler, SLJIT_SUB | flags | (type & SLJIT_INT_OP),
never executed: return ((void *)0);
executed: }
Execution Count:239
partially evaluated: __builtin_expect((sljit_emit_op2(compiler, 25 | flags | (type & 0x100), 0, 0, src1, src1w, src2, src2w)), 0)
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:239
partially evaluated: 0
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:239
0-239
1262 SLJIT_UNUSED, 0, src1, src1w, src2, src2w)); -
1263#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) || (defined SLJIT_DEBUG && SLJIT_DEBUG) -
1264 compiler->skip_checks = 1; -
1265#endif -
1266 return sljit_emit_jump(compiler, condition | (type & SLJIT_REWRITABLE_JUMP));
executed: return sljit_emit_jump(compiler, condition | (type & 0x1000));
Execution Count:239
239
1267} -
1268 -
1269SLJIT_API_FUNC_ATTRIBUTE struct sljit_jump* sljit_emit_fcmp(struct sljit_compiler *compiler, int type, -
1270 int src1, sljit_w src1w, -
1271 int src2, sljit_w src2w) -
1272{ -
1273 int flags, condition;
never executed (the execution status of this line is deduced): int flags, condition;
-
1274 -
1275 check_sljit_emit_fcmp(compiler, type, src1, src1w, src2, src2w);
never executed (the execution status of this line is deduced): check_sljit_emit_fcmp(compiler, type, src1, src1w, src2, src2w);
-
1276 -
1277 condition = type & 0xff;
never executed (the execution status of this line is deduced): condition = type & 0xff;
-
1278 if (condition <= SLJIT_C_FLOAT_NOT_EQUAL)
never evaluated: condition <= 15
0
1279 flags = SLJIT_SET_E;
never executed: flags = 0x0200;
0
1280 else -
1281 flags = SLJIT_SET_S;
never executed: flags = 0x0400;
0
1282 -
1283#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) || (defined SLJIT_DEBUG && SLJIT_DEBUG) -
1284 compiler->skip_checks = 1; -
1285#endif -
1286 sljit_emit_fop1(compiler, SLJIT_FCMP | flags, src1, src1w, src2, src2w);
never executed (the execution status of this line is deduced): sljit_emit_fop1(compiler, 34 | flags, src1, src1w, src2, src2w);
-
1287 -
1288#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) || (defined SLJIT_DEBUG && SLJIT_DEBUG) -
1289 compiler->skip_checks = 1; -
1290#endif -
1291 return sljit_emit_jump(compiler, condition | (type & SLJIT_REWRITABLE_JUMP));
never executed: return sljit_emit_jump(compiler, condition | (type & 0x1000));
0
1292} -
1293 -
1294#endif -
1295 -
1296#else /* SLJIT_CONFIG_UNSUPPORTED */ -
1297 -
1298/* Empty function bodies for those machines, which are not (yet) supported. */ -
1299 -
1300SLJIT_API_FUNC_ATTRIBUTE SLJIT_CONST char* sljit_get_platform_name() -
1301{ -
1302 return "unsupported"; -
1303} -
1304 -
1305SLJIT_API_FUNC_ATTRIBUTE struct sljit_compiler* sljit_create_compiler(void) -
1306{ -
1307 SLJIT_ASSERT_STOP(); -
1308 return NULL; -
1309} -
1310 -
1311SLJIT_API_FUNC_ATTRIBUTE void sljit_free_compiler(struct sljit_compiler *compiler) -
1312{ -
1313 SLJIT_UNUSED_ARG(compiler); -
1314 SLJIT_ASSERT_STOP(); -
1315} -
1316 -
1317SLJIT_API_FUNC_ATTRIBUTE void* sljit_alloc_memory(struct sljit_compiler *compiler, int size) -
1318{ -
1319 SLJIT_UNUSED_ARG(compiler); -
1320 SLJIT_UNUSED_ARG(size); -
1321 SLJIT_ASSERT_STOP(); -
1322 return NULL; -
1323} -
1324 -
1325#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) -
1326SLJIT_API_FUNC_ATTRIBUTE void sljit_compiler_verbose(struct sljit_compiler *compiler, FILE* verbose) -
1327{ -
1328 SLJIT_UNUSED_ARG(compiler); -
1329 SLJIT_UNUSED_ARG(verbose); -
1330 SLJIT_ASSERT_STOP(); -
1331} -
1332#endif -
1333 -
1334SLJIT_API_FUNC_ATTRIBUTE void* sljit_generate_code(struct sljit_compiler *compiler) -
1335{ -
1336 SLJIT_UNUSED_ARG(compiler); -
1337 SLJIT_ASSERT_STOP(); -
1338 return NULL; -
1339} -
1340 -
1341SLJIT_API_FUNC_ATTRIBUTE void sljit_free_code(void* code) -
1342{ -
1343 SLJIT_UNUSED_ARG(code); -
1344 SLJIT_ASSERT_STOP(); -
1345} -
1346 -
1347SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_enter(struct sljit_compiler *compiler, int args, int temporaries, int saveds, int local_size) -
1348{ -
1349 SLJIT_UNUSED_ARG(compiler); -
1350 SLJIT_UNUSED_ARG(args); -
1351 SLJIT_UNUSED_ARG(temporaries); -
1352 SLJIT_UNUSED_ARG(saveds); -
1353 SLJIT_UNUSED_ARG(local_size); -
1354 SLJIT_ASSERT_STOP(); -
1355 return SLJIT_ERR_UNSUPPORTED; -
1356} -
1357 -
1358SLJIT_API_FUNC_ATTRIBUTE void sljit_set_context(struct sljit_compiler *compiler, int args, int temporaries, int saveds, int local_size) -
1359{ -
1360 SLJIT_UNUSED_ARG(compiler); -
1361 SLJIT_UNUSED_ARG(args); -
1362 SLJIT_UNUSED_ARG(temporaries); -
1363 SLJIT_UNUSED_ARG(saveds); -
1364 SLJIT_UNUSED_ARG(local_size); -
1365 SLJIT_ASSERT_STOP(); -
1366} -
1367 -
1368SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_return(struct sljit_compiler *compiler, int op, int src, sljit_w srcw) -
1369{ -
1370 SLJIT_UNUSED_ARG(compiler); -
1371 SLJIT_UNUSED_ARG(op); -
1372 SLJIT_UNUSED_ARG(src); -
1373 SLJIT_UNUSED_ARG(srcw); -
1374 SLJIT_ASSERT_STOP(); -
1375 return SLJIT_ERR_UNSUPPORTED; -
1376} -
1377 -
1378SLJIT_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) -
1379{ -
1380 SLJIT_UNUSED_ARG(compiler); -
1381 SLJIT_UNUSED_ARG(dst); -
1382 SLJIT_UNUSED_ARG(dstw); -
1383 SLJIT_UNUSED_ARG(args); -
1384 SLJIT_UNUSED_ARG(temporaries); -
1385 SLJIT_UNUSED_ARG(saveds); -
1386 SLJIT_UNUSED_ARG(local_size); -
1387 SLJIT_ASSERT_STOP(); -
1388 return SLJIT_ERR_UNSUPPORTED; -
1389} -
1390 -
1391SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_fast_return(struct sljit_compiler *compiler, int src, sljit_w srcw) -
1392{ -
1393 SLJIT_UNUSED_ARG(compiler); -
1394 SLJIT_UNUSED_ARG(src); -
1395 SLJIT_UNUSED_ARG(srcw); -
1396 SLJIT_ASSERT_STOP(); -
1397 return SLJIT_ERR_UNSUPPORTED; -
1398} -
1399 -
1400SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_op0(struct sljit_compiler *compiler, int op) -
1401{ -
1402 SLJIT_UNUSED_ARG(compiler); -
1403 SLJIT_UNUSED_ARG(op); -
1404 SLJIT_ASSERT_STOP(); -
1405 return SLJIT_ERR_UNSUPPORTED; -
1406} -
1407 -
1408SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_op1(struct sljit_compiler *compiler, int op, -
1409 int dst, sljit_w dstw, -
1410 int src, sljit_w srcw) -
1411{ -
1412 SLJIT_UNUSED_ARG(compiler); -
1413 SLJIT_UNUSED_ARG(op); -
1414 SLJIT_UNUSED_ARG(dst); -
1415 SLJIT_UNUSED_ARG(dstw); -
1416 SLJIT_UNUSED_ARG(src); -
1417 SLJIT_UNUSED_ARG(srcw); -
1418 SLJIT_ASSERT_STOP(); -
1419 return SLJIT_ERR_UNSUPPORTED; -
1420} -
1421 -
1422SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_op2(struct sljit_compiler *compiler, int op, -
1423 int dst, sljit_w dstw, -
1424 int src1, sljit_w src1w, -
1425 int src2, sljit_w src2w) -
1426{ -
1427 SLJIT_UNUSED_ARG(compiler); -
1428 SLJIT_UNUSED_ARG(op); -
1429 SLJIT_UNUSED_ARG(dst); -
1430 SLJIT_UNUSED_ARG(dstw); -
1431 SLJIT_UNUSED_ARG(src1); -
1432 SLJIT_UNUSED_ARG(src1w); -
1433 SLJIT_UNUSED_ARG(src2); -
1434 SLJIT_UNUSED_ARG(src2w); -
1435 SLJIT_ASSERT_STOP(); -
1436 return SLJIT_ERR_UNSUPPORTED; -
1437} -
1438 -
1439SLJIT_API_FUNC_ATTRIBUTE int sljit_get_register_index(int reg) -
1440{ -
1441 SLJIT_ASSERT_STOP(); -
1442 return reg; -
1443} -
1444 -
1445SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_op_custom(struct sljit_compiler *compiler, -
1446 void *instruction, int size) -
1447{ -
1448 SLJIT_UNUSED_ARG(compiler); -
1449 SLJIT_UNUSED_ARG(instruction); -
1450 SLJIT_UNUSED_ARG(size); -
1451 SLJIT_ASSERT_STOP(); -
1452 return SLJIT_ERR_UNSUPPORTED; -
1453} -
1454 -
1455SLJIT_API_FUNC_ATTRIBUTE int sljit_is_fpu_available(void) -
1456{ -
1457 SLJIT_ASSERT_STOP(); -
1458 return 0; -
1459} -
1460 -
1461SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_fop1(struct sljit_compiler *compiler, int op, -
1462 int dst, sljit_w dstw, -
1463 int src, sljit_w srcw) -
1464{ -
1465 SLJIT_UNUSED_ARG(compiler); -
1466 SLJIT_UNUSED_ARG(op); -
1467 SLJIT_UNUSED_ARG(dst); -
1468 SLJIT_UNUSED_ARG(dstw); -
1469 SLJIT_UNUSED_ARG(src); -
1470 SLJIT_UNUSED_ARG(srcw); -
1471 SLJIT_ASSERT_STOP(); -
1472 return SLJIT_ERR_UNSUPPORTED; -
1473} -
1474 -
1475SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_fop2(struct sljit_compiler *compiler, int op, -
1476 int dst, sljit_w dstw, -
1477 int src1, sljit_w src1w, -
1478 int src2, sljit_w src2w) -
1479{ -
1480 SLJIT_UNUSED_ARG(compiler); -
1481 SLJIT_UNUSED_ARG(op); -
1482 SLJIT_UNUSED_ARG(dst); -
1483 SLJIT_UNUSED_ARG(dstw); -
1484 SLJIT_UNUSED_ARG(src1); -
1485 SLJIT_UNUSED_ARG(src1w); -
1486 SLJIT_UNUSED_ARG(src2); -
1487 SLJIT_UNUSED_ARG(src2w); -
1488 SLJIT_ASSERT_STOP(); -
1489 return SLJIT_ERR_UNSUPPORTED; -
1490} -
1491 -
1492SLJIT_API_FUNC_ATTRIBUTE struct sljit_label* sljit_emit_label(struct sljit_compiler *compiler) -
1493{ -
1494 SLJIT_UNUSED_ARG(compiler); -
1495 SLJIT_ASSERT_STOP(); -
1496 return NULL; -
1497} -
1498 -
1499SLJIT_API_FUNC_ATTRIBUTE struct sljit_jump* sljit_emit_jump(struct sljit_compiler *compiler, int type) -
1500{ -
1501 SLJIT_UNUSED_ARG(compiler); -
1502 SLJIT_UNUSED_ARG(type); -
1503 SLJIT_ASSERT_STOP(); -
1504 return NULL; -
1505} -
1506 -
1507SLJIT_API_FUNC_ATTRIBUTE struct sljit_jump* sljit_emit_cmp(struct sljit_compiler *compiler, int type, -
1508 int src1, sljit_w src1w, -
1509 int src2, sljit_w src2w) -
1510{ -
1511 SLJIT_UNUSED_ARG(compiler); -
1512 SLJIT_UNUSED_ARG(type); -
1513 SLJIT_UNUSED_ARG(src1); -
1514 SLJIT_UNUSED_ARG(src1w); -
1515 SLJIT_UNUSED_ARG(src2); -
1516 SLJIT_UNUSED_ARG(src2w); -
1517 SLJIT_ASSERT_STOP(); -
1518 return NULL; -
1519} -
1520 -
1521SLJIT_API_FUNC_ATTRIBUTE struct sljit_jump* sljit_emit_fcmp(struct sljit_compiler *compiler, int type, -
1522 int src1, sljit_w src1w, -
1523 int src2, sljit_w src2w) -
1524{ -
1525 SLJIT_UNUSED_ARG(compiler); -
1526 SLJIT_UNUSED_ARG(type); -
1527 SLJIT_UNUSED_ARG(src1); -
1528 SLJIT_UNUSED_ARG(src1w); -
1529 SLJIT_UNUSED_ARG(src2); -
1530 SLJIT_UNUSED_ARG(src2w); -
1531 SLJIT_ASSERT_STOP(); -
1532 return NULL; -
1533} -
1534 -
1535SLJIT_API_FUNC_ATTRIBUTE void sljit_set_label(struct sljit_jump *jump, struct sljit_label* label) -
1536{ -
1537 SLJIT_UNUSED_ARG(jump); -
1538 SLJIT_UNUSED_ARG(label); -
1539 SLJIT_ASSERT_STOP(); -
1540} -
1541 -
1542SLJIT_API_FUNC_ATTRIBUTE void sljit_set_target(struct sljit_jump *jump, sljit_uw target) -
1543{ -
1544 SLJIT_UNUSED_ARG(jump); -
1545 SLJIT_UNUSED_ARG(target); -
1546 SLJIT_ASSERT_STOP(); -
1547} -
1548 -
1549SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_ijump(struct sljit_compiler *compiler, int type, int src, sljit_w srcw) -
1550{ -
1551 SLJIT_UNUSED_ARG(compiler); -
1552 SLJIT_UNUSED_ARG(type); -
1553 SLJIT_UNUSED_ARG(src); -
1554 SLJIT_UNUSED_ARG(srcw); -
1555 SLJIT_ASSERT_STOP(); -
1556 return SLJIT_ERR_UNSUPPORTED; -
1557} -
1558 -
1559SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_cond_value(struct sljit_compiler *compiler, int op, int dst, sljit_w dstw, int type) -
1560{ -
1561 SLJIT_UNUSED_ARG(compiler); -
1562 SLJIT_UNUSED_ARG(op); -
1563 SLJIT_UNUSED_ARG(dst); -
1564 SLJIT_UNUSED_ARG(dstw); -
1565 SLJIT_UNUSED_ARG(type); -
1566 SLJIT_ASSERT_STOP(); -
1567 return SLJIT_ERR_UNSUPPORTED; -
1568} -
1569 -
1570SLJIT_API_FUNC_ATTRIBUTE struct sljit_const* sljit_emit_const(struct sljit_compiler *compiler, int dst, sljit_w dstw, sljit_w initval) -
1571{ -
1572 SLJIT_UNUSED_ARG(compiler); -
1573 SLJIT_UNUSED_ARG(dst); -
1574 SLJIT_UNUSED_ARG(dstw); -
1575 SLJIT_UNUSED_ARG(initval); -
1576 SLJIT_ASSERT_STOP(); -
1577 return NULL; -
1578} -
1579 -
1580SLJIT_API_FUNC_ATTRIBUTE void sljit_set_jump_addr(sljit_uw addr, sljit_uw new_addr) -
1581{ -
1582 SLJIT_UNUSED_ARG(addr); -
1583 SLJIT_UNUSED_ARG(new_addr); -
1584 SLJIT_ASSERT_STOP(); -
1585} -
1586 -
1587SLJIT_API_FUNC_ATTRIBUTE void sljit_set_const(sljit_uw addr, sljit_w new_constant) -
1588{ -
1589 SLJIT_UNUSED_ARG(addr); -
1590 SLJIT_UNUSED_ARG(new_constant); -
1591 SLJIT_ASSERT_STOP(); -
1592} -
1593 -
1594#endif -
1595 -
Source codeSwitch to Preprocessed file

Generated by Squish Coco Non-Commercial