Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Zend/zend_ini_scanner.l
Original file line number Diff line number Diff line change
Expand Up @@ -352,16 +352,16 @@ restart:
/*!re2c
re2c:yyfill:check = 0;
LNUM [0-9]+
DNUM ([0-9]*[\.][0-9]+)|([0-9]+[\.][0-9]*)
DNUM ([0-9]*[.][0-9]+)|([0-9]+[.][0-9]*)
NUMBER [-]?{LNUM}|{DNUM}
ANY_CHAR (.|[\n\t])
NEWLINE ("\r"|"\n"|"\r\n")
TABS_AND_SPACES [ \t]
WHITESPACE [ \t]+
CONSTANT [a-zA-Z_][a-zA-Z0-9_]*
LABEL_CHAR [^=\n\r\t;&|^$~(){}!"\[\]\x00]
LABEL_CHAR [^=\n\r\t;&|^$~(){}!"[\]\x00]
LABEL ({LABEL_CHAR}+)
TOKENS [:,.\[\]"'()&|^+-/*=%$!~<>?@{}]
TOKENS [:,.[\]"'()&|^+-/*=%$!~<>?@{}]
OPERATORS [&|^~()!]
DOLLAR_CURLY "${"

Expand Down
4 changes: 2 additions & 2 deletions Zend/zend_language_scanner.l
Original file line number Diff line number Diff line change
Expand Up @@ -1817,11 +1817,11 @@ OPTIONAL_WHITESPACE_OR_COMMENTS ({WHITESPACE}|{MULTI_LINE_COMMENT}|{SINGLE_LINE_
RETURN_TOKEN(T_MUL_EQUAL);
}

<ST_IN_SCRIPTING>"*\*" {
<ST_IN_SCRIPTING>"**" {
RETURN_TOKEN(T_POW);
}

<ST_IN_SCRIPTING>"*\*=" {
<ST_IN_SCRIPTING>"**=" {
RETURN_TOKEN(T_POW_EQUAL);
}

Expand Down
8 changes: 4 additions & 4 deletions docs/release-process.md
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,8 @@ slightly different steps. We'll call attention where the steps differ.
> Do *not* bump the API versions after RC1.

5. Compile and run `make test`, with and without ZTS (Zend Thread Safety), using
the correct Bison and re2c versions, e.g., for PHP 7.4, Bison 3.0.0 and re2c
0.13.4 are required, as a minimum.
the correct Bison and re2c versions, e.g., for PHP 8.5, Bison 3.0.0 and re2c
1.0.3 are required, as a minimum.

For example:

Expand Down Expand Up @@ -555,8 +555,8 @@ slightly different steps. We'll call attention where the steps differ.
an example.

6. Compile and run `make test`, with and without ZTS (Zend Thread Safety), using
the correct Bison and re2c versions, e.g., for PHP 7.4, Bison 3.0.0 and re2c
0.13.4 are required, as a minimum.
the correct Bison and re2c versions, e.g., for PHP 8.5, Bison 3.0.0 and re2c
1.0.3 are required, as a minimum.

For example:

Expand Down
2 changes: 1 addition & 1 deletion ext/mysqlnd/mysqlnd_vio.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#ifndef PHP_WIN32
#include <netinet/tcp.h>
#else
#include <winsock.h>
#include <winsock2.h>
#endif


Expand Down
4 changes: 3 additions & 1 deletion ext/opcache/jit/ir/ir.c
Original file line number Diff line number Diff line change
Expand Up @@ -803,7 +803,9 @@ ir_ref ir_proto(ir_ctx *ctx, uint8_t flags, ir_type ret_type, uint32_t params_co
proto->flags = flags;
proto->ret_type = ret_type;
proto->params_count = params_count;
memcpy(proto->param_types, param_types, params_count);
if (params_count) {
memcpy(proto->param_types, param_types, params_count);
}
return ir_strl(ctx, (const char *)proto, offsetof(ir_proto_t, param_types) + params_count);
}

Expand Down
5 changes: 4 additions & 1 deletion ext/opcache/jit/ir/ir.h
Original file line number Diff line number Diff line change
Expand Up @@ -854,6 +854,9 @@ void ir_gdb_unregister_all(void);
bool ir_gdb_present(void);

/* IR load API (implementation in ir_load.c) */
#define IR_RESOLVE_SYM_ADD_THUNK (1<<0)
#define IR_RESOLVE_SYM_SILENT (1<<1)

