Skip to content

Commit 103a5e8

Browse files
committed
Move some IR_CHECK_CALLING_CONV() calls into ir_check()
1 parent 4e87837 commit 103a5e8

File tree

3 files changed

+2
-9
lines changed

3 files changed

+2
-9
lines changed

ext/opcache/jit/ir/ir_check.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ bool ir_check(const ir_ctx *ctx)
9494
uint32_t flags;
9595
bool ok = 1;
9696

97+
IR_CHECK_CALLING_CONV(ctx->flags);
9798
if ((ctx->flags & (IR_VARARG_FUNC|IR_PRESERVE_NONE_FUNC)) == (IR_VARARG_FUNC|IR_PRESERVE_NONE_FUNC)) {
9899
fprintf(stderr, "IR_VARARG_FUNC and IR_PRESERVE_NONE_FUNC flags are mutually exclusive (preserve_none does not support var args)\n");
99100
ok = 0;

ext/opcache/jit/ir/ir_emit.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -191,8 +191,6 @@ static ir_reg ir_get_param_reg(const ir_ctx *ctx, ir_ref ref)
191191
const int8_t *int_reg_params = _ir_int_reg_params;
192192
const int8_t *fp_reg_params = _ir_fp_reg_params;
193193

194-
IR_CHECK_CALLING_CONV(ctx->flags);
195-
196194
#ifdef IR_HAVE_FASTCALL
197195
if (sizeof(void*) == 4 && (ctx->flags & IR_FASTCALL_FUNC)) {
198196
int_reg_params_count = IR_REG_INT_FCARGS;
@@ -257,8 +255,6 @@ static int ir_get_args_regs(const ir_ctx *ctx, const ir_insn *insn, int8_t *regs
257255
const int8_t *int_reg_params = _ir_int_reg_params;
258256
const int8_t *fp_reg_params = _ir_fp_reg_params;
259257

260-
IR_CHECK_CALLING_CONV(ctx->flags);
261-
262258
#ifdef IR_HAVE_FASTCALL
263259
if (sizeof(void*) == 4 && ir_is_fastcall(ctx, insn)) {
264260
int_reg_params_count = IR_REG_INT_FCARGS;
@@ -268,7 +264,7 @@ static int ir_get_args_regs(const ir_ctx *ctx, const ir_insn *insn, int8_t *regs
268264
}
269265
#endif
270266
#ifdef IR_HAVE_PRESERVE_NONE
271-
if (ctx->flags & IR_PRESERVE_NONE_FUNC) {
267+
if (ir_is_preserve_none(ctx, insn)) {
272268
int_reg_params_count = IR_REG_INT_PNARGS;
273269
int_reg_params = _ir_int_pn_reg_params;
274270
}

ext/opcache/jit/ir/ir_x86.dasc

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10145,8 +10145,6 @@ static void ir_emit_load_params(ir_ctx *ctx)
1014510145
const int8_t *fp_reg_params = _ir_fp_reg_params;
1014610146
int32_t stack_offset = 0;
1014710147

10148-
IR_CHECK_CALLING_CONV(ctx->flags);
10149-
1015010148
#ifdef IR_TARGET_X86
1015110149
if (sizeof(void*) == 4 && (ctx->flags & IR_FASTCALL_FUNC)) {
1015210150
int_reg_params_count = IR_REG_INT_FCARGS;
@@ -10279,8 +10277,6 @@ static void ir_fix_param_spills(ir_ctx *ctx)
1027910277
int32_t stack_start = 0;
1028010278
int32_t stack_offset = 0;
1028110279

10282-
IR_CHECK_CALLING_CONV(ctx->flags);
10283-
1028410280
#ifdef IR_TARGET_X86
1028510281
if (sizeof(void*) == 4 && (ctx->flags & IR_FASTCALL_FUNC)) {
1028610282
int_reg_params_count = IR_REG_INT_FCARGS;

0 commit comments

Comments
 (0)