Blame SOURCES/0062-Remove-redundant-emit_check_ofs.patch

006bc1
From 1fae7b08e319ba4028d303b09de72b026109a269 Mon Sep 17 00:00:00 2001
006bc1
From: Siddhesh Poyarekar <siddhesh@gotplt.org>
006bc1
Date: Fri, 22 Feb 2019 19:05:38 +0000
006bc1
Subject: [PATCH 62/72] Remove redundant emit_check_ofs
006bc1
006bc1
Even if the offset is a constant, it is not 32-bit since it failed
006bc1
that check earlier before it came here.  The code is thus useless and
006bc1
hence removed.  This also fixes inconsistencies with op1/op2 renaming
006bc1
that were introduced in PR #438.  They were never triggered because
006bc1
the code path is effectively dead for arm64.
006bc1
---
006bc1
 src/lj_asm_arm64.h | 15 +--------------
006bc1
 1 file changed, 1 insertion(+), 14 deletions(-)
006bc1
006bc1
diff --git a/src/lj_asm_arm64.h b/src/lj_asm_arm64.h
006bc1
index ce49cde..c214e10 100644
006bc1
--- a/src/lj_asm_arm64.h
006bc1
+++ b/src/lj_asm_arm64.h
006bc1
@@ -298,27 +298,14 @@ static void asm_fusexref(ASMState *as, A64Ins ai, Reg rd, IRRef ref,
006bc1
 	IRRef ref1 = ir->op1;
006bc1
 	IRRef ref2 = ir->op2;
006bc1
 	Reg rn;
006bc1
-	IRIns *irr;
006bc1
-	uint32_t m;
006bc1
 
006bc1
 	if (irref_isk(ir->op1)) {
006bc1
 	  ref1 = ir->op2;
006bc1
 	  ref2 = ir->op1;
006bc1
 	}
006bc1
 	rn = ra_alloc1(as, ref1, allow);
006bc1
-	irr = IR(ref2);
006bc1
-	if (irr+1 == ir && !ra_used(irr) &&
006bc1
-	    irr->o == IR_ADD && irref_isk(irr->op2)) {
006bc1
-	  ofs = sizeof(GCstr) + IR(irr->op2)->i;
006bc1
-	  if (emit_checkofs(ai, ofs)) {
006bc1
-	    Reg rm = ra_alloc1(as, irr->op1, rset_exclude(allow, rn));
006bc1
-	    m = A64F_M(rm) | A64F_EX(A64EX_SXTW);
006bc1
-	    goto skipopm;
006bc1
-	  }
006bc1
-	}
006bc1
-	m = asm_fuseopm(as, 0, ref2, rset_exclude(allow, rn));
006bc1
+	uint32_t m = asm_fuseopm(as, 0, ref2, rset_exclude(allow, rn));
006bc1
 	ofs = sizeof(GCstr);
006bc1
-      skipopm:
006bc1
 	emit_lso(as, ai, rd, rd, ofs);
006bc1
 	emit_dn(as, A64I_ADDx^m, rd, rn);
006bc1
 	return;
006bc1
-- 
006bc1
2.20.1
006bc1