struct _ir_loader {
uint32_t default_func_flags;
bool (*init_module) (ir_loader *loader, const char *name, const char *filename, const char *target);
Expand All @@ -870,7 +873,7 @@ struct _ir_loader {
bool (*sym_data_end) (ir_loader *loader, uint32_t flags);
bool (*func_init) (ir_loader *loader, ir_ctx *ctx, const char *name);
bool (*func_process) (ir_loader *loader, ir_ctx *ctx, const char *name);
void*(*resolve_sym_name) (ir_loader *loader, const char *name, bool add_thunk);
void*(*resolve_sym_name) (ir_loader *loader, const char *name, uint32_t flags);
bool (*has_sym) (ir_loader *loader, const char *name);
bool (*add_sym) (ir_loader *loader, const char *name, void *addr);
};
Expand Down
41 changes: 33 additions & 8 deletions ext/opcache/jit/ir/ir_aarch64.dasc
Original file line number Diff line number Diff line change
Expand Up @@ -4366,11 +4366,15 @@ static void ir_emit_va_arg(ir_ctx *ctx, ir_ref def, ir_insn *insn)
ir_backend_data *data = ctx->data;
dasm_State **Dst = &data->dasm_state;
ir_type type = insn->type;
ir_reg def_reg = ctx->regs[def][0];
ir_reg def_reg = IR_REG_NUM(ctx->regs[def][0]);
ir_reg op2_reg = ctx->regs[def][2];
ir_reg tmp_reg = ctx->regs[def][3];
int32_t offset;

if (ctx->use_lists[def].count == 1) {
/* dead load */
return;
}
IR_ASSERT(def_reg != IR_REG_NONE && tmp_reg != IR_REG_NONE);
if (op2_reg != IR_REG_NONE) {
if (IR_REG_SPILLED(op2_reg)) {
Expand All @@ -4394,11 +4398,15 @@ static void ir_emit_va_arg(ir_ctx *ctx, ir_ref def, ir_insn *insn)
ir_backend_data *data = ctx->data;
dasm_State **Dst = &data->dasm_state;
ir_type type = insn->type;
ir_reg def_reg = ctx->regs[def][0];
ir_reg def_reg = IR_REG_NUM(ctx->regs[def][0]);
ir_reg op2_reg = ctx->regs[def][2];
ir_reg tmp_reg = ctx->regs[def][3];
int32_t offset;

if (ctx->use_lists[def].count == 1) {
/* dead load */
return;
}
IR_ASSERT(def_reg != IR_REG_NONE && tmp_reg != IR_REG_NONE);
if (op2_reg != IR_REG_NONE) {
if (IR_REG_SPILLED(op2_reg)) {
Expand Down Expand Up @@ -4935,6 +4943,28 @@ static void ir_emit_tailcall(ir_ctx *ctx, ir_ref def, ir_insn *insn)
return;
}

/* Move op2 to a tmp register before epilogue if it's in
* used_preserved_regs, because it will be overridden. */

ir_reg op2_reg = IR_REG_NONE;
if (!IR_IS_CONST_REF(insn->op2)) {
op2_reg = ctx->regs[def][2];
IR_ASSERT(op2_reg != IR_REG_NONE);

if (IR_REG_SPILLED(op2_reg)) {
op2_reg = IR_REG_INT_TMP;
ir_emit_load(ctx, IR_ADDR, op2_reg, insn->op2);
} else if (IR_REGSET_IN((ir_regset)ctx->used_preserved_regs, IR_REG_NUM(op2_reg))) {
ir_reg orig_op2_reg = op2_reg;
op2_reg = IR_REG_INT_TMP;

ir_type type = ctx->ir_base[insn->op2].type;
| ASM_REG_REG_OP mov, type, op2_reg, IR_REG_NUM(orig_op2_reg)
} else {
op2_reg = IR_REG_NUM(op2_reg);
}
}

ir_emit_epilogue(ctx);

if (IR_IS_CONST_REF(insn->op2)) {
Expand All @@ -4947,13 +4977,8 @@ static void ir_emit_tailcall(ir_ctx *ctx, ir_ref def, ir_insn *insn)
| br Rx(IR_REG_INT_TMP)
}
} else {
ir_reg op2_reg = ctx->regs[def][2];

IR_ASSERT(op2_reg != IR_REG_NONE);
if (IR_REG_SPILLED(op2_reg)) {
op2_reg = IR_REG_NUM(op2_reg);
ir_emit_load(ctx, IR_ADDR, op2_reg, insn->op2);
}
IR_ASSERT(!IR_REGSET_IN((ir_regset)ctx->used_preserved_regs, op2_reg));
| br Rx(op2_reg)
}
}
Expand Down
Loading
Loading