This is the mail archive of the gcc@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]
Other format: [Raw text]

Re: mips cc1 spec vs. fp reg defines vs. assembly code


still something odd going on here.

so, to recap:

* target mipsisa64-elf, host sparc-solaris.  sources current as of a
  few hours ago, with no relevant mods other than those mentioned
  here.

* mipsisa64-elf config.gcc bits like eric suggested (i tweaked them
  from last time, in response to his msg):

mipsisa64-*-elf*)
	tm_file="mips/isa64.h mips/isa3264.h mips/abi64.h"
	tmake_file=mips/t-isa3264
	target_cpu_default="MASK_64BIT|MASK_FLOAT64|MASK_GAS"
	;;

* isa64.h is a new file that contains only:

#ifndef MIPS_ISA_DEFAULT
#define MIPS_ISA_DEFAULT 64
#endif

* build croaks building -mips32 multilib of libgcc, on the command:

/projects/bbp_ext7/systems/cgd/proj/gcc-testing/work/mipsisa64-elf.build/gcc/xgcc -v -B/projects/bbp_ext7/systems/cgd/proj/gcc-testing/work/mipsisa64-elf.build/gcc/ -nostdinc -B/projects/bbp_ext7/systems/cgd/proj/gcc-testing/work/mipsisa64-elf.build/mipsisa64-elf/newlib/ -isystem /projects/bbp_ext7/systems/cgd/proj/gcc-testing/work/mipsisa64-elf.build/mipsisa64-elf/newlib/targ-include -isystem /home/cgd/proj/gcc-testing/combined/newlib/libc/include -B/home/cgd/proj/gcc-testing/work/mipsisa64-elf.install/mipsisa64-elf/bin/ -B/home/cgd/proj/gcc-testing/work/mipsisa64-elf.install/mipsisa64-elf/lib/ -isystem /home/cgd/proj/gcc-testing/work/mipsisa64-elf.install/mipsisa64-elf/include -L/projects/bbp_ext7/systems/cgd/proj/gcc-testing/work/mipsisa64-elf.build/ld -O2  -DIN_GCC -DCROSS_COMPILE   -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -isystem ./include  -G 0 -g  -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -Dinhibit_libc -I. -I. -I/home/cgd/proj/gcc-testing/combined/gcc -I/home/cgd/proj/gcc-testing/combined/gcc/. -I/home/cgd/proj/gcc-testing/combined/gcc/config -I/home/cgd/proj/gcc-testing/combined/gcc/../include -mips32 -DL_m16addsf3 -xassembler-with-cpp -c /home/cgd/proj/gcc-testing/combined/gcc/config/mips/mips16.S -o libgcc/mips32/_m16addsf3.o

with the error:

cc1: error: -mips32 does not support 64 bit fp registers

Note -mips32 flag, and that the default is 64-bit fp regs (from
config.gcc).

(-v output below.)

* specs contain:

*cc1:
%{gline:%{!g:%{!g0:%{!g1:%{!g2: -g1}}}}} %{mips1:-mfp32 -mgp32} %{mips2:-mfp32 -mgp32}%{mips3:%{!msingle-float:%{!m4650:-mfp64}} -mgp64} %{mips4:%{!msingle-float:%{!m4650:-mfp64}} -mgp64} %{mips32:-mfp32 -mgp32} %{mips64:%{!msingle-float:%{!m4650:-mfp64}} -mgp64} %{mfp64:%{msingle-float:%emay not use both -mfp64 and -msingle-float}} %{mfp64:%{m4650:%emay not use both -mfp64 and -m4650}} %{mint64|mlong64|mlong32:-mexplicit-type-size }%{mgp32: %{mfp64:%emay not use both -mgp32 and -mfp64} %{!mfp32: -mfp32}} %{G*} %{EB:-meb} %{EL:-mel} %{EB:%{EL:%emay not use both -EB and -EL}} %{save-temps: } %(subtarget_cc1_spec) %(cc1_cpu_spec)

I.e., the cc1 spec should be causing -mfp32 to be set for -mips32 in
some circumstances.  However, that's not getting passed to cc1 for the
assembler-with-cpp case.

Feeling adventurous, I tried dropping a similar chunk into the asm
spec, and that didn't help either.

(full specs below.)


So, i'm back to "uh, how is this supposed to work?"  8-)



