From: nickc Date: Thu, 22 Apr 2010 14:28:16 +0000 (+0000) Subject: * config/stormy16/stormy16-lib2.c (__ucmpsi2): Fix thinko. X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7454e6c55cfd0d3aabb8e8ac75a4591c4bd16e95;p=thirdparty%2Fgcc.git * config/stormy16/stormy16-lib2.c (__ucmpsi2): Fix thinko. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@158646 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 5eb1b305bbfc..5d6a5df69557 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2010-04-22 Nick Clifton + + * config/stormy16/stormy16-lib2.c (__ucmpsi2): Fix thinko. + 2010-04-22 Alexander Monakov * 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 b8f957e915cf..edf8635e192b 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); }