This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
rs6000 cr buglet fixes
- To: gcc-patches at gcc dot gnu dot org
- Subject: rs6000 cr buglet fixes
- From: David Edelsohn <dje at watson dot ibm dot com>
- Date: Thu, 08 Mar 2001 00:51:15 -0500
- cc: Geoff Keating <geoffk at redhat dot com>
The following patch adds the POWER mnemonic alternative for crnot
and fixes a thinko in one of the cr logic splitters which used
(match_dup 5) but never defined it as the appropriate constant. I
stumbled on an example which actually caused that pattern to be used! (:^)
David
* rs6000.md (cr logic): Add original POWER mnemonic alternative
for crnot. Set operands[5] in splitter.
Index: rs6000.md
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/rs6000/rs6000.md,v
retrieving revision 1.108
diff -c -p -r1.108 rs6000.md
*** rs6000.md 2000/12/27 11:01:02 1.108
--- rs6000.md 2001/03/08 05:35:04
*************** operands[2] = GEN_INT (INTVAL (operands[
*** 12575,12581 ****
(const_int 0)])
(const_int 0)))]
""
! "crnot %E0,%j1"
[(set_attr "type" "cr_logical")])
;; If we are comparing the result of two comparisons, this can be done
--- 12575,12581 ----
(const_int 0)])
(const_int 0)))]
""
! "{crnor %E0,%j1,%j1|crnot %E0,%j1}"
[(set_attr "type" "cr_logical")])
;; If we are comparing the result of two comparisons, this can be done
*************** operands[2] = GEN_INT (INTVAL (operands[
*** 12622,12628 ****
operands[4]);
if (positive_1 == positive_2)
! operands[1] = gen_rtx_NOT (SImode, operands[1]);
}")
;; Unconditional branch and return.
--- 12622,12635 ----
operands[4]);
if (positive_1 == positive_2)
! {
! operands[1] = gen_rtx_NOT (SImode, operands[1]);
! operands[5] = constm1_rtx;
! }
! else
! {
! operands[5] = const1_rtx;
! }
}")
;; Unconditional branch and return.