OSDN Git Service

* config/stormy16/stormy16-lib2.c (__ucmpsi2): Fix thinko.
authornickc <nickc@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 22 Apr 2010 14:28:16 +0000 (14:28 +0000)
committernickc <nickc@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 22 Apr 2010 14:28:16 +0000 (14:28 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@158646 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/stormy16/stormy16-lib2.c

index 5eb1b30..5d6a5df 100644 (file)
@@ -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
index b8f957e..edf8635 100644 (file)
@@ -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);
     }