how to compile: % g++ -maix64 -g -o bigfile2 bigfile2.cc -save-temps -v error message: Reading specs from /usr/local/lib/gcc-lib/rs6000-ibm-aix5.1.0.0/3.0.1/specs Configured with: ../configure rs6000-ibm-aix5.1.0.0 Thread model: single gcc version 3.0.1 GNU CPP version 3.0.1 (cpplib) ignoring nonexistent directory "/usr/local/rs6000-ibm-aix5.1.0.0/include" #include "..." search starts here: #include <...> search starts here: /usr/local/include/g++-v3 /usr/local/include/g++-v3/rs6000-ibm-aix5.1.0.0 /usr/local/include/g++-v3/backward /usr/local/include /usr/local/lib/gcc-lib/rs6000-ibm-aix5.1.0.0/3.0.1/include /usr/include End of search list. /usr/local/lib/gcc-lib/rs6000-ibm-aix5.1.0.0/3.0.1/cc1plus -fpreprocessed bigfile2.ii -quiet -dumpbase bigfile2.cc -maix64 -g -version -o bigfile2.s GNU CPP version 3.0.1 (cpplib) GNU C++ version 3.0.1 (rs6000-ibm-aix5.1.0.0) compiled by GNU C version 2.9-aix43-010414. as -u -a64 -mppc64 -o bigfile2.o bigfile2.s Assembler: bigfile2.s: line 96894: The displacement must be greater than or equal to -32768 and less than or equal to 32767. bigfile2.s: line 96903: The displacement must be greater than or equal to -32768 and less than or equal to 32767. bigfile2.s: line 96912: The displacement must be greater than or equal to -32768 and less than or equal to 32767. bigfile2.s: line 96921: The displacement must be greater than or equal to -32768 and less than or equal to 32767. .... This assembler is AIX's assembler. IBM AIX development team says, this error is not assember's problem: Problem is with g++ compiler. You are hitting the hardware limitation. To make it clear consider an opcode . ld r4,X(r3); . where X will be at most 16 bit. So irrespective of 64bit or 32 bit object file we can traverse an offset value of 16 bit. While creating the assembly listing g++ crossed the limitation. So assembler throws series of error messages. . Customer can use IBM compiler, which takes care of this problem and we are not supporting the g++ compiler. . Release: gcc version 3.0.1 Environment: AIX 5.1 (Maintenance Level 01) (rs6000-ibm-aix5.1.0.0)
From: hashikaw@awa.tohoku.ac.jp (Kouichi Hashikawa) To: gcc-gnats@gcc.gnu.org, nobody@gcc.gnu.org Cc: hashikaw@awa.tohoku.ac.jp Subject: Re: c++/4587: g++ -maix64 generates illeagal assembler code Date: Thu, 25 Oct 2001 02:56:55 +0900 I want to modify my problem report. How-To-Repeat: % setenv OBJECT_MODE 64 % g++ -maix64 -g -o bigfile2 bigfile2.cc -save-temps -v Fix: gcc-3.0.1 generated following assembler code. this code passed to AIX's /usr/ccs/bin/as. 96890 bl ._ZNSolsEPFRSoS_E 96891 nop 96892 .line 4096 96893 ld 3,LC..1(2) 96894 ld 4,LC..8191(2) 96895 bl ._ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc 96896 nop 96897 mr 0,3 96898 ld 4,LC..3(2) 96899 bl ._ZNSolsEPFRSoS_E 96900 nop 96901 .line 4097 96902 ld 3,LC..1(2) 96903 ld 4,LC..8193(2) 96904 bl ._ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc 96905 nop 96906 mr 0,3 96907 ld 4,LC..3(2) 96908 bl ._ZNSolsEPFRSoS_E 96909 nop 96910 .line 4098 96911 ld 3,LC..1(2) 96912 ld 4,LC..8195(2) 96913 bl ._ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc 96914 nop IBM AIX development team says: Problem is with g++ compiler. You are hitting the hardware limitation. To make it clear consider an opcode . ld r4,X(r3); . where X will be at most 16 bit. So irrespective of 64bit or 32 bit object file we can traverse an offset value of 16 bit. While creating the assembly listing g++ crossed the limitation. So assembler throws series of error messages. -- $B66@n8w0l(B ($B$O$7$+$o$3$&$$$A(B) hashikaw@awa.tohoku.ac.jp
State-Changed-From-To: open->suspended State-Changed-Why: According to David Edelsohn <edelsohn@gnu.org>, " The issue is not -maix64, it is compiling excessively large files with large functions. In both cases, GCC is trying to generate a branch with a displacement larger than the architecture allows." The workaround is not to compile excessively large files.
Responsible-Changed-From-To: unassigned->dje Responsible-Changed-Why: AIX problem
Hello, does anybody know if this problem is still an issue? David says this is a problem with large files. If so, does that make this effectively a duplicate of PR 387? Thanks, Dara
see Dara's question.
David, would you mind commenting on the status of this bug? Is this in fact a duplicate of bug 387? Thanks, Dara
Subject: Re: [AIX] g++ -maix64 generates illeagal assembler code >>>>> dhazeghi@yahoo com writes: Dara> would you mind commenting on the status of this bug? Is this in fact a duplicate of bug 387? This does appear to be a duplicate of bug 378 (not 387). David
Duplicate of 378 (thanks David, sorry for calling it 387). *** This bug has been marked as a duplicate of 378 ***