chris
================== -v output
Reading specs from /projects/bbp_ext7/systems/cgd/proj/gcc-testing/work/mipsisa64-elf.build/gcc/specs
Configured with: /home/cgd/proj/gcc-testing/combined/configure --target=mipsisa64-elf --prefix=/home/cgd/proj/gcc-testing/work/mipsisa64-elf.install
Thread model: single
gcc version 3.2 20020611 (experimental)
 /projects/bbp_ext7/systems/cgd/proj/gcc-testing/work/mipsisa64-elf.build/gcc/cc1 -E -lang-asm -quiet -nostdinc -v -I. -I. -I/home/cgd/proj/gcc-testing/combined/gcc -I/home/cgd/proj/gcc-testing/combined/gcc/. -I/home/cgd/proj/gcc-testing/combined/gcc/config -I/home/cgd/proj/gcc-testing/combined/gcc/../include -iprefix /projects/bbp_ext7/systems/cgd/proj/gcc-testing/work/mipsisa64-elf.build/gcc/../lib/gcc-lib/mipsisa64-elf/3.2/ -isystem /projects/bbp_ext7/systems/cgd/proj/gcc-testing/work/mipsisa64-elf.build/gcc/include -isystem /projects/bbp_ext7/systems/cgd/proj/gcc-testing/work/mipsisa64-elf.build/mipsisa64-elf/newlib/include -isystem /home/cgd/proj/gcc-testing/work/mipsisa64-elf.install/mipsisa64-elf/bin/include -isystem /home/cgd/proj/gcc-testing/work/mipsisa64-elf.install/mipsisa64-elf/lib/include -D__GNUC__=3 -D__GNUC_MINOR__=2 -D__GNUC_PATCHLEVEL__=0 -DIN_GCC -DCROSS_COMPILE -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -Dinhibit_libc -DL_m16addsf3 -isystem /projects/bbp_ext7/systems/cgd/proj/gcc-testing/work/mipsisa64-elf.build/mipsisa64-elf/newlib/targ-include -isystem /home/cgd/proj/gcc-testing/combined/newlib/libc/include -isystem /home/cgd/proj/gcc-testing/work/mipsisa64-elf.install/mipsisa64-elf/include -isystem ./include /home/cgd/proj/gcc-testing/combined/gcc/config/mips/mips16.S -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -mips32 -O2 -o /tmp/ccKvhjju.s
ignoring nonexistent directory "/projects/bbp_ext7/systems/cgd/proj/gcc-testing/work/mipsisa64-elf.build/mipsisa64-elf/newlib/include"
ignoring nonexistent directory "/home/cgd/proj/gcc-testing/work/mipsisa64-elf.install/mipsisa64-elf/bin/include"
ignoring nonexistent directory "/home/cgd/proj/gcc-testing/work/mipsisa64-elf.install/mipsisa64-elf/lib/include"
ignoring nonexistent directory "/projects/bbp_ext7/systems/cgd/proj/gcc-testing/work/mipsisa64-elf.build/mipsisa64-elf/newlib/targ-include"
ignoring nonexistent directory "/home/cgd/proj/gcc-testing/work/mipsisa64-elf.install/mipsisa64-elf/include"
cc1: error: -mips32 does not support 64 bit fp registers
ignoring duplicate directory "."
ignoring duplicate directory "/home/cgd/proj/gcc-testing/combined/gcc"
ignoring duplicate directory "include"
#include "..." search starts here:
#include <...> search starts here:
 .
 /home/cgd/proj/gcc-testing/combined/gcc
 /home/cgd/proj/gcc-testing/combined/gcc/config
 /home/cgd/proj/gcc-testing/combined/include
 /projects/bbp_ext7/systems/cgd/proj/gcc-testing/work/mipsisa64-elf.build/gcc/include
 /home/cgd/proj/gcc-testing/combined/newlib/libc/include
End of search list.

================== specs
*asm:
%{G*} %{EB} %{EL} %{mips1} %{mips2} %{mips3} %{mips4} %{mips32} %{mips64}%{mips16:%{!mno-mips16:-mips16}} %{mno-mips16:-no-mips16} %(subtarget_asm_optimizing_spec) %(subtarget_asm_debugging_spec) %{membedded-pic} %{mabi=32:-32}%{mabi=o32:-32}%{mabi=n32:-n32}%{mabi=64:-64}%{mabi=n64:-64} %(target_asm_spec) %(subtarget_asm_spec)

