Is there any way to do 128-bit shifts on gcc <4.4?

前端 未结 4 1243
暖寄归人
暖寄归人 2020-12-06 12:28

gcc 4.4 seems to be the first version when they added int128_t. I need to use bit shifting and I have run out of room for some bit fields.

4条回答
  •  自闭症患者
    2020-12-06 12:50

    You could also use a library. This would have the advantage that it is portable (regarding platform and compiler) and you could easily switch to even bigger datatype. One I could recommend is gmp (even if its intention is not to handle bitwidth x, but variable as big as you want).

提交回复
热议问题