"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "sljit/sljitNativeARM_T2_32.c" between
pcre-8.43.tar.bz2 and pcre-8.44.tar.bz2

About: The PCRE library implements Perl compatible regular expression pattern matching.

sljitNativeARM_T2_32.c  (pcre-8.43.tar.bz2):sljitNativeARM_T2_32.c  (pcre-8.44.tar.bz2)
skipping to change at line 368 skipping to change at line 368
} }
SLJIT_API_FUNC_ATTRIBUTE void* sljit_generate_code(struct sljit_compiler *compil er) SLJIT_API_FUNC_ATTRIBUTE void* sljit_generate_code(struct sljit_compiler *compil er)
{ {
struct sljit_memory_fragment *buf; struct sljit_memory_fragment *buf;
sljit_u16 *code; sljit_u16 *code;
sljit_u16 *code_ptr; sljit_u16 *code_ptr;
sljit_u16 *buf_ptr; sljit_u16 *buf_ptr;
sljit_u16 *buf_end; sljit_u16 *buf_end;
sljit_uw half_count; sljit_uw half_count;
sljit_uw next_addr;
sljit_sw executable_offset; sljit_sw executable_offset;
struct sljit_label *label; struct sljit_label *label;
struct sljit_jump *jump; struct sljit_jump *jump;
struct sljit_const *const_; struct sljit_const *const_;
struct sljit_put_label *put_label;
CHECK_ERROR_PTR(); CHECK_ERROR_PTR();
CHECK_PTR(check_sljit_generate_code(compiler)); CHECK_PTR(check_sljit_generate_code(compiler));
reverse_buf(compiler); reverse_buf(compiler);
code = (sljit_u16*)SLJIT_MALLOC_EXEC(compiler->size * sizeof(sljit_u16)); code = (sljit_u16*)SLJIT_MALLOC_EXEC(compiler->size * sizeof(sljit_u16));
PTR_FAIL_WITH_EXEC_IF(code); PTR_FAIL_WITH_EXEC_IF(code);
buf = compiler->buf; buf = compiler->buf;
code_ptr = code; code_ptr = code;
half_count = 0; half_count = 0;
next_addr = 0;
executable_offset = SLJIT_EXEC_OFFSET(code); executable_offset = SLJIT_EXEC_OFFSET(code);
label = compiler->labels; label = compiler->labels;
jump = compiler->jumps; jump = compiler->jumps;
const_ = compiler->consts; const_ = compiler->consts;
put_label = compiler->put_labels;
do { do {
buf_ptr = (sljit_u16*)buf->memory; buf_ptr = (sljit_u16*)buf->memory;
buf_end = buf_ptr + (buf->used_size >> 1); buf_end = buf_ptr + (buf->used_size >> 1);
do { do {
*code_ptr = *buf_ptr++; *code_ptr = *buf_ptr++;
/* These structures are ordered by their address. */ if (next_addr == half_count) {
SLJIT_ASSERT(!label || label->size >= half_count); SLJIT_ASSERT(!label || label->size >= half_count)
SLJIT_ASSERT(!jump || jump->addr >= half_count); ;
SLJIT_ASSERT(!const_ || const_->addr >= half_count); SLJIT_ASSERT(!jump || jump->addr >= half_count);
if (label && label->size == half_count) { SLJIT_ASSERT(!const_ || const_->addr >= half_coun
label->addr = ((sljit_uw)SLJIT_ADD_EXEC_OFFSET(co t);
de_ptr, executable_offset)) | 0x1; SLJIT_ASSERT(!put_label || put_label->addr >= hal
label->size = code_ptr - code; f_count);
label = label->next;
} /* These structures are ordered by their address.
if (jump && jump->addr == half_count) { */
jump->addr = (sljit_uw)code_ptr - ((jump- if (label && label->size == half_count) {
>flags & IS_COND) ? 10 : 8); label->addr = ((sljit_uw)SLJIT_ADD_EXEC_O
code_ptr -= detect_jump_type(jump, code_p FFSET(code_ptr, executable_offset)) | 0x1;
tr, code, executable_offset); label->size = code_ptr - code;
jump = jump->next; label = label->next;
} }
if (const_ && const_->addr == half_count) { if (jump && jump->addr == half_count) {
const_->addr = (sljit_uw)code_ptr; jump->addr = (sljit_uw)code_ptr -
const_ = const_->next; ((jump->flags & IS_COND) ? 10 : 8);
code_ptr -= detect_jump_type(jump
, code_ptr, code, executable_offset);
jump = jump->next;
}
if (const_ && const_->addr == half_count) {
const_->addr = (sljit_uw)code_ptr;
const_ = const_->next;
}
if (put_label && put_label->addr == half_count) {
SLJIT_ASSERT(put_label->label);
put_label->addr = (sljit_uw)code_ptr;
put_label = put_label->next;
}
next_addr = compute_next_addr(label, jump, const_
, put_label);
} }
code_ptr ++; code_ptr ++;
half_count ++; half_count ++;
} while (buf_ptr < buf_end); } while (buf_ptr < buf_end);
buf = buf->next; buf = buf->next;
} while (buf); } while (buf);
if (label && label->size == half_count) { if (label && label->size == half_count) {
label->addr = ((sljit_uw)SLJIT_ADD_EXEC_OFFSET(code_ptr, executab le_offset)) | 0x1; label->addr = ((sljit_uw)SLJIT_ADD_EXEC_OFFSET(code_ptr, executab le_offset)) | 0x1;
label->size = code_ptr - code; label->size = code_ptr - code;
label = label->next; label = label->next;
} }
SLJIT_ASSERT(!label); SLJIT_ASSERT(!label);
SLJIT_ASSERT(!jump); SLJIT_ASSERT(!jump);
SLJIT_ASSERT(!const_); SLJIT_ASSERT(!const_);
SLJIT_ASSERT(!put_label);
SLJIT_ASSERT(code_ptr - code <= (sljit_sw)compiler->size); SLJIT_ASSERT(code_ptr - code <= (sljit_sw)compiler->size);
jump = compiler->jumps; jump = compiler->jumps;
while (jump) { while (jump) {
set_jump_instruction(jump, executable_offset); set_jump_instruction(jump, executable_offset);
jump = jump->next; jump = jump->next;
} }
put_label = compiler->put_labels;
while (put_label) {
modify_imm32_const((sljit_u16 *)put_label->addr, put_label->label
->addr);
put_label = put_label->next;
}
compiler->error = SLJIT_ERR_COMPILED; compiler->error = SLJIT_ERR_COMPILED;
compiler->executable_offset = executable_offset; compiler->executable_offset = executable_offset;
compiler->executable_size = (code_ptr - code) * sizeof(sljit_u16); compiler->executable_size = (code_ptr - code) * sizeof(sljit_u16);
code = (sljit_u16 *)SLJIT_ADD_EXEC_OFFSET(code, executable_offset); code = (sljit_u16 *)SLJIT_ADD_EXEC_OFFSET(code, executable_offset);
code_ptr = (sljit_u16 *)SLJIT_ADD_EXEC_OFFSET(code_ptr, executable_offset ); code_ptr = (sljit_u16 *)SLJIT_ADD_EXEC_OFFSET(code_ptr, executable_offset );
SLJIT_CACHE_FLUSH(code, code_ptr); SLJIT_CACHE_FLUSH(code, code_ptr);
/* Set thumb mode flag. */ /* Set thumb mode flag. */
return (void*)((sljit_uw)code | 0x1); return (void*)((sljit_uw)code | 0x1);
skipping to change at line 2314 skipping to change at line 2335
set_const(const_, compiler); set_const(const_, compiler);
dst_r = FAST_IS_REG(dst) ? dst : TMP_REG1; dst_r = FAST_IS_REG(dst) ? dst : TMP_REG1;
PTR_FAIL_IF(emit_imm32_const(compiler, dst_r, init_value)); PTR_FAIL_IF(emit_imm32_const(compiler, dst_r, init_value));
if (dst & SLJIT_MEM) if (dst & SLJIT_MEM)
PTR_FAIL_IF(emit_op_mem(compiler, WORD_SIZE | STORE, dst_r, dst, dstw, TMP_REG2)); PTR_FAIL_IF(emit_op_mem(compiler, WORD_SIZE | STORE, dst_r, dst, dstw, TMP_REG2));
return const_; return const_;
} }
SLJIT_API_FUNC_ATTRIBUTE struct sljit_put_label* sljit_emit_put_label(struct slj
it_compiler *compiler, sljit_s32 dst, sljit_sw dstw)
{
struct sljit_put_label *put_label;
sljit_s32 dst_r;
CHECK_ERROR_PTR();
CHECK_PTR(check_sljit_emit_put_label(compiler, dst, dstw));
ADJUST_LOCAL_OFFSET(dst, dstw);
put_label = (struct sljit_put_label*)ensure_abuf(compiler, sizeof(struct
sljit_put_label));
PTR_FAIL_IF(!put_label);
set_put_label(put_label, compiler, 0);
dst_r = FAST_IS_REG(dst) ? dst : TMP_REG1;
PTR_FAIL_IF(emit_imm32_const(compiler, dst_r, 0));
if (dst & SLJIT_MEM)
PTR_FAIL_IF(emit_op_mem(compiler, WORD_SIZE | STORE, dst_r, dst,
dstw, TMP_REG2));
return put_label;
}
SLJIT_API_FUNC_ATTRIBUTE void sljit_set_jump_addr(sljit_uw addr, sljit_uw new_ta rget, sljit_sw executable_offset) SLJIT_API_FUNC_ATTRIBUTE void sljit_set_jump_addr(sljit_uw addr, sljit_uw new_ta rget, sljit_sw executable_offset)
{ {
sljit_u16 *inst = (sljit_u16*)addr; sljit_u16 *inst = (sljit_u16*)addr;
modify_imm32_const(inst, new_target); modify_imm32_const(inst, new_target);
inst = (sljit_u16 *)SLJIT_ADD_EXEC_OFFSET(inst, executable_offset); inst = (sljit_u16 *)SLJIT_ADD_EXEC_OFFSET(inst, executable_offset);
SLJIT_CACHE_FLUSH(inst, inst + 4); SLJIT_CACHE_FLUSH(inst, inst + 4);
} }
SLJIT_API_FUNC_ATTRIBUTE void sljit_set_const(sljit_uw addr, sljit_sw new_consta nt, sljit_sw executable_offset) SLJIT_API_FUNC_ATTRIBUTE void sljit_set_const(sljit_uw addr, sljit_sw new_consta nt, sljit_sw executable_offset)
{ {
 End of changes. 8 change blocks. 
20 lines changed or deleted 71 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)