Skip to content

Commit ef1a1a0

Browse files
committed
Separate "cold" parts of comparison instructions
1 parent be94c0c commit ef1a1a0

File tree

6 files changed

+958
-1710
lines changed

6 files changed

+958
-1710
lines changed

Zend/zend_execute.c

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4518,6 +4518,14 @@ static zend_never_inline int ZEND_FASTCALL zend_quick_check_constant(
45184518
ZEND_VM_CONTINUE(); \
45194519
} \
45204520
} while (0)
4521+
#define ZEND_VM_SMART_BRANCH_TRUE_JMPZ() do { \
4522+
ZEND_VM_SET_NEXT_OPCODE(opline + 2); \
4523+
ZEND_VM_CONTINUE(); \
4524+
} while (0)
4525+
#define ZEND_VM_SMART_BRANCH_TRUE_JMPNZ() do { \
4526+
ZEND_VM_SET_OPCODE(OP_JMP_ADDR(opline + 1, (opline+1)->op2)); \
4527+
ZEND_VM_CONTINUE(); \
4528+
} while (0)
45214529
#define ZEND_VM_SMART_BRANCH_FALSE() do { \
45224530
if (EXPECTED((opline+1)->opcode == ZEND_JMPNZ)) { \
45234531
ZEND_VM_SET_NEXT_OPCODE(opline + 2); \
@@ -4527,6 +4535,14 @@ static zend_never_inline int ZEND_FASTCALL zend_quick_check_constant(
45274535
ZEND_VM_CONTINUE(); \
45284536
} \
45294537
} while (0)
4538+
#define ZEND_VM_SMART_BRANCH_FALSE_JMPZ() do { \
4539+
ZEND_VM_SET_OPCODE(OP_JMP_ADDR(opline + 1, (opline+1)->op2)); \
4540+
ZEND_VM_CONTINUE(); \
4541+
} while (0)
4542+
#define ZEND_VM_SMART_BRANCH_FALSE_JMPNZ() do { \
4543+
ZEND_VM_SET_NEXT_OPCODE(opline + 2); \
4544+
ZEND_VM_CONTINUE(); \
4545+
} while (0)
45304546
#else
45314547
# define ZEND_VM_REPEATABLE_OPCODE
45324548
# define ZEND_VM_REPEAT_OPCODE(_opcode)

0 commit comments

Comments
 (0)