Skip to content

Commit bf11352

Browse files
committed
Update IR and remove unused IR files
IR commit: 399a38771393c202a741336643118991290b4b1b
1 parent 9a4b5c6 commit bf11352

File tree

4 files changed

+10
-1651
lines changed

4 files changed

+10
-1651
lines changed

ext/opcache/jit/ir/ir_builder.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -414,8 +414,8 @@ extern "C" {
414414
#define ir_COPY_I16(_op1) ir_UNARY_OP_I16(IR_COPY, (_op1))
415415
#define ir_COPY_I32(_op1) ir_UNARY_OP_I32(IR_COPY, (_op1))
416416
#define ir_COPY_I64(_op1) ir_UNARY_OP_I64(IR_COPY, (_op1))
417-
#define ir_COPY_D(_op1) ir_UNARY_OP_I64(IR_COPY, (_op1))
418-
#define ir_COPY_F(_op1) ir_UNARY_OP_I64(IR_COPY, (_op1))
417+
#define ir_COPY_D(_op1) ir_UNARY_OP_D(IR_COPY, (_op1))
418+
#define ir_COPY_F(_op1) ir_UNARY_OP_F(IR_COPY, (_op1))
419419

420420
/* Helper to add address with a constant offset */
421421
#define ir_ADD_OFFSET(_addr, _offset) _ir_ADD_OFFSET(_ir_CTX, (_addr), (_offset))
@@ -432,8 +432,8 @@ extern "C" {
432432
#define ir_HARD_COPY_I16(_op1) ir_BINARY_OP_I16(IR_COPY, (_op1), 1)
433433
#define ir_HARD_COPY_I32(_op1) ir_BINARY_OP_I32(IR_COPY, (_op1), 1)
434434
#define ir_HARD_COPY_I64(_op1) ir_BINARY_OP_I64(IR_COPY, (_op1), 1)
435-
#define ir_HARD_COPY_D(_op1) ir_BINARY_OP_I64(IR_COPY, (_op1), 1)
436-
#define ir_HARD_COPY_F(_op1) ir_BINARY_OP_I64(IR_COPY, (_op1), 1)
435+
#define ir_HARD_COPY_D(_op1) ir_BINARY_OP_D(IR_COPY, (_op1), 1)
436+
#define ir_HARD_COPY_F(_op1) ir_BINARY_OP_F(IR_COPY, (_op1), 1)
437437

438438
#define ir_PARAM(_type, _name, _num) _ir_PARAM(_ir_CTX, (_type), (_name), (_num))
439439
#define ir_VAR(_type, _name) _ir_VAR(_ir_CTX, (_type), (_name))

ext/opcache/jit/ir/ir_disasm.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -488,6 +488,12 @@ int ir_disasm(const char *name,
488488
fprintf(f, " %" PRIx64 ":", insn->address);
489489
}
490490
p = insn->op_str;
491+
#if defined(IR_TARGET_X64) && (CS_API_MAJOR < 5)
492+
/* Fix capstone MOVD/MOVQ disassemble mismatch */
493+
if (insn->id == X86_INS_MOVQ && strcmp(insn->mnemonic, "movd") == 0) {
494+
insn->mnemonic[3] = 'q';
495+
}
496+
#endif
491497
if (strlen(p) == 0) {
492498
fprintf(f, "\t%s\n", insn->mnemonic);
493499
continue;

0 commit comments

Comments
 (0)