diff options
author | Maciej W. Rozycki <macro@linux-mips.org> | 2021-01-08 01:50:20 +0000 |
---|---|---|
committer | Maciej W. Rozycki <macro@linux-mips.org> | 2021-01-09 15:50:27 +0000 |
commit | be7e807242b36863a281df4343289b5687edd34e (patch) | |
tree | 1267df963b0c7c4cc173b624c2d67dc3edd158e6 /gcc/config/pdp11/pdp11.md | |
parent | 859be2e44aceb3766e4517e827e2aad7c9711b4c (diff) | |
download | gcc-be7e807242b36863a281df4343289b5687edd34e.zip gcc-be7e807242b36863a281df4343289b5687edd34e.tar.gz gcc-be7e807242b36863a281df4343289b5687edd34e.tar.bz2 |
PDP11: Use a mode with `const_double_zero' expressions
For predictable semantics propagate the mode from operands referred by
FP substitutions to the `const_double_zero' expressions used with the
associated condition code calculation, resulting in the following update
to insn-emit.c code produced for the `pdp11-aout' target (with machine
description line numbering change noise removed):
@@ -1514,7 +1514,7 @@
gen_rtx_COMPARE (CCmode,
gen_rtx_ABS (DFmode,
operand1),
- CONST_DOUBLE_ATOF ("0", VOIDmode))),
+ CONST_DOUBLE_ATOF ("0", DFmode))),
gen_rtx_SET (operand0,
gen_rtx_ABS (DFmode,
copy_rtx (operand1)))));
@@ -1555,7 +1555,7 @@
gen_rtx_COMPARE (CCmode,
gen_rtx_NEG (DFmode,
operand1),
- CONST_DOUBLE_ATOF ("0", VOIDmode))),
+ CONST_DOUBLE_ATOF ("0", DFmode))),
gen_rtx_SET (operand0,
gen_rtx_NEG (DFmode,
copy_rtx (operand1)))));
@@ -1790,7 +1790,7 @@
gen_rtx_MULT (DFmode,
operand1,
operand2),
- CONST_DOUBLE_ATOF ("0", VOIDmode))),
+ CONST_DOUBLE_ATOF ("0", DFmode))),
gen_rtx_SET (operand0,
gen_rtx_MULT (DFmode,
copy_rtx (operand1),
@@ -1942,7 +1942,7 @@
gen_rtx_DIV (DFmode,
operand1,
operand2),
- CONST_DOUBLE_ATOF ("0", VOIDmode))),
+ CONST_DOUBLE_ATOF ("0", DFmode))),
gen_rtx_SET (operand0,
gen_rtx_DIV (DFmode,
copy_rtx (operand1),
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.
Diffstat (limited to 'gcc/config/pdp11/pdp11.md')
-rw-r--r-- | gcc/config/pdp11/pdp11.md | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/gcc/config/pdp11/pdp11.md b/gcc/config/pdp11/pdp11.md index ecedc3b..2a12c97 100644 --- a/gcc/config/pdp11/pdp11.md +++ b/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") |