This is the mail archive of the gcc-patches@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: [PATCH] Fix ICE for mips-linux-gcc -O2


Thiemo Seufer <ths@networkno.de> writes:
> 	* config/mips/mips.c (override_options): Don't allow too small
> 	integers in FP registers, there are no appropriate load/store
> 	instructions.

This is the right idea, but...

>  			/* Allow integer modes that fit into a single
>  			   register.  We need to put integers into FPRs
>  			   when using instructions like cvt and trunc.  */
> -			|| (class == MODE_INT && size <= UNITS_PER_FPREG)
> +			|| (class == MODE_INT && size == UNITS_PER_FPREG)
>  			/* Allow TFmode for CCmode reloads.  */
>  			|| (ISA_HAS_8CC && mode == TFmode));
>  

...I don't think this is quite right.  We must still allow FPRs to
store SImode on 64-bit targets.  How about:

                        || (class == MODE_INT
                            && size >= MIN_UNITS_PER_WORD
                            && size <= UNITS_PER_FPREG)

Also, I believe ChangeLogs are supposed to say "what" not "why".
It'd probably be better if you drop the ", there are no..." bit
from the changelog and add it to the comment instead.

Richard


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