mirror of
https://github.com/LuaJIT/LuaJIT.git
synced 2025-02-07 23:24:09 +00:00
FFI/ARM: Ensure invocation of SPLIT pass for float conversions.
This commit is contained in:
parent
4c9318792f
commit
c5164b1a7d
@ -354,6 +354,7 @@ typedef struct IRType1 { uint8_t irt; } IRType1;
|
||||
#endif
|
||||
|
||||
#define irt_is64(t) ((IRT_IS64 >> irt_type(t)) & 1)
|
||||
#define irt_is64orfp(t) (((IRT_IS64|(1u<<IRT_FLOAT))>>irt_type(t)) & 1)
|
||||
|
||||
static LJ_AINLINE IRType itype2irt(const TValue *tv)
|
||||
{
|
||||
|
@ -672,18 +672,19 @@ static int split_needsplit(jit_State *J)
|
||||
IRIns *ir, *irend;
|
||||
IRRef ref;
|
||||
for (ir = IR(REF_FIRST), irend = IR(J->cur.nins); ir < irend; ir++)
|
||||
if (LJ_SOFTFP ? irt_is64(ir->t) : irt_isint64(ir->t))
|
||||
if (LJ_SOFTFP ? irt_is64orfp(ir->t) : irt_isint64(ir->t))
|
||||
return 1;
|
||||
if (LJ_SOFTFP) {
|
||||
for (ref = J->chain[IR_SLOAD]; ref; ref = IR(ref)->prev)
|
||||
if ((IR(ref)->op2 & IRSLOAD_CONVERT))
|
||||
return 1;
|
||||
}
|
||||
for (ref = J->chain[IR_CONV]; ref; ref = IR(ref)->prev)
|
||||
if ((LJ_SOFTFP && (IR(ref)->op2 & IRCONV_SRCMASK) == IRT_NUM) ||
|
||||
(IR(ref)->op2 & IRCONV_SRCMASK) == IRT_I64 ||
|
||||
(IR(ref)->op2 & IRCONV_SRCMASK) == IRT_U64)
|
||||
for (ref = J->chain[IR_CONV]; ref; ref = IR(ref)->prev) {
|
||||
IRType st = (IR(ref)->op2 & IRCONV_SRCMASK);
|
||||
if ((LJ_SOFTFP && (st == IRT_NUM || st == IRT_FLOAT)) ||
|
||||
st == IRT_I64 || st == IRT_U64)
|
||||
return 1;
|
||||
}
|
||||
return 0; /* Nope. */
|
||||
}
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user