* Function attributes
[not found] <904939.post@talk.nabble.com>
@ 2005-09-26 13:05 ` patriciak784-gccmainling
0 siblings, 0 replies; 3+ messages in thread
From: patriciak784-gccmainling @ 2005-09-26 13:05 UTC (permalink / raw)
To: gcc-help
I want to declear a function as
__declspec(dllexport) void my_HeapDestroy(HANDLE
hHeap) __attribute__ ((fastcall));
(which works without getting an error).
Now I need to write the function itself. I started
with
void my_HeapDestroy(HANDLE hHeap) but MinGW's GCC
3.4.2 complains about a function redefinition. What do
I have to write instead of void my_HeapDestroy(HANDLE
hHeap)?
___________________________________________________________
Was denken Sie über E-Mail? Wir hören auf Ihre Meinung: http://surveylink.yahoo.com/wix/p0379378.aspx
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: function attributes
2013-10-11 9:49 function attributes Nagaraju Mekala
@ 2013-10-11 14:02 ` Ian Lance Taylor
0 siblings, 0 replies; 3+ messages in thread
From: Ian Lance Taylor @ 2013-10-11 14:02 UTC (permalink / raw)
To: Nagaraju Mekala; +Cc: gcc-help, GCC Development
On Fri, Oct 11, 2013 at 2:48 AM, Nagaraju Mekala <gnuuser.raj@gmail.com> wrote:
>
> My question is how to find the attributes of a function which we are
> going to call
>
> Problem:
>
> Generally while calling a function we use branch instruction
>
> ex: br r5,<offset>
>
> But when we have a function with "super" attribute then I need to
> call the function with different branch instruction
>
> ex: bk r5,<offset>
>
>
> In the prologue of the function I was able to get the attribute
> details using below code
>
> super_table_handler_function_p (tree func)
> {
> tree a;
> if (TREE_CODE (func) != FUNCTION_DECL)
> return 0;
> a = lookup_attribute ("super", DECL_ATTRIBUTES (func));
> return a != NULL_TREE;
> }
>
>
> How to get the information of function attributes even before entering
> to prologue or during function call itself??
Please never send e-mail to both gcc-help@gcc.gnu.org and
gcc@gcc.gnu.org. Thanks. This message could have been sent to either
list, but not both.
To answer your question: look at how the rs6000 port handles the
longcall attribute.
Ian
^ permalink raw reply [flat|nested] 3+ messages in thread
* function attributes
@ 2013-10-11 9:49 Nagaraju Mekala
2013-10-11 14:02 ` Ian Lance Taylor
0 siblings, 1 reply; 3+ messages in thread
From: Nagaraju Mekala @ 2013-10-11 9:49 UTC (permalink / raw)
To: gcc-help, gcc
Hi,
I am working on GCC-4.6.4 version ported to a embedded target which
is similar to frv.
My question is how to find the attributes of a function which we are
going to call
Problem:
Generally while calling a function we use branch instruction
ex: br r5,<offset>
But when we have a function with "super" attribute then I need to
call the function with different branch instruction
ex: bk r5,<offset>
In the prologue of the function I was able to get the attribute
details using below code
super_table_handler_function_p (tree func)
{
tree a;
if (TREE_CODE (func) != FUNCTION_DECL)
return 0;
a = lookup_attribute ("super", DECL_ATTRIBUTES (func));
return a != NULL_TREE;
}
How to get the information of function attributes even before entering
to prologue or during function call itself??
Thanks,
Nag
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-10-11 14:02 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <904939.post@talk.nabble.com>
2005-09-26 13:05 ` Function attributes patriciak784-gccmainling
2013-10-11 9:49 function attributes Nagaraju Mekala
2013-10-11 14:02 ` Ian Lance Taylor
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).