"Fossies" - the Fresh Open Source Software Archive  

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

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

sljitNativeX86_64.c  (pcre-8.43.tar.bz2):sljitNativeX86_64.c  (pcre-8.44.tar.bz2)
skipping to change at line 42 skipping to change at line 42
inst = (sljit_u8*)ensure_buf(compiler, 1 + 2 + sizeof(sljit_sw)); inst = (sljit_u8*)ensure_buf(compiler, 1 + 2 + sizeof(sljit_sw));
FAIL_IF(!inst); FAIL_IF(!inst);
INC_SIZE(2 + sizeof(sljit_sw)); INC_SIZE(2 + sizeof(sljit_sw));
*inst++ = REX_W | ((reg_map[reg] <= 7) ? 0 : REX_B); *inst++ = REX_W | ((reg_map[reg] <= 7) ? 0 : REX_B);
*inst++ = MOV_r_i32 + (reg_map[reg] & 0x7); *inst++ = MOV_r_i32 + (reg_map[reg] & 0x7);
sljit_unaligned_store_sw(inst, imm); sljit_unaligned_store_sw(inst, imm);
return SLJIT_SUCCESS; return SLJIT_SUCCESS;
} }
static sljit_u8* generate_far_jump_code(struct sljit_jump *jump, sljit_u8 *code_ ptr, sljit_s32 type) static sljit_u8* generate_far_jump_code(struct sljit_jump *jump, sljit_u8 *code_ ptr)
{ {
sljit_s32 type = jump->flags >> TYPE_SHIFT;
int short_addr = !(jump->flags & SLJIT_REWRITABLE_JUMP) && !(jump->flags & JUMP_LABEL) && (jump->u.target <= 0xffffffff); int short_addr = !(jump->flags & SLJIT_REWRITABLE_JUMP) && !(jump->flags & JUMP_LABEL) && (jump->u.target <= 0xffffffff);
/* The relative jump below specialized for this case. */ /* The relative jump below specialized for this case. */
SLJIT_ASSERT(reg_map[TMP_REG2] >= 8); SLJIT_ASSERT(reg_map[TMP_REG2] >= 8);
if (type < SLJIT_JUMP) { if (type < SLJIT_JUMP) {
/* Invert type. */ /* Invert type. */
*code_ptr++ = get_jump_code(type ^ 0x1) - 0x10; *code_ptr++ = get_jump_code(type ^ 0x1) - 0x10;
*code_ptr++ = short_addr ? (6 + 3) : (10 + 3); *code_ptr++ = short_addr ? (6 + 3) : (10 + 3);
} }
skipping to change at line 75 skipping to change at line 77
code_ptr += short_addr ? sizeof(sljit_s32) : sizeof(sljit_sw); code_ptr += short_addr ? sizeof(sljit_s32) : sizeof(sljit_sw);
*code_ptr++ = REX_B; *code_ptr++ = REX_B;
*code_ptr++ = GROUP_FF; *code_ptr++ = GROUP_FF;
*code_ptr++ = MOD_REG | (type >= SLJIT_FAST_CALL ? CALL_rm : JMP_rm) | re g_lmap[TMP_REG2]; *code_ptr++ = MOD_REG | (type >= SLJIT_FAST_CALL ? CALL_rm : JMP_rm) | re g_lmap[TMP_REG2];
return code_ptr; return code_ptr;
} }
static sljit_u8* generate_put_label_code(struct sljit_put_label *put_label, slji
t_u8 *code_ptr, sljit_uw max_label)
{
if (max_label > HALFWORD_MAX) {
put_label->addr -= put_label->flags;
put_label->flags = PATCH_MD;
return code_ptr;
}
if (put_label->flags == 0) {
/* Destination is register. */
code_ptr = (sljit_u8*)put_label->addr - 2 - sizeof(sljit_uw);
SLJIT_ASSERT((code_ptr[0] & 0xf8) == REX_W);
SLJIT_ASSERT((code_ptr[1] & 0xf8) == MOV_r_i32);
if ((code_ptr[0] & 0x07) != 0) {
code_ptr[0] = (sljit_u8)(code_ptr[0] & ~0x08);
code_ptr += 2 + sizeof(sljit_s32);
}
else {
code_ptr[0] = code_ptr[1];
code_ptr += 1 + sizeof(sljit_s32);
}
put_label->addr = (sljit_uw)code_ptr;
return code_ptr;
}
code_ptr -= put_label->flags + (2 + sizeof(sljit_uw));
SLJIT_MEMMOVE(code_ptr, code_ptr + (2 + sizeof(sljit_uw)), put_label->fla
gs);
SLJIT_ASSERT((code_ptr[0] & 0xf8) == REX_W);
if ((code_ptr[1] & 0xf8) == MOV_r_i32) {
code_ptr += 2 + sizeof(sljit_uw);
SLJIT_ASSERT((code_ptr[0] & 0xf8) == REX_W);
}
SLJIT_ASSERT(code_ptr[1] == MOV_rm_r);
code_ptr[0] = (sljit_u8)(code_ptr[0] & ~0x4);
code_ptr[1] = MOV_rm_i32;
code_ptr[2] = (sljit_u8)(code_ptr[2] & ~(0x7 << 3));
code_ptr = (sljit_u8*)(put_label->addr - (2 + sizeof(sljit_uw)) + sizeof(
sljit_s32));
put_label->addr = (sljit_uw)code_ptr;
put_label->flags = 0;
return code_ptr;
}
SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_enter(struct sljit_compiler *compi ler, SLJIT_API_FUNC_ATTRIBUTE sljit_s32 sljit_emit_enter(struct sljit_compiler *compi ler,
sljit_s32 options, sljit_s32 arg_types, sljit_s32 scratches, sljit_s32 sa veds, sljit_s32 options, sljit_s32 arg_types, sljit_s32 scratches, sljit_s32 sa veds,
sljit_s32 fscratches, sljit_s32 fsaveds, sljit_s32 local_size) sljit_s32 fscratches, sljit_s32 fsaveds, sljit_s32 local_size)
{ {
sljit_s32 args, i, tmp, size, saved_register_size; sljit_s32 args, i, tmp, size, saved_register_size;
sljit_u8 *inst; sljit_u8 *inst;
CHECK_ERROR(); CHECK_ERROR();
CHECK(check_sljit_emit_enter(compiler, options, arg_types, scratches, sav eds, fscratches, fsaveds, local_size)); CHECK(check_sljit_emit_enter(compiler, options, arg_types, scratches, sav eds, fscratches, fsaveds, local_size));
set_emit_enter(compiler, options, arg_types, scratches, saveds, fscratche s, fsaveds, local_size); set_emit_enter(compiler, options, arg_types, scratches, saveds, fscratche s, fsaveds, local_size);
 End of changes. 3 change blocks. 
1 lines changed or deleted 56 lines changed or added

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