On Fri, Nov 06, 2020 at 10:46:43AM -0600, Pat Haugen wrote:
> On 11/5/20 4:32 PM, will schmidt wrote:
> > On Wed, 2020-11-04 at 14:42 -0600, Pat Haugen via Gcc-patches wrote:
> >>    * config/rs6000/rs6000.c (rs6000_final_prescan_insn): Only add 'p' for
> >>    PREFIXED_YES.
> > 
> > The code change reads as roughly 
> > - next_insn_prefixed_p != PREFIXED_NO
> > 
> > + next_insn_prefixed_p == PREFIXED_YES"
> > 
> > So just an inversion of the logic? I don't obviously see the 'p' impact
> > there.
> > 
> It's no longer an inversion of the logic since I added a PREFIXED_ALWAYS 
> value. 'next_insn_prefixed' is used by rs6000_final_prescan_insn() to 
> determine whether an insn mnemonic needs a 'p' prefix. We want it set for 
> PREFIXED_YES, but not for PREFIXED_NO or PREFIXED_ALWAYS.

Another way to do this is to do like maybe_var_shift does: things you
mask maybe_prefixed=yes get their prefixed attribute set to no or yes
depending on their operands, and for things where we always want to
set the prefixed attribute we can do just that. I don't know what reads
better / is more clear, and/or is more work to write (the schemes are
semantically identical).



Segher

Reply via email to