Search
lxdream.org :: lxdream/acinclude.m4
lxdream 0.9.1
released Jun 29
Download Now
filename acinclude.m4
changeset 923:13ac59a786f4
next927:17b6b9e245d8
author nkeynes
date Sun Dec 14 07:50:48 2008 +0000 (15 years ago)
permissions -rw-r--r--
last change Setup a 'proper' stackframe in translated blocks. This doesn't affect performance noticeably,
but does ensure that
a) The stack is aligned correctly on OS X with no extra effort, and
b) We can't mess up the stack and crash that way anymore.
Replace all PUSH/POP instructions (outside of prologue/epilogue) with ESP-rel moves to stack
local variables.
Finally merge ia32mac and ia32abi together, since they're pretty much the same now anyway (and
thereby simplifying maintenance a good deal)
view annotate diff log raw
     1 # AC_CHECK_FASTCALL([if-ok],[if-notok])
     2 # Test if the compiler recognizes __attribute__((regparm(3))) - we don't 
     3 # currently check if it actually works correctly, but probably should...
     4 # -----------------------
     5 AC_DEFUN([AC_CHECK_FASTCALL], [
     6 AC_MSG_CHECKING([support for fastcall calling conventions]);
     7 AC_RUN_IFELSE([
     8   AC_LANG_SOURCE([[
     9 int __attribute__((regparm(3))) foo(int a, int b) { return a+b; }
    11 int main(int argc, char *argv[])
    12 {
    13    return foo( 1, 2 ) == 3 ? 0 : 1;
    14 }]])], [ 
    15    AC_MSG_RESULT([yes])
    16    $1 ], [ 
    17    AC_MSG_RESULT([no])
    18    $2 ])
    19 ])
.