Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 283154
b: refs/heads/master
c: eecb207
h: refs/heads/master
v: v3
  • Loading branch information
Michal Simek committed Jan 5, 2012
1 parent 12d21d4 commit 4cd0282
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ed705633d3aba5ff442ca5b7a02bf19edfa811b5
refs/heads/master: eecb20720f1b29019725515051e41bc7c079f91f
1 change: 1 addition & 0 deletions trunk/arch/microblaze/lib/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ lib-y += uaccess_old.o

lib-y += ashldi3.o
lib-y += ashrdi3.o
lib-y += cmpdi2.o
lib-y += divsi3.o
lib-y += lshrdi3.o
lib-y += modsi3.o
Expand Down
26 changes: 26 additions & 0 deletions trunk/arch/microblaze/lib/cmpdi2.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#include <linux/module.h>

#include "libgcc.h"

word_type __cmpdi2(long long a, long long b)
{
const DWunion au = {
.ll = a
};
const DWunion bu = {
.ll = b
};

if (au.s.high < bu.s.high)
return 0;
else if (au.s.high > bu.s.high)
return 2;

if ((unsigned int) au.s.low < (unsigned int) bu.s.low)
return 0;
else if ((unsigned int) au.s.low > (unsigned int) bu.s.low)
return 2;

return 1;
}
EXPORT_SYMBOL(__cmpdi2);

0 comments on commit 4cd0282

Please sign in to comment.