public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Andrew Stubbs <ams@codesourcery.com>
To: Julian Brown <julian@codesourcery.com>, <gcc-patches@gcc.gnu.org>
Cc: <fortran@gcc.gnu.org>, Tobias Burnus <tobias@codesourcery.com>,
	Jakub Jelinek <jakub@redhat.com>,
	Thomas Schwinge <thomas@codesourcery.com>
Subject: Re: [PATCH 1/5] amdgcn: Use unsigned types for udivsi3/umodsi3 libgcc helper args/return
Date: Fri, 18 Jun 2021 16:15:02 +0100	[thread overview]
Message-ID: <8d9f22cc-80ad-6cb7-8ca5-f801cefef598@codesourcery.com> (raw)
In-Reply-To: <f432def9fb60f0c52127245534af7da76011f8c8.1624025450.git.julian@codesourcery.com>

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  <julian@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	other threads:[~2021-06-18 15:15 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-18 14:19 [PATCH 0/5] amdgcn: Improve TImode support Julian Brown
2021-06-18 14:19 ` [PATCH 1/5] amdgcn: Use unsigned types for udivsi3/umodsi3 libgcc helper args/return Julian Brown
2021-06-18 15:15   ` Andrew Stubbs [this message]
2021-06-18 14:19 ` [PATCH 2/5] amdgcn: Add [us]mulsi3_highpart SGPR alternatives & [us]mulsid3/muldi3 expanders Julian Brown
2021-06-18 14:55   ` Andrew Stubbs
2021-06-29 15:10     ` Julian Brown
2021-06-18 14:19 ` [PATCH 3/5] amdgcn: Add clrsbsi2/clrsbdi2 implementation Julian Brown
2021-06-18 15:01   ` Andrew Stubbs
2021-06-18 14:19 ` [PATCH 4/5] amdgcn: Enable support for TImode for AMD GCN Julian Brown
2021-06-18 15:08   ` Andrew Stubbs
2021-06-18 14:20 ` [PATCH 5/5] Fortran: Re-enable 128-bit integers " Julian Brown
2021-06-21 11:15   ` Tobias Burnus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8d9f22cc-80ad-6cb7-8ca5-f801cefef598@codesourcery.com \
    --to=ams@codesourcery.com \
    --cc=fortran@gcc.gnu.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jakub@redhat.com \
    --cc=julian@codesourcery.com \
    --cc=thomas@codesourcery.com \
    --cc=tobias@codesourcery.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).