From: Alan Modra <amodra@gmail.com>
To: kamlesh kumar <kamleshbhalui@gmail.com>
Cc: gcc@gcc.gnu.org, Umesh Kalappa <umesh.kalappa0@gmail.com>,
jakub@redhat.com
Subject: Re: RS6000 emitting sign extention for unsigned type
Date: Fri, 18 Jan 2019 12:33:00 -0000 [thread overview]
Message-ID: <20190118123328.GD29797@bubble.grove.modra.org> (raw)
In-Reply-To: <CABKRkggQkFELQ3FtXLjoaT-QcSpyMJ0Qi9T8-3YhxcBS7H_Y4Q@mail.gmail.com>
On Tue, Jan 15, 2019 at 04:48:27PM +0530, kamlesh kumar wrote:
> Hi all,
>
> Analysed it further and find out that
> function ' rs6000_promote_function_mode ' (rs6000.c) needs modifcation.
> """
> static machine_mode
> rs6000_promote_function_mode (const_tree type ATTRIBUTE_UNUSED,
> machine_mode mode,
> int *punsignedp ATTRIBUTE_UNUSED,
> const_tree, int)
> {
> PROMOTE_MODE (mode, *punsignedp, type);
> return mode;
> }
> """
> Here, This function is promoting the mode but
> it is not even touching 'punsignedp' and it is always initialized to zero
> by default.
> So in all cases 'punsignedp' remain zero even if it is for unsigned type.
> which cause the sign extension to happen even for unsigned type.
>
> is there any way to set 'punsignedp' appropriately here.
No. The call to promote_function_mode in emit_library_call_value_1
does not pass type info (because it isn't available for libcalls).
--
Alan Modra
Australia Development Lab, IBM
next prev parent reply other threads:[~2019-01-18 12:33 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-14 18:41 kamlesh kumar
2019-01-15 11:18 ` kamlesh kumar
2019-01-18 12:33 ` Alan Modra [this message]
2019-01-18 12:44 ` Jakub Jelinek
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=20190118123328.GD29797@bubble.grove.modra.org \
--to=amodra@gmail.com \
--cc=gcc@gcc.gnu.org \
--cc=jakub@redhat.com \
--cc=kamleshbhalui@gmail.com \
--cc=umesh.kalappa0@gmail.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).