mirror of
https://github.com/team-infusion-developers/android_kernel_samsung_msm8976.git
synced 2024-09-22 04:15:02 +00:00
[POWERPC] Add __ucmpdi2 for 64-bit comparisons in 32-bit kernels
Some drivers (such as V4L2) have code that causes gcc to generate calls to __ucmpdi2 when compiling for 32-bit powerpc, which results in either a link-time error or a module that can't be loaded, as we don't currently have a __ucmpdi2. This adds one so these drivers can be used. Signed-off-by: Paul Mackerras <paulus@samba.org>
This commit is contained in:
parent
9cf7f7fac8
commit
95ff54f517
2 changed files with 17 additions and 0 deletions
|
@ -785,6 +785,21 @@ _GLOBAL(__lshrdi3)
|
||||||
or r4,r4,r7 # LSW |= t2
|
or r4,r4,r7 # LSW |= t2
|
||||||
blr
|
blr
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 64-bit comparison: __ucmpdi2(u64 a, u64 b)
|
||||||
|
* Returns 0 if a < b, 1 if a == b, 2 if a > b.
|
||||||
|
*/
|
||||||
|
_GLOBAL(__ucmpdi2)
|
||||||
|
cmplw r3,r5
|
||||||
|
li r3,1
|
||||||
|
bne 1f
|
||||||
|
cmplw r4,r6
|
||||||
|
beqlr
|
||||||
|
1: li r3,0
|
||||||
|
bltlr
|
||||||
|
li r3,2
|
||||||
|
blr
|
||||||
|
|
||||||
_GLOBAL(abs)
|
_GLOBAL(abs)
|
||||||
srawi r4,r3,31
|
srawi r4,r3,31
|
||||||
xor r3,r3,r4
|
xor r3,r3,r4
|
||||||
|
|
|
@ -149,6 +149,8 @@ long long __lshrdi3(long long, int);
|
||||||
EXPORT_SYMBOL(__ashrdi3);
|
EXPORT_SYMBOL(__ashrdi3);
|
||||||
EXPORT_SYMBOL(__ashldi3);
|
EXPORT_SYMBOL(__ashldi3);
|
||||||
EXPORT_SYMBOL(__lshrdi3);
|
EXPORT_SYMBOL(__lshrdi3);
|
||||||
|
int __ucmpdi2(unsigned long long, unsigned long long);
|
||||||
|
EXPORT_SYMBOL(__ucmpdi2);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
EXPORT_SYMBOL(memcpy);
|
EXPORT_SYMBOL(memcpy);
|
||||||
|
|
Loading…
Reference in a new issue