Re: [PATCH, rs6000] Implement mffscrni pattern

2021-12-20 Thread Segher Boessenkool
Hi! On Mon, Dec 20, 2021 at 01:55:51PM +0800, HAO CHEN GUI wrote: > * config/rs6000/rs6000-call.c > (rs6000_expand_set_fpscr_rn_builtin): Not copy argument to a reg if > it's a constant. The pattern for constant can be recognized now. (Two spaces after full stop). > +;; Return

Re: [PATCH, rs6000] Implement mffscrni pattern

2021-12-20 Thread David Edelsohn via Gcc-patches
On Mon, Dec 20, 2021 at 12:56 AM HAO CHEN GUI wrote: > > Hi, > I modified the patch according to David and Segher's advice. > > This patch defines a pattern for mffscrni. If the RN is a constant, it can > call > gen_rs6000_mffscrni directly. The "rs6000-builtin-new.def" defines prototype >

Re: [PATCH, rs6000] Implement mffscrni pattern

2021-12-18 Thread Segher Boessenkool
On Fri, Dec 17, 2021 at 10:33:12PM -0500, David Edelsohn wrote: > On Thu, Dec 16, 2021 at 9:43 PM HAO CHEN GUI wrote: > > +(define_insn "rs6000_mffscrni" > > + [(set (match_operand:DF 0 "gpc_reg_operand" "=d") > > + (unspec_volatile:DF [(match_operand:DF 1 "u2bit_cint_operand" "n")] > >

Re: [PATCH, rs6000] Implement mffscrni pattern

2021-12-17 Thread David Edelsohn via Gcc-patches
On Thu, Dec 16, 2021 at 9:43 PM HAO CHEN GUI wrote: > > Hi, >This patch defines a pattern for mffscrni. If the RN is a constant, it can > call > gen_rs6000_mffscrni directly. The "rs6000-builtin-new.def" defines prototype > for builtin arguments. > The pattern "rs6000_set_fpscr_rn" is then