diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/lj_crecord.c | 5 | ||||
-rw-r--r-- | src/lj_ffrecord.c | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/src/lj_crecord.c b/src/lj_crecord.c index 50fca4cc..326ff6de 100644 --- a/src/lj_crecord.c +++ b/src/lj_crecord.c | |||
@@ -273,13 +273,14 @@ static TRef crec_tv_ct(jit_State *J, CType *s, CTypeID sid, TRef sp) | |||
273 | goto err_nyi; /* NYI: specialize to the result. */ | 273 | goto err_nyi; /* NYI: specialize to the result. */ |
274 | if (t == IRT_CDATA) | 274 | if (t == IRT_CDATA) |
275 | goto err_nyi; /* NYI: copyval of >64 bit integers. */ | 275 | goto err_nyi; /* NYI: copyval of >64 bit integers. */ |
276 | if ((sinfo & CTF_BOOL) || t == IRT_CDATA) | 276 | if (t >= IRT_U32) |
277 | if (t == IRT_U32) lj_trace_err(J, LJ_TRERR_NYICONV); | 277 | goto err_nyi; /* NYI: on-trace handling of U32/I64/U64. */ |
278 | return emitir(IRT(IR_XLOAD, t), sp, 0); | 278 | return emitir(IRT(IR_XLOAD, t), sp, 0); |
279 | } else if (ctype_isptr(sinfo)) { | 279 | } else if (ctype_isptr(sinfo)) { |
280 | IRType t = (LJ_64 && s->size == 8) ? IRT_P64 : IRT_P32; | 280 | IRType t = (LJ_64 && s->size == 8) ? IRT_P64 : IRT_P32; |
281 | sp = emitir(IRT(IR_XLOAD, t), sp, 0); | 281 | sp = emitir(IRT(IR_XLOAD, t), sp, 0); |
282 | } else if (ctype_isrefarray(sinfo) || ctype_isstruct(sinfo)) { | 282 | } else if (ctype_isrefarray(sinfo) || ctype_isstruct(sinfo)) { |
283 | cts->L = J->L; | ||
283 | sid = lj_ctype_intern(cts, CTINFO_REF(sid), CTSIZE_PTR); /* Create ref. */ | 284 | sid = lj_ctype_intern(cts, CTINFO_REF(sid), CTSIZE_PTR); /* Create ref. */ |
284 | } else if (ctype_iscomplex(sinfo)) { | 285 | } else if (ctype_iscomplex(sinfo)) { |
285 | IRType t = s->size == 2*sizeof(double) ? IRT_NUM : IRT_CDATA; | 286 | IRType t = s->size == 2*sizeof(double) ? IRT_NUM : IRT_CDATA; |
diff --git a/src/lj_ffrecord.c b/src/lj_ffrecord.c index b7ee06cd..ca9f6ceb 100644 --- a/src/lj_ffrecord.c +++ b/src/lj_ffrecord.c | |||
@@ -266,6 +266,10 @@ static void LJ_FASTCALL recff_tonumber(jit_State *J, RecordFFData *rd) | |||
266 | recff_nyiu(J); /* Would need an inverted STRTO for this case. */ | 266 | recff_nyiu(J); /* Would need an inverted STRTO for this case. */ |
267 | tr = emitir(IRTG(IR_STRTO, IRT_NUM), tr, 0); | 267 | tr = emitir(IRTG(IR_STRTO, IRT_NUM), tr, 0); |
268 | } | 268 | } |
269 | #if LJ_HASFFI | ||
270 | } else if (tref_iscdata(tr)) { | ||
271 | recff_nyiu(J); | ||
272 | #endif | ||
269 | } else { | 273 | } else { |
270 | tr = TREF_NIL; | 274 | tr = TREF_NIL; |
271 | } | 275 | } |