問題描述
XMM 寄存器可以用來做任何 128 位整數數學嗎? (Can XMM registers be used to do any 128 bit integer math?)
My impression is definitely not but perhaps there is a clever trick? Thanks.
‑‑‑‑‑
參考解法
方法 1:
Not directly, but there are 64 bit arithmetic operations which can be easily combined to perform 128 bit (or greater) precision.
方法 2:
The xmm registers can do arithmetics on 8, 16, 32 and 64 bit integers. It doesn't produce a carry flag so you can't extend the precision beyond 64 bits. The extended precision math libraries use the general purpose registers which are 32 bit or 64 bit, depending on the OS.