This is the mail archive of the gcc@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]

Error message when using ASM_DECLARE_FUNCTION_NAME macr o


Hi,

Sorry to cross-post but I don't have any answer on gcc-help.
 
When implementing seh for arm(arm-wince-pe) we have a weird assembler
message when
declaring ASM_DECLARE_FUNCTION_NAME. This macro calls the
arm_seh_header_function and
if we are trying to directly access a new field (has_seh) from cfun struct
we
get an assembler error message.
However if we use a temporary variable it seems to work.
Note that we are using gcc 4.4 revision 144974, is it a known bug ?

cc/gcc/config/arm/wince-pe.h
--
#undef ASM_DECLARE_FUNCTION_NAME
#define ASM_DECLARE_FUNCTION_NAME(STREAM, NAME, DECL)                   \
  do                                                                    \
    {                                                                   \
        arm_seh_header_function (STREAM, NAME, DECL);                   \
  ARM_PE_DECLARE_FUNCTION_NAME(STREAM, NAME, DECL);                     \
  }                                                                     \
  while (0)


arm.c:
-------

//
// IF WE ACCESS DIRCTLY cfun->has_seh we get assembler error .rdata ...
//
void
arm_seh_header_function (FILE *fp, char *name, tree decl)
{
  if (cfun->has_seh)
    {
     ...
    }
}


//
// IF WE USE temp. variable to store cfun->has_seh it WORKS 
//
void
arm_seh_header_function (FILE *fp, char *name, tree decl)
{
  int has_seh = cfun->has_seh;

  if (has_seh)
    {
     ...
    }
}


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