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: Fix SPEC2000 GCC misscopilation and SIMD support


> Hi,
> I've just bootstrapped the attached patch.  I am still testing wehter it
> fixes the gcc failure, but I expect so.
This, unfortunately, is not the case, as in reload eyes i've prohibited only
the paradoxical subregs, while in simplify_subreg, combine and others
I've prohibited only the non-paradoxical subregs.  Whole thing has
bootstrapped just because I eleiminated the paradoxical subregs via
simplify_subreg.

I guess I need to review the code and fix that.  How it should work?
Should be FROM the inner mode of the subregs, or should it be the
inner mode for uses and the other way around the outer mode for sets?
(that would be mess, but it describes how the mode is actaully changes)

I will work on the first.
Honza
> note that the order of comparison is reversed that what I would expect
> from paradoxical subreg, but all uses with the exception in reload1.c
> seems to be consistently that reversed way (ie FROM is the outer, not
> inner mode of subreg), so I assume that my mind is just too
> contradictionary to accept the design.
> 
> I've also ruled out FLOAT_REGS from subregs like
> (subreg:DF (reg:SF))
> that also result in inexpected things.
> 
> OK for mainline now?
> 
> Wed Dec 11 01:16:00 CET 2002  Jan Hubicka  <jh@suse.cz.
> 	* i386.h (CANNOT_CHANGE_MODE_CLASS): New.
> Index: i386.h
> ===================================================================
> RCS file: /cvs/gcc/gcc/gcc/config/i386/i386.h,v
> retrieving revision 1.305.2.6
> diff -c -3 -p -r1.305.2.6 i386.h
> *** i386.h	7 Dec 2002 16:41:18 -0000	1.305.2.6
> --- i386.h	11 Dec 2002 00:15:38 -0000
> *************** enum reg_class
> *** 1541,1546 ****
> --- 1541,1559 ----
>      || ((CLASS) == SIREG)						\
>      || ((CLASS) == DIREG))
>   
> + /* Return a class of registers that cannot change FROM mode to TO mode.
> +   
> +    x87 registers can't do subreg as all values are reformated to extended
> +    precision.  XMM registers does not support with nonzero offsets equal
> +    to 4, 8 and 12 otherwise valid for integer registers. Since we can't
> +    determine these, prohibit all nonparadoxical subregs changing size.  */
> + 
> + #define CANNOT_CHANGE_MODE_CLASS(FROM, TO)	\
> +   (GET_MODE_SIZE (TO) > GET_MODE_SIZE (FROM)    \
> +    ? FLOAT_SSE_REGS				\
> +    : GET_MODE_SIZE (FROM) != GET_MODE_SIZE (TO)	\
> +    ? FLOAT_REGS : NO_REGS)
> + 
>   /* A C statement that adds to CLOBBERS any hard regs the port wishes
>      to automatically clobber for all asms.
>   


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