Search code examples
assemblyx86armdivisionarm64

DIVQ counterpart on ARM / AArch64 (narrowing division with double-width dividend)?


x86-64 has an instruction, DIVQ, to divide 128-bits number by 64-bits number.

Does ARM64 have anything similar? How to perform 128/64 division on ARM64?


Solution

  • The ARM architecture reference is your go-to for questions like this.

    The answer is no, ARM does not support division with 128-bit dividends. Your option is to implement division on longer operands in emulation. Any big integer library should serve as a suitable reference for algorithms to that end.