Re:Adding BigInts to V8
by stephencanon on Wednesday May 02, 2018 @04:53PM
(#16981067)
Both clang and gcc expose it via the __[u]int128_t extension.
That's how they did it indeed. They have also fallback code for when this the double-width integer type is not available.
https://github.com/v8/v8/blob/6.8.137/src/objects/bigint.cc#...
Most(?) 64-bit CPUs have a 64bit × 64bit → 128bit multiplication instruction; but AFAIK the C++ language doesn't have anything like this.