ARM/AArch64上的DIVQ对应物(具有双宽度红利的缩小除法)?

x86-64 有一条 DIVQ 指令,可以将 128 位数字除以 64 位数字。

ARM64 有类似的吗?如何在 ARM64 上进行 128/64 除法?

回答

在ARM架构的参考是你去到了这样的问题。

答案是否定的,ARM 不支持128 位除法。您的选择是在仿真中对较长的操作数实施除法。任何大整数库都应作为为此目的的算法的合适参考。

  • For the specific case of 2R / R division, the libgcc implementation of uint64_t division for 32-bit ARM might be a good example, for the case where the divisor fits in 32 bits but the dividend doesn't. Or the unsigned __int128 / __int128 division helper function for AArch64, `__udivti3`. https://godbolt.org/z/oe6Txs4rd. C source for LLVM's version in https://code.woboq.org/llvm/compiler-rt/lib/builtins/udivti3.c.html -> https://code.woboq.org/llvm/compiler-rt/lib/builtins/udivmodti4.c.html#__udivmodti4

以上是ARM/AArch64上的DIVQ对应物(具有双宽度红利的缩小除法)?的全部内容。
THE END
分享
二维码
< <上一篇
下一篇>>