ARM64: Fix code generation for S19 offsets.

Contributed by Zhongwei Yao.
This commit is contained in:
Mike Pall
2016-12-08 05:53:36 +01:00
parent 3975b6c9f4
commit 986854cbb2
3 changed files with 4 additions and 4 deletions

View File

@@ -781,7 +781,7 @@ static void asm_href(ASMState *as, IRIns *ir, IROp merge)
emit_lso(as, A64I_LDRx, scr, dest, offsetof(Node, key));
}
*l_loop = A64I_BCC | A64F_S19((as->mcp-l_loop) & 0x0007ffffu) | CC_NE;
*l_loop = A64I_BCC | A64F_S19(as->mcp - l_loop) | CC_NE;
if (!isk && irt_isaddr(kt)) {
Reg type = ra_allock(as, (int32_t)irt_toitype(kt), allow);
emit_dnm(as, A64I_ADDx | A64F_SH(A64SH_LSL, 47), tmp, key, type);