Skip to content

Commit 9c7797e

Browse files
committed
JIT/AArch64: Complete logical_immediate_p() using DynAsm helpers
1 parent 4e0165e commit 9c7797e

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

ext/opcache/jit/zend_jit_arm64.dasc

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,18 @@ static bool logical_immediate_p(uint64_t value, uint32_t reg_size)
180180
return true;
181181
}
182182

183-
// TODO: slow path
183+
if (reg_size == 32) {
184+
if (dasm_imm13((uint32_t)value, (uint32_t)value) != -1) {
185+
return true;
186+
}
187+
} else if (reg_size == 64) {
188+
if (dasm_imm13((uint32_t)value, (uint32_t)(value >> 32)) != -1) {
189+
return true;
190+
}
191+
} else {
192+
ZEND_UNREACHABLE();
193+
}
194+
184195
return false;
185196
}
186197

0 commit comments

Comments
 (0)