Merge branch 'master' into v2.1

This commit is contained in:
Mike Pall
2022-12-07 17:21:36 +01:00
2 changed files with 16 additions and 0 deletions

View File

@@ -1504,9 +1504,13 @@ void LJ_FASTCALL recff_cdata_arith(jit_State *J, RecordFFData *rd)
if (ctype_isenum(ct->info)) ct = ctype_child(cts, ct);
goto ok;
} else if (ctype_isfunc(ct->info)) {
CTypeID id0 = i ? ctype_typeid(cts, s[0]) : 0;
tr = emitir(IRT(IR_FLOAD, IRT_PTR), tr, IRFL_CDATA_PTR);
ct = ctype_get(cts,
lj_ctype_intern(cts, CTINFO(CT_PTR, CTALIGN_PTR|id), CTSIZE_PTR));
if (i) {
s[0] = ctype_get(cts, id0); /* cts->tab may have been reallocated. */
}
goto ok;
} else {
tr = emitir(IRT(IR_ADD, IRT_PTR), tr, lj_ir_kintp(J, sizeof(GCcdata)));