], AC_DEFINE(HAVE_PIC_COMPUTED_GOTO, 1, [Define if you have PIC support for computed gotos]) piccompgoto=yes, piccompgoto=no)
AC_MSG_RESULT($piccompgoto)
+dnl Check for building on a multi os system
+if test x$GCC = xyes ; then
+ multi_os_directory=`$CC -print-multi-os-directory`
+ case $multi_os_directory in
+ .) ;; # Avoid trailing /.
+ *) libdir=$libdir/$multi_os_directory ;;
+ esac
+fi
+AC_SUBST(libdir)
+
dnl Checks for library functions.
if test "x$suppress_libm" = "xno" ; then
AC_CHECK_LIB(m, sin)
#define JIT_MEMCPY "jit_memcpy@PLT"
#endif
+/*
+ * We have to add all registers not saved by the caller to the clobber list
+ * and not only the registers used for parameter passing because we do
+ * function calls.
+ * Maybe we should add the xmm* registers too?
+ */
#define jit_builtin_apply(func,args,size,return_float,return_buf) \
do { \
void *__func = (void *)(func); \
"addq %%rdx, %%rsp\n\t" \
: : "m"(__func), "m"(__args), "m"(__size), "m"(__return_buf) \
: "rax", "rcx", "rdx", "rdi", "rsi", "r8", "r9", \
+ "r10", "r11", \
"xmm0", "xmm1", "xmm2", "xmm3", "xmm4", \
"xmm5", "xmm6", "xmm7" \
); \
}
#define _JIT_ALIGN_FOR_TYPE(name) \
- ((unsigned)(&(((struct _JIT_align_##name *)0)->field)))
+ ((jit_nuint)(&(((struct _JIT_align_##name *)0)->field)))
#define _JIT_ALIGN_MAX(a,b) \
((a) > (b) ? (a) : (b))