[PATCH 1/5] amdgcn: Use unsigned types for udivsi3/umodsi3 libgcc helper args/return

Julian Brown julian@codesourcery.com
Fri Jun 18 14:19:30 GMT 2021

This patch changes the argument and return types for the libgcc __udivsi3
and __umodsi3 helper functions for GCN to USItype instead of SItype.
This is probably just cosmetic in practice.

I can probably self-approve this, but I'll give Andrew Stubbs a chance
to comment.



2021-06-18  Julian Brown  <julian@codesourcery.com>

	* config/gcn/lib2-divmod.c (__udivsi3, __umodsi3): Change argument and
	return types to USItype.
	* config/gcn/lib2-gcn.h (__udivsi3, __umodsi3): Update prototypes.
 libgcc/config/gcn/lib2-divmod.c | 8 ++++----
 libgcc/config/gcn/lib2-gcn.h    | 4 ++--
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/libgcc/config/gcn/lib2-divmod.c b/libgcc/config/gcn/lib2-divmod.c
index 0d6ca44f521..7c72e24e0c3 100644
--- a/libgcc/config/gcn/lib2-divmod.c
+++ b/libgcc/config/gcn/lib2-divmod.c
@@ -102,15 +102,15 @@ __modsi3 (SItype a, SItype b)
-__udivsi3 (SItype a, SItype b)
+__udivsi3 (USItype a, USItype b)
   return udivmodsi4 (a, b, 0);
-__umodsi3 (SItype a, SItype b)
+__umodsi3 (USItype a, USItype b)
   return udivmodsi4 (a, b, 1);
diff --git a/libgcc/config/gcn/lib2-gcn.h b/libgcc/config/gcn/lib2-gcn.h
index 11476c4cda8..9223d73b8e7 100644
--- a/libgcc/config/gcn/lib2-gcn.h
+++ b/libgcc/config/gcn/lib2-gcn.h
@@ -38,8 +38,8 @@ typedef int word_type __attribute__ ((mode (__word__)));
 /* Exported functions.  */
 extern SItype __divsi3 (SItype, SItype);
 extern SItype __modsi3 (SItype, SItype);
-extern SItype __udivsi3 (SItype, SItype);
-extern SItype __umodsi3 (SItype, SItype);
+extern USItype __udivsi3 (USItype, USItype);
+extern USItype __umodsi3 (USItype, USItype);
 extern HItype __divhi3 (HItype, HItype);
 extern HItype __modhi3 (HItype, HItype);
 extern UHItype __udivhi3 (UHItype, UHItype);

More information about the Gcc-patches mailing list