This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

function attributes


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]