Skip to content

Commit afca741

Browse files
committed
Update IR
IR commit: a2f8452b3d35a756cba38924f5c51a48a7207494
1 parent b4f6366 commit afca741

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

ext/opcache/jit/ir/ir.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -778,7 +778,7 @@ static ir_ref _ir_fold_cse(ir_ctx *ctx, uint32_t opt, ir_ref op1, ir_ref op2, ir
778778
#define IR_FOLD_KEY(x) ((x) & 0x1fffff)
779779

780780
/*
781-
* key = insn->op | (insn->op1->op << 7) | (insn->op1->op << 14)
781+
* key = insn->op | (insn->op1->op << 7) | (insn->op2->op << 14)
782782
*
783783
* ANY and UNUSED ops are represented by 0
784784
*/

ext/opcache/jit/ir/ir_strtab.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ static uint32_t ir_str_hash(const char *str, size_t len)
2929

3030
static uint32_t ir_strtab_hash_size(uint32_t size)
3131
{
32+
/* Use big enough power of 2 */
3233
size -= 1;
3334
size |= (size >> 1);
3435
size |= (size >> 2);
@@ -48,7 +49,7 @@ static void ir_strtab_resize(ir_strtab *strtab)
4849
ir_strtab_bucket *p;
4950
uint32_t pos, i;
5051

51-
memset(data, -1, hash_size * sizeof(uint32_t));
52+
memset(data, IR_INVALID_IDX, hash_size * sizeof(uint32_t));
5253
strtab->data = data + (hash_size * sizeof(uint32_t));
5354
strtab->mask = (uint32_t)(-(int32_t)hash_size);
5455
strtab->size = size;
@@ -94,7 +95,7 @@ void ir_strtab_init(ir_strtab *strtab, uint32_t size, uint32_t buf_size)
9495
IR_ASSERT(size > 0);
9596
uint32_t hash_size = ir_strtab_hash_size(size);
9697
char *data = ir_mem_malloc(hash_size * sizeof(uint32_t) + size * sizeof(ir_strtab_bucket));
97-
memset(data, -1, hash_size * sizeof(uint32_t));
98+
memset(data, IR_INVALID_IDX, hash_size * sizeof(uint32_t));
9899
strtab->data = (data + (hash_size * sizeof(uint32_t)));
99100
strtab->mask = (uint32_t)(-(int32_t)hash_size);
100101
strtab->size = size;

ext/opcache/jit/ir/ir_x86.dasc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3328,7 +3328,7 @@ static void ir_emit_mul_div_mod(ir_ctx *ctx, ir_ref def, ir_insn *insn)
33283328

33293329
| mov byte [Ra(fp)+offset], ah
33303330
}
3331-
} else if (def_reg != IR_REG_RDX) {
3331+
} else {
33323332
if (def_reg != IR_REG_NONE) {
33333333
if (def_reg != IR_REG_RDX) {
33343334
ir_emit_mov(ctx, type, def_reg, IR_REG_RDX);

0 commit comments

Comments
 (0)