This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/17306] New: function_vector attribute in H8300H/H8S
- From: "asgarij at kpitcummins dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 3 Sep 2004 10:02:27 -0000
- Subject: [Bug c/17306] New: function_vector attribute in H8300H/H8S
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Hi,
As per the document at
http://gcc.gnu.org/onlinedocs/gcc-3.4.1/gcc/Function-Attributes.html#Function%
20Attributes
callling a function with function_vector attribute for H8300H,
H8S targets should use lesser number of bytes than normal call. That means it
should be using memory indirect call using jsr @@aa:8 instruction. But
following test
case doesn't generate such instruction.
Commandline: h8300-elf-gcc test.c -mh -S
/* test.c */
void foo (void) __attribute__ ((function_vector));
void foo (void)
{
}
void bar (void)
{
foo();
}
Folowing is assembly listing.
.h8300h
.section .text
.align 1
.global _foo
_foo:
mov.l er6,@-er7
mov.l er7,er6
mov.l @er7+,er6
rts
.size _foo, .-_foo
.align 1
.global _bar
_bar:
mov.l er6,@-er7
mov.l er7,er6
jsr @_foo ----> should be jsr @@aa:8
mov.l @er7+,er6
rts
.size _bar, .-_bar
.end
Regards,
Asgari Jinia
KPIT Cummins InfoSystems Ltd.
Pune, India
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Free download of GNU based tool-chains for Renesas' SH and H8 Series.
The following site also offers free technical support to its users.
Visit http://www.kpitgnutools.com for details.
Latest versions of KPIT GNU tools are released on June 1, 2004.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--
Summary: function_vector attribute in H8300H/H8S
Product: gcc
Version: 3.4.2
Status: UNCONFIRMED
Severity: critical
Priority: P2
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: asgarij at kpitcummins dot com
CC: asgarij at kpitcummins dot com,gcc-bugs at gcc dot gnu
dot org
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: h8300-unknown-elf
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17306