JIT/AArch64: Support shifted immediate (#7165)
- JIT/AArch64: Support shifted immediate
As pointed out by MikePall in , shifted immediate value is supported.
See . For example,
add x0, x1, #4096 would be encoded by DynASM
add x0, x1, #1, lsl #12 directly.
In this patch, a helper is added to check whether an immediate value is in the two allowed ranges: (1) 0 to 4095, and (2) LSL #12 on all the values from the first range.
Note that this helper works for add/adds/sub/subs/cmp/cmn instructions.
- Deprecatd CMP_IMM/ADD_SUB_IMM and add test cases
Macros CMP_IMM and ADD_SUB_IMM are deprecated and instead we use this helper to guard the immediate encoding.
Add two 64-bit only test cases, since 64-bit integers are used and tested inside.