Changeset 1391 for branches/GNU/src/gcc/libffi
- Timestamp:
- Apr 27, 2004, 8:39:34 PM (21 years ago)
- Location:
- branches/GNU/src/gcc
- Files:
-
- 30 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/GNU/src/gcc
- Property svn:ignore
-
old new 26 26 configure.vr 27 27 configure.vrs 28 dir.info 28 29 Makefile 29 dir.info30 30 lost+found 31 31 update.out
-
- Property svn:ignore
-
branches/GNU/src/gcc/libffi/ChangeLog
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 1 2003-02-05 Release Manager 2 3 * GCC 3.2.2 Released. 1 2004-02-14 Release Manager 2 3 * GCC 3.3.3 Released. 4 5 2003-10-16 Release Manager 6 7 * GCC 3.3.2 Released. 8 9 2003-09-09 Alan Modra <amodra@bigpond.net.au> 10 11 * configure: Regenerate. 12 13 2003-08-08 Kean Johnston <jkj@sco.com> 14 15 * configure.in: Add support for sco3.2v5.0* 16 * configure: Regenerated 17 18 2003-08-04 Release Manager 19 20 * GCC 3.3.1 Released. 21 22 2003-08-04 Release Manager 23 24 * GCC 3.3.1 Released. 25 26 2003-07-11 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at> 27 28 * README: Note that libffi is not part of GCC. Update the project 29 URL and status. 30 31 2003-05-13 Release Manager 32 33 * GCC 3.3 Released. 34 35 2003-05-13 Release Manager 36 37 * GCC 3.3 Released. 38 39 2003-05-13 Release Manager 40 41 * GCC 3.3 Released. 42 43 2003-05-07 Jeff Sturm <jsturm@one-point.com> 44 45 Fixes PR bootstrap/10656 46 * configure.in (HAVE_AS_REGISTER_PSEUDO_OP): Test assembler 47 support for .register pseudo-op. 48 * src/sparc/v8.S: Use it. 49 * fficonfig.h.in: Rebuilt. 50 * configure: Rebuilt. 51 52 2003-04-04 Loren J. Rittle <ljrittle@acm.org> 53 54 * include/Makefile.in: Regenerate. 55 56 2003-03-22 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz> 57 58 * libffi/include/ffi.h.in: Define X86 instead of X86_64 in 32 59 bit mode. 60 * libffi/src/x86/ffi.c (ffi_closure_SYSV, ffi_closure_raw_SYSV): 61 Receive closure pointer through parameter, read args using 62 __builtin_dwarf_cfa. 63 (FFI_INIT_TRAMPOLINE): Send closure reference through eax. 64 65 2003-02-06 Andreas Tobler <a.tobler@schweiz.ch> 66 67 * libffi/src/powerpc/darwin_closure.S: 68 Fix alignement bug, allocate 8 bytes for the result. 69 * libffi/src/powerpc/aix_closure.S: 70 Likewise. 71 * libffi/src/powerpc/ffi_darwin.c: 72 Update stackframe description for aix/darwin_closure.S. 73 74 2003-01-31 Christian Cornelssen <ccorn@cs.tu-berlin.de>, 75 Andreas Schwab <schwab@suse.de> 76 77 * configure.in: Adjust command to source config-ml.in to account 78 for changes to the libffi_basedir definition. 79 (libffi_basedir): Remove ${srcdir} from value and include trailing 80 slash if nonempty. 81 82 * configure: Regenerate. 4 83 5 84 2003-01-29 Franz Sirl <Franz.Sirl-kernel@lauterbach.com> … … 7 86 * src/powerpc/ppc_closure.S: Recode to fit shared libs. 8 87 9 2002-11-19 Release Manager 10 11 * GCC 3.2.1 Released. 12 13 2002-11-19 Release Manager 14 15 * GCC 3.2.1 Released. 16 17 2002-11-18 Release Manager 18 19 * GCC 3.2.1 Released. 20 21 2002-10-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 88 2003-01-28 Andrew Haley <aph@redhat.com> 89 90 * include/ffi.h.in: Enable FFI_CLOSURES for x86_64. 91 * src/x86/ffi64.c (ffi_prep_closure): New. 92 (ffi_closure_UNIX64_inner): New. 93 * src/x86/unix64.S (ffi_closure_UNIX64): New. 94 95 2003-01-22 Andrew Haley <aph@redhat.com> 96 97 * src/powerpc/darwin.S (_ffi_call_AIX): Add Augmentation size to 98 unwind info. 99 100 2003-01-21 Andreas Tobler <a.tobler@schweiz.ch> 101 102 * src/powerpc/darwin.S: Add unwind info. 103 * src/powerpc/darwin_closure.S: Likewise. 104 105 2003-01-14 Andrew Haley <aph@redhat.com> 106 107 * src/x86/ffi64.c (ffi_prep_args): Check for void retval. 108 (ffi_prep_cif_machdep): Likewise. 109 * src/x86/unix64.S: Add unwind info. 110 111 2003-01-14 Andreas Jaeger <aj@suse.de> 112 113 * src/ffitest.c (main): Only use ffi_closures if those are 114 supported. 115 116 2003-01-13 Andreas Tobler <a.tobler@schweiz.ch> 117 118 * libffi/src/ffitest.c 119 add closure testcases 120 121 2003-01-13 Kevin B. Hendricks <khendricks@ivey.uwo.ca> 122 123 * libffi/src/powerpc/ffi.c 124 fix alignment bug for float (4 byte aligned iso 8 byte) 125 126 2003-01-03 Jeff Sturm <jsturm@one-point.com> 127 128 * include/ffi.h.in: Add closure defines for SPARC, SPARC64. 129 * src/ffitest.c (main): Use static storage for closure. 130 * src/sparc/ffi.c (ffi_prep_closure, ffi_closure_sparc_inner): New. 131 * src/sparc/v8.S (ffi_closure_v8): New. 132 * src/sparc/v9.S (ffi_closure_v9): New. 133 134 2002-11-10 Ranjit Mathew <rmathew@hotmail.com> 135 136 * include/ffi.h.in: Added FFI_STDCALL ffi_type 137 enumeration for X86_WIN32. 138 * src/x86/win32.S: Added ffi_call_STDCALL function 139 definition. 140 * src/x86/ffi.c (ffi_call/ffi_raw_call): Added 141 switch cases for recognising FFI_STDCALL and 142 calling ffi_call_STDCALL if target is X86_WIN32. 143 * src/ffitest.c (my_stdcall_strlen/stdcall_many): 144 stdcall versions of the "my_strlen" and "many" 145 test functions (for X86_WIN32). 146 Added test cases to test stdcall invocation using 147 these functions. 148 149 2002-11-27 Ulrich Weigand <uweigand@de.ibm.com> 150 151 * src/s390/sysv.S (.eh_frame section): Make section read-only. 152 153 2002-11-26 Jim Wilson <wilson@redhat.com> 154 155 * src/types.c (FFI_TYPE_POINTER): Has size 8 on IA64. 156 157 2002-11-15 Ulrich Weigand <uweigand@de.ibm.com> 158 159 * src/s390/sysv.S (.eh_frame section): Adapt to pcrel FDE encoding. 160 161 2002-11-11 DJ Delorie <dj@redhat.com> 162 163 * configure.in: Look for common files in the right place. 164 165 2002-10-08 Ulrich Weigand <uweigand@de.ibm.com> 166 167 * src/java_raw_api.c (ffi_java_raw_to_ptrarray): Interpret 168 raw data as _Jv_word values, not ffi_raw. 169 (ffi_java_ptrarray_to_raw): Likewise. 170 (ffi_java_rvalue_to_raw): New function. 171 (ffi_java_raw_call): Call it. 172 (ffi_java_raw_to_rvalue): New function. 173 (ffi_java_translate_args): Call it. 174 * src/ffitest.c (closure_test_fn): Interpret return value 175 as ffi_arg, not int. 176 * src/s390/ffi.c (ffi_prep_cif_machdep): Add missing 177 FFI_TYPE_POINTER case. 178 (ffi_closure_helper_SYSV): Likewise. Also, assume return 179 values extended to word size. 180 181 2002-10-02 Andreas Jaeger <aj@suse.de> 182 183 * src/x86/ffi64.c (ffi_prep_cif_machdep): Remove debug output. 184 185 2002-10-01 Bo Thorsen <bo@smetana.suse.de> 186 187 * include/ffi.h.in: Fix i386 win32 compilation. 188 189 2002-09-30 Ulrich Weigand <uweigand@de.ibm.com> 190 191 * configure.in: Add s390x-*-linux-* target. 192 * configure: Regenerate. 193 * include/ffi.h.in: Define S390X for s390x targets. 194 (FFI_CLOSURES): Define for s390/s390x. 195 (FFI_TRAMPOLINE_SIZE): Likewise. 196 (FFI_NATIVE_RAW_API): Likewise. 197 * src/prep_cif.c (ffi_prep_cif): Do not compute stack space for s390. 198 * src/types.c (FFI_TYPE_POINTER): Use 8-byte pointers on s390x. 199 * src/s390/ffi.c: Major rework of existing code. Add support for 200 s390x targets. Add closure support. 201 * src/s390/sysv.S: Likewise. 202 203 2002-09-29 Richard Earnshaw <rearnsha@arm.com> 204 205 * src/arm/sysv.S: Fix typo. 206 207 2002-09-28 Richard Earnshaw <rearnsha@arm.com> 208 209 * src/arm/sysv.S: If we don't have machine/asm.h and the pre-processor 210 has defined __USER_LABEL_PREFIX__, then use it in CNAME. 211 (ffi_call_SYSV): Handle soft-float. 212 213 2002-09-27 Bo Thorsen <bo@suse.de> 214 215 * include/ffi.h.in: Fix multilib x86-64 support. 216 217 2002-09-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> 22 218 23 219 * Makefile.am (all-multi): Fix multilib parallel build. 24 220 25 2002-08-14 Release Manager 26 27 * GCC 3.2 Released. 28 29 2002-07-25 Release Manager 30 31 * GCC 3.1.1 Released. 32 33 2002-05-28 Bo Thorsen <bo@suse.de> 34 35 * src/x86/ffi.c (ffi_prep_incoming_args_SYSV): Remove avn 36 here too. 221 2002-07-19 Kaz Kojima <kkojima@gcc.gnu.org> 222 223 * configure.in (sh[34]*-*-linux*): Add brackets. 224 * configure: Regenerate. 225 226 2002-07-18 Kaz Kojima <kkojima@gcc.gnu.org> 227 228 * Makefile.am: Add SH support. 229 * Makefile.in: Regenerate. 230 * configure.in (sh-*-linux*, sh[34]*-*-linux*): Add target. 231 * configure: Regenerate. 232 * include/ffi.h.in: Add SH support. 233 * src/sh/ffi.c: New file. 234 * src/sh/sysv.S: New file. 235 * src/types.c: Add SH support. 236 237 2002-07-16 Bo Thorsen <bo@suse.de> 238 239 * src/x86/ffi64.c: New file that adds x86-64 support. 240 * src/x86/unix64.S: New file that handles argument setup for 241 x86-64. 242 * src/x86/sysv.S: Don't use this on x86-64. 243 * src/x86/ffi.c: Don't use this on x86-64. 244 Remove unused vars. 245 * src/prep_cif.c (ffi_prep_cif): Don't do stack size calculation 246 for x86-64. 247 * src/ffitest.c (struct6): New test that tests a special case in 248 the x86-64 ABI. 249 (struct7): Likewise. 250 (struct8): Likewise. 251 (struct9): Likewise. 252 (closure_test_fn): Silence warning about this when it's not used. 253 (main): Add the new tests. 254 (main): Fix a couple of wrong casts and silence some compiler warnings. 255 * include/ffi.h.in: Add x86-64 ABI definition. 256 * fficonfig.h.in: Regenerate. 257 * Makefile.am: Add x86-64 support. 258 * configure.in: Likewise. 259 * Makefile.in: Regenerate. 260 * configure: Likewise. 261 262 2002-06-24 Bo Thorsen <bo@suse.de> 263 264 * src/types.c: Merge settings for similar architectures. 265 Add x86-64 sizes and alignments. 266 267 2002-06-23 Bo Thorsen <bo@suse.de> 268 269 * src/arm/ffi.c (ffi_prep_args): Remove unused vars. 270 * src/sparc/ffi.c (ffi_prep_args_v8): Likewise. 271 * src/mips/ffi.c (ffi_prep_args): Likewise. 272 * src/m68k/ffi.c (ffi_prep_args): Likewise. 273 274 2002-07-18 H.J. Lu (hjl@gnu.org) 275 276 * Makefile.am (TARGET_SRC_MIPS_LINUX): New. 277 (libffi_la_SOURCES): Support MIPS_LINUX. 278 (libffi_convenience_la_SOURCES): Likewise. 279 * Makefile.in: Regenerated. 280 281 * configure.in (mips64*-*): Skip. 282 (mips*-*-linux*): New. 283 * configure: Regenerated. 284 285 * src/mips/ffi.c: Include <sgidefs.h>. 286 287 2002-06-06 Ulrich Weigand <uweigand@de.ibm.com> 288 289 * src/s390/sysv.S: Save/restore %r6. Add DWARF-2 unwind info. 37 290 38 291 2002-05-27 Roger Sayle <roger@eyesopen.com> … … 45 298 fix formatting. 46 299 47 2002-05-14 Release Manager 48 49 * GCC 3.1 Released. 50 51 2002-05-14 Release Manager 52 53 * GCC 3.1 Released. 300 2002-05-13 Andreas Tobler <a.tobler@schweiz.ch> 301 302 * src/powerpc/ffi_darwin.c (ffi_prep_closure): Declare fd at 303 beginning of function (for older apple cc). 54 304 55 305 2002-05-08 Alexandre Oliva <aoliva@redhat.com> … … 59 309 * configure: Rebuilt. 60 310 311 2002-05-05 Jason Thorpe <thorpej@wasabisystems.com> 312 313 * configure.in (sparc64-*-netbsd*): Add target. 314 (sparc-*-netbsdelf*): Likewise. 315 * configure: Regenerate. 316 61 317 2002-04-28 David S. Miller <davem@redhat.com> 62 318 63 319 * configure.in, configure: Fix SPARC test in previous change. 320 321 2002-04-29 Gerhard Tonn <GerhardTonn@swol.de> 322 323 * Makefile.am: Add Linux for S/390 support. 324 * Makefile.in: Regenerate. 325 * configure.in: Add Linux for S/390 support. 326 * configure: Regenerate. 327 * include/ffi.h.in: Add Linux for S/390 support. 328 * src/s390/ffi.c: New file from libffi CVS tree. 329 * src/s390/sysv.S: New file from libffi CVS tree. 64 330 65 331 2002-04-28 Jakub Jelinek <jakub@redhat.com> … … 85 351 * src/sparc/v8.S: Make .eh_frame dependent on target word size. 86 352 353 2002-04-06 Jason Thorpe <thorpej@wasabisystems.com> 354 355 * configure.in (alpha*-*-netbsd*): Add target. 356 * configure: Regenerate. 357 87 358 2002-04-04 Jeff Sturm <jsturm@one-point.com> 88 359 89 360 * src/sparc/v8.S: Add unwind info. 90 361 * src/sparc/v9.S: Likewise. 91 92 2002-04-01 Loren J. Rittle <ljrittle@acm.org>93 94 * configure.in: Enable alpha*-*-freebsd*.95 * configure: Rebuilt.96 362 97 363 2002-03-30 Krister Walfridsson <cato@df.lth.se> … … 105 371 * src/mips/n32.s: Delete 106 372 * src/mips/o32.s: Delete 373 374 2002-03-21 Loren J. Rittle <ljrittle@acm.org> 375 376 * configure.in: Enable alpha*-*-freebsd*. 377 * configure: Rebuilt. 107 378 108 379 2002-03-17 Bryce McKinlay <bryce@waitaki.otago.ac.nz> … … 202 473 2001-06-06 Andrew Haley <aph@redhat.com> 203 474 204 475 * src/alpha/osf.S (__FRAME_BEGIN__): Conditionalize for ELF. 205 476 206 477 2001-06-03 Andrew Haley <aph@redhat.com> 207 478 208 209 210 479 * src/alpha/osf.S: Add unwind info. 480 * src/powerpc/sysv.S: Add unwind info. 481 * src/powerpc/ppc_closure.S: Likewise. 211 482 212 483 2000-05-31 Jeff Sturm <jsturm@one-point.com> … … 367 638 * Makefile.in: Rebuilt. 368 639 * ltconfig (extra_compiler_flags, extra_compiler_flags_value): 369 370 371 372 373 374 375 376 640 New variables. Set for gcc using -print-multi-lib. Export them 641 to libtool. 642 (sparc64-*-linux-gnu*): Use libsuff 64 for search paths. 643 * ltmain.sh (B|b|V): Don't throw away gcc's -B, -b and -V options 644 for -shared links. 645 (extra_compiler_flags_value, extra_compiler_flags): Check these 646 for extra compiler options which need to be passed down in 647 compiler_flags. 377 648 378 649 2000-04-16 Anthony Green <green@redhat.com> … … 383 654 2000-04-14 Jakub Jelinek <jakub@redhat.com> 384 655 385 656 * include/ffi.h.in (SPARC64): Define for 64bit SPARC builds. 386 657 Set SPARC FFI_DEFAULT_ABI based on SPARC64 define. 387 658 * src/sparc/ffi.c (ffi_prep_args_v8): Renamed from ffi_prep_args. … … 493 764 * configure.in: Change version to 2.00-beta. 494 765 495 766 * fficonfig.h.in: Rebuilt. 496 767 * acconfig.h (FFI_NO_STRUCTS, FFI_NO_RAW_API): Define. 497 768 -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libffi/ChangeLog.libgcj
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 1 2003-02-20 Alexandre Oliva <aoliva@redhat.com> 2 3 * configure.in: Propagate ORIGINAL_LD_FOR_MULTILIBS to 4 config.status. 5 * configure: Rebuilt. 6 1 7 2002-01-27 Alexandre Oliva <aoliva@redhat.com> 2 8 -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libffi/Makefile.am
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 9 9 src/sparc/ffi.c src/sparc/v8.S src/sparc/v9.S \ 10 10 src/x86/ffi.c src/x86/sysv.S src/x86/win32.S \ 11 src/x86/ffi64.c src/x86/unix64.S \ 11 12 src/alpha/ffi.c src/alpha/osf.S \ 12 13 src/m68k/ffi.c src/m68k/sysv.S \ … … 16 17 src/powerpc/darwin.S src/powerpc/aix.S \ 17 18 src/powerpc/darwin_closure.S src/powerpc/aix_closures.S \ 18 src/arm/ffi.c src/arm/sysv.S 19 src/arm/ffi.c src/arm/sysv.S \ 20 src/s390/ffi.c src/s390/sysv.S \ 21 src/sh/ffi.c src/sh/sysv.S 19 22 20 23 VPATH = @srcdir@:@srcdir@/src:@srcdir@/src/@TARGETDIR@ … … 84 87 85 88 TARGET_SRC_MIPS_GCC = src/mips/ffi.c src/mips/o32.S src/mips/n32.S 89 TARGET_SRC_MIPS_LINUX = src/mips/ffi.c src/mips/o32.S 86 90 TARGET_SRC_MIPS_SGI = src/mips/ffi.c src/mips/o32.s src/mips/n32.s 87 91 TARGET_SRC_X86 = src/x86/ffi.c src/x86/sysv.S … … 95 99 TARGET_SRC_POWERPC_DARWIN = src/powerpc/ffi_darwin.c src/powerpc/darwin.S src/powerpc/darwin_closure.S 96 100 TARGET_SRC_ARM = src/arm/sysv.S src/arm/ffi.c 101 TARGET_SRC_S390 = src/s390/sysv.S src/s390/ffi.c 102 TARGET_SRC_X86_64 = src/x86/ffi64.c src/x86/unix64.S src/x86/ffi.c src/x86/sysv.S 103 TARGET_SRC_SH = src/sh/sysv.S src/sh/ffi.c 97 104 98 105 ##libffi_la_SOURCES = src/debug.c src/prep_cif.c src/types.c $(TARGET_SRC_@TARGET@) … … 104 111 libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_GCC) 105 112 endif 113 if MIPS_LINUX 114 libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_LINUX) 115 libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_LINUX) 116 endif 106 117 if MIPS_SGI 107 118 libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_SGI) … … 147 158 libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_ARM) 148 159 libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_ARM) 160 endif 161 if S390 162 libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_S390) 163 libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_S390) 164 endif 165 if X86_64 166 libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_X86_64) 167 libffi_convenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_X86_64) 168 endif 169 if SH 170 libffi_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_SH) 171 libfficonvenience_la_SOURCES = $(libffi_la_common_SOURCES) $(TARGET_SRC_SH) 149 172 endif 150 173 -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libffi/Makefile.in
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 92 92 src/sparc/ffi.c src/sparc/v8.S src/sparc/v9.S \ 93 93 src/x86/ffi.c src/x86/sysv.S src/x86/win32.S \ 94 src/x86/ffi64.c src/x86/unix64.S \ 94 95 src/alpha/ffi.c src/alpha/osf.S \ 95 96 src/m68k/ffi.c src/m68k/sysv.S \ … … 99 100 src/powerpc/darwin.S src/powerpc/aix.S \ 100 101 src/powerpc/darwin_closure.S src/powerpc/aix_closures.S \ 101 src/arm/ffi.c src/arm/sysv.S 102 src/arm/ffi.c src/arm/sysv.S \ 103 src/s390/ffi.c src/s390/sysv.S \ 104 src/sh/ffi.c src/sh/sysv.S 102 105 103 106 … … 163 166 164 167 TARGET_SRC_MIPS_GCC = src/mips/ffi.c src/mips/o32.S src/mips/n32.S 168 TARGET_SRC_MIPS_LINUX = src/mips/ffi.c src/mips/o32.S 165 169 TARGET_SRC_MIPS_SGI = src/mips/ffi.c src/mips/o32.s src/mips/n32.s 166 170 TARGET_SRC_X86 = src/x86/ffi.c src/x86/sysv.S … … 174 178 TARGET_SRC_POWERPC_DARWIN = src/powerpc/ffi_darwin.c src/powerpc/darwin.S src/powerpc/darwin_closure.S 175 179 TARGET_SRC_ARM = src/arm/sysv.S src/arm/ffi.c 180 TARGET_SRC_S390 = src/s390/sysv.S src/s390/ffi.c 181 TARGET_SRC_X86_64 = src/x86/ffi64.c src/x86/unix64.S src/x86/ffi.c src/x86/sysv.S 182 TARGET_SRC_SH = src/sh/sysv.S src/sh/ffi.c 176 183 177 184 libffi_la_common_SOURCES = src/debug.c src/prep_cif.c src/types.c \ … … 179 186 180 187 @MIPS_GCC_TRUE@libffi_la_SOURCES = @MIPS_GCC_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_GCC) 188 @MIPS_LINUX_TRUE@libffi_la_SOURCES = @MIPS_LINUX_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_LINUX) 181 189 @MIPS_SGI_TRUE@libffi_la_SOURCES = @MIPS_SGI_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_SGI) 182 190 @X86_TRUE@libffi_la_SOURCES = @X86_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_X86) … … 190 198 @POWERPC_DARWIN_TRUE@libffi_la_SOURCES = @POWERPC_DARWIN_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_POWERPC_DARWIN) 191 199 @ARM_TRUE@libffi_la_SOURCES = @ARM_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_ARM) 200 @S390_TRUE@libffi_la_SOURCES = @S390_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_S390) 201 @X86_64_TRUE@libffi_la_SOURCES = @X86_64_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_X86_64) 202 @SH_TRUE@libffi_la_SOURCES = @SH_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_SH) 192 203 @MIPS_GCC_TRUE@libffi_convenience_la_SOURCES = @MIPS_GCC_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_GCC) 204 @MIPS_LINUX_TRUE@libffi_convenience_la_SOURCES = @MIPS_LINUX_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_LINUX) 193 205 @MIPS_SGI_TRUE@libffi_convenience_la_SOURCES = @MIPS_SGI_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_MIPS_SGI) 194 206 @X86_TRUE@libffi_convenience_la_SOURCES = @X86_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_X86) … … 202 214 @POWERPC_DARWIN_TRUE@libffi_convenience_la_SOURCES = @POWERPC_DARWIN_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_POWERPC_DARWIN) 203 215 @ARM_TRUE@libffi_convenience_la_SOURCES = @ARM_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_ARM) 216 @S390_TRUE@libffi_convenience_la_SOURCES = @S390_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_S390) 217 @X86_64_TRUE@libffi_convenience_la_SOURCES = @X86_64_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_X86_64) 218 @SH_TRUE@libfficonvenience_la_SOURCES = @SH_TRUE@$(libffi_la_common_SOURCES) $(TARGET_SRC_SH) 204 219 205 220 AM_CFLAGS = -fexceptions … … 209 224 INCLUDES = -I$(top_srcdir)/include -Iinclude -I$(top_srcdir)/src 210 225 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 211 mkinstalldirs = $(SHELL) $(top_srcdir)/ ../mkinstalldirs226 mkinstalldirs = $(SHELL) $(top_srcdir)/${libffi_basedir}/../mkinstalldirs 212 227 CONFIG_HEADER = fficonfig.h 213 228 CONFIG_CLEAN_FILES = … … 221 236 libffi_convenience_la_LDFLAGS = 222 237 libffi_convenience_la_LIBADD = 223 @POWERPC_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo \224 @POWERPC_TRUE@src/prep_cif.lo src/types.lo src/raw_api.lo \225 @POWERPC_TRUE@src/java_raw_api.lo src/powerpc/ffi.lo \226 @POWERPC_TRUE@src/powerpc/sysv.lo src/powerpc/ppc_closure.lo227 238 @ALPHA_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo \ 228 239 @ALPHA_TRUE@src/prep_cif.lo src/types.lo src/raw_api.lo \ … … 235 246 @MIPS_GCC_TRUE@src/java_raw_api.lo src/mips/ffi.lo src/mips/o32.lo \ 236 247 @MIPS_GCC_TRUE@src/mips/n32.lo 248 @S390_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo src/prep_cif.lo \ 249 @S390_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \ 250 @S390_TRUE@src/s390/sysv.lo src/s390/ffi.lo 251 @M68K_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo src/prep_cif.lo \ 252 @M68K_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \ 253 @M68K_TRUE@src/m68k/ffi.lo src/m68k/sysv.lo 254 @X86_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo src/prep_cif.lo \ 255 @X86_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \ 256 @X86_TRUE@src/x86/ffi.lo src/x86/sysv.lo 257 @POWERPC_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo \ 258 @POWERPC_TRUE@src/prep_cif.lo src/types.lo src/raw_api.lo \ 259 @POWERPC_TRUE@src/java_raw_api.lo src/powerpc/ffi.lo \ 260 @POWERPC_TRUE@src/powerpc/sysv.lo src/powerpc/ppc_closure.lo 261 @MIPS_LINUX_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo \ 262 @MIPS_LINUX_TRUE@src/prep_cif.lo src/types.lo src/raw_api.lo \ 263 @MIPS_LINUX_TRUE@src/java_raw_api.lo src/mips/ffi.lo src/mips/o32.lo 237 264 @X86_WIN32_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo \ 238 265 @X86_WIN32_TRUE@src/prep_cif.lo src/types.lo src/raw_api.lo \ 239 266 @X86_WIN32_TRUE@src/java_raw_api.lo src/x86/ffi.lo src/x86/win32.lo 240 @M68K_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo src/prep_cif.lo \ 241 @M68K_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \ 242 @M68K_TRUE@src/m68k/ffi.lo src/m68k/sysv.lo 267 @X86_64_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo \ 268 @X86_64_TRUE@src/prep_cif.lo src/types.lo src/raw_api.lo \ 269 @X86_64_TRUE@src/java_raw_api.lo src/x86/ffi64.lo src/x86/unix64.lo \ 270 @X86_64_TRUE@src/x86/ffi.lo src/x86/sysv.lo 243 271 @SPARC_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo \ 244 272 @SPARC_TRUE@src/prep_cif.lo src/types.lo src/raw_api.lo \ … … 249 277 @POWERPC_AIX_TRUE@src/java_raw_api.lo src/powerpc/ffi_darwin.lo \ 250 278 @POWERPC_AIX_TRUE@src/powerpc/aix.lo src/powerpc/aix_closures.lo 251 @X86_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo src/prep_cif.lo \ 252 @X86_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \ 253 @X86_TRUE@src/x86/ffi.lo src/x86/sysv.lo 254 @ARM_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo src/prep_cif.lo \ 255 @ARM_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \ 256 @ARM_TRUE@src/arm/sysv.lo src/arm/ffi.lo 279 @MIPS_SGI_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo \ 280 @MIPS_SGI_TRUE@src/prep_cif.lo src/types.lo src/raw_api.lo \ 281 @MIPS_SGI_TRUE@src/java_raw_api.lo src/mips/ffi.lo src/mips/o32.lo \ 282 @MIPS_SGI_TRUE@src/mips/n32.lo 257 283 @POWERPC_DARWIN_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo \ 258 284 @POWERPC_DARWIN_TRUE@src/prep_cif.lo src/types.lo src/raw_api.lo \ … … 260 286 @POWERPC_DARWIN_TRUE@src/powerpc/darwin.lo \ 261 287 @POWERPC_DARWIN_TRUE@src/powerpc/darwin_closure.lo 262 @MIPS_SGI_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo \ 263 @MIPS_SGI_TRUE@src/prep_cif.lo src/types.lo src/raw_api.lo \ 264 @MIPS_SGI_TRUE@src/java_raw_api.lo src/mips/ffi.lo src/mips/o32.lo \ 265 @MIPS_SGI_TRUE@src/mips/n32.lo 288 @ARM_TRUE@libffi_convenience_la_OBJECTS = src/debug.lo src/prep_cif.lo \ 289 @ARM_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \ 290 @ARM_TRUE@src/arm/sysv.lo src/arm/ffi.lo 266 291 libffi_la_LIBADD = 292 @SH_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo src/types.lo \ 293 @SH_TRUE@src/raw_api.lo src/java_raw_api.lo src/sh/sysv.lo \ 294 @SH_TRUE@src/sh/ffi.lo 295 @IA64_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \ 296 @IA64_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \ 297 @IA64_TRUE@src/ia64/ffi.lo src/ia64/unix.lo 298 @X86_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo src/types.lo \ 299 @X86_TRUE@src/raw_api.lo src/java_raw_api.lo src/x86/ffi.lo \ 300 @X86_TRUE@src/x86/sysv.lo 267 301 @POWERPC_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \ 268 302 @POWERPC_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \ 269 303 @POWERPC_TRUE@src/powerpc/ffi.lo src/powerpc/sysv.lo \ 270 304 @POWERPC_TRUE@src/powerpc/ppc_closure.lo 271 @ALPHA_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \ 272 @ALPHA_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \ 273 @ALPHA_TRUE@src/alpha/ffi.lo src/alpha/osf.lo 274 @IA64_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \ 275 @IA64_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \ 276 @IA64_TRUE@src/ia64/ffi.lo src/ia64/unix.lo 277 @MIPS_GCC_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \ 278 @MIPS_GCC_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \ 279 @MIPS_GCC_TRUE@src/mips/ffi.lo src/mips/o32.lo src/mips/n32.lo 280 @X86_WIN32_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \ 281 @X86_WIN32_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \ 282 @X86_WIN32_TRUE@src/x86/ffi.lo src/x86/win32.lo 283 @M68K_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \ 284 @M68K_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \ 285 @M68K_TRUE@src/m68k/ffi.lo src/m68k/sysv.lo 305 @MIPS_LINUX_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \ 306 @MIPS_LINUX_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \ 307 @MIPS_LINUX_TRUE@src/mips/ffi.lo src/mips/o32.lo 286 308 @SPARC_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \ 287 309 @SPARC_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \ … … 291 313 @POWERPC_AIX_TRUE@src/powerpc/ffi_darwin.lo src/powerpc/aix.lo \ 292 314 @POWERPC_AIX_TRUE@src/powerpc/aix_closures.lo 293 @ X86_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo src/types.lo \294 @ X86_TRUE@src/raw_api.lo src/java_raw_api.lo src/x86/ffi.lo \295 @ X86_TRUE@src/x86/sysv.lo315 @MIPS_SGI_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \ 316 @MIPS_SGI_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \ 317 @MIPS_SGI_TRUE@src/mips/ffi.lo src/mips/o32.lo src/mips/n32.lo 296 318 @ARM_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo src/types.lo \ 297 319 @ARM_TRUE@src/raw_api.lo src/java_raw_api.lo src/arm/sysv.lo \ 298 320 @ARM_TRUE@src/arm/ffi.lo 321 @ALPHA_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \ 322 @ALPHA_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \ 323 @ALPHA_TRUE@src/alpha/ffi.lo src/alpha/osf.lo 324 @MIPS_GCC_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \ 325 @MIPS_GCC_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \ 326 @MIPS_GCC_TRUE@src/mips/ffi.lo src/mips/o32.lo src/mips/n32.lo 327 @S390_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \ 328 @S390_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \ 329 @S390_TRUE@src/s390/sysv.lo src/s390/ffi.lo 330 @M68K_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \ 331 @M68K_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \ 332 @M68K_TRUE@src/m68k/ffi.lo src/m68k/sysv.lo 333 @X86_WIN32_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \ 334 @X86_WIN32_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \ 335 @X86_WIN32_TRUE@src/x86/ffi.lo src/x86/win32.lo 336 @X86_64_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \ 337 @X86_64_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \ 338 @X86_64_TRUE@src/x86/ffi64.lo src/x86/unix64.lo src/x86/ffi.lo \ 339 @X86_64_TRUE@src/x86/sysv.lo 299 340 @POWERPC_DARWIN_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \ 300 341 @POWERPC_DARWIN_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \ 301 342 @POWERPC_DARWIN_TRUE@src/powerpc/ffi_darwin.lo src/powerpc/darwin.lo \ 302 343 @POWERPC_DARWIN_TRUE@src/powerpc/darwin_closure.lo 303 @MIPS_SGI_TRUE@libffi_la_OBJECTS = src/debug.lo src/prep_cif.lo \304 @MIPS_SGI_TRUE@src/types.lo src/raw_api.lo src/java_raw_api.lo \305 @MIPS_SGI_TRUE@src/mips/ffi.lo src/mips/o32.lo src/mips/n32.lo306 344 noinst_PROGRAMS = ffitest$(EXEEXT) 307 345 PROGRAMS = $(noinst_PROGRAMS) … … 579 617 $(mkinstalldirs) $(distdir)/src/alpha $(distdir)/src/arm \ 580 618 $(distdir)/src/m68k $(distdir)/src/mips \ 581 $(distdir)/src/powerpc $(distdir)/src/s parc\582 $(distdir)/src/ x86619 $(distdir)/src/powerpc $(distdir)/src/s390 $(distdir)/src/sh \ 620 $(distdir)/src/sparc $(distdir)/src/x86 583 621 @for file in $(DISTFILES); do \ 584 622 if test -f $$file; then d=.; else d=$(srcdir); fi; \ -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libffi/README
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 1 README for libffi-2.00 1 This directory contains the libffi package, which is not part of GCC but 2 shipped with GCC as convenience. 3 4 Status 5 ====== 2 6 3 7 libffi-2.00 has not been released yet! This is a development snapshot! 4 8 5 libffi-1.20 was released on [SOME FUTURE DAY]. Check the libffi web6 page for updates: <URL:http://source ware.cygnus.com/libffi/>.9 libffi-1.20 was released on October 5, 1998. Check the libffi web 10 page for updates: <URL:http://sources.redhat.com/libffi/>. 7 11 8 12 -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libffi/configure
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 634 634 if test "${srcdir}" = "."; then 635 635 if test "${with_target_subdir}" != "."; then 636 libffi_basedir="${ srcdir}/${with_multisrctop}.."636 libffi_basedir="${with_multisrctop}../" 637 637 else 638 libffi_basedir="${ srcdir}/${with_multisrctop}"638 libffi_basedir="${with_multisrctop}" 639 639 fi 640 640 else 641 libffi_basedir="${srcdir}" 642 fi 643 641 libffi_basedir= 642 fi 644 643 645 644 ac_aux_dir= 646 for ac_dir in $ srcdir $srcdir/.. $srcdir/../..; do645 for ac_dir in ${libffi_basedir}.. $srcdir/${libffi_basedir}..; do 647 646 if test -f $ac_dir/install-sh; then 648 647 ac_aux_dir=$ac_dir … … 656 655 done 657 656 if test -z "$ac_aux_dir"; then 658 { echo "configure: error: can not find install-sh or install.sh in $ srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }657 { echo "configure: error: can not find install-sh or install.sh in ${libffi_basedir}.. $srcdir/${libffi_basedir}.." 1>&2; exit 1; } 659 658 fi 660 659 ac_config_guess=$ac_aux_dir/config.guess 661 660 ac_config_sub=$ac_aux_dir/config.sub 662 661 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. 662 663 663 664 664 … … 1239 1239 1240 1240 hpux10.20*|hpux11*) 1241 lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library' 1242 lt_cv_file_magic_cmd=/usr/bin/file 1243 lt_cv_file_magic_test_file=/usr/lib/libc.sl 1241 case $host_cpu in 1242 hppa*) 1243 lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library' 1244 lt_cv_file_magic_cmd=/usr/bin/file 1245 lt_cv_file_magic_test_file=/usr/lib/libc.sl 1246 ;; 1247 ia64*) 1248 lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' 1249 lt_cv_file_magic_cmd=/usr/bin/file 1250 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 1251 ;; 1252 esac 1244 1253 ;; 1245 1254 … … 1331 1340 1332 1341 echo $ac_n "checking for object suffix""... $ac_c" 1>&6 1333 echo "configure:13 34: checking for object suffix" >&51342 echo "configure:1343: checking for object suffix" >&5 1334 1343 if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then 1335 1344 echo $ac_n "(cached) $ac_c" 1>&6 … … 1337 1346 rm -f conftest* 1338 1347 echo 'int i = 1;' > conftest.$ac_ext 1339 if { (eval echo configure:134 0: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then1348 if { (eval echo configure:1349: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then 1340 1349 for ac_file in conftest.*; do 1341 1350 case $ac_file in … … 1357 1366 1358 1367 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 1359 echo "configure:136 0: checking for executable suffix" >&51368 echo "configure:1369: checking for executable suffix" >&5 1360 1369 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then 1361 1370 echo $ac_n "(cached) $ac_c" 1>&6 … … 1367 1376 echo 'int main () { return 0; }' > conftest.$ac_ext 1368 1377 ac_cv_exeext= 1369 if { (eval echo configure:137 0: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then1378 if { (eval echo configure:1379: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then 1370 1379 for file in conftest.*; do 1371 1380 case $file in … … 1400 1409 if test "$file_magic_cmd" = '$MAGIC_CMD'; then 1401 1410 echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6 1402 echo "configure:14 03: checking for ${ac_tool_prefix}file" >&51411 echo "configure:1412: checking for ${ac_tool_prefix}file" >&5 1403 1412 if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then 1404 1413 echo $ac_n "(cached) $ac_c" 1>&6 … … 1462 1471 if test -n "$ac_tool_prefix"; then 1463 1472 echo $ac_n "checking for file""... $ac_c" 1>&6 1464 echo "configure:14 65: checking for file" >&51473 echo "configure:1474: checking for file" >&5 1465 1474 if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then 1466 1475 echo $ac_n "(cached) $ac_c" 1>&6 … … 1533 1542 set dummy ${ac_tool_prefix}ranlib; ac_word=$2 1534 1543 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 1535 echo "configure:15 36: checking for $ac_word" >&51544 echo "configure:1545: checking for $ac_word" >&5 1536 1545 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then 1537 1546 echo $ac_n "(cached) $ac_c" 1>&6 … … 1565 1574 set dummy ranlib; ac_word=$2 1566 1575 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 1567 echo "configure:15 68: checking for $ac_word" >&51576 echo "configure:1577: checking for $ac_word" >&5 1568 1577 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then 1569 1578 echo $ac_n "(cached) $ac_c" 1>&6 … … 1600 1609 set dummy ${ac_tool_prefix}strip; ac_word=$2 1601 1610 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 1602 echo "configure:16 03: checking for $ac_word" >&51611 echo "configure:1612: checking for $ac_word" >&5 1603 1612 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then 1604 1613 echo $ac_n "(cached) $ac_c" 1>&6 … … 1632 1641 set dummy strip; ac_word=$2 1633 1642 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 1634 echo "configure:16 35: checking for $ac_word" >&51643 echo "configure:1644: checking for $ac_word" >&5 1635 1644 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then 1636 1645 echo $ac_n "(cached) $ac_c" 1>&6 … … 1699 1708 *-*-irix6*) 1700 1709 # Find out which ABI we are using. 1701 echo '#line 1702 "configure"' > conftest.$ac_ext 1702 if { (eval echo configure:1703: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then 1710 echo '#line 1711 "configure"' > conftest.$ac_ext 1711 if { (eval echo configure:1712: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then 1712 if test "$lt_cv_prog_gnu_ld" = yes; then 1713 case `/usr/bin/file conftest.$ac_objext` in 1714 *32-bit*) 1715 LD="${LD-ld} -melf32bsmip" 1716 ;; 1717 *N32*) 1718 LD="${LD-ld} -melf32bmipn32" 1719 ;; 1720 *64-bit*) 1721 LD="${LD-ld} -melf64bmip" 1722 ;; 1723 esac 1724 else 1703 1725 case `/usr/bin/file conftest.$ac_objext` in 1704 1726 *32-bit*) … … 1712 1734 ;; 1713 1735 esac 1736 fi 1737 fi 1738 rm -rf conftest* 1739 ;; 1740 1741 ia64-*-hpux*) 1742 # Find out which ABI we are using. 1743 echo 'int i;' > conftest.$ac_ext 1744 if { (eval echo configure:1745: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then 1745 case "`/usr/bin/file conftest.o`" in 1746 *ELF-32*) 1747 HPUX_IA64_MODE="32" 1748 ;; 1749 *ELF-64*) 1750 HPUX_IA64_MODE="64" 1751 ;; 1752 esac 1753 fi 1754 rm -rf conftest* 1755 ;; 1756 1757 x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) 1758 # Find out which ABI we are using. 1759 echo 'int i;' > conftest.$ac_ext 1760 if { (eval echo configure:1761: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then 1761 case "`/usr/bin/file conftest.o`" in 1762 *32-bit*) 1763 case $host in 1764 x86_64-*linux*) 1765 LD="${LD-ld} -m elf_i386" 1766 ;; 1767 ppc64-*linux*|powerpc64-*linux*) 1768 LD="${LD-ld} -m elf32ppclinux" 1769 ;; 1770 s390x-*linux*) 1771 LD="${LD-ld} -m elf_s390" 1772 ;; 1773 sparc64-*linux*) 1774 LD="${LD-ld} -m elf32_sparc" 1775 ;; 1776 esac 1777 ;; 1778 *64-bit*) 1779 case $host in 1780 x86_64-*linux*) 1781 LD="${LD-ld} -m elf_x86_64" 1782 ;; 1783 ppc*-*linux*|powerpc*-*linux*) 1784 LD="${LD-ld} -m elf64ppc" 1785 ;; 1786 s390*-*linux*) 1787 LD="${LD-ld} -m elf64_s390" 1788 ;; 1789 sparc*-*linux*) 1790 LD="${LD-ld} -m elf64_sparc" 1791 ;; 1792 esac 1793 ;; 1794 esac 1714 1795 fi 1715 1796 rm -rf conftest* … … 1721 1802 CFLAGS="$CFLAGS -belf" 1722 1803 echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6 1723 echo "configure:1 724: checking whether the C compiler needs -belf" >&51804 echo "configure:1805: checking whether the C compiler needs -belf" >&5 1724 1805 if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then 1725 1806 echo $ac_n "(cached) $ac_c" 1>&6 … … 1734 1815 1735 1816 cat > conftest.$ac_ext <<EOF 1736 #line 1 737"configure"1817 #line 1818 "configure" 1737 1818 #include "confdefs.h" 1738 1819 … … 1741 1822 ; return 0; } 1742 1823 EOF 1743 if { (eval echo configure:1 744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then1824 if { (eval echo configure:1825: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 1744 1825 rm -rf conftest* 1745 1826 lt_cv_cc_needs_belf=yes … … 1869 1950 # ./install, which can be erroneously created by make from ./install.sh. 1870 1951 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 1871 echo "configure:1 872: checking for a BSD compatible install" >&51952 echo "configure:1953: checking for a BSD compatible install" >&5 1872 1953 if test -z "$INSTALL"; then 1873 1954 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then … … 1922 2003 1923 2004 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6 1924 echo "configure: 1925: checking whether build environment is sane" >&52005 echo "configure:2006: checking whether build environment is sane" >&5 1925 2006 # Just in case 1926 2007 sleep 1 … … 1979 2060 1980 2061 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 1981 echo "configure: 1982: checking whether ${MAKE-make} sets \${MAKE}" >&52062 echo "configure:2063: checking whether ${MAKE-make} sets \${MAKE}" >&5 1982 2063 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` 1983 2064 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then … … 2018 2099 missing_dir=`cd $ac_aux_dir && pwd` 2019 2100 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6 2020 echo "configure:2 021: checking for working aclocal" >&52101 echo "configure:2102: checking for working aclocal" >&5 2021 2102 # Run test in a subshell; some versions of sh will print an error if 2022 2103 # an executable is not found, even if stderr is redirected. … … 2031 2112 2032 2113 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6 2033 echo "configure:2 034: checking for working autoconf" >&52114 echo "configure:2115: checking for working autoconf" >&5 2034 2115 # Run test in a subshell; some versions of sh will print an error if 2035 2116 # an executable is not found, even if stderr is redirected. … … 2044 2125 2045 2126 echo $ac_n "checking for working automake""... $ac_c" 1>&6 2046 echo "configure:2 047: checking for working automake" >&52127 echo "configure:2128: checking for working automake" >&5 2047 2128 # Run test in a subshell; some versions of sh will print an error if 2048 2129 # an executable is not found, even if stderr is redirected. … … 2057 2138 2058 2139 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6 2059 echo "configure:2 060: checking for working autoheader" >&52140 echo "configure:2141: checking for working autoheader" >&5 2060 2141 # Run test in a subshell; some versions of sh will print an error if 2061 2142 # an executable is not found, even if stderr is redirected. … … 2070 2151 2071 2152 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6 2072 echo "configure:2 073: checking for working makeinfo" >&52153 echo "configure:2154: checking for working makeinfo" >&5 2073 2154 # Run test in a subshell; some versions of sh will print an error if 2074 2155 # an executable is not found, even if stderr is redirected. … … 2087 2168 2088 2169 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 2089 echo "configure:2 090: checking for executable suffix" >&52170 echo "configure:2171: checking for executable suffix" >&5 2090 2171 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then 2091 2172 echo $ac_n "(cached) $ac_c" 1>&6 … … 2097 2178 echo 'int main () { return 0; }' > conftest.$ac_ext 2098 2179 ac_cv_exeext= 2099 if { (eval echo configure:21 00: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then2180 if { (eval echo configure:2181: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then 2100 2181 for file in conftest.*; do 2101 2182 case $file in … … 2118 2199 2119 2200 echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 2120 echo "configure:2 121: checking whether to enable maintainer-specific portions of Makefiles" >&52201 echo "configure:2202: checking whether to enable maintainer-specific portions of Makefiles" >&5 2121 2202 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. 2122 2203 if test "${enable_maintainer_mode+set}" = set; then … … 2144 2225 set dummy gcc; ac_word=$2 2145 2226 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 2146 echo "configure:2 147: checking for $ac_word" >&52227 echo "configure:2228: checking for $ac_word" >&5 2147 2228 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then 2148 2229 echo $ac_n "(cached) $ac_c" 1>&6 … … 2174 2255 set dummy cc; ac_word=$2 2175 2256 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 2176 echo "configure:2 177: checking for $ac_word" >&52257 echo "configure:2258: checking for $ac_word" >&5 2177 2258 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then 2178 2259 echo $ac_n "(cached) $ac_c" 1>&6 … … 2225 2306 set dummy cl; ac_word=$2 2226 2307 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 2227 echo "configure:2 228: checking for $ac_word" >&52308 echo "configure:2309: checking for $ac_word" >&5 2228 2309 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then 2229 2310 echo $ac_n "(cached) $ac_c" 1>&6 … … 2257 2338 2258 2339 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 2259 echo "configure:2 260: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&52340 echo "configure:2341: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 2260 2341 2261 2342 ac_ext=c … … 2268 2349 cat > conftest.$ac_ext << EOF 2269 2350 2270 #line 2 271"configure"2351 #line 2352 "configure" 2271 2352 #include "confdefs.h" 2272 2353 2273 2354 main(){return(0);} 2274 2355 EOF 2275 if { (eval echo configure:2 276: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then2356 if { (eval echo configure:2357: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 2276 2357 ac_cv_prog_cc_works=yes 2277 2358 # If we can't run a trivial program, we are probably using a cross compiler. … … 2299 2380 fi 2300 2381 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 2301 echo "configure:23 02: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&52382 echo "configure:2383: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 2302 2383 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 2303 2384 cross_compiling=$ac_cv_prog_cc_cross 2304 2385 2305 2386 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 2306 echo "configure:23 07: checking whether we are using GNU C" >&52387 echo "configure:2388: checking whether we are using GNU C" >&5 2307 2388 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then 2308 2389 echo $ac_n "(cached) $ac_c" 1>&6 … … 2313 2394 #endif 2314 2395 EOF 2315 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:23 16: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then2396 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2397: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then 2316 2397 ac_cv_prog_gcc=yes 2317 2398 else … … 2332 2413 CFLAGS= 2333 2414 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 2334 echo "configure:2 335: checking whether ${CC-cc} accepts -g" >&52415 echo "configure:2416: checking whether ${CC-cc} accepts -g" >&5 2335 2416 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then 2336 2417 echo $ac_n "(cached) $ac_c" 1>&6 … … 2373 2454 mips-sgi-irix5.* | mips-sgi-irix6.*) TARGET=MIPS; TARGETDIR=mips;; 2374 2455 i*86-*-linux*) TARGET=X86; TARGETDIR=x86;; 2456 i*86-*-sco3.2v5*) TARGET=X86; TARGETDIR=x86;; 2375 2457 i*86-*-solaris*) TARGET=X86; TARGETDIR=x86;; 2376 2458 i*86-*-beos*) TARGET=X86; TARGETDIR=x86;; … … 2382 2464 sparc-sun-4*) TARGET=SPARC; TARGETDIR=sparc;; 2383 2465 sparc*-sun-*) TARGET=SPARC; TARGETDIR=sparc;; 2384 sparc-*-linux* ) TARGET=SPARC; TARGETDIR=sparc;;2385 sparc64-*-linux* ) TARGET=SPARC; TARGETDIR=sparc;;2386 alpha*-*-linux* | alpha*-*-osf* | alpha*-*-freebsd* ) TARGET=ALPHA; TARGETDIR=alpha;;2466 sparc-*-linux* | sparc-*-netbsdelf*) TARGET=SPARC; TARGETDIR=sparc;; 2467 sparc64-*-linux* | sparc64-*-netbsd*) TARGET=SPARC; TARGETDIR=sparc;; 2468 alpha*-*-linux* | alpha*-*-osf* | alpha*-*-freebsd* | alpha*-*-netbsd*) TARGET=ALPHA; TARGETDIR=alpha;; 2387 2469 ia64*-*-*) TARGET=IA64; TARGETDIR=ia64;; 2388 2470 m68k-*-linux*) TARGET=M68K; TARGETDIR=m68k;; 2471 mips64*-*);; 2472 mips*-*-linux*) TARGET=MIPS_LINUX; TARGETDIR=mips;; 2389 2473 powerpc-*-linux* | powerpc-*-sysv*) TARGET=POWERPC; TARGETDIR=powerpc;; 2390 2474 powerpc-*-beos*) TARGET=POWERPC; TARGETDIR=powerpc;; … … 2393 2477 rs6000-*-aix*) TARGET=POWERPC_AIX; TARGETDIR=powerpc;; 2394 2478 arm*-*-linux-*) TARGET=ARM; TARGETDIR=arm;; 2479 s390-*-linux-*) TARGET=S390; TARGETDIR=s390;; 2480 s390x-*-linux-*) TARGET=S390; TARGETDIR=s390;; 2481 x86_64-*-linux*) TARGET=X86_64; TARGETDIR=x86;; 2482 sh-*-linux* | sh[34]*-*-linux*) TARGET=SH; TARGETDIR=sh;; 2395 2483 esac 2396 2484 … … 2419 2507 2420 2508 2509 if test x$TARGET = xMIPS_LINUX; then 2510 MIPS_LINUX_TRUE= 2511 MIPS_LINUX_FALSE='#' 2512 else 2513 MIPS_LINUX_TRUE='#' 2514 MIPS_LINUX_FALSE= 2515 fi 2516 2517 2421 2518 if test x$TARGET = xSPARC; then 2422 2519 SPARC_TRUE= … … 2508 2605 fi 2509 2606 2607 2608 if test x$TARGET = xS390; then 2609 S390_TRUE= 2610 S390_FALSE='#' 2611 else 2612 S390_TRUE='#' 2613 S390_FALSE= 2614 fi 2615 2616 2617 if test x$TARGET = xX86_64; then 2618 X86_64_TRUE= 2619 X86_64_FALSE='#' 2620 else 2621 X86_64_TRUE='#' 2622 X86_64_FALSE= 2623 fi 2624 2625 2626 if test x$TARGET = xSH; then 2627 SH_TRUE= 2628 SH_FALSE='#' 2629 else 2630 SH_TRUE='#' 2631 SH_FALSE= 2632 fi 2633 2634 if test x$TARGET = xMIPS_LINUX; then 2635 TARGET=MIPS 2636 fi 2637 2510 2638 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 2511 echo "configure:2 512: checking how to run the C preprocessor" >&52639 echo "configure:2640: checking how to run the C preprocessor" >&5 2512 2640 # On Suns, sometimes $CPP names a directory. 2513 2641 if test -n "$CPP" && test -d "$CPP"; then … … 2524 2652 # not just through cpp. 2525 2653 cat > conftest.$ac_ext <<EOF 2526 #line 2 527"configure"2654 #line 2655 "configure" 2527 2655 #include "confdefs.h" 2528 2656 #include <assert.h> … … 2530 2658 EOF 2531 2659 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" 2532 { (eval echo configure:2 533: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }2660 { (eval echo configure:2661: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } 2533 2661 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` 2534 2662 if test -z "$ac_err"; then … … 2541 2669 CPP="${CC-cc} -E -traditional-cpp" 2542 2670 cat > conftest.$ac_ext <<EOF 2543 #line 2 544"configure"2671 #line 2672 "configure" 2544 2672 #include "confdefs.h" 2545 2673 #include <assert.h> … … 2547 2675 EOF 2548 2676 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" 2549 { (eval echo configure:2 550: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }2677 { (eval echo configure:2678: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } 2550 2678 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` 2551 2679 if test -z "$ac_err"; then … … 2558 2686 CPP="${CC-cc} -nologo -E" 2559 2687 cat > conftest.$ac_ext <<EOF 2560 #line 2 561"configure"2688 #line 2689 "configure" 2561 2689 #include "confdefs.h" 2562 2690 #include <assert.h> … … 2564 2692 EOF 2565 2693 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" 2566 { (eval echo configure:2 567: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }2694 { (eval echo configure:2695: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } 2567 2695 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` 2568 2696 if test -z "$ac_err"; then … … 2589 2717 2590 2718 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 2591 echo "configure:2 592: checking for ANSI C header files" >&52719 echo "configure:2720: checking for ANSI C header files" >&5 2592 2720 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then 2593 2721 echo $ac_n "(cached) $ac_c" 1>&6 2594 2722 else 2595 2723 cat > conftest.$ac_ext <<EOF 2596 #line 2 597"configure"2724 #line 2725 "configure" 2597 2725 #include "confdefs.h" 2598 2726 #include <stdlib.h> … … 2602 2730 EOF 2603 2731 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" 2604 { (eval echo configure:2 605: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }2732 { (eval echo configure:2733: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } 2605 2733 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` 2606 2734 if test -z "$ac_err"; then … … 2619 2747 # SunOS 4.x string.h does not declare mem*, contrary to ANSI. 2620 2748 cat > conftest.$ac_ext <<EOF 2621 #line 2 622"configure"2749 #line 2750 "configure" 2622 2750 #include "confdefs.h" 2623 2751 #include <string.h> … … 2637 2765 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. 2638 2766 cat > conftest.$ac_ext <<EOF 2639 #line 2 640"configure"2767 #line 2768 "configure" 2640 2768 #include "confdefs.h" 2641 2769 #include <stdlib.h> … … 2658 2786 else 2659 2787 cat > conftest.$ac_ext <<EOF 2660 #line 2 661"configure"2788 #line 2789 "configure" 2661 2789 #include "confdefs.h" 2662 2790 #include <ctype.h> … … 2669 2797 2670 2798 EOF 2671 if { (eval echo configure:2 672: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null2799 if { (eval echo configure:2800: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null 2672 2800 then 2673 2801 : … … 2695 2823 do 2696 2824 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 2697 echo "configure:2 698: checking for $ac_func" >&52825 echo "configure:2826: checking for $ac_func" >&5 2698 2826 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then 2699 2827 echo $ac_n "(cached) $ac_c" 1>&6 2700 2828 else 2701 2829 cat > conftest.$ac_ext <<EOF 2702 #line 2 703"configure"2830 #line 2831 "configure" 2703 2831 #include "confdefs.h" 2704 2832 /* System header to define __stub macros and hopefully few prototypes, … … 2723 2851 ; return 0; } 2724 2852 EOF 2725 if { (eval echo configure:2 726: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then2853 if { (eval echo configure:2854: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 2726 2854 rm -rf conftest* 2727 2855 eval "ac_cv_func_$ac_func=yes" … … 2750 2878 # for constant arguments. Useless! 2751 2879 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 2752 echo "configure:2 753: checking for working alloca.h" >&52880 echo "configure:2881: checking for working alloca.h" >&5 2753 2881 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then 2754 2882 echo $ac_n "(cached) $ac_c" 1>&6 2755 2883 else 2756 2884 cat > conftest.$ac_ext <<EOF 2757 #line 2 758"configure"2885 #line 2886 "configure" 2758 2886 #include "confdefs.h" 2759 2887 #include <alloca.h> … … 2762 2890 ; return 0; } 2763 2891 EOF 2764 if { (eval echo configure:2 765: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then2892 if { (eval echo configure:2893: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 2765 2893 rm -rf conftest* 2766 2894 ac_cv_header_alloca_h=yes … … 2783 2911 2784 2912 echo $ac_n "checking for alloca""... $ac_c" 1>&6 2785 echo "configure:2 786: checking for alloca" >&52913 echo "configure:2914: checking for alloca" >&5 2786 2914 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then 2787 2915 echo $ac_n "(cached) $ac_c" 1>&6 2788 2916 else 2789 2917 cat > conftest.$ac_ext <<EOF 2790 #line 2 791"configure"2918 #line 2919 "configure" 2791 2919 #include "confdefs.h" 2792 2920 … … 2816 2944 ; return 0; } 2817 2945 EOF 2818 if { (eval echo configure:2 819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then2946 if { (eval echo configure:2947: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 2819 2947 rm -rf conftest* 2820 2948 ac_cv_func_alloca_works=yes … … 2848 2976 2849 2977 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 2850 echo "configure:2 851: checking whether alloca needs Cray hooks" >&52978 echo "configure:2979: checking whether alloca needs Cray hooks" >&5 2851 2979 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then 2852 2980 echo $ac_n "(cached) $ac_c" 1>&6 2853 2981 else 2854 2982 cat > conftest.$ac_ext <<EOF 2855 #line 2 856"configure"2983 #line 2984 "configure" 2856 2984 #include "confdefs.h" 2857 2985 #if defined(CRAY) && ! defined(CRAY2) … … 2878 3006 for ac_func in _getb67 GETB67 getb67; do 2879 3007 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 2880 echo "configure: 2881: checking for $ac_func" >&53008 echo "configure:3009: checking for $ac_func" >&5 2881 3009 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then 2882 3010 echo $ac_n "(cached) $ac_c" 1>&6 2883 3011 else 2884 3012 cat > conftest.$ac_ext <<EOF 2885 #line 2886"configure"3013 #line 3014 "configure" 2886 3014 #include "confdefs.h" 2887 3015 /* System header to define __stub macros and hopefully few prototypes, … … 2906 3034 ; return 0; } 2907 3035 EOF 2908 if { (eval echo configure: 2909: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then3036 if { (eval echo configure:3037: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 2909 3037 rm -rf conftest* 2910 3038 eval "ac_cv_func_$ac_func=yes" … … 2933 3061 2934 3062 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 2935 echo "configure: 2936: checking stack direction for C alloca" >&53063 echo "configure:3064: checking stack direction for C alloca" >&5 2936 3064 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then 2937 3065 echo $ac_n "(cached) $ac_c" 1>&6 … … 2941 3069 else 2942 3070 cat > conftest.$ac_ext <<EOF 2943 #line 2944"configure"3071 #line 3072 "configure" 2944 3072 #include "confdefs.h" 2945 3073 find_stack_direction () … … 2960 3088 } 2961 3089 EOF 2962 if { (eval echo configure: 2963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null3090 if { (eval echo configure:3091: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null 2963 3091 then 2964 3092 ac_cv_c_stack_direction=1 … … 2983 3111 2984 3112 echo $ac_n "checking size of short""... $ac_c" 1>&6 2985 echo "configure: 2986: checking size of short" >&53113 echo "configure:3114: checking size of short" >&5 2986 3114 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then 2987 3115 echo $ac_n "(cached) $ac_c" 1>&6 … … 2989 3117 for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence. 2990 3118 cat > conftest.$ac_ext <<EOF 2991 #line 2992"configure"3119 #line 3120 "configure" 2992 3120 #include "confdefs.h" 2993 3121 #include "confdefs.h" … … 2999 3127 ; return 0; } 3000 3128 EOF 3001 if { (eval echo configure:3 002: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then3129 if { (eval echo configure:3130: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then 3002 3130 rm -rf conftest* 3003 3131 ac_cv_sizeof_short=$ac_size … … 3022 3150 3023 3151 echo $ac_n "checking size of int""... $ac_c" 1>&6 3024 echo "configure:3 025: checking size of int" >&53152 echo "configure:3153: checking size of int" >&5 3025 3153 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then 3026 3154 echo $ac_n "(cached) $ac_c" 1>&6 … … 3028 3156 for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence. 3029 3157 cat > conftest.$ac_ext <<EOF 3030 #line 3 031"configure"3158 #line 3159 "configure" 3031 3159 #include "confdefs.h" 3032 3160 #include "confdefs.h" … … 3038 3166 ; return 0; } 3039 3167 EOF 3040 if { (eval echo configure:3 041: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then3168 if { (eval echo configure:3169: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then 3041 3169 rm -rf conftest* 3042 3170 ac_cv_sizeof_int=$ac_size … … 3061 3189 3062 3190 echo $ac_n "checking size of long""... $ac_c" 1>&6 3063 echo "configure:3 064: checking size of long" >&53191 echo "configure:3192: checking size of long" >&5 3064 3192 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then 3065 3193 echo $ac_n "(cached) $ac_c" 1>&6 … … 3067 3195 for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence. 3068 3196 cat > conftest.$ac_ext <<EOF 3069 #line 3 070"configure"3197 #line 3198 "configure" 3070 3198 #include "confdefs.h" 3071 3199 #include "confdefs.h" … … 3077 3205 ; return 0; } 3078 3206 EOF 3079 if { (eval echo configure:3 080: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then3207 if { (eval echo configure:3208: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then 3080 3208 rm -rf conftest* 3081 3209 ac_cv_sizeof_long=$ac_size … … 3100 3228 3101 3229 echo $ac_n "checking size of long long""... $ac_c" 1>&6 3102 echo "configure:3 103: checking size of long long" >&53230 echo "configure:3231: checking size of long long" >&5 3103 3231 if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then 3104 3232 echo $ac_n "(cached) $ac_c" 1>&6 … … 3106 3234 for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence. 3107 3235 cat > conftest.$ac_ext <<EOF 3108 #line 3 109"configure"3236 #line 3237 "configure" 3109 3237 #include "confdefs.h" 3110 3238 #include "confdefs.h" … … 3116 3244 ; return 0; } 3117 3245 EOF 3118 if { (eval echo configure:3 119: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then3246 if { (eval echo configure:3247: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then 3119 3247 rm -rf conftest* 3120 3248 ac_cv_sizeof_long_long=$ac_size … … 3139 3267 3140 3268 echo $ac_n "checking size of float""... $ac_c" 1>&6 3141 echo "configure:3 142: checking size of float" >&53269 echo "configure:3270: checking size of float" >&5 3142 3270 if eval "test \"`echo '$''{'ac_cv_sizeof_float'+set}'`\" = set"; then 3143 3271 echo $ac_n "(cached) $ac_c" 1>&6 … … 3145 3273 for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence. 3146 3274 cat > conftest.$ac_ext <<EOF 3147 #line 3 148"configure"3275 #line 3276 "configure" 3148 3276 #include "confdefs.h" 3149 3277 #include "confdefs.h" … … 3155 3283 ; return 0; } 3156 3284 EOF 3157 if { (eval echo configure:3 158: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then3285 if { (eval echo configure:3286: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then 3158 3286 rm -rf conftest* 3159 3287 ac_cv_sizeof_float=$ac_size … … 3178 3306 3179 3307 echo $ac_n "checking size of double""... $ac_c" 1>&6 3180 echo "configure:3 181: checking size of double" >&53308 echo "configure:3309: checking size of double" >&5 3181 3309 if eval "test \"`echo '$''{'ac_cv_sizeof_double'+set}'`\" = set"; then 3182 3310 echo $ac_n "(cached) $ac_c" 1>&6 … … 3184 3312 for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence. 3185 3313 cat > conftest.$ac_ext <<EOF 3186 #line 3 187"configure"3314 #line 3315 "configure" 3187 3315 #include "confdefs.h" 3188 3316 #include "confdefs.h" … … 3194 3322 ; return 0; } 3195 3323 EOF 3196 if { (eval echo configure:3 197: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then3324 if { (eval echo configure:3325: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then 3197 3325 rm -rf conftest* 3198 3326 ac_cv_sizeof_double=$ac_size … … 3217 3345 3218 3346 echo $ac_n "checking size of long double""... $ac_c" 1>&6 3219 echo "configure:3 220: checking size of long double" >&53347 echo "configure:3348: checking size of long double" >&5 3220 3348 if eval "test \"`echo '$''{'ac_cv_sizeof_long_double'+set}'`\" = set"; then 3221 3349 echo $ac_n "(cached) $ac_c" 1>&6 … … 3223 3351 for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence. 3224 3352 cat > conftest.$ac_ext <<EOF 3225 #line 3 226"configure"3353 #line 3354 "configure" 3226 3354 #include "confdefs.h" 3227 3355 #include "confdefs.h" … … 3233 3361 ; return 0; } 3234 3362 EOF 3235 if { (eval echo configure:3 236: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then3363 if { (eval echo configure:3364: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then 3236 3364 rm -rf conftest* 3237 3365 ac_cv_sizeof_long_double=$ac_size … … 3257 3385 3258 3386 echo $ac_n "checking size of void *""... $ac_c" 1>&6 3259 echo "configure:3 260: checking size of void *" >&53387 echo "configure:3388: checking size of void *" >&5 3260 3388 if eval "test \"`echo '$''{'ac_cv_sizeof_void_p'+set}'`\" = set"; then 3261 3389 echo $ac_n "(cached) $ac_c" 1>&6 … … 3263 3391 for ac_size in 4 8 1 2 16 12 ; do # List sizes in rough order of prevalence. 3264 3392 cat > conftest.$ac_ext <<EOF 3265 #line 3 266"configure"3393 #line 3394 "configure" 3266 3394 #include "confdefs.h" 3267 3395 #include "confdefs.h" … … 3273 3401 ; return 0; } 3274 3402 EOF 3275 if { (eval echo configure:3 276: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then3403 if { (eval echo configure:3404: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then 3276 3404 rm -rf conftest* 3277 3405 ac_cv_sizeof_void_p=$ac_size … … 3296 3424 3297 3425 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 3298 echo "configure:3 299: checking whether byte ordering is bigendian" >&53426 echo "configure:3427: checking whether byte ordering is bigendian" >&5 3299 3427 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then 3300 3428 echo $ac_n "(cached) $ac_c" 1>&6 … … 3303 3431 # See if sys/param.h defines the BYTE_ORDER macro. 3304 3432 cat > conftest.$ac_ext <<EOF 3305 #line 3 306"configure"3433 #line 3434 "configure" 3306 3434 #include "confdefs.h" 3307 3435 #include <sys/types.h> … … 3314 3442 ; return 0; } 3315 3443 EOF 3316 if { (eval echo configure:3 317: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then3444 if { (eval echo configure:3445: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then 3317 3445 rm -rf conftest* 3318 3446 # It does; now see whether it defined to BIG_ENDIAN or not. 3319 3447 cat > conftest.$ac_ext <<EOF 3320 #line 3 321"configure"3448 #line 3449 "configure" 3321 3449 #include "confdefs.h" 3322 3450 #include <sys/types.h> … … 3329 3457 ; return 0; } 3330 3458 EOF 3331 if { (eval echo configure:3 332: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then3459 if { (eval echo configure:3460: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then 3332 3460 rm -rf conftest* 3333 3461 ac_cv_c_bigendian=yes … … 3349 3477 else 3350 3478 cat > conftest.$ac_ext <<EOF 3351 #line 3 352"configure"3479 #line 3480 "configure" 3352 3480 #include "confdefs.h" 3353 3481 main () { … … 3362 3490 } 3363 3491 EOF 3364 if { (eval echo configure:3 365: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null3492 if { (eval echo configure:3493: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null 3365 3493 then 3366 3494 ac_cv_c_bigendian=no … … 3380 3508 if test $ac_cv_c_bigendian = unknown; then 3381 3509 echo $ac_n "checking to probe for byte ordering""... $ac_c" 1>&6 3382 echo "configure:3 383: checking to probe for byte ordering" >&53510 echo "configure:3511: checking to probe for byte ordering" >&5 3383 3511 3384 3512 cat >conftest.c <<EOF … … 3430 3558 if test x$TARGET = xSPARC; then 3431 3559 echo $ac_n "checking assembler and linker support unaligned pc related relocs""... $ac_c" 1>&6 3432 echo "configure:3 433: checking assembler and linker support unaligned pc related relocs" >&53560 echo "configure:3561: checking assembler and linker support unaligned pc related relocs" >&5 3433 3561 if eval "test \"`echo '$''{'libffi_cv_as_sparc_ua_pcrel'+set}'`\" = set"; then 3434 3562 echo $ac_n "(cached) $ac_c" 1>&6 … … 3440 3568 LDFLAGS="$LDFLAGS -shared" 3441 3569 cat > conftest.$ac_ext <<EOF 3442 #line 3 443"configure"3570 #line 3571 "configure" 3443 3571 #include "confdefs.h" 3444 3572 asm (".text; foo: nop; .data; .align 4; .byte 0; .uaword %r_disp32(foo); .text"); … … 3447 3575 ; return 0; } 3448 3576 EOF 3449 if { (eval echo configure:3 450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then3577 if { (eval echo configure:3578: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 3450 3578 rm -rf conftest* 3451 3579 libffi_cv_as_sparc_ua_pcrel=yes … … 3465 3593 cat >> confdefs.h <<\EOF 3466 3594 #define HAVE_AS_SPARC_UA_PCREL 1 3595 EOF 3596 3597 fi 3598 3599 echo $ac_n "checking assembler .register pseudo-op support""... $ac_c" 1>&6 3600 echo "configure:3601: checking assembler .register pseudo-op support" >&5 3601 if eval "test \"`echo '$''{'libffi_cv_as_register_pseudo_op'+set}'`\" = set"; then 3602 echo $ac_n "(cached) $ac_c" 1>&6 3603 else 3604 3605 libffi_cv_as_register_pseudo_op=unknown 3606 # Check if we have .register 3607 cat > conftest.$ac_ext <<EOF 3608 #line 3609 "configure" 3609 #include "confdefs.h" 3610 asm (".register %g2, #scratch"); 3611 int main() { 3612 3613 ; return 0; } 3614 EOF 3615 if { (eval echo configure:3616: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then 3616 rm -rf conftest* 3617 libffi_cv_as_register_pseudo_op=yes 3618 else 3619 echo "configure: failed program was:" >&5 3620 cat conftest.$ac_ext >&5 3621 rm -rf conftest* 3622 libffi_cv_as_register_pseudo_op=no 3623 fi 3624 rm -f conftest* 3625 3626 fi 3627 3628 echo "$ac_t""$libffi_cv_as_register_pseudo_op" 1>&6 3629 if test "x$libffi_cv_as_register_pseudo_op" = xyes; then 3630 cat >> confdefs.h <<\EOF 3631 #define HAVE_AS_REGISTER_PSEUDO_OP 1 3467 3632 EOF 3468 3633 … … 3710 3875 s%@MIPS_SGI_TRUE@%$MIPS_SGI_TRUE%g 3711 3876 s%@MIPS_SGI_FALSE@%$MIPS_SGI_FALSE%g 3877 s%@MIPS_LINUX_TRUE@%$MIPS_LINUX_TRUE%g 3878 s%@MIPS_LINUX_FALSE@%$MIPS_LINUX_FALSE%g 3712 3879 s%@SPARC_TRUE@%$SPARC_TRUE%g 3713 3880 s%@SPARC_FALSE@%$SPARC_FALSE%g … … 3730 3897 s%@ARM_TRUE@%$ARM_TRUE%g 3731 3898 s%@ARM_FALSE@%$ARM_FALSE%g 3899 s%@S390_TRUE@%$S390_TRUE%g 3900 s%@S390_FALSE@%$S390_FALSE%g 3901 s%@X86_64_TRUE@%$X86_64_TRUE%g 3902 s%@X86_64_FALSE@%$X86_64_FALSE%g 3903 s%@SH_TRUE@%$SH_TRUE%g 3904 s%@SH_FALSE@%$SH_FALSE%g 3732 3905 s%@CPP@%$CPP%g 3733 3906 s%@ALLOCA@%$ALLOCA%g … … 3955 4128 CC="${CC}" 3956 4129 DEFS="$DEFS" 4130 ORIGINAL_LD_FOR_MULTILIBS="${ORIGINAL_LD_FOR_MULTILIBS}" 3957 4131 test ! -d include && mkdir include 3958 4132 test ! -f include/fficonfig.h && cp fficonfig.h include/fficonfig.h … … 3970 4144 if test -n "$CONFIG_FILES"; then 3971 4145 LD="${ORIGINAL_LD_FOR_MULTILIBS}" 3972 ac_file=Makefile . ${ libffi_basedir}/../config-ml.in4146 ac_file=Makefile . ${srcdir}/${libffi_basedir}../config-ml.in 3973 4147 fi 3974 4148 -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libffi/configure.in
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 23 23 if test "${srcdir}" = "."; then 24 24 if test "${with_target_subdir}" != "."; then 25 libffi_basedir="${ srcdir}/${with_multisrctop}.."25 libffi_basedir="${with_multisrctop}../" 26 26 else 27 libffi_basedir="${ srcdir}/${with_multisrctop}"27 libffi_basedir="${with_multisrctop}" 28 28 fi 29 29 else 30 libffi_basedir= "${srcdir}"30 libffi_basedir= 31 31 fi 32 32 AC_SUBST(libffi_basedir) 33 AC_CONFIG_AUX_DIR(${libffi_basedir}..) 33 34 34 35 AC_CANONICAL_HOST … … 48 49 mips-sgi-irix5.* | mips-sgi-irix6.*) TARGET=MIPS; TARGETDIR=mips;; 49 50 i*86-*-linux*) TARGET=X86; TARGETDIR=x86;; 51 i*86-*-sco3.2v5*) TARGET=X86; TARGETDIR=x86;; 50 52 i*86-*-solaris*) TARGET=X86; TARGETDIR=x86;; 51 53 i*86-*-beos*) TARGET=X86; TARGETDIR=x86;; … … 57 59 sparc-sun-4*) TARGET=SPARC; TARGETDIR=sparc;; 58 60 sparc*-sun-*) TARGET=SPARC; TARGETDIR=sparc;; 59 sparc-*-linux* ) TARGET=SPARC; TARGETDIR=sparc;;60 sparc64-*-linux* ) TARGET=SPARC; TARGETDIR=sparc;;61 alpha*-*-linux* | alpha*-*-osf* | alpha*-*-freebsd* ) TARGET=ALPHA; TARGETDIR=alpha;;61 sparc-*-linux* | sparc-*-netbsdelf*) TARGET=SPARC; TARGETDIR=sparc;; 62 sparc64-*-linux* | sparc64-*-netbsd*) TARGET=SPARC; TARGETDIR=sparc;; 63 alpha*-*-linux* | alpha*-*-osf* | alpha*-*-freebsd* | alpha*-*-netbsd*) TARGET=ALPHA; TARGETDIR=alpha;; 62 64 ia64*-*-*) TARGET=IA64; TARGETDIR=ia64;; 63 65 m68k-*-linux*) TARGET=M68K; TARGETDIR=m68k;; 66 mips64*-*);; 67 mips*-*-linux*) TARGET=MIPS_LINUX; TARGETDIR=mips;; 64 68 powerpc-*-linux* | powerpc-*-sysv*) TARGET=POWERPC; TARGETDIR=powerpc;; 65 69 powerpc-*-beos*) TARGET=POWERPC; TARGETDIR=powerpc;; … … 68 72 rs6000-*-aix*) TARGET=POWERPC_AIX; TARGETDIR=powerpc;; 69 73 arm*-*-linux-*) TARGET=ARM; TARGETDIR=arm;; 74 s390-*-linux-*) TARGET=S390; TARGETDIR=s390;; 75 s390x-*-linux-*) TARGET=S390; TARGETDIR=s390;; 76 x86_64-*-linux*) TARGET=X86_64; TARGETDIR=x86;; 77 sh-*-linux* | sh[[34]]*-*-linux*) TARGET=SH; TARGETDIR=sh;; 70 78 esac 71 79 … … 76 84 AM_CONDITIONAL(MIPS_GCC, test ${TARGET}${ac_cv_prog_gcc} = MIPSyes) 77 85 AM_CONDITIONAL(MIPS_SGI, test ${TARGET}${ac_cv_prog_gcc} = MIPSno) 86 AM_CONDITIONAL(MIPS_LINUX, test x$TARGET = xMIPS_LINUX) 78 87 AM_CONDITIONAL(SPARC, test x$TARGET = xSPARC) 79 88 AM_CONDITIONAL(X86, test x$TARGET = xX86) … … 86 95 AM_CONDITIONAL(POWERPC_DARWIN, test x$TARGET = xPOWERPC_DARWIN) 87 96 AM_CONDITIONAL(ARM, test x$TARGET = xARM) 97 AM_CONDITIONAL(S390, test x$TARGET = xS390) 98 AM_CONDITIONAL(X86_64, test x$TARGET = xX86_64) 99 AM_CONDITIONAL(SH, test x$TARGET = xSH) 100 101 if test x$TARGET = xMIPS_LINUX; then 102 TARGET=MIPS 103 fi 88 104 89 105 AC_HEADER_STDC … … 119 135 [Define if your assembler and linker support unaligned PC relative relocs.]) 120 136 fi 137 138 AC_CACHE_CHECK([assembler .register pseudo-op support], 139 libffi_cv_as_register_pseudo_op, [ 140 libffi_cv_as_register_pseudo_op=unknown 141 # Check if we have .register 142 AC_TRY_COMPILE([asm (".register %g2, #scratch");],, 143 [libffi_cv_as_register_pseudo_op=yes], 144 [libffi_cv_as_register_pseudo_op=no]) 145 ]) 146 if test "x$libffi_cv_as_register_pseudo_op" = xyes; then 147 AC_DEFINE(HAVE_AS_REGISTER_PSEUDO_OP, 1, 148 [Define if your assembler supports .register.]) 149 fi 121 150 fi 122 151 … … 172 201 if test -n "$CONFIG_FILES"; then 173 202 LD="${ORIGINAL_LD_FOR_MULTILIBS}" 174 ac_file=Makefile . ${ libffi_basedir}/../config-ml.in203 ac_file=Makefile . ${srcdir}/${libffi_basedir}../config-ml.in 175 204 fi 176 205 ], … … 184 213 CC="${CC}" 185 214 DEFS="$DEFS" 215 ORIGINAL_LD_FOR_MULTILIBS="${ORIGINAL_LD_FOR_MULTILIBS}" 186 216 test ! -d include && mkdir include 187 217 test ! -f include/fficonfig.h && cp fficonfig.h include/fficonfig.h -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libffi/fficonfig.h.in
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 26 26 #undef STDC_HEADERS 27 27 28 /* Define if your processor stores words with the most significant29 byte first (like Motorola and SPARC, unlike Intel and VAX). */30 #undef WORDS_BIGENDIAN31 32 28 /* Define this if you want extra debugging */ 33 29 #undef FFI_DEBUG … … 43 39 #undef FFI_NO_RAW_API 44 40 45 /* The number of bytes in a double. */46 #undef SIZEOF_DOUBLE47 48 /* The number of bytes in a float. */49 #undef SIZEOF_FLOAT50 51 /* The number of bytes in a int. */52 #undef SIZEOF_INT53 54 /* The number of bytes in a long. */55 #undef SIZEOF_LONG56 57 /* The number of bytes in a long double. */58 #undef SIZEOF_LONG_DOUBLE59 60 /* The number of bytes in a long long. */61 #undef SIZEOF_LONG_LONG62 63 /* The number of bytes in a short. */64 #undef SIZEOF_SHORT65 66 /* The number of bytes in a void *. */67 #undef SIZEOF_VOID_P68 69 41 /* Define if you have the memcpy function. */ 70 42 #undef HAVE_MEMCPY 71 43 72 /* Define if your assembler and linker support unaligned PC relative relocs. */ 44 /* The number of bytes in type short */ 45 #undef SIZEOF_SHORT 46 47 /* The number of bytes in type int */ 48 #undef SIZEOF_INT 49 50 /* The number of bytes in type long */ 51 #undef SIZEOF_LONG 52 53 /* The number of bytes in type long long */ 54 #undef SIZEOF_LONG_LONG 55 56 /* The number of bytes in type float */ 57 #undef SIZEOF_FLOAT 58 59 /* The number of bytes in type double */ 60 #undef SIZEOF_DOUBLE 61 62 /* The number of bytes in type long double */ 63 #undef SIZEOF_LONG_DOUBLE 64 65 /* The number of bytes in type void * */ 66 #undef SIZEOF_VOID_P 67 68 /* whether byteorder is bigendian */ 69 #undef WORDS_BIGENDIAN 70 71 /* 1234 = LIL_ENDIAN, 4321 = BIGENDIAN */ 72 #undef BYTEORDER 73 74 /* Define if your assembler and linker support unaligned PC relative relocs. */ 73 75 #undef HAVE_AS_SPARC_UA_PCREL 76 77 /* Define if your assembler supports .register. */ 78 #undef HAVE_AS_REGISTER_PSEUDO_OP 79 -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libffi/include/Makefile.in
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 1 # Makefile.in generated automatically by automake 1.4 from Makefile.am2 3 # Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.1 # Makefile.in generated automatically by automake 1.4-p5 from Makefile.am 2 3 # Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc. 4 4 # This Makefile.in is free software; the Free Software Foundation 5 5 # gives unlimited permission to copy and/or distribute it, … … 82 82 VERSION = @VERSION@ 83 83 libffi_basedir = @libffi_basedir@ 84 toolexecdir = @toolexecdir@ 85 toolexeclibdir = @toolexeclibdir@ 84 86 85 87 AUTOMAKE_OPTIONS = foreign … … 90 92 91 93 hack_DATA = fficonfig.h ffi.h ffi_mips.h 92 mkinstalldirs = $(SHELL) $(top_srcdir)/ ../mkinstalldirs94 mkinstalldirs = $(SHELL) $(top_srcdir)/${libffi_basedir}../mkinstalldirs 93 95 CONFIG_HEADER = ../fficonfig.h 94 96 CONFIG_CLEAN_FILES = ffi.h … … 100 102 DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) 101 103 102 TAR = g nutar104 TAR = gtar 103 105 GZIP_ENV = --best 104 106 all: all-redirect -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libffi/include/ffi.h.in
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 1 1 /* -----------------------------------------------------------------*-C-*- 2 libffi @VERSION@ - Copyright (c) 1996-200 2Cygnus Solutions2 libffi @VERSION@ - Copyright (c) 1996-2003 Cygnus Solutions 3 3 4 4 Permission is hereby granted, free of charge, to any person obtaining … … 165 165 #endif 166 166 167 #ifdef S390 168 #if defined (__s390x__) 169 #define S390X 170 #endif 171 #endif 172 173 #ifdef X86_64 174 #if defined (__i386__) 175 #undef X86_64 176 #define X86 177 #endif 178 #endif 179 167 180 #ifndef LIBFFI_ASM 168 181 … … 190 203 #endif 191 204 192 /* ---- Intel x86 ---------------- */193 #ifdef X86194 FFI_SYSV,195 FFI_DEFAULT_ABI = FFI_SYSV,196 #endif197 198 205 /* ---- Intel x86 Win32 ---------- */ 199 206 #ifdef X86_WIN32 200 207 FFI_SYSV, 208 FFI_STDCALL, 209 /* TODO: Add fastcall support for the sake of completeness */ 201 210 FFI_DEFAULT_ABI = FFI_SYSV, 211 #endif 212 213 /* ---- Intel x86 and AMD x86-64 - */ 214 #if !defined(X86_WIN32) && (defined(__i386__) || defined(__x86_64__)) 215 FFI_SYSV, 216 FFI_UNIX64, /* Unix variants all use the same ABI for x86-64 */ 217 #ifdef __i386__ 218 FFI_DEFAULT_ABI = FFI_SYSV, 219 #else 220 FFI_DEFAULT_ABI = FFI_UNIX64, 221 #endif 202 222 #endif 203 223 … … 248 268 /* ---- ARM --------------------- */ 249 269 #ifdef ARM 270 FFI_SYSV, 271 FFI_DEFAULT_ABI = FFI_SYSV, 272 #endif 273 274 /* ---- S390 --------------------- */ 275 #ifdef S390 276 FFI_SYSV, 277 FFI_DEFAULT_ABI = FFI_SYSV, 278 #endif 279 280 /* ---- SuperH ------------------- */ 281 #ifdef SH 250 282 FFI_SYSV, 251 283 FFI_DEFAULT_ABI = FFI_SYSV, … … 265 297 } ffi_type; 266 298 267 /* These are defined in ffi.c */299 /* These are defined in types.c */ 268 300 extern ffi_type ffi_type_void; 269 301 extern ffi_type ffi_type_uint8; … … 374 406 /* ---- Definitions for closures ----------------------------------------- */ 375 407 376 #ifdef X86 377 378 #define FFI_CLOSURES 1 /* x86 supports closures */ 379 #define FFI_TRAMPOLINE_SIZE 10 380 #define FFI_NATIVE_RAW_API 1 /* and has native raw api support */ 381 382 #elif defined(X86_WIN32) 408 #ifdef __i386__ 383 409 384 410 #define FFI_CLOSURES 1 /* x86 supports closures */ … … 423 449 #define FFI_CLOSURES 1 424 450 #define FFI_TRAMPOLINE_SIZE 24 /* see struct below */ 451 #define FFI_NATIVE_RAW_API 0 452 453 #elif defined(SPARC64) 454 455 #define FFI_CLOSURES 1 456 #define FFI_TRAMPOLINE_SIZE 24 457 #define FFI_NATIVE_RAW_API 0 458 459 #elif defined(SPARC) 460 461 #define FFI_CLOSURES 1 462 #define FFI_TRAMPOLINE_SIZE 16 463 #define FFI_NATIVE_RAW_API 0 464 465 #elif defined(S390) 466 467 #define FFI_CLOSURES 1 468 #ifdef S390X 469 #define FFI_TRAMPOLINE_SIZE 32 470 #else 471 #define FFI_TRAMPOLINE_SIZE 16 472 #endif 473 #define FFI_NATIVE_RAW_API 0 474 475 #elif defined(SH) 476 477 #define FFI_CLOSURES 1 478 #define FFI_TRAMPOLINE_SIZE 16 479 #define FFI_NATIVE_RAW_API 0 480 481 #elif defined(__x86_64__) 482 483 #define FFI_CLOSURES 1 484 #define FFI_TRAMPOLINE_SIZE 24 425 485 #define FFI_NATIVE_RAW_API 0 426 486 -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libffi/src/arm/ffi.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 37 37 { 38 38 register unsigned int i; 39 register int tmp;40 register unsigned int avn;41 39 register void **p_argv; 42 40 register char *argp; 43 41 register ffi_type **p_arg; 44 42 45 tmp = 0;46 43 argp = stack; 47 44 … … 51 48 } 52 49 53 avn = ecif->cif->nargs;54 50 p_argv = ecif->avalue; 55 51 56 52 for (i = ecif->cif->nargs, p_arg = ecif->cif->arg_types; 57 (i != 0) && (avn != 0);53 (i != 0); 58 54 i--, p_arg++) 59 55 { … … 65 61 } 66 62 67 if (avn != 0)68 {69 avn--;70 63 z = (*p_arg)->size; 71 64 if (z < sizeof(int)) … … 108 101 p_argv++; 109 102 argp += z; 110 }111 103 } 112 104 -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libffi/src/arm/sysv.S
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 29 29 #include <machine/asm.h> 30 30 #else 31 /* XXX these lose for some platforms, I'm sure. */ 31 #ifdef __USER_LABEL_PREFIX__ 32 #define CONCAT1(a, b) CONCAT2(a, b) 33 #define CONCAT2(a, b) a ## b 34 35 /* Use the right prefix for global labels. */ 36 #define CNAME(x) CONCAT1 (__USER_LABEL_PREFIX__, x) 37 #else 32 38 #define CNAME(x) x 39 #endif 33 40 #define ENTRY(x) .globl CNAME(x); .type CNAME(x),%function; CNAME(x): 34 41 #endif … … 97 104 # return FLOAT 98 105 cmp a4, #FFI_TYPE_FLOAT 106 #ifdef __SOFTFP__ 107 streq a1, [a3] 108 #else 99 109 stfeqs f0, [a3] 110 #endif 100 111 beq epilogue 101 112 102 113 # return DOUBLE or LONGDOUBLE 103 114 cmp a4, #FFI_TYPE_DOUBLE 115 #ifdef __SOFTFP__ 116 stmeqia a3, {a1, a2} 117 #else 104 118 stfeqd f0, [a3] 119 #endif 105 120 106 121 epilogue: -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libffi/src/ffitest.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 1 1 /* ----------------------------------------------------------------------- 2 ffitest.c - Copyright (c) 1996, 1997, 1998 Cygnus Solutions2 ffitest.c - Copyright (c) 1996, 1997, 1998, 2002, 2003 Red Hat, Inc. 3 3 4 4 Permission is hereby granted, free of charge, to any person obtaining … … 49 49 return (strlen(s)); 50 50 } 51 52 #ifdef X86_WIN32 53 static size_t __attribute__((stdcall)) my_stdcall_strlen(char *s) 54 { 55 return (strlen(s)); 56 } 57 #endif /* X86_WIN32 */ 51 58 52 59 static int promotion(signed char sc, signed short ss, … … 113 120 } 114 121 122 #ifdef X86_WIN32 123 static float __attribute__((stdcall)) stdcall_many(float f1, 124 float f2, 125 float f3, 126 float f4, 127 float f5, 128 float f6, 129 float f7, 130 float f8, 131 float f9, 132 float f10, 133 float f11, 134 float f12, 135 float f13) 136 { 137 return ((f1/f2+f3/f4+f5/f6+f7/f8+f9/f10+f11/f12) * f13); 138 } 139 #endif /* X86_WIN32 */ 140 115 141 static double dblit(float f) 116 142 { … … 153 179 char c2; 154 180 } test_structure_5; 181 182 typedef struct 183 { 184 float f; 185 double d; 186 } test_structure_6; 187 188 typedef struct 189 { 190 float f1; 191 float f2; 192 double d; 193 } test_structure_7; 194 195 typedef struct 196 { 197 float f1; 198 float f2; 199 float f3; 200 float f4; 201 } test_structure_8; 202 203 typedef struct 204 { 205 float f; 206 int i; 207 } test_structure_9; 155 208 156 209 static test_structure_1 struct1(test_structure_1 ts) … … 195 248 } 196 249 250 static test_structure_6 struct6 (test_structure_6 ts) 251 { 252 ts.f += 1; 253 ts.d += 1; 254 255 return ts; 256 } 257 258 static test_structure_7 struct7 (test_structure_7 ts) 259 { 260 ts.f1 += 1; 261 ts.f2 += 1; 262 ts.d += 1; 263 264 return ts; 265 } 266 267 static test_structure_8 struct8 (test_structure_8 ts) 268 { 269 ts.f1 += 1; 270 ts.f2 += 1; 271 ts.f3 += 1; 272 ts.f4 += 1; 273 274 return ts; 275 } 276 277 static test_structure_9 struct9 (test_structure_9 ts) 278 { 279 ts.f += 1; 280 ts.i += 1; 281 282 return ts; 283 } 284 197 285 /* Take an int and a float argument, together with int userdata, and */ 198 286 /* return the sum. */ 199 static void closure_test_fn(ffi_cif* cif,void* resp,void** args, void* userdata) 200 { 201 *(int*)resp = 202 *(int *)args[0] + (int)(*(float *)args[1]) + (int)(long)userdata; 203 } 204 205 typedef int (*closure_test_type)(int, float); 287 #if FFI_CLOSURES 288 static void 289 closure_test_fn(ffi_cif* cif,void* resp,void** args, void* userdata) 290 { 291 *(ffi_arg*)resp = 292 (int)*(unsigned long long *)args[0] + (int)(*(int *)args[1]) + 293 (int)(*(unsigned long long *)args[2]) + (int)*(int *)args[3] + 294 (int)(*(signed short *)args[4]) + 295 (int)(*(unsigned long long *)args[5]) + 296 (int)*(int *)args[6] + (int)(*(int *)args[7]) + 297 (int)(*(double *)args[8]) + (int)*(int *)args[9] + 298 (int)(*(int *)args[10]) + (int)(*(float *)args[11]) + 299 (int)*(int *)args[12] + (int)(*(int *)args[13]) + 300 (int)(*(int *)args[14]) + *(int *)args[15] + (int)(long)userdata; 301 302 printf("%d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d: %d\n", 303 (int)*(unsigned long long *)args[0], (int)(*(int *)args[1]), 304 (int)(*(unsigned long long *)args[2]), 305 (int)*(int *)args[3], (int)(*(signed short *)args[4]), 306 (int)(*(unsigned long long *)args[5]), 307 (int)*(int *)args[6], (int)(*(int *)args[7]), 308 (int)(*(double *)args[8]), (int)*(int *)args[9], 309 (int)(*(int *)args[10]), (int)(*(float *)args[11]), 310 (int)*(int *)args[12], (int)(*(int *)args[13]), 311 (int)(*(int *)args[14]),*(int *)args[15], 312 (int)(long)userdata, *(int*)resp); 313 } 314 315 typedef int (*closure_test_type)(unsigned long long, int, unsigned long long, 316 int, signed short, unsigned long long, int, 317 int, double, int, int, float, int, int, 318 int, int); 319 320 static void closure_test_fn1(ffi_cif* cif,void* resp,void** args, 321 void* userdata) 322 { 323 *(ffi_arg*)resp = 324 (int)*(float *)args[0] +(int)(*(float *)args[1]) + 325 (int)(*(float *)args[2]) + (int)*(float *)args[3] + 326 (int)(*(signed short *)args[4]) + (int)(*(float *)args[5]) + 327 (int)*(float *)args[6] + (int)(*(int *)args[7]) + 328 (int)(*(double*)args[8]) + (int)*(int *)args[9] + 329 (int)(*(int *)args[10]) + (int)(*(float *)args[11]) + 330 (int)*(int *)args[12] + (int)(*(int *)args[13]) + 331 (int)(*(int *)args[14]) + *(int *)args[15] + (int)(long)userdata; 332 333 printf("%d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d: %d\n", 334 (int)*(float *)args[0], (int)(*(float *)args[1]), 335 (int)(*(float *)args[2]), (int)*(float *)args[3], 336 (int)(*(signed short *)args[4]), (int)(*(float *)args[5]), 337 (int)*(float *)args[6], (int)(*(int *)args[7]), 338 (int)(*(double *)args[8]), (int)*(int *)args[9], 339 (int)(*(int *)args[10]), (int)(*(float *)args[11]), 340 (int)*(int *)args[12], (int)(*(int *)args[13]), 341 (int)(*(int *)args[14]), *(int *)args[15], 342 (int)(long)userdata, *(int*)resp); 343 } 344 345 typedef int (*closure_test_type1)(float, float, float, float, signed short, 346 float, float, int, double, int, int, float, 347 int, int, int, int); 348 349 static void closure_test_fn2(ffi_cif* cif,void* resp,void** args, 350 void* userdata) 351 { 352 *(ffi_arg*)resp = 353 (int)*(double *)args[0] +(int)(*(double *)args[1]) + 354 (int)(*(double *)args[2]) + (int)*(double *)args[3] + 355 (int)(*(signed short *)args[4]) + (int)(*(double *)args[5]) + 356 (int)*(double *)args[6] + (int)(*(int *)args[7]) + 357 (int)(*(double *)args[8]) + (int)*(int *)args[9] + 358 (int)(*(int *)args[10]) + (int)(*(float *)args[11]) + 359 (int)*(int *)args[12] + (int)(*(float *)args[13]) + 360 (int)(*(int *)args[14]) + *(int *)args[15] + (int)(long)userdata; 361 362 printf("%d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d: %d\n", 363 (int)*(double *)args[0], (int)(*(double *)args[1]), 364 (int)(*(double *)args[2]), (int)*(double *)args[3], 365 (int)(*(signed short *)args[4]), (int)(*(double *)args[5]), 366 (int)*(double *)args[6], (int)(*(int *)args[7]), 367 (int)(*(double*)args[8]), (int)*(int *)args[9], 368 (int)(*(int *)args[10]), (int)(*(float *)args[11]), 369 (int)*(int *)args[12], (int)(*(float *)args[13]), 370 (int)(*(int *)args[14]), *(int *)args[15], (int)(long)userdata, 371 *(int*)resp); 372 } 373 374 typedef int (*closure_test_type2)(double, double, double, double, signed short, 375 double, double, int, double, int, int, float, 376 int, float, int, int); 377 378 static void closure_test_fn3(ffi_cif* cif,void* resp,void** args, 379 void* userdata) 380 { 381 *(ffi_arg*)resp = 382 (int)*(float *)args[0] +(int)(*(float *)args[1]) + 383 (int)(*(float *)args[2]) + (int)*(float *)args[3] + 384 (int)(*(float *)args[4]) + (int)(*(float *)args[5]) + 385 (int)*(float *)args[6] + (int)(*(float *)args[7]) + 386 (int)(*(double *)args[8]) + (int)*(int *)args[9] + 387 (int)(*(float *)args[10]) + (int)(*(float *)args[11]) + 388 (int)*(int *)args[12] + (int)(*(float *)args[13]) + 389 (int)(*(float *)args[14]) + *(int *)args[15] + (int)(long)userdata; 390 391 printf("%d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d: %d\n", 392 (int)*(float *)args[0], (int)(*(float *)args[1]), 393 (int)(*(float *)args[2]), (int)*(float *)args[3], 394 (int)(*(float *)args[4]), (int)(*(float *)args[5]), 395 (int)*(float *)args[6], (int)(*(float *)args[7]), 396 (int)(*(double *)args[8]), (int)*(int *)args[9], 397 (int)(*(float *)args[10]), (int)(*(float *)args[11]), 398 (int)*(int *)args[12], (int)(*(float *)args[13]), 399 (int)(*(float *)args[14]), *(int *)args[15], (int)(long)userdata, 400 *(int*)resp); 401 } 402 403 typedef int (*closure_test_type3)(float, float, float, float, float, float, 404 float, float, double, int, float, float, int, 405 float, float, int); 406 #endif 206 407 207 408 int main(/*@unused@*/ int argc, /*@unused@*/ char *argv[]) … … 226 427 long long rlonglong; 227 428 429 # if FFI_CLOSURES 430 /* The closure must not be an automatic variable on 431 platforms (Solaris) that forbid stack execution by default. */ 432 static ffi_closure cl; 433 #endif 434 435 ffi_type * cl_arg_types[17]; 436 228 437 ffi_type ts1_type; 229 438 ffi_type ts2_type; … … 231 440 ffi_type ts4_type; 232 441 ffi_type ts5_type; 442 ffi_type ts6_type; 443 ffi_type ts7_type; 444 ffi_type ts8_type; 445 ffi_type ts9_type; 233 446 ffi_type *ts1_type_elements[4]; 234 447 ffi_type *ts2_type_elements[3]; … … 236 449 ffi_type *ts4_type_elements[4]; 237 450 ffi_type *ts5_type_elements[3]; 451 ffi_type *ts6_type_elements[3]; 452 ffi_type *ts7_type_elements[4]; 453 ffi_type *ts8_type_elements[5]; 454 ffi_type *ts9_type_elements[3]; 238 455 239 456 ts1_type.size = 0; … … 256 473 ts5_type.alignment = 0; 257 474 ts5_type.type = FFI_TYPE_STRUCT; 475 476 ts6_type.size = 0; 477 ts6_type.alignment = 0; 478 ts6_type.type = FFI_TYPE_STRUCT; 479 480 ts7_type.size = 0; 481 ts7_type.alignment = 0; 482 ts7_type.type = FFI_TYPE_STRUCT; 483 484 ts8_type.size = 0; 485 ts8_type.alignment = 0; 486 ts8_type.type = FFI_TYPE_STRUCT; 487 488 ts9_type.size = 0; 489 ts9_type.alignment = 0; 490 ts9_type.type = FFI_TYPE_STRUCT; 258 491 259 492 /*@-immediatetrans@*/ … … 263 496 ts4_type.elements = ts4_type_elements; 264 497 ts5_type.elements = ts5_type_elements; 498 ts6_type.elements = ts6_type_elements; 499 ts7_type.elements = ts7_type_elements; 500 ts8_type.elements = ts8_type_elements; 501 ts9_type.elements = ts9_type_elements; 265 502 /*@=immediatetrans@*/ 266 503 … … 286 523 ts5_type_elements[2] = NULL; 287 524 525 ts6_type_elements[0] = &ffi_type_float; 526 ts6_type_elements[1] = &ffi_type_double; 527 ts6_type_elements[2] = NULL; 528 529 ts7_type_elements[0] = &ffi_type_float; 530 ts7_type_elements[1] = &ffi_type_float; 531 ts7_type_elements[2] = &ffi_type_double; 532 ts7_type_elements[3] = NULL; 533 534 ts8_type_elements[0] = &ffi_type_float; 535 ts8_type_elements[1] = &ffi_type_float; 536 ts8_type_elements[2] = &ffi_type_float; 537 ts8_type_elements[3] = &ffi_type_float; 538 ts8_type_elements[4] = NULL; 539 540 ts9_type_elements[0] = &ffi_type_float; 541 ts9_type_elements[1] = &ffi_type_sint; 542 ts9_type_elements[2] = NULL; 543 288 544 ul = 0; 289 545 … … 327 583 ul++; 328 584 ffi_call(&cif, FFI_FN(return_sc), &rint, values); 329 CHECK(rint == ( int) sc);585 CHECK(rint == (ffi_arg) sc); 330 586 } 331 587 … … 414 670 ffi_call(&cif, FFI_FN(floating), &rint, values); 415 671 416 printf ("%d vs %d\n", rint, floating (si1, f, d, ld, si2));672 printf ("%d vs %d\n", (int)rint, floating (si1, f, d, ld, si2)); 417 673 418 674 CHECK(rint == floating(si1, f, d, ld, si2)); … … 484 740 485 741 /*@-usedef@*/ 486 ff = many(fa[0], fa[1],742 ff = many (fa[0], fa[1], 487 743 fa[2], fa[3], 488 744 fa[4], fa[5], … … 533 789 ul++; 534 790 ffi_call(&cif, FFI_FN(promotion), &rint, values); 535 CHECK(rint == (int) sc + (int) ss + (int) uc + (int) us); 791 CHECK((int)rint == (signed char) sc + (signed short) ss + 792 (unsigned char) uc + (unsigned short) us); 536 793 } 537 794 printf("%lu promotion tests run\n", ul); … … 580 837 581 838 /* Initialize the cif */ 582 CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 1, 583 &ts2_type, args) == FFI_OK); 839 CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 1, &ts2_type, args) == FFI_OK); 584 840 585 841 ts2_arg.d1 = 5.55; … … 648 904 649 905 /* Initialize the cif */ 650 CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 1, 651 &ts4_type, args) == FFI_OK); 906 CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 1, &ts4_type, args) == FFI_OK); 652 907 653 908 ts4_arg.ui1 = 2; … … 679 934 680 935 /* Initialize the cif */ 681 CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 2, 682 &ts5_type, args) == FFI_OK); 936 CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 2, &ts5_type, args) == FFI_OK); 683 937 684 938 ts5_arg1.c1 = 2; … … 698 952 } 699 953 954 /* struct tests */ 955 { 956 test_structure_6 ts6_arg; 957 958 /* This is a hack to get a properly aligned result buffer */ 959 test_structure_6 *ts6_result = 960 (test_structure_6 *) malloc (sizeof(test_structure_6)); 961 962 args[0] = &ts6_type; 963 values[0] = &ts6_arg; 964 965 /* Initialize the cif */ 966 CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 1, &ts6_type, args) == FFI_OK); 967 968 ts6_arg.f = 5.55f; 969 ts6_arg.d = 6.66; 970 971 printf ("%g\n", ts6_arg.f); 972 printf ("%g\n", ts6_arg.d); 973 974 ffi_call(&cif, FFI_FN(struct6), ts6_result, values); 975 976 printf ("%g\n", ts6_result->f); 977 printf ("%g\n", ts6_result->d); 978 979 CHECK(ts6_result->f == 5.55f + 1); 980 CHECK(ts6_result->d == 6.66 + 1); 981 982 printf("structure test 6 ok!\n"); 983 984 free (ts6_result); 985 } 986 987 /* struct tests */ 988 { 989 test_structure_7 ts7_arg; 990 991 /* This is a hack to get a properly aligned result buffer */ 992 test_structure_7 *ts7_result = 993 (test_structure_7 *) malloc (sizeof(test_structure_7)); 994 995 args[0] = &ts7_type; 996 values[0] = &ts7_arg; 997 998 /* Initialize the cif */ 999 CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 1, &ts7_type, args) == FFI_OK); 1000 1001 ts7_arg.f1 = 5.55f; 1002 ts7_arg.f2 = 55.5f; 1003 ts7_arg.d = 6.66; 1004 1005 printf ("%g\n", ts7_arg.f1); 1006 printf ("%g\n", ts7_arg.f2); 1007 printf ("%g\n", ts7_arg.d); 1008 1009 ffi_call(&cif, FFI_FN(struct7), ts7_result, values); 1010 1011 printf ("%g\n", ts7_result->f1); 1012 printf ("%g\n", ts7_result->f2); 1013 printf ("%g\n", ts7_result->d); 1014 1015 CHECK(ts7_result->f1 == 5.55f + 1); 1016 CHECK(ts7_result->f2 == 55.5f + 1); 1017 CHECK(ts7_result->d == 6.66 + 1); 1018 1019 printf("structure test 7 ok!\n"); 1020 1021 free (ts7_result); 1022 } 1023 1024 /* struct tests */ 1025 { 1026 test_structure_8 ts8_arg; 1027 1028 /* This is a hack to get a properly aligned result buffer */ 1029 test_structure_8 *ts8_result = 1030 (test_structure_8 *) malloc (sizeof(test_structure_8)); 1031 1032 args[0] = &ts8_type; 1033 values[0] = &ts8_arg; 1034 1035 /* Initialize the cif */ 1036 CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 1, &ts8_type, args) == FFI_OK); 1037 1038 ts8_arg.f1 = 5.55f; 1039 ts8_arg.f2 = 55.5f; 1040 ts8_arg.f3 = -5.55f; 1041 ts8_arg.f4 = -55.5f; 1042 1043 printf ("%g\n", ts8_arg.f1); 1044 printf ("%g\n", ts8_arg.f2); 1045 printf ("%g\n", ts8_arg.f3); 1046 printf ("%g\n", ts8_arg.f4); 1047 1048 ffi_call(&cif, FFI_FN(struct8), ts8_result, values); 1049 1050 printf ("%g\n", ts8_result->f1); 1051 printf ("%g\n", ts8_result->f2); 1052 printf ("%g\n", ts8_result->f3); 1053 printf ("%g\n", ts8_result->f4); 1054 1055 CHECK(ts8_result->f1 == 5.55f + 1); 1056 CHECK(ts8_result->f2 == 55.5f + 1); 1057 CHECK(ts8_result->f3 == -5.55f + 1); 1058 CHECK(ts8_result->f4 == -55.5f + 1); 1059 1060 printf("structure test 8 ok!\n"); 1061 1062 free (ts8_result); 1063 } 1064 1065 /* struct tests */ 1066 { 1067 test_structure_9 ts9_arg; 1068 1069 /* This is a hack to get a properly aligned result buffer */ 1070 test_structure_9 *ts9_result = 1071 (test_structure_9 *) malloc (sizeof(test_structure_9)); 1072 1073 args[0] = &ts9_type; 1074 values[0] = &ts9_arg; 1075 1076 /* Initialize the cif */ 1077 CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 1, &ts9_type, args) == FFI_OK); 1078 1079 ts9_arg.f = 5.55f; 1080 ts9_arg.i = 5; 1081 1082 printf ("%g\n", ts9_arg.f); 1083 printf ("%d\n", ts9_arg.i); 1084 1085 ffi_call(&cif, FFI_FN(struct9), ts9_result, values); 1086 1087 printf ("%g\n", ts9_result->f); 1088 printf ("%d\n", ts9_result->i); 1089 1090 CHECK(ts9_result->f == 5.55f + 1); 1091 CHECK(ts9_result->i == 5 + 1); 1092 1093 printf("structure test 9 ok!\n"); 1094 1095 free (ts9_result); 1096 } 1097 700 1098 #else 701 1099 printf("Structure passing doesn't work on Win32.\n"); 702 1100 #endif /* X86_WIN32 */ 703 1101 1102 #ifdef X86_WIN32 1103 /* stdcall strlen tests */ 1104 { 1105 args[0] = &ffi_type_pointer; 1106 values[0] = (void*) &s; 1107 1108 /* Initialize the cif */ 1109 CHECK(ffi_prep_cif(&cif, FFI_STDCALL, 1, 1110 &ffi_type_sint, args) == FFI_OK); 1111 1112 s = "a"; 1113 ffi_call(&cif, FFI_FN(my_stdcall_strlen), &rint, values); 1114 CHECK(rint == 1); 1115 1116 s = "1234567"; 1117 ffi_call(&cif, FFI_FN(my_stdcall_strlen), &rint, values); 1118 CHECK(rint == 7); 1119 1120 s = "1234567890123456789012345"; 1121 ffi_call(&cif, FFI_FN(my_stdcall_strlen), &rint, values); 1122 CHECK(rint == 25); 1123 1124 printf("stdcall strlen tests passed\n"); 1125 } 1126 1127 /* stdcall many arg tests */ 1128 { 1129 float ff; 1130 float fa[13]; 1131 1132 for (ul = 0; ul < 13; ul++) 1133 { 1134 args[ul] = &ffi_type_float; 1135 values[ul] = &fa[ul]; 1136 fa[ul] = (float) ul; 1137 } 1138 1139 /* Initialize the cif */ 1140 CHECK(ffi_prep_cif(&cif, FFI_STDCALL, 13, 1141 &ffi_type_float, args) == FFI_OK); 1142 1143 /*@-usedef@*/ 1144 ff = stdcall_many(fa[0], fa[1], 1145 fa[2], fa[3], 1146 fa[4], fa[5], 1147 fa[6], fa[7], 1148 fa[8], fa[9], 1149 fa[10],fa[11],fa[12]); 1150 /*@=usedef@*/ 1151 1152 ffi_call(&cif, FFI_FN(stdcall_many), &f, values); 1153 1154 /*@-realcompare@*/ 1155 if (f - ff < FLT_EPSILON) 1156 /*@=realcompare@*/ 1157 printf("stdcall many arg tests ok!\n"); 1158 else 1159 CHECK(0); 1160 } 1161 #endif /* X86_WIN32 */ 1162 704 1163 # if FFI_CLOSURES 705 1164 /* A simple closure test */ 706 1165 { 707 ffi_closure cl; 708 ffi_type * cl_arg_types[3]; 709 710 cl_arg_types[0] = &ffi_type_sint; 1166 (void) puts("\nEnter FFI_CLOSURES\n"); 1167 1168 cl_arg_types[0] = &ffi_type_uint64; 1169 cl_arg_types[1] = &ffi_type_uint; 1170 cl_arg_types[2] = &ffi_type_uint64; 1171 cl_arg_types[3] = &ffi_type_uint; 1172 cl_arg_types[4] = &ffi_type_sshort; 1173 cl_arg_types[5] = &ffi_type_uint64; 1174 cl_arg_types[6] = &ffi_type_uint; 1175 cl_arg_types[7] = &ffi_type_uint; 1176 cl_arg_types[8] = &ffi_type_double; 1177 cl_arg_types[9] = &ffi_type_uint; 1178 cl_arg_types[10] = &ffi_type_uint; 1179 cl_arg_types[11] = &ffi_type_float; 1180 cl_arg_types[12] = &ffi_type_uint; 1181 cl_arg_types[13] = &ffi_type_uint; 1182 cl_arg_types[14] = &ffi_type_uint; 1183 cl_arg_types[15] = &ffi_type_uint; 1184 cl_arg_types[16] = NULL; 1185 1186 /* Initialize the cif */ 1187 CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 16, 1188 &ffi_type_sint, cl_arg_types) == FFI_OK); 1189 1190 CHECK(ffi_prep_closure(&cl, &cif, closure_test_fn, 1191 (void *) 3 /* userdata */) == FFI_OK); 1192 1193 CHECK((*((closure_test_type)(&cl))) 1194 (1LL, 2, 3LL, 4, 127, 429LL, 7, 8, 9.5, 10, 11, 12, 13, 1195 19, 21, 1) == 680); 1196 } 1197 1198 { 1199 1200 cl_arg_types[0] = &ffi_type_float; 711 1201 cl_arg_types[1] = &ffi_type_float; 712 cl_arg_types[2] = NULL; 1202 cl_arg_types[2] = &ffi_type_float; 1203 cl_arg_types[3] = &ffi_type_float; 1204 cl_arg_types[4] = &ffi_type_sshort; 1205 cl_arg_types[5] = &ffi_type_float; 1206 cl_arg_types[6] = &ffi_type_float; 1207 cl_arg_types[7] = &ffi_type_uint; 1208 cl_arg_types[8] = &ffi_type_double; 1209 cl_arg_types[9] = &ffi_type_uint; 1210 cl_arg_types[10] = &ffi_type_uint; 1211 cl_arg_types[11] = &ffi_type_float; 1212 cl_arg_types[12] = &ffi_type_uint; 1213 cl_arg_types[13] = &ffi_type_uint; 1214 cl_arg_types[14] = &ffi_type_uint; 1215 cl_arg_types[15] = &ffi_type_uint; 1216 cl_arg_types[16] = NULL; 713 1217 714 1218 /* Initialize the cif */ 715 CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 2, 716 &ffi_type_sint, cl_arg_types) == FFI_OK); 717 718 CHECK(ffi_prep_closure(&cl, &cif, closure_test_fn, 719 (void *) 3 /* userdata */) 720 == FFI_OK); 721 CHECK((*((closure_test_type)(&cl)))(1, 2.0) == 6); 1219 CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 16, 1220 &ffi_type_sint, cl_arg_types) == FFI_OK); 1221 1222 CHECK(ffi_prep_closure(&cl, &cif, closure_test_fn1, 1223 (void *) 3 /* userdata */) == FFI_OK); 1224 1225 CHECK((*((closure_test_type1)(&cl))) 1226 (1.1, 2.2, 3.3, 4.4, 127, 5.5, 6.6, 8, 9, 10, 11, 12.0, 13, 1227 19, 21, 1) == 255); 722 1228 } 1229 1230 { 1231 1232 cl_arg_types[0] = &ffi_type_double; 1233 cl_arg_types[1] = &ffi_type_double; 1234 cl_arg_types[2] = &ffi_type_double; 1235 cl_arg_types[3] = &ffi_type_double; 1236 cl_arg_types[4] = &ffi_type_sshort; 1237 cl_arg_types[5] = &ffi_type_double; 1238 cl_arg_types[6] = &ffi_type_double; 1239 cl_arg_types[7] = &ffi_type_uint; 1240 cl_arg_types[8] = &ffi_type_double; 1241 cl_arg_types[9] = &ffi_type_uint; 1242 cl_arg_types[10] = &ffi_type_uint; 1243 cl_arg_types[11] = &ffi_type_float; 1244 cl_arg_types[12] = &ffi_type_uint; 1245 cl_arg_types[13] = &ffi_type_float; 1246 cl_arg_types[14] = &ffi_type_uint; 1247 cl_arg_types[15] = &ffi_type_uint; 1248 cl_arg_types[16] = NULL; 1249 1250 /* Initialize the cif */ 1251 CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 16, 1252 &ffi_type_sint, cl_arg_types) == FFI_OK); 1253 1254 CHECK(ffi_prep_closure(&cl, &cif, closure_test_fn2, 1255 (void *) 3 /* userdata */) == FFI_OK); 1256 1257 CHECK((*((closure_test_type2)(&cl))) 1258 (1, 2, 3, 4, 127, 5, 6, 8, 9, 10, 11, 12.0, 13, 1259 19.0, 21, 1) == 255); 1260 1261 } 1262 1263 { 1264 1265 cl_arg_types[0] = &ffi_type_float; 1266 cl_arg_types[1] = &ffi_type_float; 1267 cl_arg_types[2] = &ffi_type_float; 1268 cl_arg_types[3] = &ffi_type_float; 1269 cl_arg_types[4] = &ffi_type_float; 1270 cl_arg_types[5] = &ffi_type_float; 1271 cl_arg_types[6] = &ffi_type_float; 1272 cl_arg_types[7] = &ffi_type_float; 1273 cl_arg_types[8] = &ffi_type_double; 1274 cl_arg_types[9] = &ffi_type_uint; 1275 cl_arg_types[10] = &ffi_type_float; 1276 cl_arg_types[11] = &ffi_type_float; 1277 cl_arg_types[12] = &ffi_type_uint; 1278 cl_arg_types[13] = &ffi_type_float; 1279 cl_arg_types[14] = &ffi_type_float; 1280 cl_arg_types[15] = &ffi_type_uint; 1281 cl_arg_types[16] = NULL; 1282 1283 /* Initialize the cif */ 1284 CHECK(ffi_prep_cif(&cif, FFI_DEFAULT_ABI, 16, 1285 &ffi_type_sint, cl_arg_types) == FFI_OK); 1286 1287 CHECK(ffi_prep_closure(&cl, &cif, closure_test_fn3, 1288 (void *) 3 /* userdata */) == FFI_OK); 1289 1290 CHECK((*((closure_test_type3)(&cl))) 1291 (1.1, 2.2, 3.3, 4.4, 5.5, 6.6, 7.7, 8.8, 9, 10, 11.11, 12.0, 13, 1292 19.19, 21.21, 1) == 135); 1293 } 1294 1295 (void) puts("\nFinished FFI_CLOSURES\n"); 1296 723 1297 # endif 724 1298 -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libffi/src/java_raw_api.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 82 82 case FFI_TYPE_UINT8: 83 83 case FFI_TYPE_SINT8: 84 *args = (void*) ((char*)(raw++) + SIZEOF_ARG - 1);84 *args = (void*) ((char*)(raw++) + 3); 85 85 break; 86 86 87 87 case FFI_TYPE_UINT16: 88 88 case FFI_TYPE_SINT16: 89 *args = (void*) ((char*)(raw++) + SIZEOF_ARG - 2); 90 break; 91 92 #if SIZEOF_ARG >= 4 93 case FFI_TYPE_UINT32: 94 case FFI_TYPE_SINT32: 95 *args = (void*) ((char*)(raw++) + SIZEOF_ARG - 4); 96 break; 97 #endif 98 89 *args = (void*) ((char*)(raw++) + 2); 90 break; 91 99 92 #if SIZEOF_ARG == 8 100 93 case FFI_TYPE_UINT64: … … 158 151 { 159 152 case FFI_TYPE_UINT8: 153 #if WORDS_BIGENDIAN 154 *(UINT32*)(raw++) = *(UINT8*) (*args); 155 #else 160 156 (raw++)->uint = *(UINT8*) (*args); 157 #endif 161 158 break; 162 159 163 160 case FFI_TYPE_SINT8: 161 #if WORDS_BIGENDIAN 162 *(SINT32*)(raw++) = *(SINT8*) (*args); 163 #else 164 164 (raw++)->sint = *(SINT8*) (*args); 165 #endif 165 166 break; 166 167 167 168 case FFI_TYPE_UINT16: 169 #if WORDS_BIGENDIAN 170 *(UINT32*)(raw++) = *(UINT16*) (*args); 171 #else 168 172 (raw++)->uint = *(UINT16*) (*args); 173 #endif 169 174 break; 170 175 171 176 case FFI_TYPE_SINT16: 177 #if WORDS_BIGENDIAN 178 *(SINT32*)(raw++) = *(SINT16*) (*args); 179 #else 172 180 (raw++)->sint = *(SINT16*) (*args); 173 break; 174 175 #if SIZEOF_ARG >= 4 181 #endif 182 break; 183 176 184 case FFI_TYPE_UINT32: 185 #if WORDS_BIGENDIAN 186 *(UINT32*)(raw++) = *(UINT32*) (*args); 187 #else 177 188 (raw++)->uint = *(UINT32*) (*args); 189 #endif 178 190 break; 179 191 180 192 case FFI_TYPE_SINT32: 193 #if WORDS_BIGENDIAN 194 *(SINT32*)(raw++) = *(SINT32*) (*args); 195 #else 181 196 (raw++)->sint = *(SINT32*) (*args); 182 break; 183 #endif 184 case FFI_TYPE_FLOAT: 197 #endif 198 break; 199 200 case FFI_TYPE_FLOAT: 185 201 (raw++)->flt = *(FLOAT32*) (*args); 186 202 break; … … 212 228 #if !FFI_NATIVE_RAW_API 213 229 230 static void 231 ffi_java_rvalue_to_raw (ffi_cif *cif, void *rvalue) 232 { 233 #if WORDS_BIGENDIAN && SIZEOF_ARG == 8 234 switch (cif->rtype->type) 235 { 236 case FFI_TYPE_UINT8: 237 case FFI_TYPE_UINT16: 238 case FFI_TYPE_UINT32: 239 *(UINT64 *)rvalue <<= 32; 240 break; 241 242 case FFI_TYPE_SINT8: 243 case FFI_TYPE_SINT16: 244 case FFI_TYPE_SINT32: 245 case FFI_TYPE_INT: 246 *(SINT64 *)rvalue <<= 32; 247 break; 248 249 default: 250 break; 251 } 252 #endif 253 } 254 255 static void 256 ffi_java_raw_to_rvalue (ffi_cif *cif, void *rvalue) 257 { 258 #if WORDS_BIGENDIAN && SIZEOF_ARG == 8 259 switch (cif->rtype->type) 260 { 261 case FFI_TYPE_UINT8: 262 case FFI_TYPE_UINT16: 263 case FFI_TYPE_UINT32: 264 *(UINT64 *)rvalue >>= 32; 265 break; 266 267 case FFI_TYPE_SINT8: 268 case FFI_TYPE_SINT16: 269 case FFI_TYPE_SINT32: 270 case FFI_TYPE_INT: 271 *(SINT64 *)rvalue >>= 32; 272 break; 273 274 default: 275 break; 276 } 277 #endif 278 } 214 279 215 280 /* This is a generic definition of ffi_raw_call, to be used if the … … 228 293 ffi_java_raw_to_ptrarray (cif, raw, avalue); 229 294 ffi_call (cif, fn, rvalue, avalue); 295 ffi_java_rvalue_to_raw (cif, rvalue); 230 296 } 231 297 … … 241 307 ffi_java_ptrarray_to_raw (cif, avalue, raw); 242 308 (*cl->fun) (cif, rvalue, raw, cl->user_data); 309 ffi_java_raw_to_rvalue (cif, rvalue); 243 310 } 244 311 -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libffi/src/m68k/ffi.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 17 17 { 18 18 unsigned int i; 19 int tmp;20 unsigned int avn;21 19 void **p_argv; 22 20 char *argp; … … 24 22 void *struct_value_ptr; 25 23 26 tmp = 0;27 24 argp = stack; 28 25 … … 33 30 struct_value_ptr = NULL; 34 31 35 avn = ecif->cif->nargs;36 32 p_argv = ecif->avalue; 37 33 38 34 for (i = ecif->cif->nargs, p_arg = ecif->cif->arg_types; 39 i != 0 && avn != 0;35 i != 0; 40 36 i--, p_arg++) 41 37 { … … 46 42 argp = (char *) ALIGN (argp, (*p_arg)->alignment); 47 43 48 if (avn != 0)49 {50 avn--;51 44 z = (*p_arg)->size; 52 45 if (z < sizeof (int)) … … 83 76 p_argv++; 84 77 argp += z; 85 }86 78 } 87 79 -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libffi/src/mips/ffi.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 24 24 ----------------------------------------------------------------------- */ 25 25 26 #include <sgidefs.h> 26 27 #include <ffi.h> 27 28 #include <ffi_common.h> … … 51 52 { 52 53 register int i; 53 register int avn;54 54 register void **p_argv; 55 55 register char *argp; … … 81 81 } 82 82 83 avn = ecif->cif->nargs;84 83 p_argv = ecif->avalue; 85 84 86 for (i = ecif->cif->nargs, p_arg = ecif->cif->arg_types; 87 i && avn; 88 i--, p_arg++) 85 for (i = ecif->cif->nargs, p_arg = ecif->cif->arg_types; i; i--, p_arg++) 89 86 { 90 87 size_t z; … … 102 99 #endif 103 100 104 if (avn)105 {106 avn--;107 101 z = (*p_arg)->size; 108 102 if (z < sizeof(SLOT_TYPE_UNSIGNED)) … … 180 174 argp += z; 181 175 FIX_ARGP; 182 }183 176 } 184 177 -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libffi/src/powerpc/aix_closure.S
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 1 1 /* ----------------------------------------------------------------------- 2 aix_closure s.S - Copyright (c) 2002Free Software Foundation, Inc.3 based on darwin_closure s.S2 aix_closure.S - Copyright (c) 2002 2003 Free Software Foundation, Inc. 3 based on darwin_closure.S 4 4 5 5 PowerPC Assembly glue. … … 107 107 /* 32 Bytes (params) */ 108 108 /* 104 Bytes (13*8 from FPR) */ 109 /* 4 Bytes (result) 110 /* 164 Bytes */ 111 112 stwu r1,-164(r1) /* skip over caller save area */ 109 /* 8 Bytes (result) 110 /* 168 Bytes */ 111 112 stwu r1,-176(r1) /* skip over caller save area 113 keep stack aligned to 16 */ 113 114 114 115 /* we want to build up an area for the parameters passed */ 115 116 /* in registers (both floating point and integer) */ 116 117 117 /* we store gpr 3 to gpr 10 (aligned to 4) */118 /* in the parents outgoing area*/119 stw r3, 188(r1)120 stw r4, 192(r1)121 stw r5, 196(r1)122 stw r6, 2 00(r1)123 stw r7, 2 04(r1)124 stw r8, 2 08(r1)125 stw r9, 2 12(r1)126 stw r10, 2 16(r1)118 /* we store gpr 3 to gpr 10 (aligned to 4) 119 in the parents outgoing area */ 120 stw r3, 200(r1) 121 stw r4, 204(r1) 122 stw r5, 208(r1) 123 stw r6, 212(r1) 124 stw r7, 216(r1) 125 stw r8, 220(r1) 126 stw r9, 224(r1) 127 stw r10, 228(r1) 127 128 128 129 /* next save fpr 1 to fpr 13 (aligned to 8) */ … … 149 150 150 151 /* now load up the pointer to the saved gpr registers */ 151 addi r5,r1, 188152 addi r5,r1,200 152 153 153 154 /* now load up the pointer to the saved fpr registers */ … … 156 157 /* now load up the pointer to the outgoing parameter */ 157 158 /* stack in the previous frame */ 158 addi r7,r1,2 20159 addi r7,r1,232 159 160 160 161 /* make the call */ … … 244 245 L..44: 245 246 246 addi r1,r1,1 64/* restore stack pointer */247 addi r1,r1,176 /* restore stack pointer */ 247 248 lwz r0,8(r1) /* get return address */ 248 249 mtlr r0 /* reset link register */ -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libffi/src/powerpc/darwin.S
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 3 3 4 4 PowerPC Assembly glue. 5 6 $Id: darwin.S,v 1.2 2002/01/18 16:22:34 dje Exp $7 5 8 6 Permission is hereby granted, free of charge, to any person obtaining … … 40 38 .align 2 41 39 _ffi_call_DARWIN: 42 mr r12,r8 // We only need r12 until the call, so it doesn't have to be saved... 40 LFB0: 41 mr r12,r8 /* We only need r12 until the call, 42 so it doesn't have to be saved... */ 43 LFB1: 43 44 /* Save the old stack pointer as AP. */ 44 45 mr r8,r1 45 46 LCFI0: 46 47 /* Allocate the stack space we need. */ 47 48 stwux r1,r1,r4 … … 50 51 mflr r9 51 52 52 stw r28,-16(r8) 53 stw r28,-16(r8) 53 54 stw r29,-12(r8) 54 55 stw r30, -8(r8) 55 56 stw r31, -4(r8) 56 57 stw r9, 8(r8) 57 58 stw r9, 8(r8) 58 59 stw r2, 20(r1) 60 LCFI1: 59 61 60 62 /* Save arguments over call... */ 61 mr r31,r5 /* flags, */62 mr r30,r6 /* rvalue, */63 mr r29,r7 /* function address, */64 mr r28,r8 /* our AP. */65 63 mr r31,r5 /* flags, */ 64 mr r30,r6 /* rvalue, */ 65 mr r29,r7 /* function address, */ 66 mr r28,r8 /* our AP. */ 67 LCFI2: 66 68 /* Call ffi_prep_args. */ 67 69 mr r4,r1 … … 146 148 stfs f1,0(r30) 147 149 b L(done_return_value) 148 //END(_ffi_call_DARWIN) 150 LFE1: 151 /* END(_ffi_call_DARWIN) */ 149 152 150 153 /* Provide a null definition of _ffi_call_AIX. */ … … 156 159 _ffi_call_AIX: 157 160 blr 158 //END(_ffi_call_AIX) 159 161 /* END(_ffi_call_AIX) */ 162 163 .data 164 .section __TEXT,__eh_frame 165 Lframe1: 166 .set L$set$0,LECIE1-LSCIE1 167 .long L$set$0 ; Length of Common Information Entry 168 LSCIE1: 169 .long 0x0 ; CIE Identifier Tag 170 .byte 0x1 ; CIE Version 171 .ascii "zR\0" ; CIE Augmentation 172 .byte 0x1 ; uleb128 0x1; CIE Code Alignment Factor 173 .byte 0x7c ; sleb128 -4; CIE Data Alignment Factor 174 .byte 0x41 ; CIE RA Column 175 .byte 0x1 ; uleb128 0x1; Augmentation size 176 .byte 0x10 ; FDE Encoding (pcrel) 177 .byte 0xc ; DW_CFA_def_cfa 178 .byte 0x1 ; uleb128 0x1 179 .byte 0x0 ; uleb128 0x0 180 .align 2 181 LECIE1: 182 LSFDE1: 183 .set L$set$1,LEFDE1-LASFDE1 184 .long L$set$1 ; FDE Length 185 LASFDE1: 186 .set L$set$2,LASFDE1-Lframe1 187 .long L$set$2 ; FDE CIE offset 188 .long LFB0-. ; FDE initial location 189 .set L$set$3,LFE1-LFB0 190 .long L$set$3 ; FDE address range 191 .byte 0x0 ; uleb128 0x0; Augmentation size 192 .byte 0x4 ; DW_CFA_advance_loc4 193 .set L$set$4,LCFI0-LFB1 194 .long L$set$4 195 .byte 0xd ; DW_CFA_def_cfa_register 196 .byte 0x08 ; uleb128 0x08 197 .byte 0x4 ; DW_CFA_advance_loc4 198 .set L$set$5,LCFI1-LCFI0 199 .long L$set$5 200 .byte 0x11 ; DW_CFA_offset_extended_sf 201 .byte 0x41 ; uleb128 0x41 202 .byte 0x7e ; sleb128 -2 203 .byte 0x9f ; DW_CFA_offset, column 0x1f 204 .byte 0x1 ; uleb128 0x1 205 .byte 0x9e ; DW_CFA_offset, column 0x1e 206 .byte 0x2 ; uleb128 0x2 207 .byte 0x9d ; DW_CFA_offset, column 0x1d 208 .byte 0x3 ; uleb128 0x3 209 .byte 0x9c ; DW_CFA_offset, column 0x1c 210 .byte 0x4 ; uleb128 0x4 211 .byte 0x4 ; DW_CFA_advance_loc4 212 .set L$set$6,LCFI2-LCFI1 213 .long L$set$6 214 .byte 0xd ; DW_CFA_def_cfa_register 215 .byte 0x1c ; uleb128 0x1c 216 .align 2 217 LEFDE1: 218 -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libffi/src/powerpc/darwin_closure.S
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 1 1 /* ----------------------------------------------------------------------- 2 darwin_closure s.S - Copyright (c) 2002 Free Software Foundation, Inc.3 based on ppc_closures.S2 darwin_closure.S - Copyright (c) 2002 2003 Free Software Foundation, 3 Inc. based on ppc_closure.S 4 4 5 5 PowerPC Assembly glue. … … 38 38 .align 2 39 39 _ffi_closure_ASM: 40 41 mflr r0 /* extract return address */ 42 stw r0, 8(r1) /* save the return address */ 43 44 /* 24 Bytes (Linkage Area) */ 45 /* 32 Bytes (outgoing parameter area, always reserved) */ 46 /* 104 Bytes (13*8 from FPR) */ 47 /* 4 Bytes (result) 48 /* 164 Bytes */ 49 50 stwu r1,-164(r1) /* skip over caller save area */ 51 52 /* we want to build up an area for the parameters passed */ 53 /* in registers (both floating point and integer) */ 54 55 /* we store gpr 3 to gpr 10 (aligned to 4) */ 56 /* in the parents outgoing area */ 57 stw r3, 188(r1) 58 stw r4, 192(r1) 59 stw r5, 196(r1) 60 stw r6, 200(r1) 61 stw r7, 204(r1) 62 stw r8, 208(r1) 63 stw r9, 212(r1) 64 stw r10, 216(r1) 40 LFB1: 41 mflr r0 /* extract return address */ 42 stw r0, 8(r1) /* save the return address */ 43 LCFI0: 44 /* 24 Bytes (Linkage Area) 45 32 Bytes (outgoing parameter area, always reserved) 46 104 Bytes (13*8 from FPR) 47 8 Bytes (result) 48 168 Bytes */ 49 50 stwu r1,-176(r1) /* skip over caller save area 51 keep stack aligned to 16 */ 52 LCFI1: 53 /* we want to build up an area for the parameters passed 54 in registers (both floating point and integer) */ 55 56 /* we store gpr 3 to gpr 10 (aligned to 4) 57 in the parents outgoing area */ 58 stw r3, 200(r1) 59 stw r4, 204(r1) 60 stw r5, 208(r1) 61 stw r6, 212(r1) 62 stw r7, 216(r1) 63 stw r8, 220(r1) 64 stw r9, 224(r1) 65 stw r10, 228(r1) 65 66 66 67 /* we save fpr 1 to fpr 13 (aligned to 8) */ … … 86 87 addi r4,r1,160 87 88 88 /* now load up the pointer to the saved gpr registers */89 addi r5,r1, 18889 /* now load up the pointer to the saved gpr registers */ 90 addi r5,r1,200 90 91 91 92 /* now load up the pointer to the saved fpr registers */ 92 93 addi r6,r1,56 93 94 94 /* now load up the pointer to the outgoing parameter */95 /* stack in the previous frame*/96 addi r7,r1,2 2095 /* now load up the pointer to the outgoing parameter 96 stack in the previous frame */ 97 addi r7,r1,232 97 98 98 99 /* make the call */ … … 112 113 add r3,r3,r4 /* add contents of table to table address */ 113 114 mtctr r3 114 bctr /* jump to it */ 115 bctr /* jump to it */ 116 LFE1: 117 .align 2 115 118 116 119 .L60: … … 181 184 .L44: 182 185 183 addi r1,r1,1 64 /* restore stack pointer*/184 lwz r0,8(r1) /* get return address */185 mtlr r0 /* reset link register */186 addi r1,r1,176 /* restore stack pointer */ 187 lwz r0,8(r1) /* get return address */ 188 mtlr r0 /* reset link register */ 186 189 blr 187 190 188 /* END(ffi_closure_ASM) */ 189 191 /* END(ffi_closure_ASM) */ 192 193 .data 194 .section __TEXT,__eh_frame 195 Lframe1: 196 .set L$set$0,LECIE1-LSCIE1 197 .long L$set$0 ; Length of Common Information Entry 198 LSCIE1: 199 .long 0x0 ; CIE Identifier Tag 200 .byte 0x1 ; CIE Version 201 .ascii "zR\0" ; CIE Augmentation 202 .byte 0x1 ; uleb128 0x1; CIE Code Alignment Factor 203 .byte 0x7c ; sleb128 -4; CIE Data Alignment Factor 204 .byte 0x41 ; CIE RA Column 205 .byte 0x1 ; uleb128 0x1; Augmentation size 206 .byte 0x10 ; FDE Encoding (pcrel) 207 .byte 0xc ; DW_CFA_def_cfa 208 .byte 0x1 ; uleb128 0x1 209 .byte 0x0 ; uleb128 0x0 210 .align 2 211 LECIE1: 212 LSFDE1: 213 .set L$set$1,LEFDE1-LASFDE1 214 .long L$set$1 ; FDE Length 215 216 LASFDE1: 217 .set L$set$2,LASFDE1-Lframe1 218 .long L$set$2 ; FDE CIE offset 219 .long LFB1-. ; FDE initial location 220 .set L$set$3,LFE1-LFB1 221 .long L$set$3 ; FDE address range 222 .byte 0x0 ; uleb128 0x0; Augmentation size 223 .byte 0x4 ; DW_CFA_advance_loc4 224 .set L$set$3,LCFI1-LCFI0 225 .long L$set$3 226 .byte 0xe ; DW_CFA_def_cfa_offset 227 .byte 176,1 ; uleb128 176 228 .byte 0x4 ; DW_CFA_advance_loc4 229 .set L$set$4,LCFI0-LFB1 230 .long L$set$4 231 .byte 0x11 ; DW_CFA_offset_extended_sf 232 .byte 0x41 ; uleb128 0x41 233 .byte 0x7e ; sleb128 -2 234 .align 2 235 LEFDE1: 236 -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libffi/src/powerpc/ffi.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 138 138 { 139 139 case FFI_TYPE_FLOAT: 140 double_tmp = *(float *)*p_argv; 141 if (fparg_count >= NUM_FPR_ARG_REGISTERS) 142 { 143 *(float *)next_arg = (float)double_tmp; 144 next_arg += 1; 145 } 146 else 147 *fpr_base++ = double_tmp; 148 fparg_count++; 149 FFI_ASSERT(flags & FLAG_FP_ARGUMENTS); 150 break; 151 140 152 case FFI_TYPE_DOUBLE: 141 if ((*ptr)->type == FFI_TYPE_FLOAT) 142 double_tmp = *(float *)*p_argv; 143 else 144 double_tmp = *(double *)*p_argv; 153 double_tmp = *(double *)*p_argv; 145 154 146 155 if (fparg_count >= NUM_FPR_ARG_REGISTERS) … … 321 330 { 322 331 case FFI_TYPE_FLOAT: 332 fparg_count++; 333 /* floating singles are not 8-aligned on stack */ 334 break; 335 323 336 case FFI_TYPE_DOUBLE: 324 337 fparg_count++; … … 613 626 /* unfortunately float values are stored as doubles 614 627 * in the ffi_closure_SYSV code (since we don't check 615 * the type in that routine). This is also true 616 * of floats passed on the outgoing parameter stack. 617 * Also, on the outgoing stack all values are aligned 618 * to 8 619 * 620 * Don't you just love the simplicity of this ABI! 628 * the type in that routine). 621 629 */ 622 630 … … 624 632 625 633 if (nf < 8) { 626 634 temp = *(double*)pfr; 627 635 *(float*)pfr = (float)temp; 628 636 avalue[i] = pfr; 629 637 nf++; 630 638 pfr+=2; … … 635 643 * naughty thing to do but... 636 644 */ 637 if (((long)pst) & 4) pst++;638 temp = *(double*)pst;639 *(float*)pst = (float)temp;640 645 avalue[i] = pst; 641 646 nf++; 642 pst+= 2;647 pst+=1; 643 648 } 644 649 break; -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libffi/src/powerpc/ffi_darwin.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 6 6 Darwin ABI support (c) 2001 John Hornkvist 7 7 AIX ABI support (c) 2002 Free Software Foundation, Inc. 8 9 $Id: ffi_darwin.c,v 1.3.2.1 2002/03/12 22:35:56 tromey Exp $10 8 11 9 Permission is hereby granted, free of charge, to any person obtaining … … 413 411 | saved TOC pointer 4 | 414 412 +---------------------------------------+ 24 415 | always reserved 8*4=32 (revious GPRs)|413 | always reserved 8*4=32 (previous GPRs)| 416 414 | according to the linkage convention | 417 | from AIX 415 | from AIX | 418 416 +---------------------------------------+ 56 419 | our FPR area 13*8=104 420 | f1 421 | . 422 | f13 417 | our FPR area 13*8=104 | 418 | f1 | 419 | . | 420 | f13 | 423 421 +---------------------------------------+ 160 424 | result area 4 | 425 SP current --> +---------------------------------------+ 164 <- parent frame 422 | result area 8 | 423 +---------------------------------------+ 168 424 | alignement to the next multiple of 16 | 425 SP current --> +---------------------------------------+ 176 <- parent frame 426 426 | back chain to caller 4 | 427 +---------------------------------------+ 1 68427 +---------------------------------------+ 180 428 428 | saved CR 4 | 429 +---------------------------------------+ 1 72429 +---------------------------------------+ 184 430 430 | saved LR 4 | 431 +---------------------------------------+ 1 76431 +---------------------------------------+ 188 432 432 | reserved for compilers 4 | 433 +---------------------------------------+ 1 80433 +---------------------------------------+ 192 434 434 | reserved for binders 4 | 435 +---------------------------------------+ 1 84435 +---------------------------------------+ 196 436 436 | saved TOC pointer 4 | 437 +---------------------------------------+ 188437 +---------------------------------------+ 200 438 438 | always reserved 8*4=32 we store our | 439 | GPRs here 440 | r3 441 | . 442 | r10 443 +---------------------------------------+ 2 20444 | PST area, overflow part 439 | GPRs here | 440 | r3 | 441 | . | 442 | r10 | 443 +---------------------------------------+ 232 444 | PST area, overflow part | 445 445 +---------------------------------------+ xxx 446 | ???? 446 | ???? | 447 447 +---------------------------------------+ xxx 448 448 … … 456 456 unsigned int *tramp; 457 457 struct ffi_aix_trampoline_struct *tramp_aix; 458 aix_fd *fd; 458 459 459 460 switch (cif->abi) … … 487 488 488 489 tramp_aix = (struct ffi_aix_trampoline_struct *) (closure->tramp); 489 aix_fd *fd = (aix_fd *)(void *)ffi_closure_ASM;490 fd = (aix_fd *)(void *)ffi_closure_ASM; 490 491 491 492 FFI_ASSERT (cif->abi == FFI_AIX); -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libffi/src/prep_cif.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 104 104 FFI_ASSERT(ffi_type_test(cif->rtype)); 105 105 106 #ifndef M68K 106 /* x86-64 and s390 stack space allocation is handled in prep_machdep. */ 107 #if !defined M68K && !defined __x86_64__ && !defined S390 107 108 /* Make space for the return structure pointer */ 108 109 if (cif->rtype->type == FFI_TYPE_STRUCT … … 123 124 return FFI_BAD_TYPEDEF; 124 125 126 #if !defined __x86_64__ && !defined S390 125 127 #ifdef SPARC 126 128 if (((*ptr)->type == FFI_TYPE_STRUCT … … 138 140 bytes += STACK_ARG_SIZE((*ptr)->size); 139 141 } 142 #endif 140 143 } 141 144 -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libffi/src/sparc/ffi.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 1 1 /* ----------------------------------------------------------------------- 2 ffi.c - Copyright (c) 1996 Cygnus Solutions2 ffi.c - Copyright (c) 1996, 2003 Cygnus Solutions 3 3 4 4 Sparc Foreign Function Interface … … 29 29 #include <stdlib.h> 30 30 31 #ifdef SPARC64 32 extern void ffi_closure_v9(void); 33 #else 34 extern void ffi_closure_v8(void); 35 #endif 36 31 37 /* ffi_prep_args is called by the assembly routine once stack space 32 38 has been allocated for the function's arguments */ … … 35 41 { 36 42 int i; 37 int tmp;38 int avn;39 43 void **p_argv; 40 44 char *argp; 41 45 ffi_type **p_arg; 42 43 tmp = 0;44 46 45 47 /* Skip 16 words for the window save area */ … … 67 69 #endif 68 70 69 avn = ecif->cif->nargs;70 71 p_argv = ecif->avalue; 71 72 72 for (i = ecif->cif->nargs, p_arg = ecif->cif->arg_types; 73 i && avn; 74 i--, p_arg++) 73 for (i = ecif->cif->nargs, p_arg = ecif->cif->arg_types; i; i--, p_arg++) 75 74 { 76 75 size_t z; 77 76 78 if (avn)79 {80 avn--;81 77 if ((*p_arg)->type == FFI_TYPE_STRUCT 82 78 #if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE … … 123 119 p_argv++; 124 120 argp += z; 125 }126 121 } 127 122 … … 421 416 422 417 } 418 419 ffi_status 420 ffi_prep_closure (ffi_closure* closure, 421 ffi_cif* cif, 422 void (*fun)(ffi_cif*, void*, void**, void*), 423 void *user_data) 424 { 425 unsigned int *tramp = (unsigned int *) &closure->tramp[0]; 426 unsigned long fn; 427 unsigned long ctx = (unsigned long) closure; 428 429 #ifdef SPARC64 430 /* Trampoline address is equal to the closure address. We take advantage 431 of that to reduce the trampoline size by 8 bytes. */ 432 FFI_ASSERT (cif->abi == FFI_V9); 433 fn = (unsigned long) ffi_closure_v9; 434 tramp[0] = 0x83414000; /* rd %pc, %g1 */ 435 tramp[1] = 0xca586010; /* ldx [%g1+16], %g5 */ 436 tramp[2] = 0x81c14000; /* jmp %g5 */ 437 tramp[3] = 0x01000000; /* nop */ 438 *((unsigned long *) &tramp[4]) = fn; 439 #else 440 FFI_ASSERT (cif->abi == FFI_V8); 441 fn = (unsigned long) ffi_closure_v8; 442 tramp[0] = 0x03000000 | fn >> 10; /* sethi %hi(fn), %g1 */ 443 tramp[1] = 0x05000000 | ctx >> 10; /* sethi %hi(ctx), %g2 */ 444 tramp[2] = 0x81c06000 | (fn & 0x3ff); /* jmp %g1+%lo(fn) */ 445 tramp[3] = 0x8410a000 | (ctx & 0x3ff);/* or %g2, %lo(ctx) */ 446 #endif 447 448 closure->cif = cif; 449 closure->fun = fun; 450 closure->user_data = user_data; 451 452 /* Flush the Icache. FIXME: alignment isn't certain, assume 8 bytes */ 453 #ifdef SPARC64 454 asm volatile ("flush %0" : : "r" (closure) : "memory"); 455 asm volatile ("flush %0" : : "r" (((char *) closure) + 8) : "memory"); 456 #else 457 asm volatile ("iflush %0" : : "r" (closure) : "memory"); 458 asm volatile ("iflush %0" : : "r" (((char *) closure) + 8) : "memory"); 459 #endif 460 461 return FFI_OK; 462 } 463 464 int 465 ffi_closure_sparc_inner(ffi_closure *closure, 466 void *rvalue, unsigned long *gpr, double *fpr) 467 { 468 ffi_cif *cif; 469 void **avalue; 470 ffi_type **arg_types; 471 int i, avn, argn; 472 473 cif = closure->cif; 474 avalue = alloca(cif->nargs * sizeof(void *)); 475 476 argn = 0; 477 478 /* Copy the caller's structure return address to that the closure 479 returns the data directly to the caller. */ 480 if (cif->flags == FFI_TYPE_STRUCT) 481 { 482 rvalue = (void *) gpr[0]; 483 argn = 1; 484 } 485 486 i = 0; 487 avn = cif->nargs; 488 arg_types = cif->arg_types; 489 490 /* Grab the addresses of the arguments from the stack frame. */ 491 while (i < avn) 492 { 493 /* Assume big-endian. FIXME */ 494 argn += ALIGN(arg_types[i]->size, SIZEOF_ARG) / SIZEOF_ARG; 495 496 #ifdef SPARC64 497 if (i < 6 && (arg_types[i]->type == FFI_TYPE_FLOAT 498 || arg_types[i]->type == FFI_TYPE_DOUBLE 499 #if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE 500 || arg_types[i]->type == FFI_TYPE_LONGDOUBLE 501 #endif 502 )) 503 avalue[i] = ((char *) &fpr[argn]) - arg_types[i]->size; 504 else 505 #endif 506 avalue[i] = ((char *) &gpr[argn]) - arg_types[i]->size; 507 i++; 508 } 509 510 /* Invoke the closure. */ 511 (closure->fun) (cif, rvalue, avalue, closure->user_data); 512 513 /* Tell ffi_closure_sparc how to perform return type promotions. */ 514 return cif->rtype->type; 515 } -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libffi/src/sparc/v8.S
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 1 1 /* ----------------------------------------------------------------------- 2 v8.S - Copyright (c) 1996, 1997 Cygnus Solutions2 v8.S - Copyright (c) 1996, 1997, 2003 Cygnus Solutions 3 3 4 4 Sparc Foreign Function Interface … … 94 94 .ffi_call_V8_end: 95 95 .size ffi_call_V8,.ffi_call_V8_end-ffi_call_V8 96 97 98 #define STACKFRAME 104 /* 16*4 register window + 99 1*4 struct return + 100 6*4 args backing store + 101 3*4 locals */ 102 103 /* ffi_closure_v8(...) 104 105 Receives the closure argument in %g2. */ 106 107 .text 108 .align 8 109 .globl ffi_closure_v8 110 111 ffi_closure_v8: 112 #ifdef HAVE_AS_REGISTER_PSEUDO_OP 113 .register %g2, #scratch 114 #endif 115 .LLFB2: 116 save %sp, -STACKFRAME, %sp 117 .LLCFI1: 118 119 ! Store all of the potential argument registers in va_list format. 120 st %i0, [%fp+68+0] 121 st %i1, [%fp+68+4] 122 st %i2, [%fp+68+8] 123 st %i3, [%fp+68+12] 124 st %i4, [%fp+68+16] 125 st %i5, [%fp+68+20] 126 127 ! Call ffi_closure_sparc_inner to do the bulk of the work. 128 mov %g2, %o0 129 add %fp, -8, %o1 130 add %fp, 68, %o2 131 call ffi_closure_sparc_inner 132 mov 0, %o3 133 134 ! Load up the return value in the proper type. 135 cmp %o0, FFI_TYPE_VOID 136 be done1 137 138 cmp %o0, FFI_TYPE_FLOAT 139 be,a done1 140 ld [%fp-8], %f0 141 142 cmp %o0, FFI_TYPE_DOUBLE 143 be,a done1 144 ldd [%fp-8], %f0 145 146 cmp %o0, FFI_TYPE_SINT64 147 be,a integer 148 ld [%fp-4], %i1 149 150 cmp %o0, FFI_TYPE_UINT64 151 be,a integer 152 ld [%fp-4], %i1 153 154 integer: 155 ld [%fp-8], %i0 156 157 done1: 158 ret 159 restore 160 .LLFE2: 161 162 .ffi_closure_v8_end: 163 .size ffi_closure_v8,.ffi_closure_v8_end-ffi_closure_v8 96 164 97 165 #ifdef SPARC64 … … 149 217 .align WS 150 218 .LLEFDE1: 219 .LLSFDE2: 220 .uaword .LLEFDE2-.LLASFDE2 ! FDE Length 221 .LLASFDE2: 222 .uaword .LLASFDE2-.LLframe1 ! FDE CIE offset 223 #ifdef HAVE_AS_SPARC_UA_PCREL 224 .uaword %r_disp32(.LLFB2) 225 .uaword .LLFE2-.LLFB2 ! FDE address range 226 #else 227 .align WS 228 .nword .LLFB2 229 .uanword .LLFE2-.LLFB2 ! FDE address range 230 #endif 231 .byte 0x0 ! uleb128 0x0; Augmentation size 232 .byte 0x4 ! DW_CFA_advance_loc4 233 .uaword .LLCFI1-.LLFB2 234 .byte 0xd ! DW_CFA_def_cfa_register 235 .byte 0x1e ! uleb128 0x1e 236 .byte 0x2d ! DW_CFA_GNU_window_save 237 .byte 0x9 ! DW_CFA_register 238 .byte 0xf ! uleb128 0xf 239 .byte 0x1f ! uleb128 0x1f 240 .align WS 241 .LLEFDE2: -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libffi/src/sparc/v9.S
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 1 1 /* ----------------------------------------------------------------------- 2 v9.S - Copyright (c) 2000 Cygnus Solutions2 v9.S - Copyright (c) 2000, 2003 Cygnus Solutions 3 3 4 4 Sparc 64bit Foreign Function Interface … … 100 100 be,pn %icc, dostruct 101 101 102 102 cmp %i3, FFI_TYPE_LONGDOUBLE 103 103 bne,pt %icc, done 104 104 nop … … 125 125 .ffi_call_V9_end: 126 126 .size ffi_call_V9,.ffi_call_V9_end-ffi_call_V9 127 128 129 #define STACKFRAME 240 /* 16*8 register window + 130 6*8 args backing store + 131 8*8 locals */ 132 #define FP %fp+STACK_BIAS 133 134 /* ffi_closure_v9(...) 135 136 Receives the closure argument in %g1. */ 137 138 .text 139 .align 8 140 .globl ffi_closure_v9 141 142 ffi_closure_v9: 143 .LLFB2: 144 save %sp, -STACKFRAME, %sp 145 .LLCFI1: 146 147 ! Store all of the potential argument registers in va_list format. 148 stx %i0, [FP+128+0] 149 stx %i1, [FP+128+8] 150 stx %i2, [FP+128+16] 151 stx %i3, [FP+128+24] 152 stx %i4, [FP+128+32] 153 stx %i5, [FP+128+40] 154 155 ! Store possible floating point argument registers too. 156 std %f0, [FP-48] 157 std %f2, [FP-40] 158 std %f4, [FP-32] 159 std %f6, [FP-24] 160 std %f8, [FP-16] 161 std %f10, [FP-8] 162 163 ! Call ffi_closure_sparc_inner to do the bulk of the work. 164 mov %g1, %o0 165 add %fp, STACK_BIAS-64, %o1 166 add %fp, STACK_BIAS+128, %o2 167 call ffi_closure_sparc_inner 168 add %fp, STACK_BIAS-48, %o3 169 170 ! Load up the return value in the proper type. 171 cmp %o0, FFI_TYPE_VOID 172 be,pn %icc, done1 173 174 cmp %o0, FFI_TYPE_FLOAT 175 be,a,pn %icc, done1 176 ld [FP-64], %f0 177 178 cmp %o0, FFI_TYPE_DOUBLE 179 be,a,pn %icc, done1 180 ldd [FP-64], %f0 181 182 cmp %o0, FFI_TYPE_LONGDOUBLE 183 be,a,pn %icc, longdouble1 184 ldd [FP-64], %f0 185 186 cmp %o0, FFI_TYPE_STRUCT 187 be,pn %icc, struct1 188 189 ! FFI_TYPE_UINT64 | FFI_TYPE_SINT64 | FFI_TYPE_POINTER 190 ldx [FP-64], %i0 191 192 done1: 193 ret 194 restore 195 196 struct1: 197 ldx [FP-56], %i2 198 ret 199 restore 200 201 longdouble1: 202 ldd [FP-56], %f2 203 ret 204 restore 205 .LLFE2: 206 207 .ffi_closure_v9_end: 208 .size ffi_closure_v9,.ffi_closure_v9_end-ffi_closure_v9 127 209 128 210 .section ".eh_frame",#alloc,#write … … 170 252 .align 8 171 253 .LLEFDE1: 172 173 #endif 254 .LLSFDE2: 255 .uaword .LLEFDE2-.LLASFDE2 ! FDE Length 256 .LLASFDE2: 257 .uaword .LLASFDE2-.LLframe1 ! FDE CIE offset 258 #ifdef HAVE_AS_SPARC_UA_PCREL 259 .uaword %r_disp32(.LLFB2) 260 .uaword .LLFE2-.LLFB2 ! FDE address range 261 #else 262 .align 8 263 .xword .LLFB2 264 .uaxword .LLFE2-.LLFB2 ! FDE address range 265 #endif 266 .byte 0x0 ! uleb128 0x0; Augmentation size 267 .byte 0x4 ! DW_CFA_advance_loc4 268 .uaword .LLCFI1-.LLFB2 269 .byte 0xd ! DW_CFA_def_cfa_register 270 .byte 0x1e ! uleb128 0x1e 271 .byte 0x2d ! DW_CFA_GNU_window_save 272 .byte 0x9 ! DW_CFA_register 273 .byte 0xf ! uleb128 0xf 274 .byte 0x1f ! uleb128 0x1f 275 .align 8 276 .LLEFDE2: 277 #endif -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libffi/src/types.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 43 43 FFI_INTEGRAL_TYPEDEF(float, 4, 4, FFI_TYPE_FLOAT); 44 44 45 #if defined ALPHA || defined SPARC64 45 #if defined ALPHA || defined SPARC64 || defined X86_64 || defined S390X \ 46 || defined IA64 46 47 47 48 FFI_INTEGRAL_TYPEDEF(pointer, 8, 8, FFI_TYPE_POINTER); … … 53 54 #endif 54 55 55 #if def X8656 #if defined X86 || defined X86_WIN32 || defined ARM || defined M68K 56 57 57 58 FFI_INTEGRAL_TYPEDEF(uint64, 8, 4, FFI_TYPE_UINT64); 58 59 FFI_INTEGRAL_TYPEDEF(sint64, 8, 4, FFI_TYPE_SINT64); 59 60 60 #elif defined X86_WIN32 61 62 FFI_INTEGRAL_TYPEDEF(uint64, 8, 4, FFI_TYPE_UINT64); 63 FFI_INTEGRAL_TYPEDEF(sint64, 8, 4, FFI_TYPE_SINT64); 64 65 #elif defined ARM 66 67 FFI_INTEGRAL_TYPEDEF(uint64, 8, 4, FFI_TYPE_UINT64); 68 FFI_INTEGRAL_TYPEDEF(sint64, 8, 4, FFI_TYPE_SINT64); 69 70 #elif defined M68K 61 #elif defined SH 71 62 72 63 FFI_INTEGRAL_TYPEDEF(uint64, 8, 4, FFI_TYPE_UINT64); … … 81 72 82 73 83 #ifdef X86 84 85 FFI_INTEGRAL_TYPEDEF(double, 8, 4, FFI_TYPE_DOUBLE); 86 FFI_INTEGRAL_TYPEDEF(longdouble, 12, 4, FFI_TYPE_LONGDOUBLE); 87 88 #elif defined X86_WIN32 74 #if defined X86 || defined X86_WIN32 || defined M68K 89 75 90 76 FFI_INTEGRAL_TYPEDEF(double, 8, 4, FFI_TYPE_DOUBLE); … … 96 82 FFI_INTEGRAL_TYPEDEF(longdouble, 8, 4, FFI_TYPE_LONGDOUBLE); 97 83 98 #elif defined M68K84 #elif defined SH 99 85 100 86 FFI_INTEGRAL_TYPEDEF(double, 8, 4, FFI_TYPE_DOUBLE); 101 FFI_INTEGRAL_TYPEDEF(longdouble, 12, 4, FFI_TYPE_LONGDOUBLE);87 FFI_INTEGRAL_TYPEDEF(longdouble, 8, 4, FFI_TYPE_LONGDOUBLE); 102 88 103 89 #elif defined SPARC 104 90 105 91 FFI_INTEGRAL_TYPEDEF(double, 8, 8, FFI_TYPE_DOUBLE); 92 #ifdef SPARC64 93 FFI_INTEGRAL_TYPEDEF(longdouble, 16, 16, FFI_TYPE_LONGDOUBLE); 94 #else 95 FFI_INTEGRAL_TYPEDEF(longdouble, 16, 8, FFI_TYPE_LONGDOUBLE); 96 #endif 106 97 107 # ifdef SPARC6498 #elif defined X86_64 108 99 100 FFI_INTEGRAL_TYPEDEF(double, 8, 8, FFI_TYPE_DOUBLE); 109 101 FFI_INTEGRAL_TYPEDEF(longdouble, 16, 16, FFI_TYPE_LONGDOUBLE); 110 111 #else112 113 FFI_INTEGRAL_TYPEDEF(longdouble, 16, 8, FFI_TYPE_LONGDOUBLE);114 115 #endif116 102 117 103 #else -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libffi/src/x86/ffi.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 1 1 /* ----------------------------------------------------------------------- 2 ffi.c - Copyright (c) 1996, 1998, 1999 Cygnus Solutions 2 ffi.c - Copyright (c) 1996, 1998, 1999, 2001 Red Hat, Inc. 3 Copyright (c) 2002 Ranjit Mathew 4 Copyright (c) 2002 Bo Thorsen 5 Copyright (c) 2002 Roger Sayle 3 6 4 7 x86 Foreign Function Interface … … 24 27 ----------------------------------------------------------------------- */ 25 28 29 #ifndef __x86_64__ 30 26 31 #include <ffi.h> 27 32 #include <ffi_common.h> … … 37 42 { 38 43 register unsigned int i; 39 register int tmp;40 44 register void **p_argv; 41 45 register char *argp; 42 46 register ffi_type **p_arg; 43 47 44 tmp = 0;45 48 argp = stack; 46 49 … … 149 152 /*@=exportheader@*/ 150 153 154 #ifdef X86_WIN32 155 /*@-declundef@*/ 156 /*@-exportheader@*/ 157 extern void ffi_call_STDCALL(void (*)(char *, extended_cif *), 158 /*@out@*/ extended_cif *, 159 unsigned, unsigned, 160 /*@out@*/ unsigned *, 161 void (*fn)()); 162 /*@=declundef@*/ 163 /*@=exportheader@*/ 164 #endif /* X86_WIN32 */ 165 151 166 void ffi_call(/*@dependent@*/ ffi_cif *cif, 152 167 void (*fn)(), … … 181 196 /*@=usedef@*/ 182 197 break; 198 #ifdef X86_WIN32 199 case FFI_STDCALL: 200 /*@-usedef@*/ 201 ffi_call_STDCALL(ffi_prep_args, &ecif, cif->bytes, 202 cif->flags, ecif.rvalue, fn); 203 /*@=usedef@*/ 204 break; 205 #endif /* X86_WIN32 */ 183 206 default: 184 207 FFI_ASSERT(0); … … 192 215 static void ffi_prep_incoming_args_SYSV (char *stack, void **ret, 193 216 void** args, ffi_cif* cif); 194 static void ffi_closure_SYSV (); 195 static void ffi_closure_raw_SYSV (); 196 197 /* This function is jumped to by the trampoline, on entry, %ecx (a 198 * caller-save register) holds the address of the closure. 199 * Clearly, this requires __GNUC__, so perhaps we should translate this 200 * into an assembly file if this is to be distributed with ffi. 201 */ 217 static void ffi_closure_SYSV (ffi_closure *) 218 __attribute__ ((regparm(1))); 219 static void ffi_closure_raw_SYSV (ffi_raw_closure *) 220 __attribute__ ((regparm(1))); 221 222 /* This function is jumped to by the trampoline */ 202 223 203 224 static void 204 ffi_closure_SYSV () 225 ffi_closure_SYSV (closure) 226 ffi_closure *closure; 205 227 { 206 228 // this is our return value storage … … 208 230 209 231 // our various things... 210 void *args;211 232 ffi_cif *cif; 212 233 void **arg_area; 213 ffi_closure *closure;214 234 unsigned short rtype; 215 235 void *resp = (void*)&res; 216 217 /* grab the trampoline context pointer */ 218 asm ("movl %%ecx,%0" : "=r" (closure)); 219 236 void *args = __builtin_dwarf_cfa (); 237 220 238 cif = closure->cif; 221 239 arg_area = (void**) alloca (cif->nargs * sizeof (void*)); 222 asm ("leal 8(%%ebp),%0" : "=q" (args));223 240 224 241 /* this call will initialize ARG_AREA, such that each … … 267 284 { 268 285 register unsigned int i; 269 register int tmp;270 286 register void **p_argv; 271 287 register char *argp; 272 288 register ffi_type **p_arg; 273 289 274 tmp = 0;275 290 argp = stack; 276 291 … … 282 297 p_argv = avalue; 283 298 284 for (i = cif->nargs, p_arg = cif->arg_types; i != 0; i--, p_arg++)299 for (i = cif->nargs, p_arg = cif->arg_types; (i != 0); i--, p_arg++) 285 300 { 286 301 size_t z; 287 302 288 303 /* Align if necessary */ 289 if (((*p_arg)->alignment - 1) & (unsigned) argp) 304 if (((*p_arg)->alignment - 1) & (unsigned) argp) { 290 305 argp = (char *) ALIGN(argp, (*p_arg)->alignment); 306 } 291 307 292 308 z = (*p_arg)->size; … … 299 315 argp += z; 300 316 } 301 317 302 318 return; 303 319 } … … 309 325 unsigned int __fun = (unsigned int)(FUN); \ 310 326 unsigned int __ctx = (unsigned int)(CTX); \ 311 unsigned int __dis = __fun - ((unsigned int) __tramp + 10); \312 *(unsigned char*) &__tramp[0] = 0xb 9; \313 *(unsigned int*) &__tramp[1] = __ctx; \314 *(unsigned char *)&__tramp[5] = 0xe9; \315 *(unsigned int*) &__tramp[6] = __dis; \327 unsigned int __dis = __fun - ((unsigned int) __tramp + FFI_TRAMPOLINE_SIZE); \ 328 *(unsigned char*) &__tramp[0] = 0xb8; \ 329 *(unsigned int*) &__tramp[1] = __ctx; /* movl __ctx, %eax */ \ 330 *(unsigned char *) &__tramp[5] = 0xe9; \ 331 *(unsigned int*) &__tramp[6] = __dis; /* jmp __fun */ \ 316 332 }) 317 333 … … 343 359 344 360 static void 345 ffi_closure_raw_SYSV () 361 ffi_closure_raw_SYSV (closure) 362 ffi_raw_closure *closure; 346 363 { 347 364 // this is our return value storage … … 349 366 350 367 // our various things... 351 void *args;352 368 ffi_raw *raw_args; 353 369 ffi_cif *cif; 354 ffi_raw_closure *closure;355 370 unsigned short rtype; 356 371 void *resp = (void*)&res; 357 372 358 /* grab the trampoline context pointer */359 asm ("movl %%ecx,%0" : "=r" (closure));360 361 /* take the argument pointer */362 asm ("leal 8(%%ebp),%0" : "=q" (args));363 364 373 /* get the cif */ 365 374 cif = closure->cif; 366 375 367 376 /* the SYSV/X86 abi matches the RAW API exactly, well.. almost */ 368 raw_args = (ffi_raw*) args;377 raw_args = (ffi_raw*) __builtin_dwarf_cfa (); 369 378 370 379 (closure->fun) (cif, resp, raw_args, closure->user_data); … … 450 459 void (*fn)()); 451 460 461 #ifdef X86_WIN32 462 extern void 463 ffi_call_STDCALL(void (*)(char *, extended_cif *), 464 /*@out@*/ extended_cif *, 465 unsigned, unsigned, 466 /*@out@*/ unsigned *, 467 void (*fn)()); 468 #endif /* X86_WIN32 */ 469 452 470 void 453 471 ffi_raw_call(/*@dependent@*/ ffi_cif *cif, … … 484 502 /*@=usedef@*/ 485 503 break; 504 #ifdef X86_WIN32 505 case FFI_STDCALL: 506 /*@-usedef@*/ 507 ffi_call_STDCALL(ffi_prep_args_raw, &ecif, cif->bytes, 508 cif->flags, ecif.rvalue, fn); 509 /*@=usedef@*/ 510 break; 511 #endif /* X86_WIN32 */ 486 512 default: 487 513 FFI_ASSERT(0); … … 491 517 492 518 #endif 519 520 #endif /* __x86_64__ */ -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libffi/src/x86/sysv.S
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 1 1 /* ----------------------------------------------------------------------- 2 sysv.S - Copyright (c) 1996, 1998, 2001 Cygnus Solutions2 sysv.S - Copyright (c) 1996, 1998, 2001, 2002 Cygnus Solutions 3 3 4 4 X86 Foreign Function Interface … … 23 23 OTHER DEALINGS IN THE SOFTWARE. 24 24 ----------------------------------------------------------------------- */ 25 26 #ifndef __x86_64__ 25 27 26 28 #define LIBFFI_ASM … … 164 166 .LEFDE1: 165 167 .set .LLFDE1,.LEFDE1-.LSFDE1 168 169 #endif /* ifndef __x86_64__ */ -
Property cvs2svn:cvs-rev
changed from
-
branches/GNU/src/gcc/libffi/src/x86/win32.S
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 1 1 /* ----------------------------------------------------------------------- 2 win32.S - Copyright (c) 1996, 1998, 2001 Cygnus Solutions 2 win32.S - Copyright (c) 1996, 1998, 2001, 2002 Red Hat, Inc. 3 Copyright (c) 2001 John Beniton 4 Copyright (c) 2002 Ranjit Mathew 5 3 6 4 7 X86 Foreign Function Interface … … 53 56 addl $8,%esp 54 57 55 call *28(%ebp) 58 # FIXME: Align the stack to a 128-bit boundary to avoid 59 # potential performance hits. 60 61 call *28(%ebp) 56 62 57 63 # Remove the space we pushed for the args … … 124 130 125 131 .ffi_call_SYSV_end: 132 133 # This assumes we are using gas. 134 .balign 16 135 .globl _ffi_call_STDCALL 136 137 _ffi_call_STDCALL: 138 pushl %ebp 139 movl %esp,%ebp 140 141 # Make room for all of the new args. 142 movl 16(%ebp),%ecx 143 subl %ecx,%esp 144 145 movl %esp,%eax 146 147 # Place all of the ffi_prep_args in position 148 pushl 12(%ebp) 149 pushl %eax 150 call *8(%ebp) 151 152 # Return stack to previous state and call the function 153 addl $8,%esp 154 155 # FIXME: Align the stack to a 128-bit boundary to avoid 156 # potential performance hits. 157 158 call *28(%ebp) 159 160 # stdcall functions pop arguments off the stack themselves 161 162 # Load %ecx with the return type code 163 movl 20(%ebp),%ecx 164 165 # If the return value pointer is NULL, assume no return value. 166 cmpl $0,24(%ebp) 167 jne sc_retint 168 169 # Even if there is no space for the return value, we are 170 # obliged to handle floating-point values. 171 cmpl $FFI_TYPE_FLOAT,%ecx 172 jne sc_noretval 173 fstp %st(0) 174 175 jmp sc_epilogue 176 177 sc_retint: 178 cmpl $FFI_TYPE_INT,%ecx 179 jne sc_retfloat 180 # Load %ecx with the pointer to storage for the return value 181 movl 24(%ebp),%ecx 182 movl %eax,0(%ecx) 183 jmp sc_epilogue 184 185 sc_retfloat: 186 cmpl $FFI_TYPE_FLOAT,%ecx 187 jne sc_retdouble 188 # Load %ecx with the pointer to storage for the return value 189 movl 24(%ebp),%ecx 190 fstps (%ecx) 191 jmp sc_epilogue 192 193 sc_retdouble: 194 cmpl $FFI_TYPE_DOUBLE,%ecx 195 jne sc_retlongdouble 196 # Load %ecx with the pointer to storage for the return value 197 movl 24(%ebp),%ecx 198 fstpl (%ecx) 199 jmp sc_epilogue 200 201 sc_retlongdouble: 202 cmpl $FFI_TYPE_LONGDOUBLE,%ecx 203 jne sc_retint64 204 # Load %ecx with the pointer to storage for the return value 205 movl 24(%ebp),%ecx 206 fstpt (%ecx) 207 jmp sc_epilogue 208 209 sc_retint64: 210 cmpl $FFI_TYPE_SINT64,%ecx 211 jne sc_retstruct 212 # Load %ecx with the pointer to storage for the return value 213 movl 24(%ebp),%ecx 214 movl %eax,0(%ecx) 215 movl %edx,4(%ecx) 216 217 sc_retstruct: 218 # Nothing to do! 219 220 sc_noretval: 221 sc_epilogue: 222 movl %ebp,%esp 223 popl %ebp 224 ret 225 226 .ffi_call_STDCALL_end: -
Property cvs2svn:cvs-rev
changed from
Note:
See TracChangeset
for help on using the changeset viewer.