由于"位移必须大于或等于-32768且小于或等于32767",在aix6.1上使用g ++ 4.6.1编译失败

cra*_*rog 0 c++ unix aix g++

我正在尝试使用汇编程序版本6.1在aix6.1上使用g ++ 4.6.1编译c代码.

编译因以下原因而失败: -

line 3954495: 1252-171 The displacement must be greater than or equal to
    -32768 and less than or equal to 32767.
line 3955281: 1252-171 The displacement must be greater than or equal to
    -32768 and less than or equal to 32767.
line 3955395: 1252-171 The displacement must be greater than or equal to
    -32768 and less than or equal to 32767.
line 3955401: 1252-171 The displacement must be greater than or equal to
    -32768 and less than or equal to 32767.
Run Code Online (Sandbox Code Playgroud)

我使用以下选项编译: -

g++ -o tcl-int-cln.o -maix64 -bbigtoc -c tcl-int-cln.C
Run Code Online (Sandbox Code Playgroud)

我在aix5.3上使用gcc4.0.2编译了同一个文件.它工作正常.

当您尝试使用g ++编译大型文件时,通常会发生这种情况.我给了一个选项,但问题仍然存在.这是汇编程序问题吗?

有人可以对此有所了解,还是gcc bug或aix问题?

任何解决方法?

谢谢.

MSa*_*ers 6

自GCC 2.95以来已知的GCC错误.GCC无法处理大量投入; 然后它会组装大于16位的ld r4,X(r3)指令(相对负载,位移X)X.POWER上不允许这样做.

  • 哇,错误信息,奢侈.上次我看到这样的bug不是在gcc中,而是另一个工具链,结果是它实际上只是屏蔽了底部的16位并将它们用作位移.花了一段时间进行调试,特别是因为这是我第一份工作的第二周. (3认同)