有什么办法可以在gcc< 4.4上进行128位转换吗? [英] Is there any way to do 128-bit shifts on gcc <4.4?
问题描述
gcc
4.4似乎是第一个版本.我需要使用位移,有些位字段已经用完了.
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.
编辑:可能是因为我在32位计算机上,所以无法在32位计算机(Intel Atom)上安装它吗?如果我可以按预期的方式工作,我不在乎它是否会生成棘手的慢速机器代码.
Edit: It might be because I'm on a 32-bit computer, there's no way to have it for a 32-bit computer (Intel Atom), is there? I wouldn't care if it generated tricky slow machine code if I would work as expected with bit shifting.
推荐答案
我很确定__int128_t
在早期版本的gcc上可用.刚刚在4.2.1和FreeBSD上进行了检查,sizeof(__int128_t)
给出了16.
I'm pretty sure that __int128_t
is available on earlier versions of gcc. Just checked on 4.2.1 and FreeBSD and sizeof(__int128_t)
gives 16.
这篇关于有什么办法可以在gcc< 4.4上进行128位转换吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!