My impression is definitely not but perhaps there is a clever trick? Thanks.
Asked
Active
Viewed 2,124 times
4
-
I think SSE4 has support for 128 bit integers. – leppie Jul 19 '11 at 06:27
-
@leppie: no, that's not correct - there are a few 64 bit integer operations (e.g. `PADDQ` and `PSUBQ`) but that's as far as it goes. – Paul R Jul 19 '11 at 09:26
-
[Is __int128_t arithmetic emulated by GCC, even with SSE?](http://stackoverflow.com/q/16566437/995714) [practical BigNum AVX/SSE possible?](http://stackoverflow.com/q/27923192/995714) – phuclv May 28 '15 at 15:31
2 Answers
2
Not directly, but there are 64 bit arithmetic operations which can be easily combined to perform 128 bit (or greater) precision.
Paul R
- 208,748
- 37
- 389
- 560
-
1It's possible, but just keep in mind that there are no add-with-carry operations so the actual implementation might be slower than the scalar version. – Jasper Bekkers Jul 19 '11 at 09:06
-
@Jasper: good point - it's reltively easy to implement (although non-trivial) but performance may not be much better than just using the two 64 bit scalar ALUs which most modern x86 CPUs have. – Paul R Jul 20 '11 at 06:42
1
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.
A Fog
- 4,360
- 1
- 30
- 32