simplify-rtx.c (simplify_const_unary_operation): Handle SS_ABS.
authorJie Zhang <jie.zhang@analog.com>
Tue, 20 Oct 2009 03:33:57 +0000 (03:33 +0000)
committerJie Zhang <jiez@gcc.gnu.org>
Tue, 20 Oct 2009 03:33:57 +0000 (03:33 +0000)
* simplify-rtx.c (simplify_const_unary_operation): Handle
SS_ABS.
* doc/rtl.texi: Document ss_abs.

From-SVN: r153003

gcc/ChangeLog
gcc/doc/rtl.texi
gcc/simplify-rtx.c

index 548cc0b36ed98364c3d66ff5b6bb96fd2b1fdc7b..ee8666e84c4faaf55230461c95699cb8304446dc 100644 (file)
@@ -1,3 +1,9 @@
+2009-10-20  Jie Zhang  <jie.zhang@analog.com>
+
+       * simplify-rtx.c (simplify_const_unary_operation): Handle
+       SS_ABS.
+       * doc/rtl.texi: Document ss_abs.
+
 2009-10-19  Jakub Jelinek  <jakub@redhat.com>
 
        * c-common.c (c_parse_error): Handle CPP_UTF8STRING.
index ba72b48096be05552dc2c12dd76792b97c6ed2e5..e28ba032cdddca7d9f7822fc788415cbca4c78e0 100644 (file)
@@ -2364,9 +2364,14 @@ Similar but represent left and right rotate.  If @var{c} is a constant,
 use @code{rotate}.
 
 @findex abs
+@findex ss_abs
 @cindex absolute value
 @item (abs:@var{m} @var{x})
+@item (ss_abs:@var{m} @var{x})
 Represents the absolute value of @var{x}, computed in mode @var{m}.
+@code{ss_abs} ensures that an out-of-bounds result saturates to the
+maximum signed value.
+
 
 @findex sqrt
 @cindex square root
index 4e87d04abaf680bf3dd7bcf3df4ce015d67684ee..217db7a3cdbffbc80974c29424a65932854cd5e6 100644 (file)
@@ -1245,6 +1245,7 @@ simplify_const_unary_operation (enum rtx_code code, enum machine_mode mode,
        case US_TRUNCATE:
        case SS_NEG:
        case US_NEG:
+       case SS_ABS:
          return 0;
 
        default: