Skip to content

Commit e3756c6

Browse files
committed
Merge branch 'PHP-8.4'
* PHP-8.4: Update IR [ci skip] Update NEWS for PHP 8.4.0RC4
2 parents a47d823 + 56381e8 commit e3756c6

File tree

2 files changed

+44
-0
lines changed

2 files changed

+44
-0
lines changed

ext/opcache/jit/ir/ir.c

+40
Original file line numberDiff line numberDiff line change
@@ -2369,6 +2369,24 @@ ir_ref _ir_CALL_5(ir_ctx *ctx, ir_type type, ir_ref func, ir_ref arg1, ir_ref ar
23692369
return call;
23702370
}
23712371

2372+
ir_ref _ir_CALL_6(ir_ctx *ctx, ir_type type, ir_ref func, ir_ref arg1, ir_ref arg2, ir_ref arg3, ir_ref arg4, ir_ref arg5, ir_ref arg6)
2373+
{
2374+
ir_ref call;
2375+
2376+
IR_ASSERT(ctx->control);
2377+
call = ir_emit_N(ctx, IR_OPT(IR_CALL, type), 8);
2378+
ir_set_op(ctx, call, 1, ctx->control);
2379+
ir_set_op(ctx, call, 2, func);
2380+
ir_set_op(ctx, call, 3, arg1);
2381+
ir_set_op(ctx, call, 4, arg2);
2382+
ir_set_op(ctx, call, 5, arg3);
2383+
ir_set_op(ctx, call, 6, arg4);
2384+
ir_set_op(ctx, call, 7, arg5);
2385+
ir_set_op(ctx, call, 8, arg6);
2386+
ctx->control = call;
2387+
return call;
2388+
}
2389+
23722390
ir_ref _ir_CALL_N(ir_ctx *ctx, ir_type type, ir_ref func, uint32_t count, ir_ref *args)
23732391
{
23742392
ir_ref call;
@@ -2493,6 +2511,28 @@ void _ir_TAILCALL_5(ir_ctx *ctx, ir_type type, ir_ref func, ir_ref arg1, ir_ref
24932511
_ir_UNREACHABLE(ctx);
24942512
}
24952513

2514+
void _ir_TAILCALL_6(ir_ctx *ctx, ir_type type, ir_ref func, ir_ref arg1, ir_ref arg2, ir_ref arg3, ir_ref arg4, ir_ref arg5, ir_ref arg6)
2515+
{
2516+
ir_ref call;
2517+
2518+
IR_ASSERT(ctx->control);
2519+
if (ctx->ret_type == (ir_type)-1) {
2520+
ctx->ret_type = type;
2521+
}
2522+
IR_ASSERT(ctx->ret_type == type && "conflicting return type");
2523+
call = ir_emit_N(ctx, IR_OPT(IR_TAILCALL, type), 8);
2524+
ir_set_op(ctx, call, 1, ctx->control);
2525+
ir_set_op(ctx, call, 2, func);
2526+
ir_set_op(ctx, call, 3, arg1);
2527+
ir_set_op(ctx, call, 4, arg2);
2528+
ir_set_op(ctx, call, 5, arg3);
2529+
ir_set_op(ctx, call, 6, arg4);
2530+
ir_set_op(ctx, call, 7, arg5);
2531+
ir_set_op(ctx, call, 8, arg6);
2532+
ctx->control = call;
2533+
_ir_UNREACHABLE(ctx);
2534+
}
2535+
24962536
void _ir_TAILCALL_N(ir_ctx *ctx, ir_type type, ir_ref func, uint32_t count, ir_ref *args)
24972537
{
24982538
ir_ref call;

ext/opcache/jit/ir/ir_builder.h

+4
Original file line numberDiff line numberDiff line change
@@ -514,6 +514,7 @@ extern "C" {
514514
#define ir_CALL_3(type, func, a1, a2, a3) _ir_CALL_3(_ir_CTX, type, func, a1, a2, a3)
515515
#define ir_CALL_4(type, func, a1, a2, a3, a4) _ir_CALL_4(_ir_CTX, type, func, a1, a2, a3, a4)
516516
#define ir_CALL_5(type, func, a1, a2, a3, a4, a5) _ir_CALL_5(_ir_CTX, type, func, a1, a2, a3, a4, a5)
517+
#define ir_CALL_6(type, func, a, b, c, d, e, f) _ir_CALL_6(_ir_CTX, type, func, a, b, c, d, e, f)
517518
#define ir_CALL_N(type, func, count, args) _ir_CALL_N(_ir_CTX, type, func, count, args)
518519

519520
#define ir_TAILCALL(type, func) _ir_TAILCALL(_ir_CTX, type, func)
@@ -522,6 +523,7 @@ extern "C" {
522523
#define ir_TAILCALL_3(type, func, a1, a2, a3) _ir_TAILCALL_3(_ir_CTX, type, func, a1, a2, a3)
523524
#define ir_TAILCALL_4(type, func, a1, a2, a3, a4) _ir_TAILCALL_4(_ir_CTX, type, func, a1, a2, a3, a4)
524525
#define ir_TAILCALL_5(type, func, a1, a2, a3, a4, a5) _ir_TAILCALL_5(_ir_CTX, type, func, a1, a2, a3, a4, a5)
526+
#define ir_TAILCALL_6(type, func, a, b, c, d, e, f) _ir_TAILCALL_6(_ir_CTX, type, func, a, b, c, d, e, f)
525527
#define ir_TAILCALL_N(type, func, count, args) _ir_TAILCALL_N(_ir_CTX, type, func, count, args)
526528

527529
#define ir_ALLOCA(_size) _ir_ALLOCA(_ir_CTX, (_size))
@@ -636,13 +638,15 @@ ir_ref _ir_CALL_2(ir_ctx *ctx, ir_type type, ir_ref func, ir_ref arg1, ir_ref ar
636638
ir_ref _ir_CALL_3(ir_ctx *ctx, ir_type type, ir_ref func, ir_ref arg1, ir_ref arg2, ir_ref arg3);
637639
ir_ref _ir_CALL_4(ir_ctx *ctx, ir_type type, ir_ref func, ir_ref arg1, ir_ref arg2, ir_ref arg3, ir_ref arg4);
638640
ir_ref _ir_CALL_5(ir_ctx *ctx, ir_type type, ir_ref func, ir_ref arg1, ir_ref arg2, ir_ref arg3, ir_ref arg4, ir_ref arg5);
641+
ir_ref _ir_CALL_6(ir_ctx *ctx, ir_type type, ir_ref func, ir_ref arg1, ir_ref arg2, ir_ref arg3, ir_ref arg4, ir_ref arg5, ir_ref atg6);
639642
ir_ref _ir_CALL_N(ir_ctx *ctx, ir_type type, ir_ref func, uint32_t count, ir_ref *args);
640643
void _ir_TAILCALL(ir_ctx *ctx, ir_type type, ir_ref func);
641644
void _ir_TAILCALL_1(ir_ctx *ctx, ir_type type, ir_ref func, ir_ref arg1);
642645
void _ir_TAILCALL_2(ir_ctx *ctx, ir_type type, ir_ref func, ir_ref arg1, ir_ref arg2);
643646
void _ir_TAILCALL_3(ir_ctx *ctx, ir_type type, ir_ref func, ir_ref arg1, ir_ref arg2, ir_ref arg3);
644647
void _ir_TAILCALL_4(ir_ctx *ctx, ir_type type, ir_ref func, ir_ref arg1, ir_ref arg2, ir_ref arg3, ir_ref arg4);
645648
void _ir_TAILCALL_5(ir_ctx *ctx, ir_type type, ir_ref func, ir_ref arg1, ir_ref arg2, ir_ref arg3, ir_ref arg4, ir_ref arg5);
649+
void _ir_TAILCALL_6(ir_ctx *ctx, ir_type type, ir_ref func, ir_ref arg1, ir_ref arg2, ir_ref arg3, ir_ref arg4, ir_ref arg5, ir_ref arg6);
646650
ir_ref _ir_TAILCALL_N(ir_ctx *ctx, ir_type type, ir_ref func, uint32_t count, ir_ref *args);
647651
ir_ref _ir_ALLOCA(ir_ctx *ctx, ir_ref size);
648652
void _ir_AFREE(ir_ctx *ctx, ir_ref size);

0 commit comments

Comments
 (0)