Commit 684bb802 authored by Abraham van der Merwe's avatar Abraham van der Merwe Committed by Russell King

[PATCH] 1083/1: 64-bit unsigned modulo arithmetic support

I've added support for 64-bit modulo arithmetic on ARM. This is needed for
the video4linux API to function properly and since there's already support
for 64-bit divides, I think there shouldn't be any reason for the absence of
this.
parent 51a8fac4
...@@ -64,6 +64,7 @@ extern void __modsi3(void); ...@@ -64,6 +64,7 @@ extern void __modsi3(void);
extern void __muldi3(void); extern void __muldi3(void);
extern void __ucmpdi2(void); extern void __ucmpdi2(void);
extern void __udivdi3(void); extern void __udivdi3(void);
extern void __umoddi3(void);
extern void __udivmoddi4(void); extern void __udivmoddi4(void);
extern void __udivsi3(void); extern void __udivsi3(void);
extern void __umodsi3(void); extern void __umodsi3(void);
...@@ -227,6 +228,7 @@ EXPORT_SYMBOL_NOVERS(__modsi3); ...@@ -227,6 +228,7 @@ EXPORT_SYMBOL_NOVERS(__modsi3);
EXPORT_SYMBOL_NOVERS(__muldi3); EXPORT_SYMBOL_NOVERS(__muldi3);
EXPORT_SYMBOL_NOVERS(__ucmpdi2); EXPORT_SYMBOL_NOVERS(__ucmpdi2);
EXPORT_SYMBOL_NOVERS(__udivdi3); EXPORT_SYMBOL_NOVERS(__udivdi3);
EXPORT_SYMBOL_NOVERS(__umoddi3);
EXPORT_SYMBOL_NOVERS(__udivmoddi4); EXPORT_SYMBOL_NOVERS(__udivmoddi4);
EXPORT_SYMBOL_NOVERS(__udivsi3); EXPORT_SYMBOL_NOVERS(__udivsi3);
EXPORT_SYMBOL_NOVERS(__umodsi3); EXPORT_SYMBOL_NOVERS(__umodsi3);
......
...@@ -229,3 +229,14 @@ __udivdi3 (UDItype n, UDItype d) ...@@ -229,3 +229,14 @@ __udivdi3 (UDItype n, UDItype d)
{ {
return __udivmoddi4 (n, d, (UDItype *) 0); return __udivmoddi4 (n, d, (UDItype *) 0);
} }
UDItype
__umoddi3 (UDItype u, UDItype v)
{
UDItype w;
(void) __udivmoddi4 (u ,v, &w);
return w;
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment