This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/45000] RX signed extened unsigned char or short return value.
- From: "kazuhiro dot inaoka dot ud at renesas dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 28 Jul 2010 07:19:39 -0000
- Subject: [Bug target/45000] RX signed extened unsigned char or short return value.
- References: <bug-45000-19023@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from kazuhiro dot inaoka dot ud at renesas dot com 2010-07-28 07:19 -------
(In reply to comment #1)
Hi Nick
Thank you for your reply.
Your example is OK.
But I'm not clear.
> extension being performed. Eg:
> int bar (int a) { return a < func(); }
If the func() is external function, output code is the following.
_bar:
push.l r7
mov.L r1, r7
bsr _func
mouv.B r1, r1
cmp r7, r1
scgt.L r1
rtsd #4, r7-r7
If the return value is zero exteneded,
"movu.B r1, r1" code can be removed.
Is the explanation san integer conversion rank?
> PS. See section 6.3.1.1 of the ISO C99 standard for more information about this
> behaviour
I think that my request is depend on rx cpu target like sh, m32r not m32c.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45000