On 18/06/2021 15:19, Julian Brown wrote:
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.

Thanks,

Julian

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

libgcc/
        * 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)
  }
-SItype
-__udivsi3 (SItype a, SItype b)
+USItype
+__udivsi3 (USItype a, USItype b)
  {
    return udivmodsi4 (a, b, 0);
  }
-SItype
-__umodsi3 (SItype a, SItype b)
+USItype
+__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);

OK, this seems to match what some other targets have. Except NIOS2 though, which is probably where this file was copied from.

Andrew

Reply via email to