Message ID | alpine.LFD.2.21.2101080106410.1637534@eddie.linux-mips.org |
---|---|
State | Accepted |
Headers | show |
Series | Fixes for `const_double_zero' use + VAX iterator simplification | expand |
> On Jan 7, 2021, at 8:50 PM, Maciej W. Rozycki <macro@linux-mips.org> wrote: > > ... > > Provide a new iterator to provide copies of FP substitutions across the > FP modes supported as the substitutions now need to match the mode of > the operands. > > gcc/ > * config/pdp11/pdp11.md (PDPfp): New mode iterator. > (fcc_cc, fcc_ccnz): Use it. Add mode to `const_double_zero' and > operands. > --- > gcc/config/pdp11/pdp11.md | 10 ++++++---- > 1 file changed, 6 insertions(+), 4 deletions(-) > > gcc-pdp11-const-double-zero-mode.diff > Index: gcc/gcc/config/pdp11/pdp11.md > =================================================================== > --- gcc.orig/gcc/config/pdp11/pdp11.md > +++ gcc/gcc/config/pdp11/pdp11.md > @@ -82,6 +82,8 @@ > > (define_code_iterator SHF [ashift ashiftrt lshiftrt]) > > +(define_mode_iterator PDPfp [SF DF]) > + > ;; Substitution to turn a CC clobber into a CC setter. We have four of > ;; these: for CCmode vs. CCNZmode, and for CC_REGNUM vs. FCC_REGNUM. > (define_subst "cc_cc" > @@ -101,19 +103,19 @@ > (set (match_dup 0) (match_dup 1))]) > > (define_subst "fcc_cc" > - [(set (match_operand 0 "") (match_operand 1 "")) > + [(set (match_operand:PDPfp 0 "") (match_operand:PDPfp 1 "")) > (clobber (reg FCC_REGNUM))] > "" > [(set (reg:CC FCC_REGNUM) > - (compare:CC (match_dup 1) (const_double_zero))) > + (compare:CC (match_dup 1) (const_double_zero:PDPfp))) > (set (match_dup 0) (match_dup 1))]) > > (define_subst "fcc_ccnz" > - [(set (match_operand 0 "") (match_operand 1 "")) > + [(set (match_operand:PDPfp 0 "") (match_operand:PDPfp 1 "")) > (clobber (reg FCC_REGNUM))] > "" > [(set (reg:CCNZ FCC_REGNUM) > - (compare:CCNZ (match_dup 1) (const_double_zero))) > + (compare:CCNZ (match_dup 1) (const_double_zero:PDPfp))) > (set (match_dup 0) (match_dup 1))]) > > (define_subst_attr "cc_cc" "cc_cc" "_nocc" "_cc") Ok. Thanks Maciej. paul
On Fri, 8 Jan 2021, Paul Koning wrote:
> Ok. Thanks Maciej.
Thank you for your review. I have applied this change now (and the
remaining from the series, approved by Jeff).
Maciej
Index: gcc/gcc/config/pdp11/pdp11.md =================================================================== --- gcc.orig/gcc/config/pdp11/pdp11.md +++ gcc/gcc/config/pdp11/pdp11.md @@ -82,6 +82,8 @@ (define_code_iterator SHF [ashift ashiftrt lshiftrt]) +(define_mode_iterator PDPfp [SF DF]) + ;; Substitution to turn a CC clobber into a CC setter. We have four of ;; these: for CCmode vs. CCNZmode, and for CC_REGNUM vs. FCC_REGNUM. (define_subst "cc_cc" @@ -101,19 +103,19 @@ (set (match_dup 0) (match_dup 1))]) (define_subst "fcc_cc" - [(set (match_operand 0 "") (match_operand 1 "")) + [(set (match_operand:PDPfp 0 "") (match_operand:PDPfp 1 "")) (clobber (reg FCC_REGNUM))] "" [(set (reg:CC FCC_REGNUM) - (compare:CC (match_dup 1) (const_double_zero))) + (compare:CC (match_dup 1) (const_double_zero:PDPfp))) (set (match_dup 0) (match_dup 1))]) (define_subst "fcc_ccnz" - [(set (match_operand 0 "") (match_operand 1 "")) + [(set (match_operand:PDPfp 0 "") (match_operand:PDPfp 1 "")) (clobber (reg FCC_REGNUM))] "" [(set (reg:CCNZ FCC_REGNUM) - (compare:CCNZ (match_dup 1) (const_double_zero))) + (compare:CCNZ (match_dup 1) (const_double_zero:PDPfp))) (set (match_dup 0) (match_dup 1))]) (define_subst_attr "cc_cc" "cc_cc" "_nocc" "_cc")