diff options
author | David Edelsohn <edelsohn@gnu.org> | 1999-05-13 12:38:44 +0000 |
---|---|---|
committer | David Edelsohn <dje@gcc.gnu.org> | 1999-05-13 08:38:44 -0400 |
commit | 19ba816140b04fd28edfb4d25c5618f4fdec89bc (patch) | |
tree | 9ee8670f97cb88bd11c998fd7d753ea57a9dc6e1 | |
parent | 1b01250dd06ece2a184526053a5fccd62f51f5f8 (diff) | |
download | gcc-19ba816140b04fd28edfb4d25c5618f4fdec89bc.zip gcc-19ba816140b04fd28edfb4d25c5618f4fdec89bc.tar.gz gcc-19ba816140b04fd28edfb4d25c5618f4fdec89bc.tar.bz2 |
rs6000.c (mask_constant): Delete.
* rs6000.c (mask_constant): Delete.
(mask_operand): Move mask_constant() body to here.
* rs6000.h (mask_constant): Delete declaration.
* rs6000.md (nabsdi2): Reverse subtraction in splitter.
From-SVN: r26925
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/config/rs6000/rs6000.c | 23 | ||||
-rw-r--r-- | gcc/config/rs6000/rs6000.h | 1 | ||||
-rw-r--r-- | gcc/config/rs6000/rs6000.md | 4 |
4 files changed, 19 insertions, 16 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4f9a2ef..c193e8a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +Thu May 13 15:34:18 1999 David Edelsohn <edelsohn@gnu.org> + + * rs6000.c (mask_constant): Delete. + (mask_operand): Move mask_constant() body to here. + * rs6000.h (mask_constant): Delete declaration. + * rs6000.md (nabsdi2): Reverse subtraction in splitter. + Thu May 13 02:25:01 1999 Jeffrey A Law (law@cygnus.com) * cpp.texi: Fix some typos. diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index d3861e9..34071f2 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -922,19 +922,26 @@ non_logical_cint_operand (op, mode) && (INTVAL (op) & (~ (HOST_WIDE_INT) 0xffff0000)) != 0); } -/* Return 1 if C is a constant that can be encoded in a mask on the +/* Return 1 if C is a constant that can be encoded in a 32-bit mask on the RS/6000. It is if there are no more than two 1->0 or 0->1 transitions. Reject all ones and all zeros, since these should have been optimized away and confuse the making of MB and ME. */ int -mask_constant (c) - register HOST_WIDE_INT c; +mask_operand (op, mode) + register rtx op; + enum machine_mode mode ATTRIBUTE_UNUSED; { + HOST_WIDE_INT c; int i; int last_bit_value; int transitions = 0; + if (GET_CODE (op) != CONST_INT) + return 0; + + c = INTVAL (op); + if (c == 0 || c == ~0) return 0; @@ -947,16 +954,6 @@ mask_constant (c) return transitions <= 2; } -/* Return 1 if the operand is a constant that is a mask on the RS/6000. */ - -int -mask_operand (op, mode) - register rtx op; - enum machine_mode mode ATTRIBUTE_UNUSED; -{ - return GET_CODE (op) == CONST_INT && mask_constant (INTVAL (op)); -} - /* Return 1 if the operand is a constant that is a PowerPC64 mask. It is if there are no more than one 1->0 or 0->1 transitions. Reject all ones and all zeros, since these should have been optimized diff --git a/gcc/config/rs6000/rs6000.h b/gcc/config/rs6000/rs6000.h index 0ca9782..4fecba1 100644 --- a/gcc/config/rs6000/rs6000.h +++ b/gcc/config/rs6000/rs6000.h @@ -3257,7 +3257,6 @@ extern int add_operand (); extern int non_add_cint_operand (); extern int non_logical_cint_operand (); extern int logical_operand (); -extern int mask_constant (); extern int mask_operand (); extern int mask64_operand (); extern int and64_operand (); diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6000/rs6000.md index 73728a8f..34ccacf 100644 --- a/gcc/config/rs6000/rs6000.md +++ b/gcc/config/rs6000/rs6000.md @@ -4963,7 +4963,7 @@ (set (match_dup 0) (minus:DI (match_dup 0) (match_dup 2)))] "") -(define_insn "" +(define_insn "*nabsdi2" [(set (match_operand:DI 0 "gpc_reg_operand" "=&r,r") (neg:DI (abs:DI (match_operand:DI 1 "gpc_reg_operand" "r,0")))) (clobber (match_scratch:DI 2 "=&r,&r"))] @@ -4978,7 +4978,7 @@ "TARGET_POWERPC64 && reload_completed" [(set (match_dup 2) (ashiftrt:DI (match_dup 1) (const_int 63))) (set (match_dup 0) (xor:DI (match_dup 2) (match_dup 1))) - (set (match_dup 0) (minus:DI (match_dup 0) (match_dup 2)))] + (set (match_dup 0) (minus:DI (match_dup 2) (match_dup 0)))] "") (define_expand "negdi2" |