From d5f4a5273337b6f8ab94b0cecf925e53d369aeb1 Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Thu, 22 Apr 2010 14:28:16 +0000 Subject: * config/stormy16/stormy16-lib2.c (__ucmpsi2): Fix thinko. From-SVN: r158646 --- gcc/config/stormy16/stormy16-lib2.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'gcc/config/stormy16') 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); } -- cgit v1.1