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 s390 fallout from PR11271 patch


> > If this code were to be enabled for the thumb case, I think we'd end up
> > with invalid output.  The reason being that the code would attempt to
> > generate a sum of the stack pointer and another register, but that's
> > invalid: one of the reasons the stack pointer isn't classed as a base
> > register is because this mode of addressing is not supported for stack
> > accesses.
> 
> Okay.  But the comment is very misleading.

The code was almost certainly written before thumb support was added.  It 
just so happens that things work correctly with that code not matching 
(for an over-sized stack offset); but I think it would break if it were 
changed as you suggested.

I'm sure that most ports are largely written by doing a basic port and 
then fixing things that don't quite work right.  I know that's how the 
Thumb support was added.  I very much doubt that every line of source in 
the compiler is analysed by each engineer adding a new back end.

R.


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