aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMike Pall <mike>2012-08-27 20:25:54 +0200
committerMike Pall <mike>2012-08-27 20:25:54 +0200
commit30f458fb4d8bab4096d74ed62d621110ca16e881 (patch)
tree22a2acde2d57772ce3912c2e169e4f51ec161b2f /src
parent1e477e648795e7c93460ae420eb541a15361b780 (diff)
downloadluajit-30f458fb4d8bab4096d74ed62d621110ca16e881.tar.gz
luajit-30f458fb4d8bab4096d74ed62d621110ca16e881.tar.bz2
luajit-30f458fb4d8bab4096d74ed62d621110ca16e881.zip
ARM, PPC, MIPS: Improve XLOAD operand fusion and register hinting.
Diffstat (limited to 'src')
-rw-r--r--src/lj_asm.c6
-rw-r--r--src/lj_asm_arm.h2
-rw-r--r--src/lj_asm_mips.h2
-rw-r--r--src/lj_asm_ppc.h4
4 files changed, 9 insertions, 5 deletions
diff --git a/src/lj_asm.c b/src/lj_asm.c
index bdc86dd0..79097759 100644
--- a/src/lj_asm.c
+++ b/src/lj_asm.c
@@ -1749,8 +1749,12 @@ static void asm_setup_regsp(ASMState *as)
1749 } 1749 }
1750 break; 1750 break;
1751#endif 1751#endif
1752 /* Do not propagate hints across type conversions. */ 1752 /* Do not propagate hints across type conversions or loads. */
1753 case IR_TOBIT: 1753 case IR_TOBIT:
1754 case IR_XLOAD:
1755#if !LJ_TARGET_ARM
1756 case IR_ALOAD: case IR_HLOAD: case IR_ULOAD: case IR_VLOAD:
1757#endif
1754 break; 1758 break;
1755 case IR_CONV: 1759 case IR_CONV:
1756 if (irt_isfp(ir->t) || (ir->op2 & IRCONV_SRCMASK) == IRT_NUM || 1760 if (irt_isfp(ir->t) || (ir->op2 & IRCONV_SRCMASK) == IRT_NUM ||
diff --git a/src/lj_asm_arm.h b/src/lj_asm_arm.h
index 8ba3dc06..8e57ad01 100644
--- a/src/lj_asm_arm.h
+++ b/src/lj_asm_arm.h
@@ -237,7 +237,7 @@ static void asm_fusexref(ASMState *as, ARMIns ai, Reg rd, IRRef ref,
237{ 237{
238 IRIns *ir = IR(ref); 238 IRIns *ir = IR(ref);
239 Reg base; 239 Reg base;
240 if (ra_noreg(ir->r) && mayfuse(as, ref)) { 240 if (ra_noreg(ir->r) && canfuse(as, ir)) {
241 int32_t lim = (!LJ_SOFTFP && (ai & 0x08000000)) ? 1024 : 241 int32_t lim = (!LJ_SOFTFP && (ai & 0x08000000)) ? 1024 :
242 (ai & 0x04000000) ? 4096 : 256; 242 (ai & 0x04000000) ? 4096 : 256;
243 if (ir->o == IR_ADD) { 243 if (ir->o == IR_ADD) {
diff --git a/src/lj_asm_mips.h b/src/lj_asm_mips.h
index 3de133b8..d6bd8ca0 100644
--- a/src/lj_asm_mips.h
+++ b/src/lj_asm_mips.h
@@ -187,7 +187,7 @@ static void asm_fusexref(ASMState *as, MIPSIns mi, Reg rt, IRRef ref,
187{ 187{
188 IRIns *ir = IR(ref); 188 IRIns *ir = IR(ref);
189 Reg base; 189 Reg base;
190 if (ra_noreg(ir->r) && mayfuse(as, ref)) { 190 if (ra_noreg(ir->r) && canfuse(as, ir)) {
191 if (ir->o == IR_ADD) { 191 if (ir->o == IR_ADD) {
192 int32_t ofs2; 192 int32_t ofs2;
193 if (irref_isk(ir->op2) && (ofs2 = ofs + IR(ir->op2)->i, checki16(ofs2))) { 193 if (irref_isk(ir->op2) && (ofs2 = ofs + IR(ir->op2)->i, checki16(ofs2))) {
diff --git a/src/lj_asm_ppc.h b/src/lj_asm_ppc.h
index 7d9a9c76..e3cbe5b8 100644
--- a/src/lj_asm_ppc.h
+++ b/src/lj_asm_ppc.h
@@ -166,7 +166,7 @@ static void asm_fusexref(ASMState *as, PPCIns pi, Reg rt, IRRef ref,
166{ 166{
167 IRIns *ir = IR(ref); 167 IRIns *ir = IR(ref);
168 Reg base; 168 Reg base;
169 if (ra_noreg(ir->r) && mayfuse(as, ref)) { 169 if (ra_noreg(ir->r) && canfuse(as, ir)) {
170 if (ir->o == IR_ADD) { 170 if (ir->o == IR_ADD) {
171 int32_t ofs2; 171 int32_t ofs2;
172 if (irref_isk(ir->op2) && (ofs2 = ofs + IR(ir->op2)->i, checki16(ofs2))) { 172 if (irref_isk(ir->op2) && (ofs2 = ofs + IR(ir->op2)->i, checki16(ofs2))) {
@@ -214,7 +214,7 @@ static void asm_fusexrefx(ASMState *as, PPCIns pi, Reg rt, IRRef ref,
214{ 214{
215 IRIns *ira = IR(ref); 215 IRIns *ira = IR(ref);
216 Reg right, left; 216 Reg right, left;
217 if (mayfuse(as, ref) && ira->o == IR_ADD && ra_noreg(ira->r)) { 217 if (canfuse(as, ira) && ira->o == IR_ADD && ra_noreg(ira->r)) {
218 left = ra_alloc2(as, ira, allow); 218 left = ra_alloc2(as, ira, allow);
219 right = (left >> 8); left &= 255; 219 right = (left >> 8); left &= 255;
220 } else { 220 } else {