aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog4
-rw-r--r--gcc/config/stormy16/stormy16-lib2.c8
2 files changed, 8 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 5eb1b30..5d6a5df 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,7 @@
+2010-04-22 Nick Clifton <nickc@redhat.com>
+
+ * config/stormy16/stormy16-lib2.c (__ucmpsi2): Fix thinko.
+
2010-04-22 Alexander Monakov <amonakov@ispras.ru>
* tree-ssa-reassoc.c (eliminate_plus_minus_pair): Handle BIT_NOT_EXPR
diff --git a/gcc/config/stormy16/stormy16-lib2.c b/gcc/config/stormy16/stormy16-lib2.c
index b8f957e9..edf8635 100644
--- a/gcc/config/stormy16/stormy16-lib2.c
+++ b/gcc/config/stormy16/stormy16-lib2.c
@@ -318,13 +318,13 @@ __ffshi2 (UHWtype u)
word_type
__ucmpsi2 (USItype a, USItype b)
{
- word_type hi_a = (a << 16);
- word_type hi_b = (b << 16);
+ word_type hi_a = (a >> 16);
+ word_type hi_b = (b >> 16);
if (hi_a == hi_b)
{
- word_type low_a = (a & 0xff);
- word_type low_b = (b & 0xff);
+ word_type low_a = (a & 0xffff);
+ word_type low_b = (b & 0xffff);
return low_a < low_b ? 0 : (low_a > low_b ? 2 : 1);
}