summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoramylaar <amylaar@138bc75d-0d04-0410-961f-82ee72b054a4>2004-06-30 12:30:00 +0000
committeramylaar <amylaar@138bc75d-0d04-0410-961f-82ee72b054a4>2004-06-30 12:30:00 +0000
commit747b1ec1eda089a12b012efdd4c74c0e9e2e052a (patch)
treeb3bc9e9caf5ce8a2d5d561985ae7cc424b7bfa99
parent58960de0439a1b4875c5ff7eafbec0e87c11f75a (diff)
downloadppe42-gcc-747b1ec1eda089a12b012efdd4c74c0e9e2e052a.tar.gz
ppe42-gcc-747b1ec1eda089a12b012efdd4c74c0e9e2e052a.zip
* expmed.c (expand_smod_pow2): Fix sign of mask.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@83905 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog4
-rw-r--r--gcc/expmed.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 3d74a3c520f..e18d36ff1a0 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,7 @@
+2004-06-30 J"orn Rennecke <joern.rennecke@superh.com>
+
+ * expmed.c (expand_smod_pow2): Fix sign of mask.
+
2004-06-29 Diego Novillo <dnovillo@redhat.com>
* tree-ssa-pre.c (phi_trans_add): Use is_gimple_min_invariant
diff --git a/gcc/expmed.c b/gcc/expmed.c
index bb60ba1e832..a2278b9d8c1 100644
--- a/gcc/expmed.c
+++ b/gcc/expmed.c
@@ -3124,7 +3124,7 @@ expand_smod_pow2 (enum machine_mode mode, rtx op0, HOST_WIDE_INT d)
can avoid an explicit compare operation in the following comparison
against zero. */
- mask = (HOST_WIDE_INT) 1 << (GET_MODE_BITSIZE (mode) - 1)
+ mask = (HOST_WIDE_INT) -1 << (GET_MODE_BITSIZE (mode) - 1)
| (((HOST_WIDE_INT) 1 << logd) - 1);
temp = expand_binop (mode, and_optab, op0, GEN_INT (mask), result,
OpenPOWER on IntegriCloud