summaryrefslogtreecommitdiff
path: root/gcc/config/stormy16
diff options
context:
space:
mode:
authornickc <nickc@138bc75d-0d04-0410-961f-82ee72b054a4>2010-04-22 14:28:16 +0000
committernickc <nickc@138bc75d-0d04-0410-961f-82ee72b054a4>2010-04-22 14:28:16 +0000
commit7454e6c55cfd0d3aabb8e8ac75a4591c4bd16e95 (patch)
tree3a254e6eaa7e3a1d59edcf024167d9f56d0a76b3 /gcc/config/stormy16
parent50fa62c69940ddea294ac7656ec7c04ffa990221 (diff)
downloadgcc-7454e6c55cfd0d3aabb8e8ac75a4591c4bd16e95.tar.gz
* 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
Diffstat (limited to 'gcc/config/stormy16')
-rw-r--r--gcc/config/stormy16/stormy16-lib2.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/config/stormy16/stormy16-lib2.c b/gcc/config/stormy16/stormy16-lib2.c
index b8f957e915c..edf8635e192 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);
}