*asm_debug:


*asm_final:
%{mmips-as: %{!mno-mips-tfile: 	
 mips-tfile %{v*: -v} 		%{K: -I %b.o~} 		%{!K: %{save-temps: -I %b.o~}} 		%{c:%W{o*}%{!o*:-o %b.o}}%{!c:-o %U.o} 		%{.s:%i} %{!.s:%g.s}}}

*asm_options:
%a %Y %{c:%W{o*}%{!o*:-o %w%b%O}}%{!c:-o %d%w%u%O}

*invoke_as:
%{!S:-o %{|!pipe:%g.s} |
 as %(asm_options) %{!pipe:%g.s} %A }

*cpp:
%(subtarget_cpp_spec)

*cpp_options:
%(cpp_unique_options) %{std*} %{W*&pedantic*} %{w} %{m*} %{f*} %{O*} %{undef}

*cpp_debug_options:
%{d*}

*cpp_unique_options:
%{C:%{!E:%eGNU C does not support -C without using -E}} %{CC:%{!E:%eGNU C does not support -CC without using -E}} %{!Q:-quiet} %{nostdinc*} %{C} %{CC} %{v} %{I*} %{P} %{$} %I %{MD:-MD %W{!o: %b.d}%W{o*:%.d%*}} %{MMD:-MMD %W{!o: %b.d}%W{o*:%.d%*}} %{M} %{MM} %W{MF*} %{MG} %{MP} %{MQ*} %{MT*} %{!E:%{!M:%{!MM:%{MD|MMD:%{o*:-MQ %*}}}}} %{!no-gcc:-D__GNUC__=%v1 -D__GNUC_MINOR__=%v2 -D__GNUC_PATCHLEVEL__=%v3} %{!undef:%{!ansi:%{!std=*:%p}%{std=gnu*:%p}} %P} %{trigraphs} %{remap} %{g3:-dD} %{H} %C %{D*&U*&A*} %{i*} %Z %i %{E|M|MM:%W{o*}}

*trad_capable_cpp:
%{traditional|ftraditional|traditional-cpp:tradcpp0} %{!traditional:%{!ftraditional:%{!traditional-cpp:cc1 -E}}}

*cc1:
%{gline:%{!g:%{!g0:%{!g1:%{!g2: -g1}}}}} %{mips1:-mfp32 -mgp32} %{mips2:-mfp32 -mgp32}%{mips3:%{!msingle-float:%{!m4650:-mfp64}} -mgp64} %{mips4:%{!msingle-float:%{!m4650:-mfp64}} -mgp64} %{mips32:-mfp32 -mgp32} %{mips64:%{!msingle-float:%{!m4650:-mfp64}} -mgp64} %{mfp64:%{msingle-float:%emay not use both -mfp64 and -msingle-float}} %{mfp64:%{m4650:%emay not use both -mfp64 and -m4650}} %{mint64|mlong64|mlong32:-mexplicit-type-size }%{mgp32: %{mfp64:%emay not use both -mgp32 and -mfp64} %{!mfp32: -mfp32}} %{G*} %{EB:-meb} %{EL:-mel} %{EB:%{EL:%emay not use both -EB and -EL}} %{save-temps: } %(subtarget_cc1_spec) %(cc1_cpu_spec)

*cc1_options:
%{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}} %1 %{!Q:-quiet} -dumpbase %B %{d*} %{m*} %{a*} %{g*} %{O*} %{W*&pedantic*} %{w} %{std*} %{ansi} %{v:-version} %{pg:-p} %{p} %{f*} %{undef} %{Qn:-fno-ident} %{--help:--help} %{--target-help:--target-help} %{!fsyntax-only:%{S:%W{o*}%{!o*:-o %b.s}}} %{fsyntax-only:-o %j} %{-param*}

*cc1plus:


*link_gcc_c_sequence:
%G %L %G

*endfile:
crtend%O%s crtn%O%s

*link:
%(endian_spec) %{G*} %{mips1} %{mips2} %{mips3} %{mips4} %{mips32} %{mips64} %{bestGnum} %{shared} %{non_shared}

*lib:


*libgcc:
-lgcc

*startfile:
crti%O%s crtbegin%O%s %{!mno-crt0: }

*switches_need_spaces:


*predefines:


*cross_compile:
1

*version:
3.2

