summaryrefslogtreecommitdiffstats
path: root/src/libgcc/__divdi3.c
diff options
context:
space:
mode:
authorMichael Brown2016-05-04 20:13:31 +0200
committerMichael Brown2016-05-06 00:42:57 +0200
commit67f539fa80753877d7d7615c32b5ebdee5169f54 (patch)
treecb27feffe7680240fa186c6752b45595838790b5 /src/libgcc/__divdi3.c
parent[legacy] Fix building with GCC 6 (diff)
downloadipxe-67f539fa80753877d7d7615c32b5ebdee5169f54.tar.gz
ipxe-67f539fa80753877d7d7615c32b5ebdee5169f54.tar.xz
ipxe-67f539fa80753877d7d7615c32b5ebdee5169f54.zip
[libgcc] Provide __divmoddi4()
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/libgcc/__divdi3.c')
-rw-r--r--src/libgcc/__divdi3.c18
1 files changed, 1 insertions, 17 deletions
diff --git a/src/libgcc/__divdi3.c b/src/libgcc/__divdi3.c
index 7097b11e..224bb69c 100644
--- a/src/libgcc/__divdi3.c
+++ b/src/libgcc/__divdi3.c
@@ -6,21 +6,5 @@
__libgcc int64_t __divdi3(int64_t num, int64_t den)
{
- int minus = 0;
- int64_t 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;
+ return __divmoddi4(num, den, NULL);
}