-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Certain 32-bit kernel configurations seem to be able to cause references, this was observed with gcc 4.1.2. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
- Loading branch information
Ralf Baechle
committed
Aug 27, 2007
1 parent
606bf78
commit 2704afe
Showing
2 changed files
with
28 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#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); |