-
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.
microblaze: Add __ucmpdi2() helper function
Add missing __ucmpdi2 helper function. Error log: kernel/built-in.o: In function `print_graph_duration': : undefined reference to `__ucmpdi2' kernel/built-in.o: In function `print_graph_duration': : undefined reference to `__ucmpdi2' Based on MIPS code. Signed-off-by: Michal Simek <monstr@monstr.eu>
- Loading branch information
Michal Simek
committed
Oct 14, 2011
1 parent
15ec090
commit c8ae8a8
Showing
2 changed files
with
21 additions
and
0 deletions.
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,20 @@ | ||
#include <linux/module.h> | ||
|
||
#include "libgcc.h" | ||
|
||
word_type __ucmpdi2(unsigned long long a, unsigned long 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; | ||
} | ||
EXPORT_SYMBOL(__ucmpdi2); |