diff options
author | Mike Pall <mike> | 2011-10-14 01:09:30 +0200 |
---|---|---|
committer | Mike Pall <mike> | 2011-10-14 01:09:30 +0200 |
commit | c5164b1a7d3948db025517fa4206f4486a0e4cfe (patch) | |
tree | a32d935a0102501f5e7f4ea5ed8c5a446fd95dd5 /src/lj_opt_split.c | |
parent | 4c9318792f455c776a840ad2cf011db152ff48e9 (diff) | |
download | luajit-c5164b1a7d3948db025517fa4206f4486a0e4cfe.tar.gz luajit-c5164b1a7d3948db025517fa4206f4486a0e4cfe.tar.bz2 luajit-c5164b1a7d3948db025517fa4206f4486a0e4cfe.zip |
FFI/ARM: Ensure invocation of SPLIT pass for float conversions.
Diffstat (limited to 'src/lj_opt_split.c')
-rw-r--r-- | src/lj_opt_split.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/lj_opt_split.c b/src/lj_opt_split.c index 0a1d87cb..1ea2c057 100644 --- a/src/lj_opt_split.c +++ b/src/lj_opt_split.c | |||
@@ -672,18 +672,19 @@ static int split_needsplit(jit_State *J) | |||
672 | IRIns *ir, *irend; | 672 | IRIns *ir, *irend; |
673 | IRRef ref; | 673 | IRRef ref; |
674 | for (ir = IR(REF_FIRST), irend = IR(J->cur.nins); ir < irend; ir++) | 674 | for (ir = IR(REF_FIRST), irend = IR(J->cur.nins); ir < irend; ir++) |
675 | if (LJ_SOFTFP ? irt_is64(ir->t) : irt_isint64(ir->t)) | 675 | if (LJ_SOFTFP ? irt_is64orfp(ir->t) : irt_isint64(ir->t)) |
676 | return 1; | 676 | return 1; |
677 | if (LJ_SOFTFP) { | 677 | if (LJ_SOFTFP) { |
678 | for (ref = J->chain[IR_SLOAD]; ref; ref = IR(ref)->prev) | 678 | for (ref = J->chain[IR_SLOAD]; ref; ref = IR(ref)->prev) |
679 | if ((IR(ref)->op2 & IRSLOAD_CONVERT)) | 679 | if ((IR(ref)->op2 & IRSLOAD_CONVERT)) |
680 | return 1; | 680 | return 1; |
681 | } | 681 | } |
682 | for (ref = J->chain[IR_CONV]; ref; ref = IR(ref)->prev) | 682 | for (ref = J->chain[IR_CONV]; ref; ref = IR(ref)->prev) { |
683 | if ((LJ_SOFTFP && (IR(ref)->op2 & IRCONV_SRCMASK) == IRT_NUM) || | 683 | IRType st = (IR(ref)->op2 & IRCONV_SRCMASK); |
684 | (IR(ref)->op2 & IRCONV_SRCMASK) == IRT_I64 || | 684 | if ((LJ_SOFTFP && (st == IRT_NUM || st == IRT_FLOAT)) || |
685 | (IR(ref)->op2 & IRCONV_SRCMASK) == IRT_U64) | 685 | st == IRT_I64 || st == IRT_U64) |
686 | return 1; | 686 | return 1; |
687 | } | ||
687 | return 0; /* Nope. */ | 688 | return 0; /* Nope. */ |
688 | } | 689 | } |
689 | #endif | 690 | #endif |