Weird assembler error

Vincent R. forumer@smartmobili.com
Wed Apr 15 10:03:00 GMT 2009


Hi,

When implementing seh for arm 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 trunk 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)
    {
     ...
    }
}



More information about the Gcc-help mailing list