Subject: port-sparc64/29689: setting -mcpu=ultrasparc causes gcc/assembler produce "Error: Illegal operands: There are only 32 single precision f registers; [0-31]"
To: None <port-sparc64-maintainer@netbsd.org, gnats-admin@netbsd.org,>
From: None <sigsegv@rambler.ru>
List: netbsd-bugs
Date: 03/13/2005 14:58:00
>Number:         29689
>Category:       port-sparc64
>Synopsis:       setting -mcpu=ultrasparc causes gcc/assembler produce "Error: Illegal operands: There are only 32 single precision f registers; [0-31]"
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    port-sparc64-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Mar 13 14:58:00 +0000 2005
>Originator:     sigsegv
>Release:        2.99.16
>Organization:
>Environment:
NetBSD u10 2.99.16 NetBSD 2.99.16 (GENERIC_SUN4U) #2: Sat Mar 12 20:20:02 UTC 2005  roman@athlon1000:/opt/obj.sparc.netbsd-current/sys/arch/sparc/compile/GENERIC_SUN4U sparc64
>Description:
setting -mcpu=ultrasparc causes gcc/assembler produce "Error: Illegal operands: There are only 32 single precision f registers; [0-31]" when building src/lib/libm/src/e_pow.c
>How-To-Repeat:
set COPTS+=-mcpu=ultrasparc in mk.conf and then run

cd /opt/src && ./build.sh -j 1 -u -m sparc64 -x -X /opt/xsrc \
        -O /opt/obj.sparc64 -T /opt/tools.sparc64 \
        release 2>&1 | tee /scripts/log.sparc64


#   compile  libm/e_pow.o
/opt/tools.sparc64/bin/sparc64--netbsd-gcc -O2 -Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wno-sign-compare -Wno-traditional -Wno-uninitialized  -Werror  -mcpu=ultrasparc -Os -pipe   -D_MULTI_LIBM -D_POSIX_MODE -DLIBM_SCCS   -nostdinc -isystem /opt/obj.sparc64/destdir.sparc64/usr/include -c /opt/src/lib/libm/src/e_pow.c -o e_pow.o.tmp
{standard input}: Assembler messages:
{standard input}:316: Error: Illegal operands: There are only 32 single precision f registers; [0-31]
*** [e_pow.o] Error code 1
1 error

nbmake: stopped in /opt/src/lib/libm
*** [dependall] Error code 2
1 error

nbmake: stopped in /opt/src/lib/libm

*** Failed target:  dependall-libm
*** Failed command: _makedirtarget() { dir="$1"; shift; target="$1"; shift; case "${dir}" in /*) this="${dir}/"; real="${dir}" ;; .) this="lib/"; real="/opt/src/lib" ;; *) this="lib/${dir}/"; real="/opt/src/lib/${dir}" ;; esac; show=${this:-.}; echo "${target} ===> ${show%/}${1:+ (with: $@)}"; cd "${real}" && /opt/tools.sparc64/bin/nbmake _THISDIR_="${this}" "$@" ${target}; }; _makedirtarget libm dependall
*** Error code 2

Stop. 
>Fix:
Here is a link to a webpage that talks about the same problem. Looks like GNU binutils bug
http://lists.freebsd.org/pipermail/freebsd-sparc64/2004-December/002466.html