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]

Re: SUBREGs and modes


On Wed, Aug 02, 2000 at 02:49:16PM +0200, Jan Hubicka wrote:
> Hi
> (except for many other cases), my checker pointed out
> weird usage of SUBREGs. According to my uderstanding the docs, when
> WORDNUM is nonzero, the  innermode must be greater than word and
> the outer mode must be word.
> 
> My checker has caught occurences of subregs not matching these constraints
> such as:
> (subreg:HI (reg:DI ) 1)
> in i386.
> 
> These happends in early stages of RTL generation and seems to be results of
> combining two SUBREGS together. Simplifiers in recog.c and combine.c can't deal
> with such SUBREGS when they get constant insode so we at least miss
> optimizations.
> 
> So the question is, whether are such subregs correct, if so we
> should probably docuemnt their semantics and add optimizations, if not,
> how to avoid these?
> 
> Jakub: Does your (and Davids) SUBREG_BYTE work touch this issue somehow?

Yes, things are quite different.
First of all, one big endian subreg_lowpart_p has nonzero BYTENUM.
(subreg:QI (reg:SI %eax) 1) is legal e.g. on i386, that's %ah.
I hope SUBREG_BYTE will be integrated soon and thus am not sure how much is
it worth of regoing the SUBREG_WORD stuff now (it would definitely be much
more work for me to keep up with the patches).

	Jakub

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