[m68k 04/13] libffi fixes and closure support

Roman Zippel zippel@linux-m68k.org
Wed Feb 7 22:37:00 GMT 2007


Hi,

On Wed, 7 Feb 2007, Tom Tromey wrote:

> Roman> One question here might be about frame information handling, older
> Roman> assemblers don't support the cfi instructions, but I'd really like to
> Roman> avoid having to hardcode this like other ports, as this is impossible to
> Roman> maintain. Is there maybe a way to make this conditional?
> 
> You could use the preprocessor, at least if you worked out the
> configury necessary to decide whether the assembler supports it.

Hmm, there is already a similiar assembler test in configure.ac, based on 
it this should work:

AC_CACHE_CHECK([assembler .cfi pseudo-op support],
   libffi_cv_as_cfi_pseudo_op, [
   libffi_cv_as_cfi_pseudo_op=unknown
   AC_TRY_COMPILE([asm (".cfi_startproc\n\t.cfi_endproc");],,
                  [libffi_cv_as_cfi_pseudo_op=yes],
                  [libffi_cv_as_cfi_pseudo_op=no])
])
if test "x$libffi_cv_as_cfi_pseudo_op" = xyes; then
   AC_DEFINE(HAVE_AS_CFI_PSEUDO_OP, 1,
             [Define if your assembler supports .cfi_* directives.])
fi

If making it conditional like this is acceptable, I'll prepare a patch.

bye, Roman



More information about the Gcc-patches mailing list