filename | acinclude.m4 |
changeset | 927:17b6b9e245d8 |
prev | 923:13ac59a786f4 |
next | 964:f2f3c7612d06 |
author | nkeynes |
date | Sat Dec 27 02:59:35 2008 +0000 (15 years ago) |
branch | lxdream-mem |
permissions | -rw-r--r-- |
last change | Replace fpscr_mask/fpscr flags in xlat_cache_block with a single xlat_sh4_mode, which tracks the field of the same name in sh4r - actually a little faster this way. Now depends on SR.MD, FPSCR.PR and FPSCR.SZ (although it doesn't benefit from the SR flag yet). Also fixed the failure to check the flags in the common case (code address returned by previous block) which took away the performance benefits, but oh well. |
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 ])
21 # AC_CHECK_FRAME_ADDRESS([if-ok],[if-notok])
22 # Test if the compiler will let us modify the return address on the stack
23 # via __builtin_frame_address()
24 # -----------------------
25 AC_DEFUN([AC_CHECK_FRAME_ADDRESS], [
26 AC_MSG_CHECKING([if we have a working __builtin_frame_address()]);
27 AC_RUN_IFELSE([
28 AC_LANG_SOURCE([[
29 void * __attribute__((noinline)) first_arg( void *x, void *y ) { return x; }
30 int __attribute__((noinline)) foo( int arg, void *exc )
31 {
32 if( arg < 2 ) {
33 *(((void **)__builtin_frame_address(0))+1) = exc;
34 }
35 return 0;
36 }
38 int main(int argc, char *argv[])
39 {
40 goto *first_arg(&&start, &&except);
42 start:
43 return foo( argc, &&except ) + 1;
45 except:
46 return 0;
47 }]])], [
48 AC_MSG_RESULT([yes])
49 $1 ], [
50 AC_MSG_RESULT([no])
51 $2 ])
52 ])
.