-
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.
yaml --- r: 71907 b: refs/heads/master c: efb80e7 h: refs/heads/master i: 71905: 17b8335 71903: 324954a v: v3
- Loading branch information
Kyle McMartin
authored and
Kyle McMartin
committed
Oct 18, 2007
1 parent
edef966
commit 7b78652
Showing
32 changed files
with
4,629 additions
and
25 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
--- | ||
refs/heads/master: 6f7d998e94ec7b7f08bd0c72fc05343435d7fa93 | ||
refs/heads/master: efb80e7e097d0888e59fbbe4ded2ac5a256f556d |
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
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,4 @@ | ||
obj-y := __ashldi3.o __ashrdi3.o __clzsi2.o __divdi3.o __divsi3.o \ | ||
__lshrdi3.o __moddi3.o __modsi3.o __udivdi3.o \ | ||
__udivmoddi4.o __udivmodsi4.o __udivsi3.o \ | ||
__umoddi3.o __umodsi3.o __muldi3.o __umulsidi3.o |
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 "libgcc.h" | ||
|
||
u64 __ashldi3(u64 v, int cnt) | ||
{ | ||
int c = cnt & 31; | ||
u32 vl = (u32) v; | ||
u32 vh = (u32) (v >> 32); | ||
|
||
if (cnt & 32) { | ||
vh = (vl << c); | ||
vl = 0; | ||
} else { | ||
vh = (vh << c) + (vl >> (32 - c)); | ||
vl = (vl << c); | ||
} | ||
|
||
return ((u64) vh << 32) + vl; | ||
} | ||
EXPORT_SYMBOL(__ashldi3); |
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 "libgcc.h" | ||
|
||
u64 __ashrdi3(u64 v, int cnt) | ||
{ | ||
int c = cnt & 31; | ||
u32 vl = (u32) v; | ||
u32 vh = (u32) (v >> 32); | ||
|
||
if (cnt & 32) { | ||
vl = ((s32) vh >> c); | ||
vh = (s32) vh >> 31; | ||
} else { | ||
vl = (vl >> c) + (vh << (32 - c)); | ||
vh = ((s32) vh >> c); | ||
} | ||
|
||
return ((u64) vh << 32) + vl; | ||
} | ||
EXPORT_SYMBOL(__ashrdi3); |
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,30 @@ | ||
#include "libgcc.h" | ||
|
||
u32 __clzsi2(u32 v) | ||
{ | ||
int p = 31; | ||
|
||
if (v & 0xffff0000) { | ||
p -= 16; | ||
v >>= 16; | ||
} | ||
if (v & 0xff00) { | ||
p -= 8; | ||
v >>= 8; | ||
} | ||
if (v & 0xf0) { | ||
p -= 4; | ||
v >>= 4; | ||
} | ||
if (v & 0xc) { | ||
p -= 2; | ||
v >>= 2; | ||
} | ||
if (v & 0x2) { | ||
p -= 1; | ||
v >>= 1; | ||
} | ||
|
||
return p; | ||
} | ||
EXPORT_SYMBOL(__clzsi2); |
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,23 @@ | ||
#include "libgcc.h" | ||
|
||
s64 __divdi3(s64 num, s64 den) | ||
{ | ||
int minus = 0; | ||
s64 v; | ||
|
||
if (num < 0) { | ||
num = -num; | ||
minus = 1; | ||
} | ||
if (den < 0) { | ||
den = -den; | ||
minus ^= 1; | ||
} | ||
|
||
v = __udivmoddi4(num, den, NULL); | ||
if (minus) | ||
v = -v; | ||
|
||
return v; | ||
} | ||
EXPORT_SYMBOL(__divdi3); |
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,23 @@ | ||
#include "libgcc.h" | ||
|
||
s32 __divsi3(s32 num, s32 den) | ||
{ | ||
int minus = 0; | ||
s32 v; | ||
|
||
if (num < 0) { | ||
num = -num; | ||
minus = 1; | ||
} | ||
if (den < 0) { | ||
den = -den; | ||
minus ^= 1; | ||
} | ||
|
||
v = __udivmodsi4(num, den, NULL); | ||
if (minus) | ||
v = -v; | ||
|
||
return v; | ||
} | ||
EXPORT_SYMBOL(__divsi3); |
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 "libgcc.h" | ||
|
||
u64 __lshrdi3(u64 v, int cnt) | ||
{ | ||
int c = cnt & 31; | ||
u32 vl = (u32) v; | ||
u32 vh = (u32) (v >> 32); | ||
|
||
if (cnt & 32) { | ||
vl = (vh >> c); | ||
vh = 0; | ||
} else { | ||
vl = (vl >> c) + (vh << (32 - c)); | ||
vh = (vh >> c); | ||
} | ||
|
||
return ((u64) vh << 32) + vl; | ||
} | ||
EXPORT_SYMBOL(__lshrdi3); |
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,23 @@ | ||
#include "libgcc.h" | ||
|
||
s64 __moddi3(s64 num, s64 den) | ||
{ | ||
int minus = 0; | ||
s64 v; | ||
|
||
if (num < 0) { | ||
num = -num; | ||
minus = 1; | ||
} | ||
if (den < 0) { | ||
den = -den; | ||
minus ^= 1; | ||
} | ||
|
||
(void)__udivmoddi4(num, den, (u64 *) & v); | ||
if (minus) | ||
v = -v; | ||
|
||
return v; | ||
} | ||
EXPORT_SYMBOL(__moddi3); |
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,23 @@ | ||
#include "libgcc.h" | ||
|
||
s32 __modsi3(s32 num, s32 den) | ||
{ | ||
int minus = 0; | ||
s32 v; | ||
|
||
if (num < 0) { | ||
num = -num; | ||
minus = 1; | ||
} | ||
if (den < 0) { | ||
den = -den; | ||
minus ^= 1; | ||
} | ||
|
||
(void)__udivmodsi4(num, den, (u32 *) & v); | ||
if (minus) | ||
v = -v; | ||
|
||
return v; | ||
} | ||
EXPORT_SYMBOL(__modsi3); |
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,22 @@ | ||
#include "libgcc.h" | ||
|
||
union DWunion { | ||
struct { | ||
s32 high; | ||
s32 low; | ||
} s; | ||
s64 ll; | ||
}; | ||
|
||
s64 __muldi3(s64 u, s64 v) | ||
{ | ||
const union DWunion uu = { .ll = u }; | ||
const union DWunion vv = { .ll = v }; | ||
union DWunion w = { .ll = __umulsidi3(uu.s.low, vv.s.low) }; | ||
|
||
w.s.high += ((u32)uu.s.low * (u32)vv.s.high | ||
+ (u32)uu.s.high * (u32)vv.s.low); | ||
|
||
return w.ll; | ||
} | ||
EXPORT_SYMBOL(__muldi3); |
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,7 @@ | ||
#include "libgcc.h" | ||
|
||
u64 __udivdi3(u64 num, u64 den) | ||
{ | ||
return __udivmoddi4(num, den, NULL); | ||
} | ||
EXPORT_SYMBOL(__udivdi3); |
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,31 @@ | ||
#include "libgcc.h" | ||
|
||
u64 __udivmoddi4(u64 num, u64 den, u64 * rem_p) | ||
{ | ||
u64 quot = 0, qbit = 1; | ||
|
||
if (den == 0) { | ||
BUG(); | ||
} | ||
|
||
/* Left-justify denominator and count shift */ | ||
while ((s64) den >= 0) { | ||
den <<= 1; | ||
qbit <<= 1; | ||
} | ||
|
||
while (qbit) { | ||
if (den <= num) { | ||
num -= den; | ||
quot += qbit; | ||
} | ||
den >>= 1; | ||
qbit >>= 1; | ||
} | ||
|
||
if (rem_p) | ||
*rem_p = num; | ||
|
||
return quot; | ||
} | ||
EXPORT_SYMBOL(__udivmoddi4); |
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,31 @@ | ||
#include "libgcc.h" | ||
|
||
u32 __udivmodsi4(u32 num, u32 den, u32 * rem_p) | ||
{ | ||
u32 quot = 0, qbit = 1; | ||
|
||
if (den == 0) { | ||
BUG(); | ||
} | ||
|
||
/* Left-justify denominator and count shift */ | ||
while ((s32) den >= 0) { | ||
den <<= 1; | ||
qbit <<= 1; | ||
} | ||
|
||
while (qbit) { | ||
if (den <= num) { | ||
num -= den; | ||
quot += qbit; | ||
} | ||
den >>= 1; | ||
qbit >>= 1; | ||
} | ||
|
||
if (rem_p) | ||
*rem_p = num; | ||
|
||
return quot; | ||
} | ||
EXPORT_SYMBOL(__udivmodsi4); |
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,7 @@ | ||
#include "libgcc.h" | ||
|
||
u32 __udivsi3(u32 num, u32 den) | ||
{ | ||
return __udivmodsi4(num, den, NULL); | ||
} | ||
EXPORT_SYMBOL(__udivsi3); |
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,10 @@ | ||
#include "libgcc.h" | ||
|
||
u64 __umoddi3(u64 num, u64 den) | ||
{ | ||
u64 v; | ||
|
||
(void)__udivmoddi4(num, den, &v); | ||
return v; | ||
} | ||
EXPORT_SYMBOL(__umoddi3); |
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,10 @@ | ||
#include "libgcc.h" | ||
|
||
u32 __umodsi3(u32 num, u32 den) | ||
{ | ||
u32 v; | ||
|
||
(void)__udivmodsi4(num, den, &v); | ||
return v; | ||
} | ||
EXPORT_SYMBOL(__umodsi3); |
Oops, something went wrong.