| 1 |
/* |
/* |
| 2 |
* Stack-less Just-In-Time compiler |
* Stack-less Just-In-Time compiler |
| 3 |
* |
* |
| 4 |
* Copyright 2009-2010 Zoltan Herczeg (hzmester@freemail.hu). All rights reserved. |
* Copyright 2009-2012 Zoltan Herczeg (hzmester@freemail.hu). All rights reserved. |
| 5 |
* |
* |
| 6 |
* Redistribution and use in source and binary forms, with or without modification, are |
* Redistribution and use in source and binary forms, with or without modification, are |
| 7 |
* permitted provided that the following conditions are met: |
* permitted provided that the following conditions are met: |
| 161 |
/* instruction types */ |
/* instruction types */ |
| 162 |
#define UNMOVABLE_INS 0 |
#define UNMOVABLE_INS 0 |
| 163 |
/* 1 - 31 last destination register */ |
/* 1 - 31 last destination register */ |
|
/* 32 - 39 FCSR FCC bits */ |
|
| 164 |
#define FCSR_FCC 32 |
#define FCSR_FCC 32 |
| 165 |
/* no destination (i.e: store) */ |
/* no destination (i.e: store) */ |
| 166 |
#define MOVABLE_INS 40 |
#define MOVABLE_INS 33 |
| 167 |
#endif |
#endif |
| 168 |
|
|
| 169 |
#endif /* !(defined SLJIT_CONFIG_UNSUPPORTED && SLJIT_CONFIG_UNSUPPORTED) */ |
#endif /* !(defined SLJIT_CONFIG_UNSUPPORTED && SLJIT_CONFIG_UNSUPPORTED) */ |
| 192 |
static void init_compiler(void); |
static void init_compiler(void); |
| 193 |
#endif |
#endif |
| 194 |
|
|
| 195 |
struct sljit_compiler* sljit_create_compiler(void) |
|
| 196 |
|
SLJIT_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)); |
struct sljit_compiler *compiler = (struct sljit_compiler*)SLJIT_MALLOC(sizeof(struct sljit_compiler)); |
|
/* Compile time assert. */ |
|
|
SLJIT_CONST int minus1[sizeof(sljit_b) == 1 && sizeof(sljit_h) == 2 && |
|
|
sizeof(sljit_i) == 4 && (sizeof(sljit_w) == 4 || sizeof(sljit_w) == 8) ? 1 : -1] = { -1 }; |
|
|
|
|
| 199 |
if (!compiler) |
if (!compiler) |
| 200 |
return NULL; |
return NULL; |
| 201 |
|
SLJIT_ZEROMEM(compiler, sizeof(struct sljit_compiler)); |
| 202 |
|
|
| 203 |
compiler->error = SLJIT_SUCCESS; |
SLJIT_COMPILE_ASSERT( |
| 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 |
compiler->labels = NULL; |
/* Only the non-zero members must be set. */ |
| 211 |
compiler->jumps = NULL; |
compiler->error = SLJIT_SUCCESS; |
|
compiler->consts = NULL; |
|
|
compiler->last_label = NULL; |
|
|
compiler->last_jump = NULL; |
|
|
compiler->last_const = NULL; |
|
| 212 |
|
|
| 213 |
compiler->buf = (struct sljit_memory_fragment*)SLJIT_MALLOC(BUF_SIZE); |
compiler->buf = (struct sljit_memory_fragment*)SLJIT_MALLOC(BUF_SIZE); |
| 214 |
compiler->abuf = (struct sljit_memory_fragment*)SLJIT_MALLOC(ABUF_SIZE); |
compiler->abuf = (struct sljit_memory_fragment*)SLJIT_MALLOC(ABUF_SIZE); |
| 227 |
compiler->abuf->next = NULL; |
compiler->abuf->next = NULL; |
| 228 |
compiler->abuf->used_size = 0; |
compiler->abuf->used_size = 0; |
| 229 |
|
|
| 230 |
compiler->temporaries = minus1[0]; |
compiler->temporaries = -1; |
| 231 |
compiler->generals = minus1[0]; |
compiler->generals = -1; |
|
compiler->local_size = 0; |
|
|
compiler->size = 0; |
|
| 232 |
|
|
| 233 |
#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32) |
#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32) |
| 234 |
compiler->args = -1; |
compiler->args = -1; |
| 235 |
#endif |
#endif |
| 236 |
|
|
|
#if (defined SLJIT_CONFIG_X86_32 && SLJIT_CONFIG_X86_32) || (defined SLJIT_CONFIG_X86_64 && SLJIT_CONFIG_X86_64) |
|
|
compiler->flags_saved = 0; |
|
|
#endif |
|
|
|
|
| 237 |
#if (defined SLJIT_CONFIG_ARM_V5 && SLJIT_CONFIG_ARM_V5) |
#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)); |
compiler->cpool = (sljit_uw*)SLJIT_MALLOC(CPOOL_SIZE * sizeof(sljit_uw) + CPOOL_SIZE * sizeof(sljit_ub)); |
| 239 |
if (!compiler->cpool) { |
if (!compiler->cpool) { |
| 244 |
} |
} |
| 245 |
compiler->cpool_unique = (sljit_ub*)(compiler->cpool + CPOOL_SIZE); |
compiler->cpool_unique = (sljit_ub*)(compiler->cpool + CPOOL_SIZE); |
| 246 |
compiler->cpool_diff = 0xffffffff; |
compiler->cpool_diff = 0xffffffff; |
|
compiler->cpool_fill = 0; |
|
|
compiler->patches = 0; |
|
| 247 |
#endif |
#endif |
| 248 |
|
|
| 249 |
#if (defined SLJIT_CONFIG_MIPS_32 && SLJIT_CONFIG_MIPS_32) |
#if (defined SLJIT_CONFIG_MIPS_32 && SLJIT_CONFIG_MIPS_32) |
|
compiler->has_locals = 0; |
|
| 250 |
compiler->delay_slot = UNMOVABLE_INS; |
compiler->delay_slot = UNMOVABLE_INS; |
| 251 |
#endif |
#endif |
| 252 |
|
|
|
#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) |
|
|
compiler->verbose = NULL; |
|
|
#endif |
|
|
|
|
|
#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) || (defined SLJIT_DEBUG && SLJIT_DEBUG) |
|
|
compiler->skip_checks = 0; |
|
|
#endif |
|
|
|
|
| 253 |
#if (defined SLJIT_NEEDS_COMPILER_INIT && SLJIT_NEEDS_COMPILER_INIT) |
#if (defined SLJIT_NEEDS_COMPILER_INIT && SLJIT_NEEDS_COMPILER_INIT) |
| 254 |
if (!compiler_initialized) { |
if (!compiler_initialized) { |
| 255 |
init_compiler(); |
init_compiler(); |
| 260 |
return compiler; |
return compiler; |
| 261 |
} |
} |
| 262 |
|
|
| 263 |
void sljit_free_compiler(struct sljit_compiler *compiler) |
SLJIT_API_FUNC_ATTRIBUTE void sljit_free_compiler(struct sljit_compiler *compiler) |
| 264 |
{ |
{ |
| 265 |
struct sljit_memory_fragment *buf; |
struct sljit_memory_fragment *buf; |
| 266 |
struct sljit_memory_fragment *curr; |
struct sljit_memory_fragment *curr; |
| 286 |
} |
} |
| 287 |
|
|
| 288 |
#if (defined SLJIT_CONFIG_ARM_THUMB2 && SLJIT_CONFIG_ARM_THUMB2) |
#if (defined SLJIT_CONFIG_ARM_THUMB2 && SLJIT_CONFIG_ARM_THUMB2) |
| 289 |
void sljit_free_code(void* code) |
SLJIT_API_FUNC_ATTRIBUTE void sljit_free_code(void* code) |
| 290 |
{ |
{ |
| 291 |
/* Remove thumb mode flag. */ |
/* Remove thumb mode flag. */ |
| 292 |
SLJIT_FREE_EXEC((void*)((sljit_uw)code & ~0x1)); |
SLJIT_FREE_EXEC((void*)((sljit_uw)code & ~0x1)); |
| 293 |
} |
} |
| 294 |
#elif (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64) |
#elif (defined SLJIT_CONFIG_PPC_64 && SLJIT_CONFIG_PPC_64) |
| 295 |
void sljit_free_code(void* code) |
SLJIT_API_FUNC_ATTRIBUTE void sljit_free_code(void* code) |
| 296 |
{ |
{ |
| 297 |
/* Resolve indirection. */ |
/* Resolve indirection. */ |
| 298 |
code = (void*)(*(sljit_uw*)code); |
code = (void*)(*(sljit_uw*)code); |
| 299 |
SLJIT_FREE_EXEC(code); |
SLJIT_FREE_EXEC(code); |
| 300 |
} |
} |
| 301 |
#else |
#else |
| 302 |
void sljit_free_code(void* code) |
SLJIT_API_FUNC_ATTRIBUTE void sljit_free_code(void* code) |
| 303 |
{ |
{ |
| 304 |
SLJIT_FREE_EXEC(code); |
SLJIT_FREE_EXEC(code); |
| 305 |
} |
} |
| 306 |
#endif |
#endif |
| 307 |
|
|
| 308 |
void sljit_set_label(struct sljit_jump *jump, struct sljit_label* label) |
SLJIT_API_FUNC_ATTRIBUTE void sljit_set_label(struct sljit_jump *jump, struct sljit_label* label) |
| 309 |
{ |
{ |
| 310 |
if (SLJIT_LIKELY(!!jump) && SLJIT_LIKELY(!!label)) { |
if (SLJIT_LIKELY(!!jump) && SLJIT_LIKELY(!!label)) { |
| 311 |
jump->flags &= ~JUMP_ADDR; |
jump->flags &= ~JUMP_ADDR; |
| 314 |
} |
} |
| 315 |
} |
} |
| 316 |
|
|
| 317 |
void sljit_set_target(struct sljit_jump *jump, sljit_uw target) |
SLJIT_API_FUNC_ATTRIBUTE void sljit_set_target(struct sljit_jump *jump, sljit_uw target) |
| 318 |
{ |
{ |
| 319 |
if (SLJIT_LIKELY(!!jump)) { |
if (SLJIT_LIKELY(!!jump)) { |
| 320 |
SLJIT_ASSERT(jump->flags & SLJIT_REWRITABLE_JUMP); |
SLJIT_ASSERT(jump->flags & SLJIT_REWRITABLE_JUMP); |
| 365 |
return new_frag->memory; |
return new_frag->memory; |
| 366 |
} |
} |
| 367 |
|
|
| 368 |
void* sljit_alloc_memory(struct sljit_compiler *compiler, int size) |
SLJIT_API_FUNC_ATTRIBUTE void* sljit_alloc_memory(struct sljit_compiler *compiler, int size) |
| 369 |
{ |
{ |
| 370 |
CHECK_ERROR_PTR(); |
CHECK_ERROR_PTR(); |
| 371 |
|
|
| 430 |
compiler->last_const = const_; |
compiler->last_const = const_; |
| 431 |
} |
} |
| 432 |
|
|
| 433 |
#define depends_on(exp, reg) \ |
#define ADDRESSING_DEPENDS_ON(exp, reg) \ |
| 434 |
(((exp) & SLJIT_MEM) && (((exp) & 0xf) == reg || (((exp) >> 4) & 0xf) == reg)) |
(((exp) & SLJIT_MEM) && (((exp) & 0xf) == reg || (((exp) >> 4) & 0xf) == reg)) |
| 435 |
|
|
| 436 |
#if (defined SLJIT_DEBUG && SLJIT_DEBUG) |
#if (defined SLJIT_DEBUG && SLJIT_DEBUG) |
| 545 |
|
|
| 546 |
#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) |
#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) |
| 547 |
|
|
| 548 |
void sljit_compiler_verbose(struct sljit_compiler *compiler, FILE* verbose) |
SLJIT_API_FUNC_ATTRIBUTE void sljit_compiler_verbose(struct sljit_compiler *compiler, FILE* verbose) |
| 549 |
{ |
{ |
| 550 |
compiler->verbose = verbose; |
compiler->verbose = verbose; |
| 551 |
} |
} |
| 644 |
(char*)"c_float_less", (char*)"c_float_greater_equal", |
(char*)"c_float_less", (char*)"c_float_greater_equal", |
| 645 |
(char*)"c_float_greater", (char*)"c_float_less_equal", |
(char*)"c_float_greater", (char*)"c_float_less_equal", |
| 646 |
(char*)"c_float_nan", (char*)"c_float_not_nan", |
(char*)"c_float_nan", (char*)"c_float_not_nan", |
| 647 |
(char*)"jump", |
(char*)"jump", (char*)"fast_call", |
| 648 |
(char*)"call0", (char*)"call1", (char*)"call2", (char*)"call3" |
(char*)"call0", (char*)"call1", (char*)"call2", (char*)"call3" |
| 649 |
}; |
}; |
| 650 |
|
|
| 874 |
#endif |
#endif |
| 875 |
} |
} |
| 876 |
|
|
| 877 |
|
static SLJIT_INLINE void check_sljit_get_register_index(int reg) |
| 878 |
|
{ |
| 879 |
|
SLJIT_UNUSED_ARG(reg); |
| 880 |
|
SLJIT_ASSERT(reg > 0 && reg <= SLJIT_NO_REGISTERS); |
| 881 |
|
} |
| 882 |
|
|
| 883 |
|
static SLJIT_INLINE void check_sljit_emit_op_custom(struct sljit_compiler *compiler, |
| 884 |
|
void *instruction, int size) |
| 885 |
|
{ |
| 886 |
|
SLJIT_UNUSED_ARG(compiler); |
| 887 |
|
SLJIT_UNUSED_ARG(instruction); |
| 888 |
|
SLJIT_UNUSED_ARG(size); |
| 889 |
|
SLJIT_ASSERT(instruction); |
| 890 |
|
} |
| 891 |
|
|
| 892 |
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, int op, |
| 893 |
int dst, sljit_w dstw, |
int dst, sljit_w dstw, |
| 894 |
int src, sljit_w srcw) |
int src, sljit_w srcw) |
| 1101 |
#endif |
#endif |
| 1102 |
|
|
| 1103 |
#if !(defined SLJIT_CONFIG_MIPS_32 && SLJIT_CONFIG_MIPS_32) |
#if !(defined SLJIT_CONFIG_MIPS_32 && SLJIT_CONFIG_MIPS_32) |
| 1104 |
struct sljit_jump* sljit_emit_cmp(struct sljit_compiler *compiler, int type, |
SLJIT_API_FUNC_ATTRIBUTE struct sljit_jump* sljit_emit_cmp(struct sljit_compiler *compiler, int type, |
| 1105 |
int src1, sljit_w src1w, |
int src1, sljit_w src1w, |
| 1106 |
int src2, sljit_w src2w) |
int src2, sljit_w src2w) |
| 1107 |
{ |
{ |
| 1173 |
|
|
| 1174 |
/* Empty function bodies for those machines, which are not (yet) supported. */ |
/* Empty function bodies for those machines, which are not (yet) supported. */ |
| 1175 |
|
|
| 1176 |
SLJIT_CONST char* sljit_get_platform_name() |
SLJIT_API_FUNC_ATTRIBUTE SLJIT_CONST char* sljit_get_platform_name() |
| 1177 |
{ |
{ |
| 1178 |
return "unsupported"; |
return "unsupported"; |
| 1179 |
} |
} |
| 1180 |
|
|
| 1181 |
struct sljit_compiler* sljit_create_compiler(void) |
SLJIT_API_FUNC_ATTRIBUTE struct sljit_compiler* sljit_create_compiler(void) |
| 1182 |
{ |
{ |
| 1183 |
SLJIT_ASSERT_STOP(); |
SLJIT_ASSERT_STOP(); |
| 1184 |
return NULL; |
return NULL; |
| 1185 |
} |
} |
| 1186 |
|
|
| 1187 |
void sljit_free_compiler(struct sljit_compiler *compiler) |
SLJIT_API_FUNC_ATTRIBUTE void sljit_free_compiler(struct sljit_compiler *compiler) |
| 1188 |
{ |
{ |
| 1189 |
SLJIT_UNUSED_ARG(compiler); |
SLJIT_UNUSED_ARG(compiler); |
| 1190 |
SLJIT_ASSERT_STOP(); |
SLJIT_ASSERT_STOP(); |
| 1191 |
} |
} |
| 1192 |
|
|
| 1193 |
void* sljit_alloc_memory(struct sljit_compiler *compiler, int size) |
SLJIT_API_FUNC_ATTRIBUTE void* sljit_alloc_memory(struct sljit_compiler *compiler, int size) |
| 1194 |
{ |
{ |
| 1195 |
SLJIT_UNUSED_ARG(compiler); |
SLJIT_UNUSED_ARG(compiler); |
| 1196 |
SLJIT_UNUSED_ARG(size); |
SLJIT_UNUSED_ARG(size); |
| 1199 |
} |
} |
| 1200 |
|
|
| 1201 |
#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) |
#if (defined SLJIT_VERBOSE && SLJIT_VERBOSE) |
| 1202 |
void sljit_compiler_verbose(struct sljit_compiler *compiler, FILE* verbose) |
SLJIT_API_FUNC_ATTRIBUTE void sljit_compiler_verbose(struct sljit_compiler *compiler, FILE* verbose) |
| 1203 |
{ |
{ |
| 1204 |
SLJIT_UNUSED_ARG(compiler); |
SLJIT_UNUSED_ARG(compiler); |
| 1205 |
SLJIT_UNUSED_ARG(verbose); |
SLJIT_UNUSED_ARG(verbose); |
| 1207 |
} |
} |
| 1208 |
#endif |
#endif |
| 1209 |
|
|
| 1210 |
void* sljit_generate_code(struct sljit_compiler *compiler) |
SLJIT_API_FUNC_ATTRIBUTE void* sljit_generate_code(struct sljit_compiler *compiler) |
| 1211 |
{ |
{ |
| 1212 |
SLJIT_UNUSED_ARG(compiler); |
SLJIT_UNUSED_ARG(compiler); |
| 1213 |
SLJIT_ASSERT_STOP(); |
SLJIT_ASSERT_STOP(); |
| 1214 |
return NULL; |
return NULL; |
| 1215 |
} |
} |
| 1216 |
|
|
| 1217 |
void sljit_free_code(void* code) |
SLJIT_API_FUNC_ATTRIBUTE void sljit_free_code(void* code) |
| 1218 |
{ |
{ |
| 1219 |
SLJIT_UNUSED_ARG(code); |
SLJIT_UNUSED_ARG(code); |
| 1220 |
SLJIT_ASSERT_STOP(); |
SLJIT_ASSERT_STOP(); |
| 1221 |
} |
} |
| 1222 |
|
|
| 1223 |
int sljit_emit_enter(struct sljit_compiler *compiler, int args, int temporaries, int generals, int local_size) |
SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_enter(struct sljit_compiler *compiler, int args, int temporaries, int generals, int local_size) |
| 1224 |
{ |
{ |
| 1225 |
SLJIT_UNUSED_ARG(compiler); |
SLJIT_UNUSED_ARG(compiler); |
| 1226 |
SLJIT_UNUSED_ARG(args); |
SLJIT_UNUSED_ARG(args); |
| 1231 |
return SLJIT_ERR_UNSUPPORTED; |
return SLJIT_ERR_UNSUPPORTED; |
| 1232 |
} |
} |
| 1233 |
|
|
| 1234 |
void sljit_fake_enter(struct sljit_compiler *compiler, int args, int temporaries, int generals, int local_size) |
SLJIT_API_FUNC_ATTRIBUTE void sljit_fake_enter(struct sljit_compiler *compiler, int args, int temporaries, int generals, int local_size) |
| 1235 |
{ |
{ |
| 1236 |
SLJIT_UNUSED_ARG(compiler); |
SLJIT_UNUSED_ARG(compiler); |
| 1237 |
SLJIT_UNUSED_ARG(args); |
SLJIT_UNUSED_ARG(args); |
| 1241 |
SLJIT_ASSERT_STOP(); |
SLJIT_ASSERT_STOP(); |
| 1242 |
} |
} |
| 1243 |
|
|
| 1244 |
int sljit_emit_return(struct sljit_compiler *compiler, int src, sljit_w srcw) |
SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_return(struct sljit_compiler *compiler, int src, sljit_w srcw) |
| 1245 |
{ |
{ |
| 1246 |
SLJIT_UNUSED_ARG(compiler); |
SLJIT_UNUSED_ARG(compiler); |
| 1247 |
SLJIT_UNUSED_ARG(src); |
SLJIT_UNUSED_ARG(src); |
| 1250 |
return SLJIT_ERR_UNSUPPORTED; |
return SLJIT_ERR_UNSUPPORTED; |
| 1251 |
} |
} |
| 1252 |
|
|
| 1253 |
int sljit_emit_fast_enter(struct sljit_compiler *compiler, int dst, sljit_w dstw, int args, int temporaries, int generals, int local_size) |
SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_fast_enter(struct sljit_compiler *compiler, int dst, sljit_w dstw, int args, int temporaries, int generals, int local_size) |
| 1254 |
{ |
{ |
| 1255 |
SLJIT_UNUSED_ARG(compiler); |
SLJIT_UNUSED_ARG(compiler); |
| 1256 |
SLJIT_UNUSED_ARG(dst); |
SLJIT_UNUSED_ARG(dst); |
| 1263 |
return SLJIT_ERR_UNSUPPORTED; |
return SLJIT_ERR_UNSUPPORTED; |
| 1264 |
} |
} |
| 1265 |
|
|
| 1266 |
int sljit_emit_fast_return(struct sljit_compiler *compiler, int src, sljit_w srcw) |
SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_fast_return(struct sljit_compiler *compiler, int src, sljit_w srcw) |
| 1267 |
{ |
{ |
| 1268 |
SLJIT_UNUSED_ARG(compiler); |
SLJIT_UNUSED_ARG(compiler); |
| 1269 |
SLJIT_UNUSED_ARG(src); |
SLJIT_UNUSED_ARG(src); |
| 1272 |
return SLJIT_ERR_UNSUPPORTED; |
return SLJIT_ERR_UNSUPPORTED; |
| 1273 |
} |
} |
| 1274 |
|
|
| 1275 |
int sljit_emit_op0(struct sljit_compiler *compiler, int op) |
SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_op0(struct sljit_compiler *compiler, int op) |
| 1276 |
{ |
{ |
| 1277 |
SLJIT_UNUSED_ARG(compiler); |
SLJIT_UNUSED_ARG(compiler); |
| 1278 |
SLJIT_UNUSED_ARG(op); |
SLJIT_UNUSED_ARG(op); |
| 1280 |
return SLJIT_ERR_UNSUPPORTED; |
return SLJIT_ERR_UNSUPPORTED; |
| 1281 |
} |
} |
| 1282 |
|
|
| 1283 |
int sljit_emit_op1(struct sljit_compiler *compiler, int op, |
SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_op1(struct sljit_compiler *compiler, int op, |
| 1284 |
int dst, sljit_w dstw, |
int dst, sljit_w dstw, |
| 1285 |
int src, sljit_w srcw) |
int src, sljit_w srcw) |
| 1286 |
{ |
{ |
| 1294 |
return SLJIT_ERR_UNSUPPORTED; |
return SLJIT_ERR_UNSUPPORTED; |
| 1295 |
} |
} |
| 1296 |
|
|
| 1297 |
int sljit_emit_op2(struct sljit_compiler *compiler, int op, |
SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_op2(struct sljit_compiler *compiler, int op, |
| 1298 |
int dst, sljit_w dstw, |
int dst, sljit_w dstw, |
| 1299 |
int src1, sljit_w src1w, |
int src1, sljit_w src1w, |
| 1300 |
int src2, sljit_w src2w) |
int src2, sljit_w src2w) |
| 1311 |
return SLJIT_ERR_UNSUPPORTED; |
return SLJIT_ERR_UNSUPPORTED; |
| 1312 |
} |
} |
| 1313 |
|
|
| 1314 |
int sljit_is_fpu_available(void) |
SLJIT_API_FUNC_ATTRIBUTE int sljit_is_fpu_available(void) |
| 1315 |
{ |
{ |
| 1316 |
SLJIT_ASSERT_STOP(); |
SLJIT_ASSERT_STOP(); |
| 1317 |
return 0; |
return 0; |
| 1318 |
} |
} |
| 1319 |
|
|
| 1320 |
int sljit_emit_fop1(struct sljit_compiler *compiler, int op, |
SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_fop1(struct sljit_compiler *compiler, int op, |
| 1321 |
int dst, sljit_w dstw, |
int dst, sljit_w dstw, |
| 1322 |
int src, sljit_w srcw) |
int src, sljit_w srcw) |
| 1323 |
{ |
{ |
| 1331 |
return SLJIT_ERR_UNSUPPORTED; |
return SLJIT_ERR_UNSUPPORTED; |
| 1332 |
} |
} |
| 1333 |
|
|
| 1334 |
int sljit_emit_fop2(struct sljit_compiler *compiler, int op, |
SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_fop2(struct sljit_compiler *compiler, int op, |
| 1335 |
int dst, sljit_w dstw, |
int dst, sljit_w dstw, |
| 1336 |
int src1, sljit_w src1w, |
int src1, sljit_w src1w, |
| 1337 |
int src2, sljit_w src2w) |
int src2, sljit_w src2w) |
| 1348 |
return SLJIT_ERR_UNSUPPORTED; |
return SLJIT_ERR_UNSUPPORTED; |
| 1349 |
} |
} |
| 1350 |
|
|
| 1351 |
struct sljit_label* sljit_emit_label(struct sljit_compiler *compiler) |
SLJIT_API_FUNC_ATTRIBUTE struct sljit_label* sljit_emit_label(struct sljit_compiler *compiler) |
| 1352 |
{ |
{ |
| 1353 |
SLJIT_UNUSED_ARG(compiler); |
SLJIT_UNUSED_ARG(compiler); |
| 1354 |
SLJIT_ASSERT_STOP(); |
SLJIT_ASSERT_STOP(); |
| 1355 |
return NULL; |
return NULL; |
| 1356 |
} |
} |
| 1357 |
|
|
| 1358 |
struct sljit_jump* sljit_emit_jump(struct sljit_compiler *compiler, int type) |
SLJIT_API_FUNC_ATTRIBUTE struct sljit_jump* sljit_emit_jump(struct sljit_compiler *compiler, int type) |
| 1359 |
{ |
{ |
| 1360 |
SLJIT_UNUSED_ARG(compiler); |
SLJIT_UNUSED_ARG(compiler); |
| 1361 |
SLJIT_UNUSED_ARG(type); |
SLJIT_UNUSED_ARG(type); |
| 1363 |
return NULL; |
return NULL; |
| 1364 |
} |
} |
| 1365 |
|
|
| 1366 |
struct sljit_jump* sljit_emit_cmp(struct sljit_compiler *compiler, int type, |
SLJIT_API_FUNC_ATTRIBUTE struct sljit_jump* sljit_emit_cmp(struct sljit_compiler *compiler, int type, |
| 1367 |
int src1, sljit_w src1w, |
int src1, sljit_w src1w, |
| 1368 |
int src2, sljit_w src2w) |
int src2, sljit_w src2w) |
| 1369 |
{ |
{ |
| 1377 |
return NULL; |
return NULL; |
| 1378 |
} |
} |
| 1379 |
|
|
| 1380 |
void sljit_set_label(struct sljit_jump *jump, struct sljit_label* label) |
SLJIT_API_FUNC_ATTRIBUTE void sljit_set_label(struct sljit_jump *jump, struct sljit_label* label) |
| 1381 |
{ |
{ |
| 1382 |
SLJIT_UNUSED_ARG(jump); |
SLJIT_UNUSED_ARG(jump); |
| 1383 |
SLJIT_UNUSED_ARG(label); |
SLJIT_UNUSED_ARG(label); |
| 1384 |
SLJIT_ASSERT_STOP(); |
SLJIT_ASSERT_STOP(); |
| 1385 |
} |
} |
| 1386 |
|
|
| 1387 |
void sljit_set_target(struct sljit_jump *jump, sljit_uw target) |
SLJIT_API_FUNC_ATTRIBUTE void sljit_set_target(struct sljit_jump *jump, sljit_uw target) |
| 1388 |
{ |
{ |
| 1389 |
SLJIT_UNUSED_ARG(jump); |
SLJIT_UNUSED_ARG(jump); |
| 1390 |
SLJIT_UNUSED_ARG(target); |
SLJIT_UNUSED_ARG(target); |
| 1391 |
SLJIT_ASSERT_STOP(); |
SLJIT_ASSERT_STOP(); |
| 1392 |
} |
} |
| 1393 |
|
|
| 1394 |
int sljit_emit_ijump(struct sljit_compiler *compiler, int type, int src, sljit_w srcw) |
SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_ijump(struct sljit_compiler *compiler, int type, int src, sljit_w srcw) |
| 1395 |
{ |
{ |
| 1396 |
SLJIT_UNUSED_ARG(compiler); |
SLJIT_UNUSED_ARG(compiler); |
| 1397 |
SLJIT_UNUSED_ARG(type); |
SLJIT_UNUSED_ARG(type); |
| 1401 |
return SLJIT_ERR_UNSUPPORTED; |
return SLJIT_ERR_UNSUPPORTED; |
| 1402 |
} |
} |
| 1403 |
|
|
| 1404 |
int sljit_emit_cond_value(struct sljit_compiler *compiler, int op, int dst, sljit_w dstw, int type) |
SLJIT_API_FUNC_ATTRIBUTE int sljit_emit_cond_value(struct sljit_compiler *compiler, int op, int dst, sljit_w dstw, int type) |
| 1405 |
{ |
{ |
| 1406 |
SLJIT_UNUSED_ARG(compiler); |
SLJIT_UNUSED_ARG(compiler); |
| 1407 |
SLJIT_UNUSED_ARG(op); |
SLJIT_UNUSED_ARG(op); |
| 1412 |
return SLJIT_ERR_UNSUPPORTED; |
return SLJIT_ERR_UNSUPPORTED; |
| 1413 |
} |
} |
| 1414 |
|
|
| 1415 |
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, int dst, sljit_w dstw, sljit_w initval) |
| 1416 |
{ |
{ |
| 1417 |
SLJIT_UNUSED_ARG(compiler); |
SLJIT_UNUSED_ARG(compiler); |
| 1418 |
SLJIT_UNUSED_ARG(dst); |
SLJIT_UNUSED_ARG(dst); |
| 1422 |
return NULL; |
return NULL; |
| 1423 |
} |
} |
| 1424 |
|
|
| 1425 |
void sljit_set_jump_addr(sljit_uw addr, sljit_uw new_addr) |
SLJIT_API_FUNC_ATTRIBUTE void sljit_set_jump_addr(sljit_uw addr, sljit_uw new_addr) |
| 1426 |
{ |
{ |
| 1427 |
SLJIT_UNUSED_ARG(addr); |
SLJIT_UNUSED_ARG(addr); |
| 1428 |
SLJIT_UNUSED_ARG(new_addr); |
SLJIT_UNUSED_ARG(new_addr); |
| 1429 |
SLJIT_ASSERT_STOP(); |
SLJIT_ASSERT_STOP(); |
| 1430 |
} |
} |
| 1431 |
|
|
| 1432 |
void sljit_set_const(sljit_uw addr, sljit_w new_constant) |
SLJIT_API_FUNC_ATTRIBUTE void sljit_set_const(sljit_uw addr, sljit_w new_constant) |
| 1433 |
{ |
{ |
| 1434 |
SLJIT_UNUSED_ARG(addr); |
SLJIT_UNUSED_ARG(addr); |
| 1435 |
SLJIT_UNUSED_ARG(new_constant); |
SLJIT_UNUSED_ARG(new_constant); |