summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/doc/rtl.texi5
-rw-r--r--gcc/simplify-rtx.c1
3 files changed, 12 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 548cc0b36ed..ee8666e84c4 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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.
diff --git a/gcc/doc/rtl.texi b/gcc/doc/rtl.texi
index ba72b48096b..e28ba032cdd 100644
--- a/gcc/doc/rtl.texi
+++ b/gcc/doc/rtl.texi
@@ -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
diff --git a/gcc/simplify-rtx.c b/gcc/simplify-rtx.c
index 4e87d04abaf..217db7a3cdb 100644
--- a/gcc/simplify-rtx.c
+++ b/gcc/simplify-rtx.c
@@ -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: