This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Solaris 8 64-bit C compilation fails to add .register declaration



When making GCC 2.95.2 on a Solaris 8 64-bit UltraSPARC system, wether
using Sun Workshop 5.0 for the initial compilation or a 32-bit GCC the
make fails when xgcc is used. The problem appears to be a the lack of
emission of a ".register" pseudo assembly instruction in xgcc's
assembler output.

I include the portion of the make where the error can be see as well as
a snippet from a Sun WORKSHOP 5.0 README that refers to the need for
this .register pseudo-instruction.

I believe this non-emission constitutes a bug.

I found instructions for building a 64-bit-capable GCC for Solaris 8 on
UltraSPARCs by doing a "Quick Search" on http://www.deja.com for
"Solaris 64 bit gcc" and finding a three-post thread with subject
"Re: 64-bit gcc?" in the comp.sys.sun.apps newsgroup.

(http://www.deja.com/qs.xp?OP=dnquery.xp&ST=MS&DBS=2&QRY=Solaris+64+bit+gcc)

One of the posters' (Holger Burde <j03k@alf.zfn.uni-bremen.de>) web page,
http://home.t-online.de/home/hburde/, includes instructions for building
a 64-bit capable GCC for Solaris on UltraSPARC
(http://home.t-online.de/home/hburde/s7-tips.html#64bit).

I tried the approaches suggested in that thread and I also tried
building GCC with Sun's Workshop 5.0. The result was the same.

...
make[2]: Entering directory `/tmp/gcc-2.95.2/gcc'
rm -f tmplibgcc2.a
for name in _muldi3 _divdi3 _moddi3 _udivdi3 _umoddi3 _negdi2 _lshrdi3 _ashldi3 _ashrdi3 _ffsdi2 _udiv_w_sdiv _udivmoddi4 _cmpdi2 _ucmpdi2 _floatdidf _floatdisf _fixunsdfsi _fixunssfsi _fixunsdfdi _fixdfdi _fixunssfdi _fixsfdi _fixxfdi _fixunsxfdi _floatdixf _fixunsxfsi _fixtfdi _fixunstfdi _floatditf __gcc_bcmp _varargs __dummy _eprintf _bb _shtab _clear_cache _trampoline __main _exit _ctors _pure; \
do \
  echo ${name}; \
  /tmp/gcc-2.95.2/gcc/xgcc -B/tmp/gcc-2.95.2/gcc/ -B/usr/local/gnu32/sparcv9-sun-solaris2.8/bin/ -I/usr/local/gnu32/sparcv9-sun-solaris2.8/include -O2   -DIN_GCC -DHAIFA  -DSVR4  -O -I./include  -fPIC -g1 -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED    -I. -I. -I./config -I./../include -c -DL${name} \
       ./libgcc2.c -o ${name}.o; \
  if [ $? -eq 0 ] ; then true; else exit 1; fi; \
  ar rc tmplibgcc2.a ${name}.o; \
  rm -f ${name}.o; \
done
_muldi3
/usr/ccs/bin/as: "/var/tmp/ccK8bxnl.s", line 274: error: detect global register use not covered .register pseudo-op
/usr/ccs/bin/as: "/var/tmp/ccK8bxnl.s", line 274: error: detect global register use not covered .register pseudo-op
/usr/ccs/bin/as: "/var/tmp/ccK8bxnl.s", line 275: error: detect global register use not covered .register pseudo-op
/usr/ccs/bin/as: "/var/tmp/ccK8bxnl.s", line 275: error: detect global register use not covered .register pseudo-op
/usr/ccs/bin/as: "/var/tmp/ccK8bxnl.s", line 310: error: detect global register use not covered .register pseudo-op
/usr/ccs/bin/as: "/var/tmp/ccK8bxnl.s", line 310: error: detect global register use not covered .register pseudo-op
/usr/ccs/bin/as: "/var/tmp/ccK8bxnl.s", line 312: error: detect global register use not covered .register pseudo-op
/usr/ccs/bin/as: "/var/tmp/ccK8bxnl.s", line 312: error: detect global register use not covered .register pseudo-op
/usr/ccs/bin/as: "/var/tmp/ccK8bxnl.s", line 312: error: detect global register use not covered .register pseudo-op
/usr/ccs/bin/as: "/var/tmp/ccK8bxnl.s", line 312: error: detect global register use not covered .register pseudo-op
/usr/ccs/bin/as: "/var/tmp/ccK8bxnl.s", line 316: error: detect global register use not covered .register pseudo-op
/usr/ccs/bin/as: "/var/tmp/ccK8bxnl.s", line 318: error: detect global register use not covered .register pseudo-op
/usr/ccs/bin/as: "/var/tmp/ccK8bxnl.s", line 319: error: detect global register use not covered .register pseudo-op
/usr/ccs/bin/as: "/var/tmp/ccK8bxnl.s", line 319: error: detect global register use not covered .register pseudo-op
/usr/ccs/bin/as: "/var/tmp/ccK8bxnl.s", line 319: error: detect global register use not covered .register pseudo-op
/usr/ccs/bin/as: "/var/tmp/ccK8bxnl.s", line 319: error: detect global register use not covered .register pseudo-op
/usr/ccs/bin/as: "/var/tmp/ccK8bxnl.s", line 320: error: detect global register use not covered .register pseudo-op
/usr/ccs/bin/as: "/var/tmp/ccK8bxnl.s", line 320: error: detect global register use not covered .register pseudo-op
/usr/ccs/bin/as: "/var/tmp/ccK8bxnl.s", line 321: error: detect global register use not covered .register pseudo-op
/usr/ccs/bin/as: "/var/tmp/ccK8bxnl.s", line 321: error: detect global register use not covered .register pseudo-op
/usr/ccs/bin/as: "/var/tmp/ccK8bxnl.s", line 322: error: detect global register use not covered .register pseudo-op
/usr/ccs/bin/as: "/var/tmp/ccK8bxnl.s", line 324: error: detect global register use not covered .register pseudo-op
/usr/ccs/bin/as: "/var/tmp/ccK8bxnl.s", line 324: error: detect global register use not covered .register pseudo-op
/usr/ccs/bin/as: "/var/tmp/ccK8bxnl.s", line 325: error: detect global register use not covered .register pseudo-op
/usr/ccs/bin/as: "/var/tmp/ccK8bxnl.s", line 325: error: detect global register use not covered .register pseudo-op
/usr/ccs/bin/as: "/var/tmp/ccK8bxnl.s", line 326: error: detect global register use not covered .register pseudo-op
/usr/ccs/bin/as: "/var/tmp/ccK8bxnl.s", line 326: error: detect global register use not covered .register pseudo-op
/usr/ccs/bin/as: "/var/tmp/ccK8bxnl.s", line 329: error: detect global register use not covered .register pseudo-op
/usr/ccs/bin/as: "/var/tmp/ccK8bxnl.s", line 329: error: detect global register use not covered .register pseudo-op
/usr/ccs/bin/as: "/var/tmp/ccK8bxnl.s", line 330: error: detect global register use not covered .register pseudo-op
/usr/ccs/bin/as: "/var/tmp/ccK8bxnl.s", line 330: error: detect global register use not covered .register pseudo-op
/usr/ccs/bin/as: "/var/tmp/ccK8bxnl.s", line 330: error: detect global register use not covered .register pseudo-op
/usr/ccs/bin/as: "/var/tmp/ccK8bxnl.s", line 331: error: detect global register use not covered .register pseudo-op
/usr/ccs/bin/as: "/var/tmp/ccK8bxnl.s", line 331: error: detect global register use not covered .register pseudo-op
/usr/ccs/bin/as: "/var/tmp/ccK8bxnl.s", line 331: error: detect global register use not covered .register pseudo-op
/usr/ccs/bin/as: "/var/tmp/ccK8bxnl.s", line 331: error: detect global register use not covered .register pseudo-op
/usr/ccs/bin/as: "/var/tmp/ccK8bxnl.s", line 332: error: detect global register use not covered .register pseudo-op
/usr/ccs/bin/as: "/var/tmp/ccK8bxnl.s", line 332: error: detect global register use not covered .register pseudo-op
/usr/ccs/bin/as: "/var/tmp/ccK8bxnl.s", line 332: error: detect global register use not covered .register pseudo-op
/usr/ccs/bin/as: "/var/tmp/ccK8bxnl.s", line 332: error: detect global register use not covered .register pseudo-op
/usr/ccs/bin/as: "/var/tmp/ccK8bxnl.s", line 334: error: detect global register use not covered .register pseudo-op
make[3]: *** [libgcc2.a] Error 1
make[3]: Leaving directory `/tmp/gcc-2.95.2/gcc'
make[2]: *** [stmp-multilib-sub] Error 2
make[2]: Leaving directory `/tmp/gcc-2.95.2/gcc'
make[1]: *** [stmp-multilib] Error 1
make[1]: Leaving directory `/tmp/gcc-2.95.2/gcc'
make: *** [all-gcc] Error 2


From the Sun Workshop 5.0 READMEs/64bit_Compilers file:

"
   There is one undocumented pseudo instruction that is important for those
   porting assembly language code to SPARC-V9:

       .register %g{2|3|6|7}, {#scratch|symbol_name}

   With SPARC-V9, the four registers %g2, %g3, %g6, %g7, should not be used
   unless explicitly declared on a .register pseudo-op. Under -xarch=v9, the
   SPARC assembler will issue an error message if it detects the use of %g2 or
   %g3 registers without a .register declaration. A .register declaration is
   not required for %g6 or %g7, but its appearance does invoke checking for 
   proper use of these registers.

   Specify the #scratch option when the register is used as a scratch register.

        .register %g3, #scratch
 
   Or, declare the global register with a symbolic name, as in:

        .register %g2, xyz

   A .register declaration must appear before the first use of the register.
   Linking objects containing conflicting register will cause the linker to
   issue error messages.
"

Nico

This message contains confidential information and is intended only 
for the individual named.  If you are not the named addressee you 
should not disseminate, distribute or copy this e-mail.  Please 
notify the sender immediately by e-mail if you have received this 
e-mail by mistake and delete this e-mail from your system.

E-mail transmission cannot be guaranteed to be secure or error-free 
as information could be intercepted, corrupted, lost, destroyed, 
arrive late or incomplete, or contain viruses.  The sender therefore 
does not accept liability for any errors or omissions in the contents 
of this message which arise as a result of e-mail transmission.  If 
verification is required please request a hard-copy version.  This 
message is provided for informational purposes and should not be 
construed as a solicitation or offer to buy or sell any securities or 
related financial instruments.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]