forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Recent GCC SVN versions may generate calls to __ucmpdi2. Signed-off-by: Thiemo Seufer <[email protected]> Signed-off-by: Ralf Baechle <[email protected]>
- Loading branch information
1 parent
774583f
commit df6b106
Showing
2 changed files
with
20 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,19 @@ | ||
#include <linux/module.h> | ||
|
||
#include "libgcc.h" | ||
|
||
word_type __ucmpdi2 (unsigned long a, unsigned long b) | ||
{ | ||
const DWunion au = {.ll = a}; | ||
const DWunion bu = {.ll = b}; | ||
|
||
if ((unsigned int) au.s.high < (unsigned int) bu.s.high) | ||
return 0; | ||
else if ((unsigned int) au.s.high > (unsigned int) 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; | ||
} |