This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
RE: [PATCH H8300] Add function_vector attribute
- From: Ajinkya Dhobale <Ajinkya dot Dhobale at kpitcummins dot com>
- To: Jeff Law <law at redhat dot com>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, "Jayant R. Sonar" <Jayant dot Sonar at kpitcummins dot com>
- Date: Wed, 28 Mar 2012 15:10:07 +0000
- Subject: RE: [PATCH H8300] Add function_vector attribute
- References: <157AA791EDB3C743B0B0D29B559D6A0D33B63CDA@KCHJEXMB02.kpit.com> <4F708BC9.7010706@redhat.com>
Hi Jeff,
Thank you for replying to the post.
>> How is this different than the function vector support that is
>> already in GCC for the H8/300 series processors?
Current H8/300 implementation of function vector seems inappropriate.
This patch fixes following problems from it.
1. Attribute syntax:
The function vector attribute is expected to accept one argument i.e.
vector number.
Ref: http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html#index-
calling-functions-through-the-function-vector-on-H8_002f300_002c-
M16C_002c-M32C-and-SH2A-processors-2525
However, with H8/300 target, it does not accept any argument and test case compilation fails with an error message:
error: wrong number of arguments specified for function_vector attribute
This patch fixes this problem.
2. Addressing mode support:
Currently, even for function vectors, GCC generates instruction 'jsr'
in absolute addressing mode which is incorrect. Instead of that, it should be generating 'jsr' in indirect memory addressing mode (@@aa:8).
This patch fixes this problem as well.
Thanks & Regards,
Ajinkya Dhobale
KPIT Cummins Infosystems Ltd,
Pune (INDIA)