Skip to contentSkip to conversation

lib/math.c: implement __udivmoddi4

PATCH In review Wei Liu 2 participants 2 messages Aug 9, 2017 Library code

lore
Share & tools
lore

Wei Liu

author
#0 lore raw

PATCH 1/1 lib/math.c: implement __udivmoddi4

Some code compiled by gcc 7 requires this.

---
 lib/math.c | 10 ++++++++++
 1 file changed, 10 insertions(+)
lib/math.c +10 -0
index 561393e..6ac8669 100644
@@ -6,6 +6,7 @@
  *        File: math.c
  *      Author: Rolf Neugebauer ([email protected])
  *     Changes: 
+ *        Implement __udivmoddi4 (Wei Liu <[email protected]>)
  *              
  *        Date: Aug 2003
  * 
@@ -396,6 +397,15 @@ __umoddi3(u_quad_t a, u_quad_t b)
 	return (r);
 }
 
+/*
+ * Returns the quotient and place remainder in r
+ */
+u_quad_t
+__udivmoddi4(u_quad_t a, u_quad_t b, u_quad_t *r)
+{
+	return __qdivrem(a, b, r);
+}
+
 /*
  * From
  * moddi3.c
Signature · 7 lines
2.11.0


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Reviewed-by on v1 1/1
#1 lore raw
Quoted 3 lines · Wei Liu, on mer. 09 août 2017 13:15:48 +0100, wrote:

Some code compiled by gcc 7 requires this.

Quoted 35 lines
---
 lib/math.c | 10 ++++++++++
 1 file changed, 10 insertions(+)
lib/math.c +10 -0
index 561393e..6ac8669 100644
@@ -6,6 +6,7 @@
  *        File: math.c
  *      Author: Rolf Neugebauer ([email protected])
  *     Changes: 
+ *        Implement __udivmoddi4 (Wei Liu <[email protected]>)
  *              
  *        Date: Aug 2003
  * 
@@ -396,6 +397,15 @@ __umoddi3(u_quad_t a, u_quad_t b)
 	return (r);
 }
 
+/*
+ * Returns the quotient and place remainder in r
+ */
+u_quad_t
+__udivmoddi4(u_quad_t a, u_quad_t b, u_quad_t *r)
+{
+	return __qdivrem(a, b, r);
+}
+
 /*
  * From
  * moddi3.c
Signature · 1 line
2.11.0
Signature · 1 line
Samuel
Quoted 1 line
	dvips -o $@ $<     

Faut faire gffe de pas te couper avec ton truc, t'as mis des ciseaux ($<) partout :))
-+- Dom in Guide du linuxien pervers - "J'aime pas les Makefile !" -+-

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel