Blame SOURCES/0008-Currently-we-have-DivU64x32-on-ia32-but-it-tries-to-.patch
|
|
ba2c15 |
From d039cd620b8a270d9b231691c9b31d6824f18c08 Mon Sep 17 00:00:00 2001
|
|
|
ba2c15 |
From: Nigel Croxon <ncroxon@redhat.com>
|
|
|
ba2c15 |
Date: Wed, 10 Jan 2018 10:28:36 -0500
|
|
|
ba2c15 |
Subject: [PATCH 08/25] Currently we have DivU64x32 on ia32, but it tries to
|
|
|
ba2c15 |
call __umoddi3 and __udivdi3 from libgcc, which we don't have. This fixes it
|
|
|
ba2c15 |
to use our implementation in that case.
|
|
|
ba2c15 |
|
|
|
ba2c15 |
Signed-off-by: Peter Jones <pjones@redhat.com>
|
|
|
ba2c15 |
Signed-off-by: Nigel Croxon <ncroxon@redhat.com>
|
|
|
ba2c15 |
---
|
|
|
ba2c15 |
lib/ia32/math.c | 4 ++--
|
|
|
ba2c15 |
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
|
ba2c15 |
|
|
|
ba2c15 |
diff --git a/lib/ia32/math.c b/lib/ia32/math.c
|
|
|
ba2c15 |
index 81f51bf45e4..fce7a8d4875 100644
|
|
|
ba2c15 |
--- a/lib/ia32/math.c
|
|
|
ba2c15 |
+++ b/lib/ia32/math.c
|
|
|
ba2c15 |
@@ -140,7 +140,7 @@ DivU64x32 (
|
|
|
ba2c15 |
// divide 64bit by 32bit and get a 64bit result
|
|
|
ba2c15 |
// N.B. only works for 31bit divisors!!
|
|
|
ba2c15 |
{
|
|
|
ba2c15 |
-#if defined(__GNUC__) && !defined(__MINGW32__)
|
|
|
ba2c15 |
+#if 0 && defined(__GNUC__) && !defined(__MINGW32__)
|
|
|
ba2c15 |
if (Remainder)
|
|
|
ba2c15 |
*Remainder = Dividend % Divisor;
|
|
|
ba2c15 |
return Dividend / Divisor;
|
|
|
ba2c15 |
@@ -157,7 +157,7 @@ DivU64x32 (
|
|
|
ba2c15 |
|
|
|
ba2c15 |
Rem = 0;
|
|
|
ba2c15 |
for (bit=0; bit < 64; bit++) {
|
|
|
ba2c15 |
-#ifdef __MINGW32__
|
|
|
ba2c15 |
+#if defined(__GNUC__) || defined(__MINGW32__)
|
|
|
ba2c15 |
asm (
|
|
|
ba2c15 |
"shll $1, %0\n\t"
|
|
|
ba2c15 |
"rcll $1, 4%0\n\t"
|
|
|
ba2c15 |
--
|
|
|
ba2c15 |
2.15.0
|
|
|
ba2c15 |
|