From: David Edelsohn Date: Thu, 13 May 1999 12:38:44 +0000 (+0000) Subject: rs6000.c (mask_constant): Delete. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=19ba816140b04fd28edfb4d25c5618f4fdec89bc;p=gcc.git 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4f9a2ef6d02..c193e8a9cd5 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +Thu May 13 15:34:18 1999 David Edelsohn + + * 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 d3861e9ed1e..34071f20a19 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 0ca9782af29..4fecba1c4bf 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 73728a8fd17..34ccacf9c2d 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"