This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: mips cc1 spec vs. fp reg defines vs. assembly code
Chris G. Demetriou wrote:-
> * 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.
The assembler-with-cpp case does not use cc1_options: it uses just the
preprocessor and then the assembler.
I guess this use to be right, but is now b0rken because cc1 is the
preprocessor, and the preprocessor now has state set my cc1 (in
c-common.c with the TARGET_CPU_CPP_BUILTINS etc.) and that cc1 state
is not properly set because that requires a %(cc1_options) in a
suitable place in the .S spec.
Just a guess.
Or is that cc1 is trying to be too clever when just preprocessing, and
making sanity checks only appropriate for when it's acting as a
compiler?
Neil.