On Wed, Oct 23, 2019 at 05:00:58PM -0400, Michael Meissner wrote: > On Tue, Oct 22, 2019 at 05:27:19PM -0500, Segher Boessenkool wrote: > > On Wed, Oct 16, 2019 at 09:35:33AM -0400, Michael Meissner wrote: > > > - int n = get_attr_length (insn) / 4; > > > + /* If the insn tells us how many insns there are, use that. Otherwise > > > use > > > + the length/4. Adjust the insn length to remove the extra size that > > > + prefixed instructions take. */ > > > > This should be temporary, until we have converted everything to use > > num_insns, right? > > Well there were some 200+ places where length was set.
Yes, and I did volunteer to do this work, if needed / wanted. > > Please use a function, not a function-like macro. > > Ok, I added rs6000_adjust_insn_length in rs6000.c. Thanks. > > > +;; Return the number of real hardware instructions in a combined insn. > > > If it > > > +;; is 0, just use the length / 4. > > > +(define_attr "num_insns" "" (const_int 0)) > > > > So we could have the default value *be* length/4, not 0? > > Only if you make sure that every place sets num_insns. As the comment says, > until it is set every where, you run the risk of a deadly embrace. Sure :-) Segher