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]
Other format: [Raw text]

Re: [ARM] Implementing doloop pattern


Roman Zhuykov wrote:

> Memory is used instead of a register to store doloop counter.

Yes, this can happen, and your doloop insn pattern *must* be
able to handle this.  This is usually done via a splitter
(and possibly an additional scratch register allocated via
an extra insn operand).  See various other doloop implementations
for examples, like s390 or rs6000.

(The reason why the register allocator and/or reload cannot fix
this is: the doloop counter is an *output* as well as an input
to the isns, therefore it would require an output reload to fix;
however, the doloop insn is also a *jump* pattern, and those
must never have output reloads, since reload has no place to
put them.)

Bye,
Ulrich

-- 
  Dr. Ulrich Weigand
  GNU Toolchain for Linux on System z and Cell BE
  Ulrich.Weigand@de.ibm.com


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