Re: [PATCH rs6000] remove implicit static var outputs of toc_relative_expr_p

2017-06-29 Thread Aaron Sawdey
On Wed, 2017-06-28 at 18:19 -0500, Segher Boessenkool wrote: > On Wed, Jun 28, 2017 at 03:21:49PM -0500, Aaron Sawdey wrote: > > -toc_relative_expr_p (const_rtx op, bool strict) > > +toc_relative_expr_p (const_rtx op, bool strict, const_rtx > > *tocrel_base_ret, > > +  const_rtx *tocr

Re: [PATCH rs6000] remove implicit static var outputs of toc_relative_expr_p

2017-06-28 Thread Segher Boessenkool
On Wed, Jun 28, 2017 at 03:21:49PM -0500, Aaron Sawdey wrote: > > It is probably nicer to have a separate function for > > toc_relative_expr_p > > and one to pull the base/offset out.  And maybe don't keep it cached > > for > > the output function either?  It has all info it needs, right, the > > f

Re: [PATCH rs6000] remove implicit static var outputs of toc_relative_expr_p

2017-06-28 Thread Aaron Sawdey
Hi Segher, On Tue, 2017-06-27 at 18:35 -0500, Segher Boessenkool wrote: > Hi Aaron, > > On Tue, Jun 27, 2017 at 11:43:57AM -0500, Aaron Sawdey wrote: > > The function toc_relative_expr_p implicitly sets two static vars > > (tocrel_base and tocrel_offset) that are declared in rs6000.c. The > > rea

Re: [PATCH rs6000] remove implicit static var outputs of toc_relative_expr_p

2017-06-27 Thread Segher Boessenkool
Hi Aaron, On Tue, Jun 27, 2017 at 11:43:57AM -0500, Aaron Sawdey wrote: > The function toc_relative_expr_p implicitly sets two static vars > (tocrel_base and tocrel_offset) that are declared in rs6000.c. The real > purpose of this is to communicate between > print_operand/print_operand_address and