*multilib:
. !msoft-float !EL !EB !mips32 !mips64;soft-float msoft-float !EL !EB !mips32 !mips64;el !msoft-float EL !EB !mips32 !mips64;eb !msoft-float !EL EB !mips32 !mips64;mips32 !msoft-float !EL !EB mips32 !mips64;mips64 !msoft-float !EL !EB !mips32 mips64;el/mips32 !msoft-float EL !EB mips32 !mips64;el/mips64 !msoft-float EL !EB !mips32 mips64;eb/mips32 !msoft-float !EL EB mips32 !mips64;eb/mips64 !msoft-float !EL EB !mips32 mips64;soft-float/el msoft-float EL !EB !mips32 !mips64;soft-float/eb msoft-float !EL EB !mips32 !mips64;soft-float/mips32 msoft-float !EL !EB mips32 !mips64;soft-float/mips64 msoft-float !EL !EB !mips32 mips64;soft-float/el/mips32 msoft-float EL !EB mips32 !mips64;soft-float/el/mips64 msoft-float EL !EB !mips32 mips64;soft-float/eb/mips32 msoft-float !EL EB mips32 !mips64;soft-float/eb/mips64 msoft-float !EL EB !mips32 mips64;

*multilib_defaults:
EB mips64

*multilib_extra:


*multilib_matches:
msoft-float msoft-float;EL EL;EB EB;mips32 mips32;mips64 mips64;

*multilib_exclusions:


*linker:
collect2

*link_libgcc:
%D

*md_exec_prefix:


*md_startfile_prefix:


*md_startfile_prefix_1:


*startfile_prefix_spec:


*subtarget_cc1_spec:


*cc1_cpu_spec:
%{!mcpu*: %{m3900:-march=r3900 -mips1 -mfp32 -mgp32 %n`-m3900' is deprecated. Use `-march=r3900' instead.
} %{m4650:-march=r4650 -mmad -msingle-float %n`-m4650' is deprecated. Use `-march=r4650' instead.
}}

*subtarget_cpp_spec:


*mips_as_asm_spec:
%{!.s:-nocpp} %{.s: %{cpp} %{nocpp}} %{pipe: %e-pipe is not supported} %{K} %(subtarget_mips_as_asm_spec)

*gas_asm_spec:
%{march=*} %{mtune=*} %{mcpu=*} %{m4650} %{mmad:-m4650} %{m3900} %{v} %{mgp32} %{mgp64} %(abi_gas_asm_spec) %{mabi=32:%{!mips*:-mips1}}

*abi_gas_asm_spec:


*target_asm_spec:
%{mmips-as: %(mips_as_asm_spec)} %{!mmips-as: %(gas_asm_spec)}

*subtarget_mips_as_asm_spec:
%{v}

*subtarget_asm_optimizing_spec:
%{noasmopt:-O0} %{!noasmopt:%{O:-O2} %{O1:-O2} %{O2:-O2} %{O3:-O3}}

*subtarget_asm_debugging_spec:
%{g} %{g0} %{g1} %{g2} %{g3} %{ggdb:-g} %{ggdb0:-g0} %{ggdb1:-g1} %{ggdb2:-g2} %{ggdb3:-g3} %{gstabs:-g} %{gstabs0:-g0} %{gstabs1:-g1} %{gstabs2:-g2} %{gstabs3:-g3} %{gstabs+:-g} %{gstabs+0:-g0} %{gstabs+1:-g1} %{gstabs+2:-g2} %{gstabs+3:-g3} %{gcoff:-g} %{gcoff0:-g0} %{gcoff1:-g1} %{gcoff2:-g2} %{gcoff3:-g3}

*subtarget_asm_spec:


*endian_spec:
%{!EL:%{!mel:-EB}} %{EL|mel:-EL}

*link_command:
%{!fsyntax-only:%{!c:%{!M:%{!MM:%{!E:%{!S:    %(linker) %l %X %{o*} %{A} %{d} %{e*} %{m} %{N} %{n} %{r} %{s} %{t}    %{u*} %{x} %{z} %{Z} %{!A:%{!nostdlib:%{!nostartfiles:%S}}}    %{static:} %{L*} %(link_libgcc) %o %{!nostdlib:%{!nodefaultlibs:%(link_gcc_c_sequence)}}    %{!A:%{!nostdlib:%{!nostartfiles:%E}}} %{T*} }}}}}}



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