An #endif in the wrong place would cause compile failure on powerpcle.
[libffi.git] / ChangeLog
1 2013-11-16  Alan Modra  <amodra@gmail.com>
2
3         * src/powerpc/ppc_closure.S: Move errant #endif to where it belongs.
4         Don't bl .Luint128.
5
6 2013-11-16  Alan Modra  <amodra@gmail.com>
7
8         * src/powerpc/ffi.c (ffi_prep_cif_machdep_core): Use #if _CALL_ELF
9         test to select parameter save sizing for ELFv2 vs. ELFv1.
10         * src/powerpc/ffitarget.h (FFI_V2_TYPE_FLOAT_HOMOG,
11         FFI_V2_TYPE_DOUBLE_HOMOG, FFI_V2_TYPE_SMALL_STRUCT): Define.
12         (FFI_TRAMPOLINE_SIZE): Define variant for ELFv2.
13         * src/powerpc/ffi.c (FLAG_ARG_NEEDS_PSAVE): Define.
14         (discover_homogeneous_aggregate): New function.
15         (ffi_prep_args64): Adjust start of param save area for ELFv2.
16         Handle homogenous floating point struct parms.
17         (ffi_prep_cif_machdep_core): Adjust space calculation for ELFv2.
18         Handle ELFv2 return values.  Set FLAG_ARG_NEEDS_PSAVE.  Handle
19         homogenous floating point structs.
20         (ffi_call): Increase size of smst_buffer for ELFv2.  Handle ELFv2.
21         (flush_icache): Compile for ELFv2.
22         (ffi_prep_closure_loc): Set up ELFv2 trampoline.
23         (ffi_closure_helper_LINUX64): Don't return all structs directly
24         to caller.  Handle homogenous floating point structs.  Handle
25         ELFv2 struct return values.
26         * src/powerpc/linux64.S (ffi_call_LINUX64): Set up r2 for
27         ELFv2.  Adjust toc save location.  Call function pointer using
28         r12.  Handle FLAG_RETURNS_SMST.  Don't predict branches.
29         * src/powerpc/linux64_closure.S (ffi_closure_LINUX64): Set up r2
30         for ELFv2.  Define ELFv2 versions of STACKFRAME, PARMSAVE, and
31         RETVAL.  Handle possibly missing parameter save area.  Handle
32         ELFv2 return values.
33         (.note.GNU-stack): Move inside outer #ifdef.
34
35 2013-11-16  Alan Modra  <amodra@gmail.com>
36
37         * src/powerpc/ffi.c (ffi_prep_cif_machdep): Revert 2013-02-08
38         change.  Do not consume an int arg when returning a small struct
39         for FFI_SYSV ABI.
40         (ffi_call): Only use bounce buffer when FLAG_RETURNS_SMST.
41         Properly copy bounce buffer to destination.
42         * src/powerpc/sysv.S: Revert 2013-02-08 change.
43         * src/powerpc/ppc_closure.S: Remove stray '+'.
44
45 2013-11-16  Alan Modra  <amodra@gmail.com>
46
47         * src/powerpc/ffi.c (ffi_prep_args64): Align struct parameters
48         according to __STRUCT_PARM_ALIGN__.
49         (ffi_prep_cif_machdep_core): Likewise.
50         (ffi_closure_helper_LINUX64): Likewise.
51
52 2013-11-16  Alan Modra  <amodra@gmail.com>
53
54         * src/powerpc/linux64.S (ffi_call_LINUX64): Tweak restore of r28.
55         (.note.GNU-stack): Move inside outer #ifdef.
56         * src/powerpc/linux64_closure.S (STACKFRAME, PARMSAVE,
57         RETVAL): Define and use throughout.
58         (ffi_closure_LINUX64): Save fprs before buying stack.
59         (.note.GNU-stack): Move inside outer #ifdef.
60
61 2013-11-16  Alan Modra  <amodra@gmail.com>
62
63         * src/powerpc/ffitarget.h (FFI_TARGET_SPECIFIC_VARIADIC): Define.
64         (FFI_EXTRA_CIF_FIELDS): Define.
65         * src/powerpc/ffi.c (ffi_prep_args64): Save fprs as per the
66         ABI, not to both fpr and param save area.
67         (ffi_prep_cif_machdep_core): Renamed from ffi_prep_cif_machdep.
68         Keep initial flags.  Formatting.  Remove dead FFI_LINUX_SOFT_FLOAT
69         code.
70         (ffi_prep_cif_machdep, ffi_prep_cif_machdep_var): New functions.
71         (ffi_closure_helper_LINUX64): Pass floating point as per ABI,
72         not to both fpr and parameter save areas.
73
74         * libffi/testsuite/libffi.call/cls_double_va.c (main): Correct
75         function cast and don't call ffi_prep_cif.
76         * libffi/testsuite/libffi.call/cls_longdouble_va.c (main): Likewise.
77
78 2013-11-15  Andrew Haley  <aph@redhat.com>
79
80         * doc/libffi.texi (Closure Example): Fix the sample code.
81         * doc/libffi.info, doc/stamp-vti, doc/version.texi: Rebuilt.
82
83 2013-11-15  Andrew Haley  <aph@redhat.com>
84
85         * testsuite/libffi.call/va_struct1.c (main): Fix broken test.
86         * testsuite/libffi.call/cls_uint_va.c (cls_ret_T_fn): Likewise
87         * testsuite/libffi.call/cls_struct_va1.c (test_fn): Likewise.
88         * testsuite/libffi.call/va_1.c (main): Likewise.
89
90 2013-11-14  David Schneider  <david.schneider@bivab.de>
91
92         * src/arm/ffi.c: Fix register allocation for mixed float and
93         doubles.
94         * testsuite/libffi.call/cls_many_mixed_float_double.c: Testcase
95         for many mixed float and double arguments.
96
97 2013-11-13  Alan Modra  <amodra@gmail.com>
98
99         * doc/libffi.texi (Simple Example): Correct example code.
100         * doc/libffi.info, doc/stamp-vti, doc/version.texi: Rebuilt.
101
102 2013-11-13  Anthony Green  <green@moxielogic.com>
103
104         * include/ffi_common.h: Respect HAVE_ALLOCA_H for GNU compiler
105         based build. (Thanks to tmr111116 on github)
106
107 2013-11-09  Anthony Green  <green@moxielogic.com>
108
109         * m4/libtool.m4: Refresh.
110         * configure, Makefile.in: Rebuilt.
111         * README: Add more notes about next release.
112
113 2013-11-09  Shigeharu TAKENO  <shige@iee.niit.ac.jp>
114
115         * m4/ax_gcc_archflag.m4 (ax_gcc_arch): Don't recognize
116         UltraSPARC-IIi as ultrasparc3.
117
118 2013-11-06  Mark Kettenis  <kettenis@gnu.org>
119
120         * src/x86/freebsd.S (ffi_call_SYSV): Align the stack pointer to
121         16-bytes.
122
123 2013-11-06  Konstantin Belousov <kib@freebsd.org>
124
125         * src/x86/freebsd.S (ffi_closure_raw_SYSV): Mark the assembler
126         source as not requiring executable stack.
127
128 2013-11-02  Anthony Green  <green@moxielogic.com>
129
130         * doc/libffi.texi (The Basics): Clarify return value buffer size
131         requirements.  Also, NULL result buffer pointers are no longer
132         supported.
133         * doc/libffi.info: Rebuilt.
134
135 2013-11-02  Mischa Jonker  <mjonker@synopsys.com>
136
137         * Makefile.am (nodist_libffi_la_SOURCES): Fix build error.
138         * Makefile.in: Rebuilt.
139
140 2013-11-02  David Schneider  <david.schneider@bivab.de>
141
142         * src/arm/ffi.c: more robust argument handling for closures on arm hardfloat
143         * testsuite/libffi.call/many_mixed.c: New file.
144         * testsuite/libffi.call/cls_many_mixed_args.c: More tests.
145
146 2013-11-02  Vitaly Budovski
147
148         * src/x86/ffi.c (ffi_prep_cif_machdep): Don't align stack for win32.
149
150 2013-10-23  Mark H Weaver  <mhw@netris.org>
151
152         * src/mips/ffi.c: Fix handling of uint32_t arguments on the
153         MIPS N32 ABI.
154
155 2013-10-13  Sandra Loosemore  <sandra@codesourcery.com>
156
157         * README: Add Nios II to table of supported platforms.
158         * Makefile.am (EXTRA_DIST): Add nios2 files.
159         (nodist_libffi_la_SOURCES): Likewise.
160         * Makefile.in: Regenerated.
161         * configure.ac (nios2*-linux*): New host.
162         (NIOS2): Add AM_CONDITIONAL.
163         * configure: Regenerated.
164         * src/nios2/ffi.c: New.
165         * src/nios2/ffitarget.h: New.
166         * src/nios2/sysv.S: New.
167         * src/prep_cif.c (initialize_aggregate): Handle extra structure
168         alignment via FFI_AGGREGATE_ALIGNMENT.
169         (ffi_prep_cif_core): Conditionalize structure return for NIOS2.
170
171 2013-10-10  Sandra Loosemore  <sandra@codesourcery.com>
172
173         * testsuite/libffi.call/cls_many_mixed_args.c (cls_ret_double_fn):
174         Fix uninitialized variable.
175
176 2013-10-11  Marcus Shawcroft  <marcus.shawcroft@arm.com>
177
178         * testsuite/libffi.call/many.c (many): Replace * with +.
179
180 2013-10-08  Ondřej Bílka  <neleai@seznam.cz>
181
182         * src/aarch64/ffi.c, src/aarch64/sysv.S, src/arm/ffi.c,
183         src/arm/gentramp.sh, src/bfin/sysv.S, src/closures.c,
184         src/dlmalloc.c, src/ia64/ffi.c, src/microblaze/ffi.c,
185         src/microblaze/sysv.S, src/powerpc/darwin_closure.S,
186         src/powerpc/ffi.c, src/powerpc/ffi_darwin.c, src/sh/ffi.c,
187         src/tile/tile.S, testsuite/libffi.call/nested_struct11.c: Fix
188         spelling errors.
189
190 2013-10-08  Anthony Green  <green@moxielogic.com>
191
192         * aclocal.m4, compile, config.guess, config.sub, depcomp,
193         install-sh, mdate-sh, missing, texinfo.tex: Update from upstream.
194         * configure.ac: Update version to 3.0.14-rc0.
195         * Makefile.in, configure, Makefile.in, include/Makefile.in,
196         man/Makefile.in, testsuite/Makefile.in: Rebuilt.
197         * README: Mention M88K and VAX.
198
199 2013-07-15  Miod Vallat  <miod@openbsd.org>
200
201         * Makefile.am,
202         configure.ac,
203         src/m88k/ffi.c,
204         src/m88k/ffitarget.h,
205         src/m88k/obsd.S,
206         src/vax/elfbsd.S,
207         src/vax/ffi.c,
208         src/vax/ffitarget.h: Add m88k and vax support.
209
210 2013-06-24 Alan Modra  <amodra@gmail.com>
211
212         * src/powerpc/ffi.c (ffi_prep_args_SYSV): Move var declaration
213         before statements.
214         (ffi_prep_args64): Support little-endian.
215         (ffi_closure_helper_SYSV, ffi_closure_helper_LINUX64): Likewise.
216         * src/powerpc/linux64_closure.S (ffi_closure_LINUX64): Likewise.
217         * src/powerpc/ppc_closure.S (ffi_closure_SYSV): Likewise.
218
219 2013-06-12  Mischa Jonker  <mjonker@synopsys.com>
220
221          * configure.ac: Add support for ARC.
222          * Makefile.am: Likewise.
223          * README: Add ARC details.
224          * src/arc/arcompact.S: New.
225          * src/arc/ffi.c: Likewise.
226          * src/arc/ffitarget.h: Likewise.
227
228 2013-03-28  David Schneider  <david.schneider@bivab.de>
229
230          * src/arm/ffi.c: Fix support for ARM hard-float calling convention.
231          * src/arm/sysv.S: call different methods for SYSV and VFP ABIs.
232          * testsuite/libffi.call/cls_many_mixed_args.c: testcase for a closure with
233          mixed arguments, many doubles.
234          * testsuite/libffi.call/many_double.c: testcase for calling a function using
235          more than 8 doubles.
236          * testcase/libffi.call/many.c: use absolute value to check result against an
237          epsilon
238
239 2013-03-17  Anthony Green  <green@moxielogic.com>
240
241         * README: Update for 3.0.13.
242         * configure.ac: Ditto.
243         * configure: Rebuilt.
244         * doc/*: Update version.
245
246 2013-03-17  Dave Korn  <dave.korn.cygwin@gmail.com>
247
248         * src/closures.c (is_emutramp_enabled
249         [!FFI_MMAP_EXEC_EMUTRAMP_PAX]): Move default definition outside
250         enclosing #if scope.
251
252 2013-03-17  Anthony Green  <green@moxielogic.com>
253
254         * configure.ac: Only modify toolexecdir in certain cases.
255         * configure: Rebuilt.
256
257 2013-03-16  Gilles Talis  <gilles.talis@gmail.com>
258
259         * src/powerpc/ffi.c (ffi_prep_args_SYSV): Don't use
260         fparg_count,etc on __NO_FPRS__ targets.
261
262 2013-03-16  Alan Hourihane  <alanh@fairlite.co.uk>
263
264         * src/m68k/sysv.S (epilogue): Don't use extb instruction on
265         m680000 machines.
266
267 2013-03-16  Alex Gaynor <alex.gaynor@gmail.com>
268
269         * src/x86/ffi.c (ffi_prep_cif_machdep): Always align stack.
270
271 2013-03-13  Markos Chandras <markos.chandras@imgtec.com>
272
273         * configure.ac: Add support for Imagination Technologies Meta.
274         * Makefile.am: Likewise.
275         * README: Add Imagination Technologies Meta details.
276         * src/metag/ffi.c: New.
277         * src/metag/ffitarget.h: Likewise.
278         * src/metag/sysv.S: Likewise.
279
280 2013-02-24  Andreas Schwab  <schwab@linux-m68k.org>
281
282         * doc/libffi.texi (Structures): Fix missing category argument of
283         @deftp.
284
285 2013-02-11  Anthony Green <green@moxielogic.com>
286
287         * configure.ac: Update release number to 3.0.12.
288         * configure: Rebuilt.
289         * README: Update release info.
290
291 2013-02-10  Anthony Green <green@moxielogic.com>
292
293         * README: Add Moxie.
294         * src/moxie/ffi.c: Created.
295         * src/moxie/eabi.S: Created.
296         * src/moxie/ffitarget.h: Created.
297         * Makefile.am (nodist_libffi_la_SOURCES): Add Moxie.
298         * Makefile.in: Rebuilt.
299         * configure.ac: Add Moxie.
300         * configure: Rebuilt.
301         * testsuite/libffi.call/huge_struct.c: Disable format string
302         warnings for moxie*-*-elf tests.
303
304 2013-02-10  Anthony Green <green@moxielogic.com>
305
306         * Makefile.am (LTLDFLAGS): Fix reference.
307         * Makefile.in: Rebuilt.
308
309 2013-02-10  Anthony Green <green@moxielogic.com>
310
311         * README: Update supported platforms.  Update test results link.
312
313 2013-02-09  Anthony Green <green@moxielogic.com>
314
315         * testsuite/libffi.call/negint.c: Remove forced -O2.
316         * testsuite/libffi.call/many2.c (foo): Remove GCCism.
317         * testsuite/libffi.call/ffitest.h: Add default PRIuPTR definition.
318
319         * src/sparc/v8.S (ffi_closure_v8): Import ancient ulonglong
320         closure return type fix developed by Martin v. Löwis for cpython
321         fork.
322
323 2013-02-08  Andreas Tobler  <andreast@fgznet.ch>
324
325         * src/powerpc/ffi.c (ffi_prep_cif_machdep): Fix small struct
326         support.
327         * src/powerpc/sysv.S: Ditto.
328
329 2013-02-08  Anthony Green <green@moxielogic.com>
330
331         * testsuite/libffi.call/cls_longdouble.c: Remove xfail for
332         arm*-*-*.
333
334 2013-02-08  Anthony Green <green@moxielogic.com>
335
336         * src/sparc/ffi.c (ffi_prep_closure_loc): Fix cache flushing for GCC.
337
338 2013-02-08  Matthias Klose  <doko@ubuntu.com>
339
340         * man/ffi_prep_cif.3: Clean up for debian linter.
341
342 2013-02-08  Peter Bergner  <bergner@vnet.ibm.com>
343
344         * src/powerpc/ffi.c (ffi_prep_args_SYSV): Account for FP args pushed
345         on the stack.
346
347 2013-02-08  Anthony Green <green@moxielogic.com>
348
349         * Makefile.am (EXTRA_DIST): Add missing files.
350         * testsuite/Makefile.am (EXTRA_DIST): Ditto.
351         * Makefile.in: Rebuilt.
352
353 2013-02-08  Anthony Green <green@moxielogic.com>
354
355         * configure.ac: Move sparc asm config checks to within functions
356         for compatibility with sun tools.
357         * configure: Rebuilt.
358         * src/sparc/ffi.c (ffi_prep_closure_loc): Flush cache on v9
359         systems.
360         * src/sparc/v8.S (ffi_flush_icache): Implement a sparc v9 cache
361         flusher.
362
363 2013-02-08  Nathan Rossi <nathan.rossi@xilinx.com>
364
365         * src/microblaze/ffi.c (ffi_closure_call_SYSV): Fix handling of
366         small big-endian structures.
367         (ffi_prep_args): Ditto.
368
369 2013-02-07  Anthony Green <green@moxielogic.com>
370
371         * src/sparc/v8.S (ffi_call_v8): Fix typo from last patch
372         (effectively hiding ffi_call_v8).
373
374 2013-02-07  Anthony Green <green@moxielogic.com>
375
376         * configure.ac: Update bug reporting address.
377         * configure.in: Rebuild.
378
379         * src/sparc/v8.S (ffi_flush_icache): Out-of-line cache flusher for
380         Sun compiler.
381         * src/sparc/ffi.c (ffi_call): Remove warning.
382         Call ffi_flush_icache for non-GCC builds.
383         (ffi_prep_closure_loc): Use ffi_flush_icache.
384
385         * Makefile.am (EXTRA_DIST): Add libtool-ldflags.
386         * Makefile.in: Rebuilt.
387         * libtool-ldflags: New file.
388
389 2013-02-07  Daniel Schepler <dschepler@gmail.com>
390
391         * configure.ac: Correctly identify x32 systems as 64-bit.
392         * m4/libtool.m4: Remove libtool expr error.
393         * aclocal.m4, configure: Rebuilt.
394
395 2013-02-07  Anthony Green <green@moxielogic.com>
396
397         * configure.ac: Fix GCC usage test.
398         * configure: Rebuilt.
399         * README: Mention LLVM/GCC x86_64 issue.
400         * testsuite/Makefile.in: Rebuilt.
401
402 2013-02-07  Anthony Green <green@moxielogic.com>
403
404         * testsuite/libffi.call/cls_double_va.c (main): Replace // style
405         comments with /* */ for xlc compiler.
406         * testsuite/libffi.call/stret_large.c (main): Ditto.
407         * testsuite/libffi.call/stret_large2.c (main): Ditto.
408         * testsuite/libffi.call/nested_struct1.c (main): Ditto.
409         * testsuite/libffi.call/huge_struct.c (main): Ditto.
410         * testsuite/libffi.call/float_va.c (main): Ditto.
411         * testsuite/libffi.call/cls_struct_va1.c (main): Ditto.
412         * testsuite/libffi.call/cls_pointer_stack.c (main): Ditto.
413         * testsuite/libffi.call/cls_pointer.c (main): Ditto.
414         * testsuite/libffi.call/cls_longdouble_va.c (main): Ditto.
415
416 2013-02-06  Anthony Green <green@moxielogic.com>
417
418         * man/ffi_prep_cif.3: Clean up for debian lintian checker.
419
420 2013-02-06  Anthony Green <green@moxielogic.com>
421
422         * Makefile.am (pkgconfigdir): Add missing pkgconfig install bits.
423         * Makefile.in: Rebuild.
424
425 2013-02-02  Mark H Weaver <mhw@netris.org>
426
427         * src/x86/ffi64.c (ffi_call): Sign-extend integer arguments passed
428         via general purpose registers.
429
430 2013-01-21  Nathan Rossi <nathan.rossi@xilinx.com>
431
432         * README: Add MicroBlaze details.
433         * Makefile.am: Add MicroBlaze support.
434         * configure.ac: Likewise.
435         * src/microblaze/ffi.c: New.
436         * src/microblaze/ffitarget.h: Likewise.
437         * src/microblaze/sysv.S: Likewise.
438
439 2013-01-21  Nathan Rossi <nathan.rossi@xilinx.com>
440         * testsuite/libffi.call/return_uc.c: Fixed issue.
441
442 2013-01-21  Chris Zankel   <chris@zankel.net>
443
444         * README: Add Xtensa support.
445         * Makefile.am: Likewise.
446         * configure.ac: Likewise.
447         * Makefile.in Regenerate.
448         * configure: Likewise.
449         * src/prep_cif.c: Handle Xtensa.
450         * src/xtensa: New directory.
451         * src/xtensa/ffi.c: New file.
452         * src/xtensa/ffitarget.h: Ditto.
453         * src/xtensa/sysv.S: Ditto.
454
455 2013-01-11  Anthony Green  <green@moxielogic.com>
456
457         * src/powerpc/ffi_darwin.c (ffi_prep_args): Replace // style
458         comments with /* */ for xlc compiler.
459         * src/powerpc/aix.S (ffi_call_AIX): Ditto.
460         * testsuite/libffi.call/ffitest.h (allocate_mmap): Delete
461         deprecated inline function.
462         * testsuite/libffi.special/ffitestcxx.h: Ditto.
463         * README: Add update for AIX support.
464
465 2013-01-11  Anthony Green  <green@moxielogic.com>
466
467         * configure.ac: Robustify pc relative reloc check.
468         * m4/ax_cc_maxopt.m4: Don't -malign-double.  This is an ABI
469         changing option for 32-bit x86.
470         * aclocal.m4, configure: Rebuilt.
471         * README: Update supported target list.
472
473 2013-01-10  Anthony Green  <green@moxielogic.com>
474
475         * README (tested): Add Compiler column to table.
476
477 2013-01-10  Anthony Green  <green@moxielogic.com>
478
479         * src/x86/ffi64.c (struct register_args): Make sse array and array
480         of unions for sunpro compiler compatibility.
481
482 2013-01-10  Anthony Green  <green@moxielogic.com>
483
484         * configure.ac: Test target platform size_t size.  Handle both 32
485         and 64-bit builds for x86_64-* and i?86-* targets (allowing for
486         CFLAG option to change default settings).
487         * configure, aclocal.m4: Rebuilt.
488
489 2013-01-10  Anthony Green  <green@moxielogic.com>
490
491         * testsuite/libffi.special/special.exp: Only run exception
492         handling tests when using GNU compiler.
493
494         * m4/ax_compiler_vendor.m4: New file.
495         * configure.ac: Test for compiler vendor and don't use
496         AX_CFLAGS_WARN_ALL with the sun compiler.
497         * aclocal.m4, configure: Rebuilt.
498
499 2013-01-10  Anthony Green  <green@moxielogic.com>
500
501         * include/ffi_common.h: Don't use GCCisms to define types when
502         building with the SUNPRO compiler.
503
504 2013-01-10  Anthony Green  <green@moxielogic.com>
505
506         * configure.ac: Put local.exp in the right place.
507         * configure: Rebuilt.
508
509         * src/x86/ffi.c: Update comment about regparm function attributes.
510         * src/x86/sysv.S (ffi_closure_SYSV): The SUNPRO compiler requires
511         that all function arguments be passed on the stack (no regparm
512         support).
513
514 2013-01-08  Anthony Green  <green@moxielogic.com>
515
516         * configure.ac: Generate local.exp.  This sets CC_FOR_TARGET
517         when we are using the vendor compiler.
518         * testsuite/Makefile.am (EXTRA_DEJAGNU_SITE_CONFIG): Point to
519         ../local.exp.
520         * configure, testsuite/Makefile.in: Rebuilt.
521
522         * testsuite/libffi.call/call.exp: Run tests with different
523         options, depending on whether or not we are using gcc or the
524         vendor compiler.
525         * testsuite/lib/libffi.exp (libffi-init): Set using_gcc based on
526         whether or not we are building/testing with gcc.
527
528 2013-01-08  Anthony Green  <green@moxielogic.com>
529
530         * configure.ac: Switch x86 solaris target to X86 by default.
531         * configure: Rebuilt.
532
533 2013-01-08  Anthony Green  <green@moxielogic.com>
534
535         * configure.ac: Fix test for read-only eh_frame.
536         * configure: Rebuilt.
537
538 2013-01-08  Anthony Green  <green@moxielogic.com>
539
540         * src/x86/sysv.S, src/x86/unix64.S: Only emit DWARF unwind info
541         when building with the GNU toolchain.
542         * testsuite/libffi.call/ffitest.h (CHECK): Fix for Solaris vendor
543         compiler.
544
545 2013-01-07  Thorsten Glaser <tg@mirbsd.org>
546
547         * testsuite/libffi.call/cls_uchar_va.c,
548         testsuite/libffi.call/cls_ushort_va.c,
549         testsuite/libffi.call/va_1.c: Testsuite fixes.
550
551 2013-01-07  Thorsten Glaser <tg@mirbsd.org>
552
553         * src/m68k/ffi.c (CIF_FLAGS_SINT8, CIF_FLAGS_SINT16): Define.
554         (ffi_prep_cif_machdep): Fix 8-bit and 16-bit signed calls.
555         * src/m68k/sysv.S (ffi_call_SYSV, ffi_closure_SYSV): Ditto.
556
557 2013-01-04  Anthony Green  <green@moxielogic.com>
558
559         * Makefile.am (AM_CFLAGS): Don't automatically add -fexceptions
560         and -Wall.  This is set in the configure script after testing for
561         GCC.
562         * Makefile.in: Rebuilt.
563
564 2013-01-02  rofl0r <https://github.com/rofl0r>
565
566         * src/powerpc/ffi.c (ffi_prep_cif_machdep): Fix build error on ppc
567         when long double == double.
568
569 2013-01-02  Reini Urban  <rurban@x-ray.at>
570
571         * Makefile.am (libffi_la_LDFLAGS): Add -no-undefined to LDFLAGS
572         (required for shared libs on cygwin/mingw).
573         * Makefile.in: Rebuilt.
574
575 2012-10-31  Alan Modra  <amodra@gmail.co>
576
577         * src/powerpc/linux64_closure.S: Add new ABI support.
578         * src/powerpc/linux64.S: Likewise.
579
580 2012-10-30  Magnus Granberg  <zorry@gentoo.org>
581             Pavel Labushev  <pavel.labushev@runbox.ru>
582
583         * configure.ac: New options pax_emutramp
584         * configure, fficonfig.h.in: Regenerated
585         * src/closures.c: New function emutramp_enabled_check() and
586         checks.
587
588 2012-10-30  Frederick Cheung  <frederick.cheung@gmail.com>
589
590         * configure.ac: Enable FFI_MAP_EXEC_WRIT for Darwin 12 (mountain
591         lion) and future version.
592         * configure: Rebuild.
593
594 2012-10-30  James Greenhalgh  <james.greenhalgh at arm.com>
595             Marcus Shawcroft  <marcus.shawcroft at arm.com>
596
597         * README: Add details of aarch64 port.
598         * src/aarch64/ffi.c: New.
599         * src/aarch64/ffitarget.h: Likewise.
600         * src/aarch64/sysv.S: Likewise.
601         * Makefile.am: Support aarch64.
602         * configure.ac: Support aarch64.
603         * Makefile.in, configure: Rebuilt.
604
605 2012-10-30  James Greenhalgh  <james.greenhalgh at arm.com>
606             Marcus Shawcroft  <marcus.shawcroft at arm.com>
607
608         * testsuite/lib/libffi.exp: Add support for aarch64.
609         * testsuite/libffi.call/cls_struct_va1.c: New.
610         * testsuite/libffi.call/cls_uchar_va.c: Likewise.
611         * testsuite/libffi.call/cls_uint_va.c: Likewise.
612         * testsuite/libffi.call/cls_ulong_va.c: Likewise.
613         * testsuite/libffi.call/cls_ushort_va.c: Likewise.
614         * testsuite/libffi.call/nested_struct11.c: Likewise.
615         * testsuite/libffi.call/uninitialized.c: Likewise.
616         * testsuite/libffi.call/va_1.c: Likewise.
617         * testsuite/libffi.call/va_struct1.c: Likewise.
618         * testsuite/libffi.call/va_struct2.c: Likewise.
619         * testsuite/libffi.call/va_struct3.c: Likewise.
620
621 2012-10-12  Walter Lee  <walt@tilera.com>
622
623         * Makefile.am: Add TILE-Gx/TILEPro support.
624         * configure.ac: Likewise.
625         * Makefile.in: Regenerate.
626         * configure: Likewise.
627         * src/prep_cif.c (ffi_prep_cif_core): Handle TILE-Gx/TILEPro.
628         * src/tile: New directory.
629         * src/tile/ffi.c: New file.
630         * src/tile/ffitarget.h: Ditto.
631         * src/tile/tile.S: Ditto.
632
633 2012-10-12  Matthias Klose  <doko@ubuntu.com>
634
635         * generate-osx-source-and-headers.py: Normalize whitespace.
636
637 2012-09-14  David Edelsohn  <dje.gcc@gmail.com>
638
639         * configure: Regenerated.
640
641 2012-08-26  Andrew Pinski  <apinski@cavium.com>
642
643         PR libffi/53014
644         * src/mips/ffi.c (ffi_prep_closure_loc): Allow n32 with soft-float and n64 with
645         soft-float.
646
647 2012-08-08  Uros Bizjak  <ubizjak@gmail.com>
648
649         * src/s390/ffi.c (ffi_prep_closure_loc): Don't ASSERT ABI test,
650         just return FFI_BAD_ABI when things are wrong.
651
652 2012-07-18  H.J. Lu  <hongjiu.lu@intel.com>
653
654         PR libffi/53982
655         PR libffi/53973
656         * src/x86/ffitarget.h: Check __ILP32__ instead of __LP64__ for x32.
657         (FFI_SIZEOF_JAVA_RAW): Defined to 4 for x32.
658
659 2012-05-16  H.J. Lu  <hongjiu.lu@intel.com>
660
661         * configure: Regenerated.
662
663 2012-05-05  Nicolas Lelong
664
665         * libffi.xcodeproj/project.pbxproj: Fixes.
666         * README: Update for iOS builds.
667
668 2012-04-23  Alexandre Keunecke I. de Mendonca <alexandre.keunecke@gmail.com>
669
670         * configure.ac: Add Blackfin/sysv support
671         * Makefile.am: Add Blackfin/sysv support
672         * src/bfin/ffi.c:  Add Blackfin/sysv support
673         * src/bfin/ffitarget.h: Add Blackfin/sysv support
674
675 2012-04-11  Anthony Green  <green@moxielogic.com>
676
677         * Makefile.am (EXTRA_DIST): Add new script.
678         * Makefile.in: Rebuilt.
679
680 2012-04-11  Zachary Waldowski  <zwaldowski@gmail.com>
681
682         * generate-ios-source-and-headers.py,
683         libffi.xcodeproj/project.pbxproj: Support a Mac static library via
684         Xcode. Set iOS compatibility to 4.0.  Move iOS trampoline
685         generation into an Xcode "run script" phase.  Include both as
686         Xcode build scripts. Don't always regenerate config files.
687
688 2012-04-10  Anthony Green  <green@moxielogic.com>
689
690         * src/powerpc/ffi_darwin.c (ffi_prep_args): Add missing semicolon.
691
692 2012-04-06  Anthony Green  <green@moxielogic.com>
693
694         * Makefile.am (EXTRA_DIST): Add new iOS/xcode files.
695         * Makefile.in: Rebuilt.
696
697 2012-04-06  Mike Lewis  <mikelikespie@gmail.com>
698
699         * generate-ios-source-and-headers.py: New file.
700         * libffi.xcodeproj/project.pbxproj: New file.
701         * README: Update instructions on building iOS binary.
702         * build-ios.sh: Delete.
703
704 2012-04-06  Anthony Green  <green@moxielogic.com>
705
706         * src/x86/ffi64.c (UINT128): Define differently for Intel and GNU
707         compilers, then use it.
708
709 2012-04-06  H.J. Lu  <hongjiu.lu@intel.com>
710
711         * m4/libtool.m4 (_LT_ENABLE_LOCK): Support x32.
712
713 2012-04-06  Anthony Green  <green@moxielogic.com>
714
715         * testsuite/Makefile.am (EXTRA_DIST): Add missing test cases.
716         * testsuite/Makefile.in: Rebuilt.
717
718 2012-04-05  Zachary Waldowski  <zwaldowski@gmail.com>
719
720         * include/ffi.h.in: Add missing trampoline table fields.
721         * src/arm/sysv.S: Fix ENTRY definition, and wrap symbol references
722         in CNAME.
723         * src/x86/ffi.c: Wrap Windows specific code in ifdefs.
724
725 2012-04-02  Peter Bergner  <bergner@vnet.ibm.com>
726
727         * src/powerpc/ffi.c (ffi_prep_args_SYSV): Declare double_tmp.
728         Silence casting pointer to integer of different size warning.
729         Delete goto to previously deleted label.
730         (ffi_call): Silence possibly undefined warning.
731         (ffi_closure_helper_SYSV): Declare variable type.
732
733 2012-04-02  Peter Rosin  <peda@lysator.liu.se>
734
735         * src/x86/win32.S (ffi_call_win32): Sign/zero extend the return
736         value in the Intel version as is already done for the AT&T version.
737         (ffi_closure_SYSV): Likewise.
738         (ffi_closure_raw_SYSV): Likewise.
739         (ffi_closure_STDCALL): Likewise.
740
741 2012-03-29  Peter Rosin  <peda@lysator.liu.se>
742
743         * src/x86/win32.S (ffi_closure_raw_THISCALL): Unify the frame
744         generation, fix the ENDP label and remove the surplus third arg
745         from the 'lea' insn.
746
747 2012-03-29  Peter Rosin  <peda@lysator.liu.se>
748
749         * src/x86/win32.S (ffi_closure_raw_SYSV): Make the 'stubraw' label
750         visible outside the PROC, so that ffi_closure_raw_THISCALL can see
751         it.  Also instruct the assembler to add a frame to the function.
752
753 2012-03-23  Peter Rosin  <peda@lysator.liu.se>
754
755         * Makefile.am (AM_CPPFLAGS): Add -DFFI_BUILDING.
756         * Makefile.in: Rebuilt.
757         * include/ffi.h.in [MSVC]: Add __declspec(dllimport) decorations
758         to all data exports, when compiling libffi clients using MSVC.
759
760 2012-03-29  Peter Rosin  <peda@lysator.liu.se>
761
762         * src/x86/ffitarget.h (ffi_abi): Add new ABI FFI_MS_CDECL and
763         make it the default for MSVC.
764         (FFI_TYPE_MS_STRUCT): New structure return convention.
765         * src/x86/ffi.c (ffi_prep_cif_machdep): Tweak the structure
766         return convention for FFI_MS_CDECL to be FFI_TYPE_MS_STRUCT
767         instead of an ordinary FFI_TYPE_STRUCT.
768         (ffi_prep_args): Treat FFI_TYPE_MS_STRUCT as FFI_TYPE_STRUCT.
769         (ffi_call): Likewise.
770         (ffi_prep_incoming_args_SYSV): Likewise.
771         (ffi_raw_call): Likewise.
772         (ffi_prep_closure_loc): Treat FFI_MS_CDECL as FFI_SYSV.
773         * src/x86/win32.S (ffi_closure_SYSV): For FFI_TYPE_MS_STRUCT,
774         return a pointer to the result structure in eax and don't pop
775         that pointer from the stack, the caller takes care of it.
776         (ffi_call_win32): Treat FFI_TYPE_MS_STRUCT as FFI_TYPE_STRUCT.
777         (ffi_closure_raw_SYSV): Likewise.
778
779 2012-03-22  Peter Rosin  <peda@lysator.liu.se>
780
781         * testsuite/libffi.call/closure_stdcall.c [MSVC]: Add inline
782         assembly version with Intel syntax.
783         * testsuite/libffi.call/closure_thiscall.c [MSVC]: Likewise.
784
785 2012-03-23  Peter Rosin  <peda@lysator.liu.se>
786
787         * testsuite/libffi.call/ffitest.h: Provide abstration of
788         __attribute__((fastcall)) in the form of a __FASTCALL__
789         define.  Define it to __fastcall for MSVC.
790         * testsuite/libffi.call/fastthis1_win32.c: Use the above.
791         * testsuite/libffi.call/fastthis2_win32.c: Likewise.
792         * testsuite/libffi.call/fastthis3_win32.c: Likewise.
793         * testsuite/libffi.call/strlen2_win32.c: Likewise.
794         * testsuite/libffi.call/struct1_win32.c: Likewise.
795         * testsuite/libffi.call/struct2_win32.c: Likewise.
796
797 2012-03-22  Peter Rosin  <peda@lysator.liu.se>
798
799         * src/x86/win32.S [MSVC] (ffi_closure_THISCALL): Remove the manual
800         frame on function entry, MASM adds one automatically.
801
802 2012-03-22  Peter Rosin  <peda@lysator.liu.se>
803
804         * testsuite/libffi.call/ffitest.h [MSVC]: Add kludge for missing
805         bits in the MSVC headers.
806
807 2012-03-22  Peter Rosin  <peda@lysator.liu.se>
808
809         * testsuite/libffi.call/cls_12byte.c: Adjust to the C89 style
810         with no declarations after statements.
811         * testsuite/libffi.call/cls_16byte.c: Likewise.
812         * testsuite/libffi.call/cls_18byte.c: Likewise.
813         * testsuite/libffi.call/cls_19byte.c: Likewise.
814         * testsuite/libffi.call/cls_1_1byte.c: Likewise.
815         * testsuite/libffi.call/cls_20byte.c: Likewise.
816         * testsuite/libffi.call/cls_20byte1.c: Likewise.
817         * testsuite/libffi.call/cls_24byte.c: Likewise.
818         * testsuite/libffi.call/cls_2byte.c: Likewise.
819         * testsuite/libffi.call/cls_3_1byte.c: Likewise.
820         * testsuite/libffi.call/cls_3byte1.c: Likewise.
821         * testsuite/libffi.call/cls_3byte2.c: Likewise.
822         * testsuite/libffi.call/cls_4_1byte.c: Likewise.
823         * testsuite/libffi.call/cls_4byte.c: Likewise.
824         * testsuite/libffi.call/cls_5_1_byte.c: Likewise.
825         * testsuite/libffi.call/cls_5byte.c: Likewise.
826         * testsuite/libffi.call/cls_64byte.c: Likewise.
827         * testsuite/libffi.call/cls_6_1_byte.c: Likewise.
828         * testsuite/libffi.call/cls_6byte.c: Likewise.
829         * testsuite/libffi.call/cls_7_1_byte.c: Likewise.
830         * testsuite/libffi.call/cls_7byte.c: Likewise.
831         * testsuite/libffi.call/cls_8byte.c: Likewise.
832         * testsuite/libffi.call/cls_9byte1.c: Likewise.
833         * testsuite/libffi.call/cls_9byte2.c: Likewise.
834         * testsuite/libffi.call/cls_align_double.c: Likewise.
835         * testsuite/libffi.call/cls_align_float.c: Likewise.
836         * testsuite/libffi.call/cls_align_longdouble.c: Likewise.
837         * testsuite/libffi.call/cls_align_longdouble_split.c: Likewise.
838         * testsuite/libffi.call/cls_align_longdouble_split2.c: Likewise.
839         * testsuite/libffi.call/cls_align_pointer.c: Likewise.
840         * testsuite/libffi.call/cls_align_sint16.c: Likewise.
841         * testsuite/libffi.call/cls_align_sint32.c: Likewise.
842         * testsuite/libffi.call/cls_align_sint64.c: Likewise.
843         * testsuite/libffi.call/cls_align_uint16.c: Likewise.
844         * testsuite/libffi.call/cls_align_uint32.c: Likewise.
845         * testsuite/libffi.call/cls_align_uint64.c: Likewise.
846         * testsuite/libffi.call/cls_dbls_struct.c: Likewise.
847         * testsuite/libffi.call/cls_pointer_stack.c: Likewise.
848         * testsuite/libffi.call/err_bad_typedef.c: Likewise.
849         * testsuite/libffi.call/huge_struct.c: Likewise.
850         * testsuite/libffi.call/nested_struct.c: Likewise.
851         * testsuite/libffi.call/nested_struct1.c: Likewise.
852         * testsuite/libffi.call/nested_struct10.c: Likewise.
853         * testsuite/libffi.call/nested_struct2.c: Likewise.
854         * testsuite/libffi.call/nested_struct3.c: Likewise.
855         * testsuite/libffi.call/nested_struct4.c: Likewise.
856         * testsuite/libffi.call/nested_struct5.c: Likewise.
857         * testsuite/libffi.call/nested_struct6.c: Likewise.
858         * testsuite/libffi.call/nested_struct7.c: Likewise.
859         * testsuite/libffi.call/nested_struct8.c: Likewise.
860         * testsuite/libffi.call/nested_struct9.c: Likewise.
861         * testsuite/libffi.call/stret_large.c: Likewise.
862         * testsuite/libffi.call/stret_large2.c: Likewise.
863         * testsuite/libffi.call/stret_medium.c: Likewise.
864         * testsuite/libffi.call/stret_medium2.c: Likewise.
865         * testsuite/libffi.call/struct1.c: Likewise.
866         * testsuite/libffi.call/struct1_win32.c: Likewise.
867         * testsuite/libffi.call/struct2.c: Likewise.
868         * testsuite/libffi.call/struct2_win32.c: Likewise.
869         * testsuite/libffi.call/struct3.c: Likewise.
870         * testsuite/libffi.call/struct4.c: Likewise.
871         * testsuite/libffi.call/struct5.c: Likewise.
872         * testsuite/libffi.call/struct6.c: Likewise.
873         * testsuite/libffi.call/struct7.c: Likewise.
874         * testsuite/libffi.call/struct8.c: Likewise.
875         * testsuite/libffi.call/struct9.c: Likewise.
876         * testsuite/libffi.call/testclosure.c: Likewise.
877
878 2012-03-21  Peter Rosin  <peda@lysator.liu.se>
879
880         * testsuite/libffi.call/float_va.c (float_va_fn): Use %f when
881         printing doubles (%lf is for long doubles).
882         (main): Likewise.
883
884 2012-03-21  Peter Rosin  <peda@lysator.liu.se>
885
886         * testsuite/lib/target-libpath.exp [*-*-cygwin*, *-*-mingw*]
887         (set_ld_library_path_env_vars): Add the library search dir to PATH
888         (and save PATH for later).
889         (restore_ld_library_path_env_vars): Restore PATH.
890
891 2012-03-21  Peter Rosin  <peda@lysator.liu.se>
892
893         * testsuite/lib/target-libpath.exp [*-*-cygwin*, *-*-mingw*]
894         (set_ld_library_path_env_vars): Add the library search dir to PATH
895         (and save PATH for later).
896         (restore_ld_library_path_env_vars): Restore PATH.
897
898 2012-03-20  Peter Rosin  <peda@lysator.liu.se>
899
900         * testsuite/libffi.call/strlen2_win32.c (main): Remove bug.
901         * src/x86/win32.S [MSVC] (ffi_closure_SYSV): Make the 'stub' label
902         visible outside the PROC, so that ffi_closure_THISCALL can see it.
903
904 2012-03-20  Peter Rosin  <peda@lysator.liu.se>
905
906         * testsuite/libffi.call/strlen2_win32.c (main): Remove bug.
907         * src/x86/win32.S [MSVC] (ffi_closure_SYSV): Make the 'stub' label
908         visible outside the PROC, so that ffi_closure_THISCALL can see it.
909
910 2012-03-19  Alan Hourihane  <alanh@fairlite.co.uk>
911
912         * src/m68k/ffi.c: Add MINT support.
913         * src/m68k/sysv.S: Ditto.
914
915 2012-03-06  Chung-Lin Tang  <cltang@codesourcery.com>
916
917         * src/arm/ffi.c (ffi_call): Add __ARM_EABI__ guard around call to
918         ffi_call_VFP().
919         (ffi_prep_closure_loc): Add __ARM_EABI__ guard around use of
920         ffi_closure_VFP.
921         * src/arm/sysv.S: Add __ARM_EABI__ guard around VFP code.
922
923 2012-03-19  chennam  <csit@axway.com>
924
925         * src/powerpc/ffi_darwin.c (ffi_prep_closure_loc): Fix AIX closure
926         support.
927
928 2012-03-13  Kaz Kojima  <kkojima@gcc.gnu.org>
929
930         * src/sh/ffi.c (ffi_prep_closure_loc): Don't ASSERT ABI test,
931         just return FFI_BAD_ABI when things are wrong.
932         * src/sh64/ffi.c (ffi_prep_closure_loc): Ditto.
933
934 2012-03-09  David Edelsohn  <dje.gcc@gmail.com>
935
936         * src/powerpc/aix_closure.S (ffi_closure_ASM): Adjust for Darwin64
937         change to return value of ffi_closure_helper_DARWIN and load type
938         from return type.
939
940 2012-03-03  H.J. Lu  <hongjiu.lu@intel.com>
941
942         * src/x86/ffi64.c (ffi_call): Cast the return value to unsigned
943         long.
944         (ffi_prep_closure_loc): Cast to 64bit address in trampoline.
945         (ffi_closure_unix64_inner): Cast return pointer to unsigned long
946         first.
947
948         * src/x86/ffitarget.h (FFI_SIZEOF_ARG): Defined to 8 for x32.
949         (ffi_arg): Set to unsigned long long for x32.
950         (ffi_sarg): Set to long long for x32.
951
952 2012-03-03  H.J. Lu  <hongjiu.lu@intel.com>
953
954         * src/prep_cif.c (ffi_prep_cif_core): Properly check bad ABI.
955
956 2012-03-03  Andoni Morales Alastruey  <ylatuya@gmail.com>
957
958         * configure.ac: Add -no-undefined for both 32- and 64-bit x86
959         windows-like hosts.
960         * configure: Rebuilt.
961
962 2012-02-27  Mikael Pettersson  <mikpe@it.uu.se>
963
964         PR libffi/52223
965         * Makefile.am (FLAGS_TO_PASS): Define.
966         * Makefile.in: Regenerate.
967
968 2012-02-23  Anthony Green  <green@moxielogic.com>
969
970         * src/*/ffitarget.h: Ensure that users never include ffitarget.h
971         directly.
972
973 2012-02-23  Kai Tietz  <ktietz@redhat.com>
974
975         PR libffi/52221
976         * src/x86/ffi.c (ffi_closure_raw_THISCALL): New
977         prototype.
978         (ffi_prep_raw_closure_loc): Use ffi_closure_raw_THISCALL for
979         thiscall-convention.
980         (ffi_raw_call): Use ffi_prep_args_raw.
981         * src/x86/win32.S (ffi_closure_raw_THISCALL): Add
982         implementation for stub.
983
984 2012-02-10  Kai Tietz  <ktietz@redhat.com>
985
986         * configure.ac (AM_LTLDFLAGS): Add -no-undefine for x64
987         windows target.
988         * configure: Regenerated.
989
990 2012-02-08  Kai Tietz  <ktietz@redhat.com>
991
992         * src/prep_cif.c (ffi_prep_cif): Allow for X86_WIN32
993         also FFI_THISCALL.
994         * src/x86/ffi.c (ffi_closure_THISCALL): Add prototype.
995         (FFI_INIT_TRAMPOLINE_THISCALL): New trampoline code.
996         (ffi_prep_closure_loc): Add FFI_THISCALL support.
997         * src/x86/ffitarget.h (FFI_TRAMPOLINE_SIZE): Adjust size.
998         * src/x86/win32.S (ffi_closure_THISCALL): New closure code
999         for thiscall-calling convention.
1000         * testsuite/libffi.call/closure_thiscall.c: New test.
1001
1002 2012-01-28  Kai Tietz  <ktietz@redhat.com>
1003
1004         * src/libffi/src/x86/ffi.c (ffi_call_win32): Add new
1005         argument to prototype for specify calling-convention.
1006         (ffi_call): Add support for stdcall/thiscall convention.
1007         (ffi_prep_args): Likewise.
1008         (ffi_raw_call): Likewise.
1009         * src/x86/ffitarget.h (ffi_abi): Add FFI_THISCALL and
1010         FFI_FASTCALL.
1011         * src/x86/win32.S (_ffi_call_win32): Add support for
1012         fastcall/thiscall calling-convention calls.
1013         * testsuite/libffi.call/fastthis1_win32.c: New test.
1014         * testsuite/libffi.call/fastthis2_win32.c: New test.
1015         * testsuite/libffi.call/fastthis3_win32.c: New test.
1016         * testsuite/libffi.call/strlen2_win32.c: New test.
1017         * testsuite/libffi.call/many2_win32.c: New test.
1018         * testsuite/libffi.call/struct1_win32.c: New test.
1019         * testsuite/libffi.call/struct2_win32.c: New test.
1020
1021 2012-01-23  Uros Bizjak  <ubizjak@gmail.com>
1022
1023         * src/alpha/ffi.c (ffi_prep_closure_loc): Check for bad ABI.
1024
1025 2012-01-23  Anthony Green  <green@moxielogic.com>
1026             Chris Young  <cdyoung@ntlworld.com>
1027
1028         * configure.ac: Add Amiga support.
1029         * configure: Rebuilt.
1030
1031 2012-01-23  Dmitry Nadezhin  <dmitry.nadezhin@gmail.com>
1032
1033         * include/ffi_common.h (LIKELY, UNLIKELY): Fix definitions.
1034
1035 2012-01-23  Andreas Schwab  <schwab@linux-m68k.org>
1036
1037         * src/m68k/sysv.S (ffi_call_SYSV): Properly test for plain
1038         mc68000.  Test for __HAVE_68881__ in addition to __MC68881__.
1039
1040 2012-01-19  Jakub Jelinek  <jakub@redhat.com>
1041
1042         PR rtl-optimization/48496
1043         * src/ia64/ffi.c (ffi_call): Fix up aliasing violations.
1044
1045 2012-01-09  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1046
1047         * configure.ac (i?86-*-*): Set TARGET to X86_64.
1048         * configure: Regenerate.
1049
1050 2011-12-07  Andrew Pinski  <apinski@cavium.com>
1051
1052         PR libffi/50051
1053         * src/mips/n32.S: Add ".set mips4".
1054
1055 2011-11-21  Andreas Tobler  <andreast@fgznet.ch>
1056
1057         * configure: Regenerate.
1058
1059 2011-11-12  David Gilbert <david.gilbert@linaro.org>
1060
1061         * doc/libffi.texi, include/ffi.h.in, include/ffi_common.h,
1062         man/Makefile.am, man/ffi.3, man/ffi_prep_cif.3,
1063         man/ffi_prep_cif_var.3, src/arm/ffi.c, src/arm/ffitarget.h,
1064         src/cris/ffi.c, src/prep_cif.c,
1065         testsuite/libffi.call/cls_double_va.c,
1066         testsuite/libffi.call/cls_longdouble_va.c,
1067         testsuite/libffi.call/float_va.c: Many changes to support variadic
1068         function calls.
1069
1070 2011-11-12  Kyle Moffett <Kyle.D.Moffett@boeing.com>
1071
1072         * src/powerpc/ffi.c, src/powerpc/ffitarget.h,
1073         src/powerpc/ppc_closure.S, src/powerpc/sysv.S: Many changes for
1074         softfloat powerpc variants.
1075
1076 2011-11-12  Petr Salinger <Petr.Salinger@seznam.cz>
1077
1078         * configure.ac (FFI_EXEC_TRAMPOLINE_TABLE): Fix kfreebsd support.
1079         * configure: Rebuilt.
1080
1081 2011-11-12  Timothy Wall  <twall@users.sf.net>
1082
1083         * src/arm/ffi.c (ffi_prep_args, ffi_prep_incoming_args_SYSV): Max
1084         alignment of 4 for wince on ARM.
1085
1086 2011-11-12  Kyle Moffett <Kyle.D.Moffett@boeing.com>
1087             Anthony Green <green@moxielogic.com>
1088
1089         * src/ppc/sysv.S, src/ppc/ffi.c: Remove use of ppc string
1090         instructions (not available on some cores, like the PPC440).
1091
1092 2011-11-12  Kimura Wataru  <kimuraw@i.nifty.jp>
1093
1094         * m4/ax_enable_builddir: Change from string comparison to numeric
1095         comparison for wc output.
1096         * configure.ac: Enable FFI_MMAP_EXEC_WRIT for darwin11 aka Mac OS
1097         X 10.7.
1098         * configure: Rebuilt.
1099
1100 2011-11-12  Anthony Green  <green@moxielogic.com>
1101
1102         * Makefile.am (AM_CCASFLAGS): Add -g option to build assembly
1103         files with debug info.
1104         * Makefile.in: Rebuilt.
1105
1106 2011-11-12  Jasper Lievisse Adriaanse <jasper@openbsd.org>
1107
1108         * README: Update list of supported OpenBSD systems.
1109
1110 2011-11-12  Anthony Green  <green@moxielogic.com>
1111
1112         * libtool-version: Update.
1113         * Makefile.am (nodist_libffi_la_SOURCES): Add src/debug.c if
1114         FFI_DEBUG.
1115         (libffi_la_SOURCES): Remove src/debug.c
1116         (EXTRA_DIST): Add src/debug.c
1117         * Makefile.in: Rebuilt.
1118         * README: Update for 3.0.11.
1119
1120 2011-11-10  Richard Henderson  <rth@redhat.com>
1121
1122         * configure.ac (GCC_AS_CFI_PSEUDO_OP): Use it instead of inline check.
1123         * configure, aclocal.m4: Rebuild.
1124
1125 2011-09-04  Iain Sandoe  <iains@gcc.gnu.org>
1126
1127         PR libffi/49594
1128         * src/powerpc/darwin_closure.S (stubs): Make the stub binding
1129         helper reference track the architecture pointer size.
1130
1131 2011-08-25  Andrew Haley  <aph@redhat.com>
1132
1133         * src/arm/ffi.c (FFI_INIT_TRAMPOLINE): Remove hard-coded assembly
1134         instructions.
1135         * src/arm/sysv.S (ffi_arm_trampoline): Put them here instead.
1136
1137 2011-07-11  Andrew Haley  <aph@redhat.com>
1138
1139         * src/arm/ffi.c (FFI_INIT_TRAMPOLINE): Clear icache.
1140
1141 2011-06-29  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1142
1143         * testsuite/libffi.call/cls_double_va.c: Move PR number to comment.
1144         * testsuite/libffi.call/cls_longdouble_va.c: Likewise.
1145
1146 2011-06-29  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1147
1148         PR libffi/46660
1149         * testsuite/libffi.call/cls_double_va.c: xfail dg-output on
1150         mips-sgi-irix6*.
1151         * testsuite/libffi.call/cls_longdouble_va.c: Likewise.
1152
1153 2011-06-14  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1154
1155         * testsuite/libffi.call/huge_struct.c (test_large_fn): Use PRIu8,
1156         PRId8 instead of %hhu, %hhd.
1157         * testsuite/libffi.call/ffitest.h [__alpha__ && __osf__] (PRId8,
1158         PRIu8): Define.
1159         [__sgi__] (PRId8, PRIu8): Define.
1160
1161 2011-04-29  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1162
1163         * src/alpha/osf.S (UA_SI, FDE_ENCODING, FDE_ENCODE, FDE_ARANGE):
1164         Define.
1165         Use them to handle ELF vs. ECOFF differences.
1166         [__osf__] (_GLOBAL__F_ffi_call_osf): Define.
1167
1168 2011-03-30  Timothy Wall  <twall@users.sf.net>
1169
1170         * src/powerpc/darwin.S: Fix unknown FDE encoding.
1171         * src/powerpc/darwin_closure.S: ditto.
1172
1173 2011-02-25  Anthony Green  <green@moxielogic.com>
1174
1175         * src/powerpc/ffi.c (ffi_prep_closure_loc): Allow for more
1176         32-bit ABIs.
1177
1178 2011-02-15  Anthony Green  <green@moxielogic.com>
1179
1180         * m4/ax_cc_maxopt.m4: Don't -malign-double or use -ffast-math.
1181         * configure: Rebuilt.
1182
1183 2011-02-13  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1184
1185         * configure: Regenerate.
1186
1187 2011-02-13  Anthony Green  <green@moxielogic.com>
1188
1189         * include/ffi_common.h (UNLIKELY, LIKELY): Define.
1190         * src/x86/ffi64.c (UNLIKELY, LIKELY): Remove definition.
1191         * src/prep_cif.c (UNLIKELY, LIKELY): Remove definition.
1192
1193         * src/prep_cif.c (initialize_aggregate): Convert assertion into
1194         FFI_BAD_TYPEDEF return.  Initialize arg size and alignment to 0.
1195
1196         * src/pa/ffi.c (ffi_prep_closure_loc): Don't ASSERT ABI test,
1197         just return FFI_BAD_ABI when things are wrong.
1198         * src/arm/ffi.c (ffi_prep_closure_loc): Ditto.
1199         * src/powerpc/ffi.c (ffi_prep_closure_loc): Ditto.
1200         * src/mips/ffi.c (ffi_prep_closure_loc): Ditto.
1201         * src/ia64/ffi.c (ffi_prep_closure_loc): Ditto.
1202         * src/avr32/ffi.c (ffi_prep_closure_loc): Ditto.
1203
1204 2011-02-11  Anthony Green  <green@moxielogic.com>
1205
1206         * src/sparc/ffi.c (ffi_prep_closure_loc): Don't ASSERT ABI test,
1207         just return FFI_BAD_ABI when things are wrong.
1208
1209 2012-02-11  Eric Botcazou  <ebotcazou@adacore.com>
1210
1211         * src/sparc/v9.S (STACKFRAME): Bump to 176.
1212
1213 2011-02-09  Stuart Shelton  <srcshelton@gmail.com>
1214
1215         http://bugs.gentoo.org/show_bug.cgi?id=286911
1216         * src/mips/ffitarget.h: Clean up error messages.
1217         * src/java_raw_api.c (ffi_java_translate_args): Cast raw arg to
1218         ffi_raw*.
1219         * include/ffi.h.in: Add pragma for SGI compiler.
1220
1221 2011-02-09  Anthony Green  <green@moxielogic.com>
1222
1223         * configure.ac: Add powerpc64-*-darwin* support.
1224
1225 2011-02-09  Anthony Green <green@moxielogic.com>
1226
1227         * README: Mention Interix.
1228
1229 2011-02-09  Jonathan Callen  <abcd@gentoo.org>
1230
1231         * configure.ac: Add Interix to win32/cygwin/mingw case.
1232         * configure: Ditto.
1233         * src/closures.c: Treat Interix like Cygwin, instead of as a
1234         generic win32.
1235
1236 2011-02-09  Anthony Green <green@moxielogic.com>
1237
1238         * testsuite/libffi.call/err_bad_typedef.c: Remove xfail.
1239         * testsuite/libffi.call/err_bad_abi.c: Remove xfail.
1240         * src/x86/ffi64.c (UNLIKELY, LIKELY): Define.
1241         (ffi_prep_closure_loc): Check for bad ABI.
1242         * src/prep_cif.c (UNLIKELY, LIKELY): Define.
1243         (initialize_aggregate): Check for bad types.
1244
1245 2011-02-09  Landon Fuller <landonf@plausible.coop>
1246
1247         * Makefile.am (EXTRA_DIST): Add build-ios.sh, src/arm/gentramp.sh,
1248         src/arm/trampoline.S.
1249         (nodist_libffi_la_SOURCES): Add src/arc/trampoline.S.
1250         * configure.ac (FFI_EXEC_TRAMPOLINE_TABLE): Define.
1251         * src/arm/ffi.c (ffi_trampoline_table)
1252         (ffi_closure_trampoline_table_page, ffi_trampoline_table_entry)
1253         (FFI_TRAMPOLINE_CODELOC_CONFIG, FFI_TRAMPOLINE_CONFIG_PAGE_OFFSET)
1254         (FFI_TRAMPOLINE_COUNT, ffi_trampoline_lock, ffi_trampoline_tables)
1255         (ffi_trampoline_table_alloc, ffi_closure_alloc, ffi_closure_free):
1256         Define for FFI_EXEC_TRAMPOLINE_TABLE case (iOS).
1257         (ffi_prep_closure_loc): Handl FFI_EXEC_TRAMPOLINE_TABLE case
1258         separately.
1259         * src/arm/sysv.S: Handle Apple iOS host.
1260         * src/closures.c: Handle FFI_EXEC_TRAMPOLINE_TABLE case.
1261         * build-ios.sh: New file.
1262         * fficonfig.h.in, configure, Makefile.in: Rebuilt.
1263         * README: Mention ARM iOS.
1264
1265 2011-02-08  Oren Held  <orenhe@il.ibm.com>
1266
1267         * src/dlmalloc.c (_STRUCT_MALLINFO): Define in order to avoid
1268         redefinition of mallinfo on HP-UX.
1269
1270 2011-02-08  Ginn Chen  <ginn.chen@oracle.com>
1271
1272         * src/sparc/ffi.c (ffi_call): Make compatible with Solaris Studio
1273         aggregate return ABI.  Flush cache.
1274         (ffi_prep_closure_loc): Flush cache.
1275
1276 2011-02-11  Anthony Green  <green@moxielogic.com>
1277
1278         From Tom Honermann <tom.honermann@oracle.com>:
1279         * src/powerpc/aix.S (ffi_call_AIX): Support for xlc toolchain on
1280         AIX.  Declare .ffi_prep_args.  Insert nops after branch
1281         instructions so that the AIX linker can insert TOC reload
1282         instructions.
1283         * src/powerpc/aix_closure.S: Declare .ffi_closure_helper_DARWIN.
1284
1285 2011-02-08  Ed  <ed@kdtc.net>
1286
1287         * src/powerpc/asm.h: Fix grammar nit in comment.
1288
1289 2011-02-08  Uli Link  <ul.mcamafia@linkitup.de>
1290
1291         * include/ffi.h.in (FFI_64_BIT_MAX): Define and use.
1292
1293 2011-02-09  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1294
1295         PR libffi/46661
1296         * testsuite/libffi.call/cls_pointer.c (main): Cast void * to
1297         uintptr_t first.
1298         * testsuite/libffi.call/cls_pointer_stack.c (main): Likewise.
1299
1300 2011-02-08  Rafael Avila de Espindola  <respindola@mozilla.com>
1301
1302         * configure.ac: Fix x86 test for pc related relocs.
1303         * configure: Rebuilt.
1304
1305 2011-02-07  Joel Sherrill <joel.sherrill@oarcorp.com>
1306
1307         * libffi/src/m68k/ffi.c: Add RTEMS support for cache flushing.
1308         Handle case when CPU variant does not have long double support.
1309         * libffi/src/m68k/sysv.S: Add support for mc68000, Coldfire,
1310         and cores with soft floating point.
1311
1312 2011-02-07  Joel Sherrill <joel.sherrill@oarcorp.com>
1313
1314         * configure.ac: Add mips*-*-rtems* support.
1315         * configure: Regenerate.
1316         * src/mips/ffitarget.h: Ensure needed constants are available
1317         for targets which do not have sgidefs.h.
1318
1319 2011-01-26  Dave Korn  <dave.korn.cygwin@gmail.com>
1320
1321         PR target/40125
1322         * configure.ac (AM_LTLDFLAGS): Add -bindir option for windows DLLs.
1323         * configure: Regenerate.
1324
1325 2010-12-18  Iain Sandoe  <iains@gcc.gnu.org>
1326
1327         PR libffi/29152
1328         PR libffi/42378
1329         * src/powerpc/darwin_closure.S: Provide Darwin64 implementation,
1330         update comments.
1331         * src/powerpc/ffitarget.h (POWERPC_DARWIN64): New,
1332         (FFI_TRAMPOLINE_SIZE): Update for Darwin64.
1333         * src/powerpc/darwin.S: Provide Darwin64 implementation,
1334         update comments.
1335         * src/powerpc/ffi_darwin.c: Likewise.
1336
1337 2010-12-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1338
1339         * configure.ac (libffi_cv_as_ascii_pseudo_op): Use double
1340         backslashes.
1341         (libffi_cv_as_string_pseudo_op): Likewise.
1342         * configure: Regenerate.
1343
1344 2010-12-03  Chung-Lin Tang  <cltang@codesourcery.com>
1345
1346         * src/arm/sysv.S (ffi_closure_SYSV): Add UNWIND to .pad directive.
1347         (ffi_closure_VFP): Same.
1348         (ffi_call_VFP): Move down to before ffi_closure_VFP. Add '.fpu vfp'
1349         directive.
1350
1351 2010-12-01  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1352
1353         * testsuite/libffi.call/ffitest.h [__sgi] (PRId64, PRIu64): Define.
1354         (PRIuPTR): Define.
1355
1356 2010-11-29  Richard Henderson  <rth@redhat.com>
1357             Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1358
1359         * src/x86/sysv.S (FDE_ENCODING, FDE_ENCODE): Define.
1360         (.eh_frame): Use FDE_ENCODING.
1361         (.LASFDE1, .LASFDE2, LASFDE3): Simplify with FDE_ENCODE.
1362
1363 2010-11-22  Jacek Caban <jacek@codeweavers.com>
1364
1365         * configure.ac: Check for symbol underscores on mingw-w64.
1366         * configure: Rebuilt.
1367         * src/x86/win64.S: Correctly access extern symbols in respect to
1368         underscores.
1369
1370 2010-11-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1371
1372         * testsuite/lib/libffi-dg.exp: Rename ...
1373         * testsuite/lib/libffi.exp: ... to this.
1374         * libffi/testsuite/libffi.call/call.exp: Don't load libffi-dg.exp.
1375         * libffi/testsuite/libffi.special/special.exp: Likewise.
1376
1377 2010-10-28  Chung-Lin Tang  <cltang@codesourcery.com>
1378
1379         * src/arm/ffi.c (ffi_prep_args): Add VFP register argument handling
1380         code, new parameter, and return value. Update comments.
1381         (ffi_prep_cif_machdep): Add case for VFP struct return values. Add
1382         call to layout_vfp_args().
1383         (ffi_call_SYSV): Update declaration.
1384         (ffi_call_VFP): New declaration.
1385         (ffi_call): Add VFP struct return conditions. Call ffi_call_VFP()
1386         when ABI is FFI_VFP.
1387         (ffi_closure_VFP): New declaration.
1388         (ffi_closure_SYSV_inner): Add new vfp_args parameter, update call to
1389         ffi_prep_incoming_args_SYSV().
1390         (ffi_prep_incoming_args_SYSV): Update parameters. Add VFP argument
1391         case handling.
1392         (ffi_prep_closure_loc): Pass ffi_closure_VFP to trampoline
1393         construction under VFP hard-float.
1394         (rec_vfp_type_p): New function.
1395         (vfp_type_p): Same.
1396         (place_vfp_arg): Same.
1397         (layout_vfp_args): Same.
1398         * src/arm/ffitarget.h (ffi_abi): Add FFI_VFP. Define FFI_DEFAULT_ABI
1399         based on __ARM_PCS_VFP.
1400         (FFI_EXTRA_CIF_FIELDS): Define for adding VFP hard-float specific
1401         fields.
1402         (FFI_TYPE_STRUCT_VFP_FLOAT): Define internally used type code.
1403         (FFI_TYPE_STRUCT_VFP_DOUBLE): Same.
1404         * src/arm/sysv.S (ffi_call_SYSV): Change call of ffi_prep_args() to
1405         direct call. Move function pointer load upwards.
1406         (ffi_call_VFP): New function.
1407         (ffi_closure_VFP): Same.
1408
1409         * testsuite/lib/libffi-dg.exp (check-flags): New function.
1410         (dg-skip-if): New function.
1411         * testsuite/libffi.call/cls_double_va.c: Skip if target is arm*-*-*
1412         and compiler options include -mfloat-abi=hard.
1413         * testsuite/libffi.call/cls_longdouble_va.c: Same.
1414
1415 2010-10-01  Jakub Jelinek  <jakub@redhat.com>
1416
1417         PR libffi/45677
1418         * src/x86/ffi64.c (ffi_prep_cif_machdep): Ensure cif->bytes is
1419         a multiple of 8.
1420         * testsuite/libffi.call/many2.c: New test.
1421
1422 2010-08-20  Mark Wielaard  <mjw@redhat.com>
1423
1424         * src/closures.c (open_temp_exec_file_mnt): Check if getmntent_r
1425         returns NULL.
1426
1427 2010-08-09  Andreas Tobler  <andreast@fgznet.ch>
1428
1429         * configure.ac: Add target powerpc64-*-freebsd*.
1430         * configure: Regenerate.
1431         * testsuite/libffi.call/cls_align_longdouble_split.c: Pass
1432         -mlong-double-128 only to linux targets.
1433         * testsuite/libffi.call/cls_align_longdouble_split2.c: Likewise.
1434         * testsuite/libffi.call/cls_longdouble.c: Likewise.
1435         * testsuite/libffi.call/huge_struct.c: Likewise.
1436
1437 2010-08-05  Dan Witte  <dwitte@mozilla.com>
1438
1439         * Makefile.am: Pass FFI_DEBUG define to msvcc.sh for linking to the
1440         debug CRT when --enable-debug is given.
1441         * configure.ac: Define it.
1442         * msvcc.sh: Translate -g and -DFFI_DEBUG appropriately.
1443
1444 2010-08-04  Dan Witte  <dwitte@mozilla.com>
1445
1446         * src/x86/ffitarget.h: Add X86_ANY define for all x86/x86_64
1447         platforms.
1448         * src/x86/ffi.c: Remove redundant ifdef checks.
1449         * src/prep_cif.c: Push stack space computation into src/x86/ffi.c
1450         for X86_ANY so return value space doesn't get added twice.
1451
1452 2010-08-03  Neil Rashbrooke <neil@parkwaycc.co.uk>
1453
1454         * msvcc.sh: Don't pass -safeseh to ml64 because behavior is buggy.
1455
1456 2010-07-22  Dan Witte  <dwitte@mozilla.com>
1457
1458         * src/*/ffitarget.h: Make FFI_LAST_ABI one past the last valid ABI.
1459         * src/prep_cif.c: Fix ABI assertion.
1460         * src/cris/ffi.c: Ditto.
1461
1462 2010-07-10  Evan Phoenix  <evan@fallingsnow.net>
1463
1464         * src/closures.c (selinux_enabled_check): Fix strncmp usage bug.
1465
1466 2010-07-07  Dan Horák <dan@danny.cz>
1467
1468         * include/ffi.h.in: Protect #define with #ifndef.
1469         * src/powerpc/ffitarget.h: Ditto.
1470         * src/s390/ffitarget.h: Ditto.
1471         * src/sparc/ffitarget.h: Ditto.
1472
1473 2010-07-07   Neil Roberts <neil@linux.intel.com>
1474
1475         * src/x86/sysv.S (ffi_call_SYSV): Align the stack pointer to
1476         16-bytes.
1477
1478 2010-07-02  Jakub Jelinek  <jakub@redhat.com>
1479
1480         * Makefile.am (AM_MAKEFLAGS): Pass also mandir to submakes.
1481         * Makefile.in: Regenerated.
1482
1483 2010-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1484
1485         * configure.ac (libffi_cv_as_x86_pcrel): Check for illegal in as
1486         output, too.
1487         (libffi_cv_as_ascii_pseudo_op): Check for .ascii.
1488         (libffi_cv_as_string_pseudo_op): Check for .string.
1489         * configure: Regenerate.
1490         * fficonfig.h.in: Regenerate.
1491         * src/x86/sysv.S (.eh_frame): Use .ascii, .string or error.
1492
1493 2010-05-11  Dan Witte  <dwitte@mozilla.com>
1494
1495         * doc/libffi.tex: Document previous change.
1496
1497 2010-05-11  Makoto Kato <m_kato@ga2.so-net.ne.jp>
1498
1499         * src/x86/ffi.c (ffi_call): Don't copy structs passed by value.
1500
1501 2010-05-05  Michael Kohler <michaelkohler@live.com>
1502
1503         * src/dlmalloc.c (dlfree): Fix spelling.
1504         * src/ia64/ffi.c (ffi_prep_cif_machdep): Ditto.
1505         * configure.ac: Ditto.
1506         * configure: Rebuilt.
1507
1508 2010-04-13  Dan Witte  <dwitte@mozilla.com>
1509
1510         * msvcc.sh: Build with -W3 instead of -Wall.
1511         * src/powerpc/ffi_darwin.c: Remove build warnings.
1512         * src/x86/ffi.c: Ditto.
1513         * src/x86/ffitarget.h: Ditto.
1514
1515 2010-04-12  Dan Witte  <dwitte@mozilla.com>
1516             Walter Meinl <wuno@lsvw.de>
1517
1518         * configure.ac: Add OS/2 support.
1519         * configure: Rebuilt.
1520         * src/closures.c: Ditto.
1521         * src/dlmalloc.c: Ditto.
1522         * src/x86/win32.S: Ditto.
1523
1524 2010-04-07  Jakub Jelinek  <jakub@redhat.com>
1525
1526         * testsuite/libffi.call/err_bad_abi.c: Remove unused args variable.
1527
1528 2010-04-02  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1529
1530         * Makefile.in: Regenerate.
1531         * aclocal.m4: Regenerate.
1532         * include/Makefile.in: Regenerate.
1533         * man/Makefile.in: Regenerate.
1534         * testsuite/Makefile.in: Regenerate.
1535
1536 2010-03-30  Dan Witte  <dwitte@mozilla.com>
1537
1538         * msvcc.sh: Disable build warnings.
1539         * README (tested): Clarify windows build procedure.
1540
1541 2010-03-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1542
1543         * configure.ac (libffi_cv_as_x86_64_unwind_section_type): New test.
1544         * configure: Regenerate.
1545         * fficonfig.h.in: Regenerate.
1546         * libffi/src/x86/unix64.S (.eh_frame)
1547         [HAVE_AS_X86_64_UNWIND_SECTION_TYPE]: Use @unwind section type.
1548
1549 2010-03-14  Matthias Klose  <doko@ubuntu.com>
1550
1551         * src/x86/ffi64.c: Fix typo in comment.
1552         * src/x86/ffi.c: Use /* ... */ comment style.
1553
1554 2010-02-24  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1555
1556         * doc/libffi.texi (The Closure API): Fix typo.
1557         * doc/libffi.info: Remove.
1558
1559 2010-02-15  Matthias Klose  <doko@ubuntu.com>
1560
1561         * src/arm/sysv.S (__ARM_ARCH__): Define for processor
1562         __ARM_ARCH_7EM__.
1563
1564 2010-01-15  Anthony Green  <green@redhat.com>
1565
1566         * README: Add notes on building with Microsoft Visual C++.
1567
1568 2010-01-15  Daniel Witte  <dwitte@mozilla.com>
1569
1570         * msvcc.sh: New file.
1571
1572         * src/x86/win32.S: Port assembly routines to MSVC and #ifdef.
1573         * src/x86/ffi.c: Tweak function declaration and remove excess
1574         parens.
1575         * include/ffi.h.in: Add __declspec(align(8)) to typedef struct
1576         ffi_closure.
1577
1578         * src/x86/ffi.c: Merge ffi_call_SYSV and ffi_call_STDCALL into new
1579         function ffi_call_win32 on X86_WIN32.
1580         * src/x86/win32.S (ffi_call_SYSV): Rename to ffi_call_win32.
1581         (ffi_call_STDCALL): Remove.
1582
1583         * src/prep_cif.c (ffi_prep_cif): Move stack space allocation code
1584         to ffi_prep_cif_machdep for x86.
1585         * src/x86/ffi.c (ffi_prep_cif_machdep): To here.
1586
1587 2010-01-15  Oliver Kiddle  <okiddle@yahoo.co.uk>
1588
1589         * src/x86/ffitarget.h (ffi_abi): Check for __i386 and __amd64 for
1590         Sun Studio compiler compatibility.
1591
1592 2010-01-12  Conrad Irwin <conrad.irwin@gmail.com>
1593
1594         * doc/libffi.texi: Add closure example.
1595
1596 2010-01-07  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1597
1598         PR libffi/40701
1599         * testsuite/libffi.call/ffitest.h [__alpha__ && __osf__] (PRIdLL,
1600         PRIuLL, PRId64, PRIu64, PRIuPTR): Define.
1601         * testsuite/libffi.call/cls_align_sint64.c: Add -Wno-format on
1602         alpha*-dec-osf*.
1603         * testsuite/libffi.call/cls_align_uint64.c: Likewise.
1604         * testsuite/libffi.call/cls_ulonglong.c: Likewise.
1605         * testsuite/libffi.call/return_ll1.c: Likewise.
1606         * testsuite/libffi.call/stret_medium2.c: Likewise.
1607         * testsuite/libffi.special/ffitestcxx.h (allocate_mmap): Cast
1608         MAP_FAILED to char *.
1609
1610 2010-01-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1611
1612         * src/mips/n32.S: Use .abicalls and .eh_frame with __GNUC__.
1613
1614 2009-12-31  Anthony Green  <green@redhat.com>
1615
1616         * README: Update for libffi 3.0.9.
1617
1618 2009-12-27  Matthias Klose  <doko@ubuntu.com>
1619
1620         * configure.ac (HAVE_LONG_DOUBLE): Define for mips when
1621         appropriate.
1622         * configure: Rebuilt.
1623
1624 2009-12-26  Anthony Green  <green@redhat.com>
1625
1626         * testsuite/libffi.call/cls_longdouble_va.c: Mark as xfail for
1627         avr32*-*-*.
1628         * testsuite/libffi.call/cls_double_va.c: Ditto.
1629
1630 2009-12-26  Andreas Tobler  <a.tobler@schweiz.org>
1631
1632         * testsuite/libffi.call/ffitest.h: Conditionally include stdint.h
1633         and inttypes.h.
1634         * testsuite/libffi.special/unwindtest.cc: Ditto.
1635
1636 2009-12-26  Andreas Tobler  <a.tobler@schweiz.org>
1637
1638         * configure.ac: Add amd64-*-openbsd*.
1639         * configure: Rebuilt.
1640         * testsuite/lib/libffi-dg.exp (libffi_target_compile): Link
1641         openbsd programs with -lpthread.
1642
1643 2009-12-26  Anthony Green  <green@redhat.com>
1644
1645         * testsuite/libffi.call/cls_double_va.c,
1646         testsuite/libffi.call/cls_longdouble.c,
1647         testsuite/libffi.call/cls_longdouble_va.c,
1648         testsuite/libffi.call/cls_pointer.c,
1649         testsuite/libffi.call/cls_pointer_stack.c: Remove xfail for
1650         mips*-*-* and arm*-*-*.
1651         * testsuite/libffi.call/cls_align_longdouble_split.c,
1652         testsuite/libffi.call/cls_align_longdouble_split2.c,
1653         testsuite/libffi.call/stret_medium2.c,
1654         testsuite/libffi.call/stret_medium.c,
1655         testsuite/libffi.call/stret_large.c,
1656         testsuite/libffi.call/stret_large2.c: Remove xfail for arm*-*-*.
1657
1658 2009-12-31  Kay Tietz  <ktietz70@googlemail.com>
1659
1660         * testsuite/libffi.call/ffitest.h,
1661         testsuite/libffi.special/ffitestcxx.h (PRIdLL, PRuLL): Fix
1662         definitions.
1663
1664 2009-12-31  Carlo Bramini  <carlo.bramix@libero.it>
1665
1666         * configure.ac (AM_LTLDFLAGS): Define for windows hosts.
1667         * Makefile.am (libffi_la_LDFLAGS): Add AM_LTLDFLAGS.
1668         * configure: Rebuilt.
1669         * Makefile.in: Rebuilt.
1670
1671 2009-12-31  Anthony Green  <green@redhat.com>
1672             Blake Chaffin.
1673
1674         * testsuite/libffi.call/huge_struct.c: New test case from Blake
1675         Chaffin @ Apple.
1676
1677 2009-12-28  David Edelsohn  <edelsohn@gnu.org>
1678
1679         * src/powerpc/ffi_darwin.c (ffi_prep_args): Copy abi and nargs to
1680         local variables.
1681         (aix_adjust_aggregate_sizes): New function.
1682         (ffi_prep_cif_machdep): Call it.
1683
1684 2009-12-26  Andreas Tobler  <a.tobler@schweiz.org>
1685
1686         * configure.ac: Define FFI_MMAP_EXEC_WRIT for the given targets.
1687         * configure: Regenerate.
1688         * fficonfig.h.in: Likewise.
1689         * src/closures.c: Remove the FFI_MMAP_EXEC_WRIT definition for
1690         Solaris/x86.
1691
1692 2009-12-26  Andreas Schwab  <schwab@linux-m68k.org>
1693
1694         * src/powerpc/ffi.c (ffi_prep_args_SYSV): Advance intarg_count
1695         when a float arguments is passed in memory.
1696         (ffi_closure_helper_SYSV): Mark general registers as used up when
1697         a 64bit or soft-float long double argument is passed in memory.
1698
1699 2009-12-25  Matthias Klose  <doko@ubuntu.com>
1700
1701         * man/ffi_call.3: Fix #include in examples.
1702         * doc/libffi.texi: Add dircategory.
1703
1704 2009-12-25  Frank Everdij <f.p.x.everdij@tudelft.nl>
1705
1706         * include/ffi.h.in: Placed '__GNUC__' ifdef around
1707         '__attribute__((aligned(8)))' in ffi_closure, fixes compile for
1708         IRIX MIPSPro c99.
1709         * include/ffi_common.h: Added '__sgi' define to non
1710         '__attribute__((__mode__()))' integer typedefs.
1711         * src/mips/ffi.c (ffi_call, ffi_closure_mips_inner_O32,
1712         ffi_closure_mips_inner_N32): Added 'defined(_MIPSEB)' to BE check.
1713         (ffi_closure_mips_inner_O32, ffi_closure_mips_inner_N32): Added
1714         FFI_LONGDOUBLE support and alignment(N32 only).
1715         * src/mips/ffitarget.h: Corrected '#include <sgidefs.h>' for IRIX and
1716         fixed non '__attribute__((__mode__()))' integer typedefs.
1717         * src/mips/n32.S: Put '#ifdef linux' around '.abicalls' and '.eh_frame'
1718         since they are Linux/GNU Assembler specific.
1719
1720 2009-12-25  Bradley Smith  <brad@brad-smith.co.uk>
1721
1722         * configure.ac, Makefile.am, src/avr32/ffi.c,
1723         src/avr32/ffitarget.h,
1724         src/avr32/sysv.S: Add AVR32 port.
1725         * configure, Makefile.in: Rebuilt.
1726
1727 2009-12-21  Andreas Tobler  <a.tobler@schweiz.org>
1728
1729         * configure.ac: Make i?86 build on FreeBSD and OpenBSD.
1730         * configure: Regenerate.
1731
1732 2009-12-15  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
1733
1734         * testsuite/libffi.call/ffitest.h: Define PRIuPTR on PA HP-UX.
1735
1736 2009-12-13  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
1737
1738         * src/pa/ffi.c (ffi_closure_inner_pa32): Handle FFI_TYPE_LONGDOUBLE
1739         type on HP-UX.
1740
1741 2012-02-13  Kai Tietz  <ktietz@redhat.com>
1742
1743         PR libffi/52221
1744         * src/x86/ffi.c (ffi_prep_raw_closure_loc): Add thiscall
1745         support for X86_WIN32.
1746         (FFI_INIT_TRAMPOLINE_THISCALL): Fix displacement.
1747
1748 2009-12-11  Eric Botcazou  <ebotcazou@adacore.com>
1749
1750         * src/sparc/ffi.c (ffi_closure_sparc_inner_v9): Properly align 'long
1751         double' arguments.
1752
1753 2009-12-11  Eric Botcazou  <ebotcazou@adacore.com>
1754
1755         * testsuite/libffi.call/ffitest.h: Define PRIuPTR on Solaris < 10.
1756
1757 2009-12-10  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1758
1759         PR libffi/40700
1760         * src/closures.c [X86_64 && __sun__ && __svr4__]
1761         (FFI_MMAP_EXEC_WRIT): Define.
1762
1763 2009-12-08  David Daney  <ddaney@caviumnetworks.com>
1764
1765         * testsuite/libffi.call/stret_medium.c: Remove xfail for mips*-*-*
1766         * testsuite/libffi.call/cls_align_longdouble_split2.c: Same.
1767         * testsuite/libffi.call/stret_large.c: Same.
1768         * testsuite/libffi.call/cls_align_longdouble_split.c: Same.
1769         * testsuite/libffi.call/stret_large2.c: Same.
1770         * testsuite/libffi.call/stret_medium2.c: Same.
1771
1772 2009-12-07  David Edelsohn  <edelsohn@gnu.org>
1773
1774         * src/powerpc/aix_closure.S (libffi_closure_ASM): Fix tablejump
1775         typo.
1776
1777 2009-12-05  David Edelsohn  <edelsohn@gnu.org>
1778
1779         * src/powerpc/aix.S: Update AIX32 code to be consistent with AIX64
1780         code.
1781         * src/powerpc/aix_closure.S: Same.
1782
1783 2009-12-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1784
1785         * Makefile.in: Regenerate.
1786         * configure: Regenerate.
1787         * include/Makefile.in: Regenerate.
1788         * man/Makefile.in: Regenerate.
1789         * testsuite/Makefile.in: Regenerate.
1790
1791 2009-12-04  David Edelsohn  <edelsohn@gnu.org>
1792
1793         * src/powerpc/aix_closure.S: Reorganize 64-bit code to match
1794         linux64_closure.S.
1795
1796 2009-12-04  Uros Bizjak  <ubizjak@gmail.com>
1797
1798         PR libffi/41908
1799         * src/x86/ffi64.c (classify_argument): Update from
1800         gcc/config/i386/i386.c.
1801         (ffi_closure_unix64_inner): Do not use the address of two consecutive
1802         SSE registers directly.
1803         * testsuite/libffi.call/cls_dbls_struct.c (main): Remove xfail
1804         for x86_64 linux targets.
1805
1806 2009-12-04  David Edelsohn  <edelsohn@gnu.org>
1807
1808         * src/powerpc/ffi_darwin.c (ffi_closure_helper_DARWIN): Increment
1809         pfr for long double split between fpr13 and stack.
1810
1811 2009-12-03  David Edelsohn  <edelsohn@gnu.org>
1812
1813         * src/powerpc/ffi_darwin.c (ffi_prep_args): Increment next_arg and
1814         fparg_count twice for long double.
1815
1816 2009-12-03  David Edelsohn  <edelsohn@gnu.org>
1817
1818         PR libffi/42243
1819         * src/powerpc/ffi_darwin.c (ffi_prep_args): Remove extra parentheses.
1820
1821 2009-12-03  Uros Bizjak  <ubizjak@gmail.com>
1822
1823         * testsuite/libffi.call/cls_longdouble_va.c (main): Fix format string.
1824         Remove xfails for x86 linux targets.
1825
1826 2009-12-02  David Edelsohn  <edelsohn@gnu.org>
1827
1828         * src/powerpc/ffi_darwin.c (ffi_prep_args): Fix typo in INT64
1829         case.
1830
1831 2009-12-01  David Edelsohn  <edelsohn@gnu.org>
1832
1833         * src/powerpc/aix.S (ffi_call_AIX): Convert to more standard
1834         register usage.  Call ffi_prep_args directly.  Add long double
1835         return value support.
1836         * src/powerpc/ffi_darwin.c (ffi_prep_args): Double arg increment
1837         applies to FFI_TYPE_DOUBLE.  Correct fpr_base increment typo.
1838         Separate FFI_TYPE_SINT32 and FFI_TYPE_UINT32 cases.
1839         (ffi_prep_cif_machdep): Only 16 byte stack alignment in 64 bit
1840         mode.
1841         (ffi_closure_helper_DARWIN): Remove nf and ng counters.  Move temp
1842         into case.
1843         * src/powerpc/aix_closure.S: Maintain 16 byte stack alignment.
1844         Allocate result area between params and FPRs.
1845
1846 2009-11-30  David Edelsohn  <edelsohn@gnu.org>
1847
1848         PR target/35484
1849         * src/powerpc/ffitarget.h (POWERPC64): Define for PPC64 Linux and
1850         AIX64.
1851         * src/powerpc/aix.S: Implement AIX64 version.
1852         * src/powerpc/aix_closure.S: Implement AIX64 version.
1853         (ffi_closure_ASM): Use extsb, lha and displament addresses.
1854         * src/powerpc/ffi_darwin.c (ffi_prep_args): Implement AIX64
1855         support.
1856         (ffi_prep_cif_machdep): Same.
1857         (ffi_call): Same.
1858         (ffi_closure_helper_DARWIN): Same.
1859
1860 2009-11-02  Andreas Tobler  <a.tobler@schweiz.org>
1861
1862         PR libffi/41908
1863         * testsuite/libffi.call/testclosure.c: New test.
1864
1865 2009-09-28  Kai Tietz  <kai.tietz@onevision.com>
1866
1867         * src/x86/win64.S (_ffi_call_win64 stack): Remove for gnu
1868         assembly version use of ___chkstk.
1869
1870 2009-09-23  Matthias Klose  <doko@ubuntu.com>
1871
1872         PR libffi/40242, PR libffi/41443
1873         * src/arm/sysv.S (__ARM_ARCH__): Define for processors
1874         __ARM_ARCH_6T2__, __ARM_ARCH_6M__, __ARM_ARCH_7__,
1875         __ARM_ARCH_7A__, __ARM_ARCH_7R__, __ARM_ARCH_7M__.
1876         Change the conditionals to __SOFTFP__ || __ARM_EABI__
1877         for -mfloat-abi=softfp to work.
1878
1879 2009-09-17  Loren J. Rittle  <ljrittle@acm.org>
1880
1881         PR testsuite/32843 (strikes again)
1882         * src/x86/ffi.c (ffi_prep_cif_machdep): Add X86_FREEBSD to
1883         enable proper extension on char and short.
1884
1885 2009-09-15  David Daney  <ddaney@caviumnetworks.com>
1886
1887         * src/java_raw_api.c (ffi_java_raw_to_rvalue): Remove special
1888         handling for FFI_TYPE_POINTER.
1889         * src/mips/ffitarget.h (FFI_TYPE_STRUCT_D_SOFT,
1890         FFI_TYPE_STRUCT_F_SOFT, FFI_TYPE_STRUCT_DD_SOFT,
1891         FFI_TYPE_STRUCT_FF_SOFT, FFI_TYPE_STRUCT_FD_SOFT,
1892         FFI_TYPE_STRUCT_DF_SOFT, FFI_TYPE_STRUCT_SOFT): New defines.
1893         (FFI_N32_SOFT_FLOAT, FFI_N64_SOFT_FLOAT): New ffi_abi enumerations.
1894         (enum ffi_abi): Set FFI_DEFAULT_ABI for soft-float.
1895         * src/mips/n32.S (ffi_call_N32): Add handling for soft-float
1896         structure and pointer returns.
1897         (ffi_closure_N32): Add handling for pointer returns.
1898         * src/mips/ffi.c (ffi_prep_args, calc_n32_struct_flags,
1899         calc_n32_return_struct_flags): Handle soft-float.
1900         (ffi_prep_cif_machdep):  Handle soft-float, fix pointer handling.
1901         (ffi_call_N32): Declare proper argument types.
1902         (ffi_call, copy_struct_N32, ffi_closure_mips_inner_N32): Handle
1903         soft-float.
1904
1905 2009-08-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1906
1907         * configure.ac (AC_PREREQ): Bump to 2.64.
1908
1909 2009-08-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1910
1911         * Makefile.am (install-html, install-pdf): Remove.
1912         * Makefile.in: Regenerate.
1913
1914         * Makefile.in: Regenerate.
1915         * aclocal.m4: Regenerate.
1916         * configure: Regenerate.
1917         * fficonfig.h.in: Regenerate.
1918         * include/Makefile.in: Regenerate.
1919         * man/Makefile.in: Regenerate.
1920         * testsuite/Makefile.in: Regenerate.
1921
1922 2011-08-22  Jasper Lievisse Adriaanse <jasper@openbsd.org>
1923
1924         * configure.ac: Add OpenBSD/hppa and OpenBSD/powerpc support.
1925         * configure: Rebuilt.
1926
1927 2009-07-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1928
1929         * configure.ac (_AC_ARG_VAR_PRECIOUS): Use m4_rename_force.
1930
1931 2009-07-24  Dave Korn  <dave.korn.cygwin@gmail.com>
1932
1933         PR libffi/40807
1934         * src/x86/ffi.c (ffi_prep_cif_machdep): Also use sign/zero-extending
1935         return types for X86_WIN32.
1936         * src/x86/win32.S (_ffi_call_SYSV): Handle omitted return types.
1937         (_ffi_call_STDCALL, _ffi_closure_SYSV, _ffi_closure_raw_SYSV,
1938         _ffi_closure_STDCALL): Likewise.
1939
1940         * src/closures.c (is_selinux_enabled): Define to const 0 for Cygwin.
1941         (dlmmap, dlmunmap): Also use these functions on Cygwin.
1942
1943 2009-07-11  Richard Sandiford  <rdsandiford@googlemail.com>
1944
1945         PR testsuite/40699
1946         PR testsuite/40707
1947         PR testsuite/40709
1948         * testsuite/lib/libffi-dg.exp: Revert 2009-07-02, 2009-07-01 and
1949         2009-06-30 commits.
1950
1951 2009-07-01  Richard Sandiford  <r.sandiford@uk.ibm.com>
1952
1953         * testsuite/lib/libffi-dg.exp (libffi-init): Set ld_library_path
1954         to "" before adding paths.  (This reinstates an assignment that
1955         was removed by my 2009-06-30 commit, but changes the initial
1956         value from "." to "".)
1957
1958 2009-07-01  H.J. Lu  <hongjiu.lu@intel.com>
1959
1960         PR testsuite/40601
1961         * testsuite/lib/libffi-dg.exp (libffi-init): Properly set
1962         gccdir.  Adjust ld_library_path for gcc only if gccdir isn't
1963         empty.
1964
1965 2009-06-30  Richard Sandiford  <r.sandiford@uk.ibm.com>
1966
1967         * testsuite/lib/libffi-dg.exp (libffi-init): Don't add "."
1968         to ld_library_path.  Use add_path.  Add just find_libgcc_s
1969         to ld_library_path, not every libgcc multilib directory.
1970
1971 2009-06-16  Wim Lewis  <wiml@hhhh.org>
1972
1973         * src/powerpc/ffi.c: Avoid clobbering cr3 and cr4, which are
1974         supposed to be callee-saved.
1975         * src/powerpc/sysv.S (small_struct_return_value): Fix overrun of
1976         return buffer for odd-size structs.
1977
1978 2009-06-16  Andreas Tobler  <a.tobler@schweiz.org>
1979
1980         PR libffi/40444
1981         * testsuite/lib/libffi-dg.exp (libffi_target_compile): Add
1982         allow_stack_execute for Darwin.
1983
1984 2009-06-16  Andrew Haley  <aph@redhat.com>
1985
1986         * configure.ac (TARGETDIR): Add missing blank lines.
1987         * configure: Regenerate.
1988
1989 2009-06-16  Andrew Haley  <aph@redhat.com>
1990
1991         * testsuite/libffi.call/cls_align_sint64.c,
1992         testsuite/libffi.call/cls_align_uint64.c,
1993         testsuite/libffi.call/cls_longdouble_va.c,
1994         testsuite/libffi.call/cls_ulonglong.c,
1995         testsuite/libffi.call/return_ll1.c,
1996         testsuite/libffi.call/stret_medium2.c: Fix printf format
1997         specifiers.
1998         * testsuite/libffi.call/ffitest.h,
1999         testsuite/libffi.special/ffitestcxx.h (PRIdLL, PRIuLL): Define.
2000
2001 2009-06-15  Andrew Haley  <aph@redhat.com>
2002
2003         * testsuite/libffi.call/err_bad_typedef.c: xfail everywhere.
2004         * testsuite/libffi.call/err_bad_abi.c: Likewise.
2005
2006 2009-06-12  Andrew Haley  <aph@redhat.com>
2007
2008         * Makefile.am: Remove info_TEXINFOS.
2009
2010 2009-06-12  Andrew Haley  <aph@redhat.com>
2011
2012         * ChangeLog.libffi: testsuite/libffi.call/cls_align_sint64.c,
2013         testsuite/libffi.call/cls_align_uint64.c,
2014         testsuite/libffi.call/cls_ulonglong.c,
2015         testsuite/libffi.call/return_ll1.c,
2016         testsuite/libffi.call/stret_medium2.c: Fix printf format
2017         specifiers.
2018         testsuite/libffi.special/unwindtest.cc: include stdint.h.
2019
2020 2009-06-11  Timothy Wall  <twall@users.sf.net>
2021
2022         * Makefile.am,
2023         configure.ac,
2024         include/ffi.h.in,
2025         include/ffi_common.h,
2026         src/closures.c,
2027         src/dlmalloc.c,
2028         src/x86/ffi.c,
2029         src/x86/ffitarget.h,
2030         src/x86/win64.S (new),
2031         README: Added win64 support (mingw or MSVC)
2032         * Makefile.in,
2033         include/Makefile.in,
2034         man/Makefile.in,
2035         testsuite/Makefile.in,
2036         configure,
2037         aclocal.m4: Regenerated
2038         * ltcf-c.sh: properly escape cygwin/w32 path
2039         * man/ffi_call.3: Clarify size requirements for return value.
2040         * src/x86/ffi64.c: Fix filename in comment.
2041         * src/x86/win32.S: Remove unused extern.
2042
2043         * testsuite/libffi.call/closure_fn0.c,
2044         testsuite/libffi.call/closure_fn1.c,
2045         testsuite/libffi.call/closure_fn2.c,
2046         testsuite/libffi.call/closure_fn3.c,
2047         testsuite/libffi.call/closure_fn4.c,
2048         testsuite/libffi.call/closure_fn5.c,
2049         testsuite/libffi.call/closure_fn6.c,
2050         testsuite/libffi.call/closure_stdcall.c,
2051         testsuite/libffi.call/cls_12byte.c,
2052         testsuite/libffi.call/cls_16byte.c,
2053         testsuite/libffi.call/cls_18byte.c,
2054         testsuite/libffi.call/cls_19byte.c,
2055         testsuite/libffi.call/cls_1_1byte.c,
2056         testsuite/libffi.call/cls_20byte.c,
2057         testsuite/libffi.call/cls_20byte1.c,
2058         testsuite/libffi.call/cls_24byte.c,
2059         testsuite/libffi.call/cls_2byte.c,
2060         testsuite/libffi.call/cls_3_1byte.c,
2061         testsuite/libffi.call/cls_3byte1.c,
2062         testsuite/libffi.call/cls_3byte2.c,
2063         testsuite/libffi.call/cls_4_1byte.c,
2064         testsuite/libffi.call/cls_4byte.c,
2065         testsuite/libffi.call/cls_5_1_byte.c,
2066         testsuite/libffi.call/cls_5byte.c,
2067         testsuite/libffi.call/cls_64byte.c,
2068         testsuite/libffi.call/cls_6_1_byte.c,
2069         testsuite/libffi.call/cls_6byte.c,
2070         testsuite/libffi.call/cls_7_1_byte.c,
2071         testsuite/libffi.call/cls_7byte.c,
2072         testsuite/libffi.call/cls_8byte.c,
2073         testsuite/libffi.call/cls_9byte1.c,
2074         testsuite/libffi.call/cls_9byte2.c,
2075         testsuite/libffi.call/cls_align_double.c,
2076         testsuite/libffi.call/cls_align_float.c,
2077         testsuite/libffi.call/cls_align_longdouble.c,
2078         testsuite/libffi.call/cls_align_longdouble_split.c,
2079         testsuite/libffi.call/cls_align_longdouble_split2.c,
2080         testsuite/libffi.call/cls_align_pointer.c,
2081         testsuite/libffi.call/cls_align_sint16.c,
2082         testsuite/libffi.call/cls_align_sint32.c,
2083         testsuite/libffi.call/cls_align_sint64.c,
2084         testsuite/libffi.call/cls_align_uint16.c,
2085         testsuite/libffi.call/cls_align_uint32.c,
2086         testsuite/libffi.call/cls_align_uint64.c,
2087         testsuite/libffi.call/cls_dbls_struct.c,
2088         testsuite/libffi.call/cls_double.c,
2089         testsuite/libffi.call/cls_double_va.c,
2090         testsuite/libffi.call/cls_float.c,
2091         testsuite/libffi.call/cls_longdouble.c,
2092         testsuite/libffi.call/cls_longdouble_va.c,
2093         testsuite/libffi.call/cls_multi_schar.c,
2094         testsuite/libffi.call/cls_multi_sshort.c,
2095         testsuite/libffi.call/cls_multi_sshortchar.c,
2096         testsuite/libffi.call/cls_multi_uchar.c,
2097         testsuite/libffi.call/cls_multi_ushort.c,
2098         testsuite/libffi.call/cls_multi_ushortchar.c,
2099         testsuite/libffi.call/cls_pointer.c,
2100         testsuite/libffi.call/cls_pointer_stack.c,
2101         testsuite/libffi.call/cls_schar.c,
2102         testsuite/libffi.call/cls_sint.c,
2103         testsuite/libffi.call/cls_sshort.c,
2104         testsuite/libffi.call/cls_uchar.c,
2105         testsuite/libffi.call/cls_uint.c,
2106         testsuite/libffi.call/cls_ulonglong.c,
2107         testsuite/libffi.call/cls_ushort.c,
2108         testsuite/libffi.call/err_bad_abi.c,
2109         testsuite/libffi.call/err_bad_typedef.c,
2110         testsuite/libffi.call/float2.c,
2111         testsuite/libffi.call/huge_struct.c,
2112         testsuite/libffi.call/nested_struct.c,
2113         testsuite/libffi.call/nested_struct1.c,
2114         testsuite/libffi.call/nested_struct10.c,
2115         testsuite/libffi.call/nested_struct2.c,
2116         testsuite/libffi.call/nested_struct3.c,
2117         testsuite/libffi.call/nested_struct4.c,
2118         testsuite/libffi.call/nested_struct5.c,
2119         testsuite/libffi.call/nested_struct6.c,
2120         testsuite/libffi.call/nested_struct7.c,
2121         testsuite/libffi.call/nested_struct8.c,
2122         testsuite/libffi.call/nested_struct9.c,
2123         testsuite/libffi.call/problem1.c,
2124         testsuite/libffi.call/return_ldl.c,
2125         testsuite/libffi.call/return_ll1.c,
2126         testsuite/libffi.call/stret_large.c,
2127         testsuite/libffi.call/stret_large2.c,
2128         testsuite/libffi.call/stret_medium.c,
2129         testsuite/libffi.call/stret_medium2.c,
2130         testsuite/libffi.special/unwindtest.cc: use ffi_closure_alloc instead
2131         of checking for MMAP.  Use intptr_t instead of long casts.
2132
2133 2009-06-11  Kaz Kojima  <kkojima@gcc.gnu.org>
2134
2135         * testsuite/libffi.call/cls_longdouble_va.c: Add xfail sh*-*-linux-*.
2136         * testsuite/libffi.call/err_bad_abi.c: Add xfail sh*-*-*.
2137         * testsuite/libffi.call/err_bad_typedef.c: Likewise.
2138
2139 2009-06-09  Andrew Haley  <aph@redhat.com>
2140
2141         * src/x86/freebsd.S: Add missing file.
2142
2143 2009-06-08  Andrew Haley  <aph@redhat.com>
2144
2145         Import from libffi 3.0.8:
2146
2147         * doc/libffi.texi: New file.
2148         * doc/libffi.info: Likewise.
2149         * doc/stamp-vti: Likewise.
2150         * man/Makefile.am: New file.
2151         * man/ffi_call.3: New file.
2152
2153         * Makefile.am (EXTRA_DIST): Add src/x86/darwin64.S,
2154         src/dlmalloc.c.
2155         (nodist_libffi_la_SOURCES): Add X86_FREEBSD.
2156
2157         * configure.ac: Bump version to 3.0.8.
2158         parisc*-*-linux*: Add.
2159         i386-*-freebsd* | i386-*-openbsd*: Add.
2160         powerpc-*-beos*: Add.
2161         AM_CONDITIONAL X86_FREEBSD: Add.
2162         AC_CONFIG_FILES: Add man/Makefile.
2163
2164         * include/ffi.h.in (FFI_FN): Change void (*)() to void (*)(void).
2165
2166 2009-06-08  Andrew Haley  <aph@redhat.com>
2167
2168         * README: Import from libffi 3.0.8.
2169
2170 2009-06-08  Andrew Haley  <aph@redhat.com>
2171
2172         * testsuite/libffi.call/err_bad_abi.c: Add xfails.
2173         * testsuite/libffi.call/cls_longdouble_va.c: Add xfails.
2174         * testsuite/libffi.call/cls_dbls_struct.c: Add xfail x86_64-*-linux-*.
2175         * testsuite/libffi.call/err_bad_typedef.c: Add xfails.
2176
2177         * testsuite/libffi.call/stret_medium2.c: Add __UNUSED__ to args.
2178         * testsuite/libffi.call/stret_medium.c: Likewise.
2179         * testsuite/libffi.call/stret_large2.c: Likewise.
2180         * testsuite/libffi.call/stret_large.c:  Likewise.
2181
2182 2008-12-26  Timothy Wall  <twall@users.sf.net>
2183
2184         * testsuite/libffi.call/cls_longdouble.c,
2185         testsuite/libffi.call/cls_longdouble_va.c,
2186         testsuite/libffi.call/cls_align_longdouble.c,
2187         testsuite/libffi.call/cls_align_longdouble_split.c,
2188         testsuite/libffi.call/cls_align_longdouble_split2.c: mark expected
2189         failures on x86_64 cygwin/mingw.
2190
2191 2008-12-22  Timothy Wall  <twall@users.sf.net>
2192
2193         * testsuite/libffi.call/closure_fn0.c,
2194         testsuite/libffi.call/closure_fn1.c,
2195         testsuite/libffi.call/closure_fn2.c,
2196         testsuite/libffi.call/closure_fn3.c,
2197         testsuite/libffi.call/closure_fn4.c,
2198         testsuite/libffi.call/closure_fn5.c,
2199         testsuite/libffi.call/closure_fn6.c,
2200         testsuite/libffi.call/closure_loc_fn0.c,
2201         testsuite/libffi.call/closure_stdcall.c,
2202         testsuite/libffi.call/cls_align_pointer.c,
2203         testsuite/libffi.call/cls_pointer.c,
2204         testsuite/libffi.call/cls_pointer_stack.c: use portable cast from
2205         pointer to integer (intptr_t).
2206         * testsuite/libffi.call/cls_longdouble.c: disable for win64.
2207
2208 2008-07-24  Anthony Green  <green@redhat.com>
2209
2210         * testsuite/libffi.call/cls_dbls_struct.c,
2211         testsuite/libffi.call/cls_double_va.c,
2212         testsuite/libffi.call/cls_longdouble.c,
2213         testsuite/libffi.call/cls_longdouble_va.c,
2214         testsuite/libffi.call/cls_pointer.c,
2215         testsuite/libffi.call/cls_pointer_stack.c,
2216         testsuite/libffi.call/err_bad_abi.c: Clean up failures from
2217         compiler warnings.
2218
2219 2008-03-04  Anthony Green  <green@redhat.com>
2220             Blake Chaffin
2221             hos@tamanegi.org
2222
2223         * testsuite/libffi.call/cls_align_longdouble_split2.c
2224           testsuite/libffi.call/cls_align_longdouble_split.c
2225           testsuite/libffi.call/cls_dbls_struct.c
2226           testsuite/libffi.call/cls_double_va.c
2227           testsuite/libffi.call/cls_longdouble.c
2228           testsuite/libffi.call/cls_longdouble_va.c
2229           testsuite/libffi.call/cls_pointer.c
2230           testsuite/libffi.call/cls_pointer_stack.c
2231           testsuite/libffi.call/err_bad_abi.c
2232           testsuite/libffi.call/err_bad_typedef.c
2233           testsuite/libffi.call/stret_large2.c
2234           testsuite/libffi.call/stret_large.c
2235           testsuite/libffi.call/stret_medium2.c
2236           testsuite/libffi.call/stret_medium.c: New tests from Apple.
2237
2238 2009-06-05  Andrew Haley  <aph@redhat.com>
2239
2240         * src/x86/ffitarget.h, src/x86/ffi.c: Merge stdcall changes from
2241         libffi.
2242
2243 2009-06-04  Andrew Haley  <aph@redhat.com>
2244
2245         * src/x86/ffitarget.h, src/x86/win32.S, src/x86/ffi.c: Back out
2246         stdcall changes.
2247
2248 2008-02-26  Anthony Green  <green@redhat.com>
2249             Thomas Heller  <theller@ctypes.org>
2250
2251         * src/x86/ffi.c (ffi_closure_SYSV_inner): Change C++ comment to C
2252         comment.
2253
2254 2008-02-03  Timothy Wall  <twall@users.sf.net>
2255
2256         * src/x86/ffi.c (FFI_INIT_TRAMPOLINE_STDCALL): Calculate jump return
2257           offset based on code pointer, not data pointer.
2258
2259 2008-01-31  Timothy Wall <twall@users.sf.net>
2260
2261         * testsuite/libffi.call/closure_stdcall.c: Add test for stdcall
2262         closures.
2263         * src/x86/ffitarget.h: Increase size of trampoline for stdcall
2264         closures.
2265         * src/x86/win32.S: Add assembly for stdcall closure.
2266         * src/x86/ffi.c: Initialize stdcall closure trampoline.
2267
2268 2009-06-04  Andrew Haley  <aph@redhat.com>
2269
2270         * include/ffi.h.in: Change void (*)() to void (*)(void).
2271         * src/x86/ffi.c: Likewise.
2272
2273 2009-06-04  Andrew Haley  <aph@redhat.com>
2274
2275         * src/powerpc/ppc_closure.S: Insert licence header.
2276         * src/powerpc/linux64_closure.S: Likewise.
2277         * src/m68k/sysv.S: Likewise.
2278
2279         * src/sh64/ffi.c: Change void (*)() to void (*)(void).
2280         * src/powerpc/ffi.c: Likewise.
2281         * src/powerpc/ffi_darwin.c: Likewise.
2282         * src/m32r/ffi.c: Likewise.
2283         * src/sh64/ffi.c: Likewise.
2284         * src/x86/ffi64.c: Likewise.
2285         * src/alpha/ffi.c: Likewise.
2286         * src/alpha/osf.S: Likewise.
2287         * src/frv/ffi.c: Likewise.
2288         * src/s390/ffi.c: Likewise.
2289         * src/pa/ffi.c: Likewise.
2290         * src/pa/hpux32.S: Likewise.
2291         * src/ia64/unix.S: Likewise.
2292         * src/ia64/ffi.c: Likewise.
2293         * src/sparc/ffi.c: Likewise.
2294         * src/mips/ffi.c: Likewise.
2295         * src/sh/ffi.c: Likewise.
2296
2297 2008-02-15  David Daney  <ddaney@avtrex.com>
2298
2299         * src/mips/ffi.c (USE__BUILTIN___CLEAR_CACHE):
2300         Define (conditionally), and use it to include cachectl.h.
2301         (ffi_prep_closure_loc): Fix cache flushing.
2302         * src/mips/ffitarget.h (_ABIN32, _ABI64, _ABIO32): Define.
2303
2304 2009-06-04  Andrew Haley  <aph@redhat.com>
2305
2306         include/ffi.h.in,
2307         src/arm/ffitarget.h,
2308         src/arm/ffi.c,
2309         src/arm/sysv.S,
2310         src/powerpc/ffitarget.h,
2311         src/closures.c,
2312         src/sh64/ffitarget.h,
2313         src/sh64/ffi.c,
2314         src/sh64/sysv.S,
2315         src/types.c,
2316         src/x86/ffi64.c,
2317         src/x86/ffitarget.h,
2318         src/x86/win32.S,
2319         src/x86/darwin.S,
2320         src/x86/ffi.c,
2321         src/x86/sysv.S,
2322         src/x86/unix64.S,
2323         src/alpha/ffitarget.h,
2324         src/alpha/ffi.c,
2325         src/alpha/osf.S,
2326         src/m68k/ffitarget.h,
2327         src/frv/ffitarget.h,
2328         src/frv/ffi.c,
2329         src/s390/ffitarget.h,
2330         src/s390/sysv.S,
2331         src/cris/ffitarget.h,
2332         src/pa/linux.S,
2333         src/pa/ffitarget.h,
2334         src/pa/ffi.c,
2335         src/raw_api.c,
2336         src/ia64/ffitarget.h,
2337         src/ia64/unix.S,
2338         src/ia64/ffi.c,
2339         src/ia64/ia64_flags.h,
2340         src/java_raw_api.c,
2341         src/debug.c,
2342         src/sparc/v9.S,
2343         src/sparc/ffitarget.h,
2344         src/sparc/ffi.c,
2345         src/sparc/v8.S,
2346         src/mips/ffitarget.h,
2347         src/mips/n32.S,
2348         src/mips/o32.S,
2349         src/mips/ffi.c,
2350         src/prep_cif.c,
2351         src/sh/ffitarget.h,
2352         src/sh/ffi.c,
2353         src/sh/sysv.S: Update license text.
2354
2355 2009-05-22  Dave Korn  <dave.korn.cygwin@gmail.com>
2356
2357         * src/x86/win32.S (_ffi_closure_STDCALL):  New function.
2358         (.eh_frame):  Add FDE for it.
2359
2360 2009-05-22  Dave Korn  <dave.korn.cygwin@gmail.com>
2361
2362         * configure.ac:  Also check if assembler supports pc-relative
2363         relocs on X86_WIN32 targets.
2364         * configure:  Regenerate.
2365         * src/x86/win32.S (ffi_prep_args):  Declare extern, not global.
2366         (_ffi_call_SYSV):  Add missing function type symbol .def and
2367         add EH markup labels.
2368         (_ffi_call_STDCALL):  Likewise.
2369         (_ffi_closure_SYSV):  Likewise.
2370         (_ffi_closure_raw_SYSV):  Likewise.
2371         (.eh_frame):  Add hand-crafted EH data.
2372
2373 2009-04-09  Jakub Jelinek  <jakub@redhat.com>
2374
2375         * testsuite/lib/libffi-dg.exp: Change copyright header to refer to
2376         version 3 of the GNU General Public License and to point readers
2377         at the COPYING3 file and the FSF's license web page.
2378         * testsuite/libffi.call/call.exp: Likewise.
2379         * testsuite/libffi.special/special.exp: Likewise.
2380
2381 2009-03-01  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2382
2383         * configure: Regenerate.
2384
2385 2008-12-18  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
2386
2387         PR libffi/26048
2388         * configure.ac (HAVE_AS_X86_PCREL): New test.
2389         * configure: Regenerate.
2390         * fficonfig.h.in: Regenerate.
2391         * src/x86/sysv.S [!FFI_NO_RAW_API]: Precalculate
2392         RAW_CLOSURE_CIF_OFFSET, RAW_CLOSURE_FUN_OFFSET,
2393         RAW_CLOSURE_USER_DATA_OFFSET for the Solaris 10/x86 assembler.
2394         (.eh_frame): Only use SYMBOL-. iff HAVE_AS_X86_PCREL.
2395         * src/x86/unix64.S (.Lstore_table): Move to .text section.
2396         (.Lload_table): Likewise.
2397         (.eh_frame): Only use SYMBOL-. iff HAVE_AS_X86_PCREL.
2398
2399 2008-12-18  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2400
2401         * configure: Regenerate.
2402
2403 2008-11-21  Eric Botcazou  <ebotcazou@adacore.com>
2404
2405         * src/sparc/ffi.c (ffi_prep_cif_machdep): Add support for
2406         signed/unsigned int8/16 return values.
2407         * src/sparc/v8.S (ffi_call_v8): Likewise.
2408         (ffi_closure_v8): Likewise.
2409
2410 2008-09-26  Peter O'Gorman  <pogma@thewrittenword.com>
2411             Steve Ellcey  <sje@cup.hp.com>
2412
2413         * configure: Regenerate for new libtool.
2414         * Makefile.in: Ditto.
2415         * include/Makefile.in: Ditto.
2416         * aclocal.m4: Ditto.
2417
2418 2008-08-25  Andreas Tobler  <a.tobler@schweiz.org>
2419
2420         * src/powerpc/ffitarget.h (ffi_abi): Add FFI_LINUX and
2421         FFI_LINUX_SOFT_FLOAT to the POWERPC_FREEBSD enum.
2422         Add note about flag bits used for FFI_SYSV_TYPE_SMALL_STRUCT.
2423         Adjust copyright notice.
2424         * src/powerpc/ffi.c: Add two new flags to indicate if we have one
2425         register or two register to use for FFI_SYSV structs.
2426         (ffi_prep_cif_machdep): Pass the right register flag introduced above.
2427         (ffi_closure_helper_SYSV): Fix the return type for
2428         FFI_SYSV_TYPE_SMALL_STRUCT. Comment.
2429         Adjust copyright notice.
2430
2431 2008-07-16  Kaz Kojima  <kkojima@gcc.gnu.org>
2432
2433         * src/sh/ffi.c (ffi_prep_closure_loc): Turn INSN into an unsigned
2434         int.
2435
2436 2008-06-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2437
2438         * configure: Regenerate.
2439         * include/Makefile.in: Regenerate.
2440         * testsuite/Makefile.in: Regenerate.
2441
2442 2008-06-07  Joseph Myers  <joseph@codesourcery.com>
2443
2444         * configure.ac (parisc*-*-linux*, powerpc-*-sysv*,
2445         powerpc-*-beos*): Remove.
2446         * configure: Regenerate.
2447
2448 2008-05-09  Julian Brown  <julian@codesourcery.com>
2449
2450         * Makefile.am (LTLDFLAGS): New.
2451         (libffi_la_LDFLAGS): Use above.
2452         * Makefile.in: Regenerate.
2453
2454 2008-04-18  Paolo Bonzini  <bonzini@gnu.org>
2455
2456         PR bootstrap/35457
2457         * aclocal.m4: Regenerate.
2458         * configure: Regenerate.
2459
2460 2008-03-26  Kaz Kojima  <kkojima@gcc.gnu.org>
2461
2462         * src/sh/sysv.S: Add .note.GNU-stack on Linux.
2463         * src/sh64/sysv.S: Likewise.
2464
2465 2008-03-26  Daniel Jacobowitz  <dan@debian.org>
2466
2467         * src/arm/sysv.S: Fix ARM comment marker.
2468
2469 2008-03-26  Jakub Jelinek  <jakub@redhat.com>
2470
2471         * src/alpha/osf.S: Add .note.GNU-stack on Linux.
2472         * src/s390/sysv.S: Likewise.
2473         * src/powerpc/ppc_closure.S: Likewise.
2474         * src/powerpc/sysv.S: Likewise.
2475         * src/x86/unix64.S: Likewise.
2476         * src/x86/sysv.S: Likewise.
2477         * src/sparc/v8.S: Likewise.
2478         * src/sparc/v9.S: Likewise.
2479         * src/m68k/sysv.S: Likewise.
2480         * src/arm/sysv.S: Likewise.
2481
2482 2008-03-16  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2483
2484         * aclocal.m4: Regenerate.
2485         * configure: Likewise.
2486         * Makefile.in: Likewise.
2487         * include/Makefile.in: Likewise.
2488         * testsuite/Makefile.in: Likewise.
2489
2490 2008-02-12  Bjoern Koenig  <bkoenig@alpha-tierchen.de>
2491             Andreas Tobler  <a.tobler@schweiz.org>
2492
2493         * configure.ac: Add amd64-*-freebsd* target.
2494         * configure: Regenerate.
2495
2496 2008-01-30  H.J. Lu  <hongjiu.lu@intel.com>
2497
2498         PR libffi/34612
2499         * src/x86/sysv.S (ffi_closure_SYSV): Pop 4 byte from stack when
2500         returning struct.
2501
2502         * testsuite/libffi.call/call.exp: Add "-O2 -fomit-frame-pointer"
2503         tests.
2504
2505 2008-01-24  David Edelsohn  <edelsohn@gnu.org>
2506
2507         * configure: Regenerate.
2508
2509 2008-01-06  Andreas Tobler  <a.tobler@schweiz.org>
2510
2511         * src/x86/ffi.c (ffi_prep_cif_machdep): Fix thinko.
2512
2513 2008-01-05  Andreas Tobler  <a.tobler@schweiz.org>
2514
2515         PR testsuite/32843
2516         * src/x86/ffi.c (ffi_prep_cif_machdep): Add code for
2517         signed/unsigned int8/16 for X86_DARWIN.
2518         Updated copyright info.
2519         Handle one and two byte structs with special cif->flags.
2520         * src/x86/ffitarget.h: Add special types for one and two byte structs.
2521         Updated copyright info.
2522         * src/x86/darwin.S (ffi_call_SYSV): Rewrite to use a jump table like
2523         sysv.S
2524         Remove code to pop args from the stack after call.
2525         Special-case signed/unsigned for int8/16, one and two byte structs.
2526         (ffi_closure_raw_SYSV): Handle FFI_TYPE_UINT8,
2527         FFI_TYPE_SINT8, FFI_TYPE_UINT16, FFI_TYPE_SINT16, FFI_TYPE_UINT32,
2528         FFI_TYPE_SINT32.
2529         Updated copyright info.
2530
2531 2007-12-08  David Daney  <ddaney@avtrex.com>
2532
2533         * src/mips/n32.S (ffi_call_N32):  Replace dadd with ADDU, dsub with
2534         SUBU, add with ADDU and use smaller code sequences.
2535
2536 2007-12-07  David Daney  <ddaney@avtrex.com>
2537
2538         * src/mips/ffi.c (ffi_prep_cif_machdep): Handle long double return
2539         type.
2540
2541 2007-12-06  David Daney  <ddaney@avtrex.com>
2542
2543         * include/ffi.h.in (FFI_SIZEOF_JAVA_RAW): Define if not already
2544         defined.
2545         (ffi_java_raw): New typedef.
2546         (ffi_java_raw_call, ffi_java_ptrarray_to_raw,
2547         ffi_java_raw_to_ptrarray): Change parameter types from ffi_raw to
2548         ffi_java_raw.
2549         (ffi_java_raw_closure) : Same.
2550         (ffi_prep_java_raw_closure, ffi_prep_java_raw_closure_loc): Change
2551         parameter types.
2552         * src/java_raw_api.c (ffi_java_raw_size):  Replace FFI_SIZEOF_ARG with
2553         FFI_SIZEOF_JAVA_RAW.
2554         (ffi_java_raw_to_ptrarray): Change type of raw to ffi_java_raw.
2555         Replace FFI_SIZEOF_ARG with FFI_SIZEOF_JAVA_RAW. Use
2556         sizeof(ffi_java_raw) for alignment calculations.
2557         (ffi_java_ptrarray_to_raw): Same.
2558         (ffi_java_rvalue_to_raw): Add special handling for FFI_TYPE_POINTER
2559         if FFI_SIZEOF_JAVA_RAW == 4.
2560         (ffi_java_raw_to_rvalue): Same.
2561         (ffi_java_raw_call): Change type of raw to ffi_java_raw.
2562         (ffi_java_translate_args): Same.
2563         (ffi_prep_java_raw_closure_loc, ffi_prep_java_raw_closure): Change
2564         parameter types.
2565         * src/mips/ffitarget.h (FFI_SIZEOF_JAVA_RAW): Define for N32 ABI.
2566
2567 2007-12-06  David Daney  <ddaney@avtrex.com>
2568
2569         * src/mips/n32.S (ffi_closure_N32): Use 64-bit add instruction on
2570         pointer values.
2571
2572 2007-12-01  Andreas Tobler  <a.tobler@schweiz.org>
2573
2574         PR libffi/31937
2575         * src/powerpc/ffitarget.h: Introduce new ABI FFI_LINUX_SOFT_FLOAT.
2576         Add local FFI_TYPE_UINT128 to handle soft-float long-double-128.
2577         * src/powerpc/ffi.c: Distinguish between __NO_FPRS__ and not and
2578         set the NUM_FPR_ARG_REGISTERS according to.
2579         Add support for potential soft-float support under hard-float
2580         architecture.
2581         (ffi_prep_args_SYSV): Set NUM_FPR_ARG_REGISTERS to 0 in case of
2582         FFI_LINUX_SOFT_FLOAT, handle float, doubles and long-doubles according
2583         to the FFI_LINUX_SOFT_FLOAT ABI.
2584         (ffi_prep_cif_machdep): Likewise.
2585         (ffi_closure_helper_SYSV): Likewise.
2586         * src/powerpc/ppc_closure.S: Make sure not to store float/double
2587         on archs where __NO_FPRS__ is true.
2588         Add FFI_TYPE_UINT128 support.
2589         * src/powerpc/sysv.S: Add support for soft-float long-double-128.
2590         Adjust copyright notice.
2591
2592 2007-11-25  Andreas Tobler  <a.tobler@schweiz.org>
2593
2594         * src/closures.c: Move defintion of MAYBE_UNUSED from here to ...
2595         * include/ffi_common.h: ... here.
2596         Update copyright.
2597
2598 2007-11-17  Andreas Tobler  <a.tobler@schweiz.org>
2599
2600         * src/powerpc/sysv.S: Load correct cr to compare if we have long double.
2601         * src/powerpc/linux64.S: Likewise.
2602         * src/powerpc/ffi.c: Add a comment to show which part goes into cr6.
2603         * testsuite/libffi.call/return_ldl.c: New test.
2604
2605 2007-09-04    <aph@redhat.com>
2606
2607         * src/arm/sysv.S (UNWIND): New.
2608         (Whole file): Conditionally compile unwinder directives.
2609         * src/arm/sysv.S: Add unwinder directives.
2610
2611         * src/arm/ffi.c (ffi_prep_args): Align structs by at least 4 bytes.
2612         Only treat r0 as a struct address if we're actually returning a
2613         struct by address.
2614         Only copy the bytes that are actually within a struct.
2615         (ffi_prep_cif_machdep): A Composite Type not larger than 4 bytes
2616         is returned in r0, not passed by address.
2617         (ffi_call): Allocate a word-sized temporary for the case where
2618         a composite is returned in r0.
2619         (ffi_prep_incoming_args_SYSV): Align as necessary.
2620
2621 2007-08-05  Steven Newbury  <s_j_newbury@yahoo.co.uk>
2622
2623         * src/arm/ffi.c (FFI_INIT_TRAMPOLINE): Use __clear_cache instead of
2624         directly using the sys_cacheflush syscall.
2625
2626 2007-07-27  Andrew Haley  <aph@redhat.com>
2627
2628         * src/arm/sysv.S (ffi_closure_SYSV): Add soft-float.
2629
2630 2007-09-03  Maciej W. Rozycki  <macro@linux-mips.org>
2631
2632         * Makefile.am: Unify MIPS_IRIX and MIPS_LINUX into MIPS.
2633         * configure.ac: Likewise.
2634         * Makefile.in: Regenerate.
2635         * include/Makefile.in: Likewise.
2636         * testsuite/Makefile.in: Likewise.
2637         * configure: Likewise.
2638
2639 2007-08-24  David Daney  <ddaney@avtrex.com>
2640
2641         * testsuite/libffi.call/return_sl.c: New test.
2642
2643 2007-08-10  David Daney  <ddaney@avtrex.com>
2644
2645         * testsuite/libffi.call/cls_multi_ushort.c,
2646         testsuite/libffi.call/cls_align_uint16.c,
2647         testsuite/libffi.call/nested_struct1.c,
2648         testsuite/libffi.call/nested_struct3.c,
2649         testsuite/libffi.call/cls_7_1_byte.c,
2650         testsuite/libffi.call/nested_struct5.c,
2651         testsuite/libffi.call/cls_double.c,
2652         testsuite/libffi.call/nested_struct7.c,
2653         testsuite/libffi.call/cls_sint.c,
2654         testsuite/libffi.call/nested_struct9.c,
2655         testsuite/libffi.call/cls_20byte1.c,
2656         testsuite/libffi.call/cls_multi_sshortchar.c,
2657         testsuite/libffi.call/cls_align_sint64.c,
2658         testsuite/libffi.call/cls_3byte2.c,
2659         testsuite/libffi.call/cls_multi_schar.c,
2660         testsuite/libffi.call/cls_multi_uchar.c,
2661         testsuite/libffi.call/cls_19byte.c,
2662         testsuite/libffi.call/cls_9byte1.c,
2663         testsuite/libffi.call/cls_align_float.c,
2664         testsuite/libffi.call/closure_fn1.c,
2665         testsuite/libffi.call/problem1.c,
2666         testsuite/libffi.call/closure_fn3.c,
2667         testsuite/libffi.call/cls_sshort.c,
2668         testsuite/libffi.call/closure_fn5.c,
2669         testsuite/libffi.call/cls_align_double.c,
2670         testsuite/libffi.call/nested_struct.c,
2671         testsuite/libffi.call/cls_2byte.c,
2672         testsuite/libffi.call/nested_struct10.c,
2673         testsuite/libffi.call/cls_4byte.c,
2674         testsuite/libffi.call/cls_6byte.c,
2675         testsuite/libffi.call/cls_8byte.c,
2676         testsuite/libffi.call/cls_multi_sshort.c,
2677         testsuite/libffi.call/cls_align_sint16.c,
2678         testsuite/libffi.call/cls_align_uint32.c,
2679         testsuite/libffi.call/cls_20byte.c,
2680         testsuite/libffi.call/cls_float.c,
2681         testsuite/libffi.call/nested_struct2.c,
2682         testsuite/libffi.call/cls_5_1_byte.c,
2683         testsuite/libffi.call/nested_struct4.c,
2684         testsuite/libffi.call/cls_24byte.c,
2685         testsuite/libffi.call/nested_struct6.c,
2686         testsuite/libffi.call/cls_64byte.c,
2687         testsuite/libffi.call/nested_struct8.c,
2688         testsuite/libffi.call/cls_uint.c,
2689         testsuite/libffi.call/cls_multi_ushortchar.c,
2690         testsuite/libffi.call/cls_schar.c,
2691         testsuite/libffi.call/cls_uchar.c,
2692         testsuite/libffi.call/cls_align_uint64.c,
2693         testsuite/libffi.call/cls_ulonglong.c,
2694         testsuite/libffi.call/cls_align_longdouble.c,
2695         testsuite/libffi.call/cls_1_1byte.c,
2696         testsuite/libffi.call/cls_12byte.c,
2697         testsuite/libffi.call/cls_3_1byte.c,
2698         testsuite/libffi.call/cls_3byte1.c,
2699         testsuite/libffi.call/cls_4_1byte.c,
2700         testsuite/libffi.call/cls_6_1_byte.c,
2701         testsuite/libffi.call/cls_16byte.c,
2702         testsuite/libffi.call/cls_18byte.c,
2703         testsuite/libffi.call/closure_fn0.c,
2704         testsuite/libffi.call/cls_9byte2.c,
2705         testsuite/libffi.call/closure_fn2.c,
2706         testsuite/libffi.call/closure_fn4.c,
2707         testsuite/libffi.call/cls_ushort.c,
2708         testsuite/libffi.call/closure_fn6.c,
2709         testsuite/libffi.call/cls_5byte.c,
2710         testsuite/libffi.call/cls_align_pointer.c,
2711         testsuite/libffi.call/cls_7byte.c,
2712         testsuite/libffi.call/cls_align_sint32.c,
2713         testsuite/libffi.special/unwindtest_ffi_call.cc,
2714         testsuite/libffi.special/unwindtest.cc: Remove xfail for mips64*-*-*.
2715
2716 2007-08-10  David Daney  <ddaney@avtrex.com>
2717
2718         PR libffi/28313
2719         * configure.ac: Don't treat mips64 as a special case.
2720         * Makefile.am (nodist_libffi_la_SOURCES): Add n32.S.
2721         * configure: Regenerate
2722         * Makefile.in: Ditto.
2723         * fficonfig.h.in: Ditto.
2724         * src/mips/ffitarget.h (REG_L, REG_S, SUBU, ADDU, SRL, LI): Indent.
2725         (LA, EH_FRAME_ALIGN, FDE_ADDR_BYTES): New preprocessor macros.
2726         (FFI_DEFAULT_ABI): Set for n64 case.
2727         (FFI_CLOSURES, FFI_TRAMPOLINE_SIZE): Define for n32 and n64 cases.
2728         * src/mips/n32.S (ffi_call_N32): Add debug macros and labels for FDE.
2729         (ffi_closure_N32): New function.
2730         (.eh_frame): New section
2731         * src/mips/o32.S: Clean up comments.
2732         (ffi_closure_O32): Pass ffi_closure parameter in $12.
2733         * src/mips/ffi.c: Use FFI_MIPS_N32 instead of
2734         _MIPS_SIM == _ABIN32 throughout.
2735         (FFI_MIPS_STOP_HERE): New, use in place of
2736         ffi_stop_here.
2737         (ffi_prep_args): Use unsigned long to hold pointer values.  Rewrite
2738         to support n32/n64 ABIs.
2739         (calc_n32_struct_flags): Rewrite.
2740         (calc_n32_return_struct_flags): Remove unused variable.  Reverse
2741         position of flag bits.
2742         (ffi_prep_cif_machdep): Rewrite n32 portion.
2743         (ffi_call): Enable for n64.  Add special handling for small structure
2744         return values.
2745         (ffi_prep_closure_loc): Add n32 and n64 support.
2746         (ffi_closure_mips_inner_O32): Add cast to silence warning.
2747         (copy_struct_N32, ffi_closure_mips_inner_N32): New functions.
2748
2749 2007-08-08  David Daney  <ddaney@avtrex.com>
2750
2751         * testsuite/libffi.call/ffitest.h (ffi_type_mylong): Remove definition.
2752         * testsuite/libffi.call/cls_align_uint16.c (main): Use correct type
2753         specifiers.
2754         * testsuite/libffi.call/nested_struct1.c (main): Ditto.
2755         * testsuite/libffi.call/cls_sint.c (main): Ditto.
2756         * testsuite/libffi.call/nested_struct9.c (main): Ditto.
2757         * testsuite/libffi.call/cls_20byte1.c (main): Ditto.
2758         * testsuite/libffi.call/cls_9byte1.c (main): Ditto.
2759         * testsuite/libffi.call/closure_fn1.c (main): Ditto.
2760         * testsuite/libffi.call/closure_fn3.c (main): Ditto.
2761         * testsuite/libffi.call/return_dbl2.c (main): Ditto.
2762         * testsuite/libffi.call/cls_sshort.c (main): Ditto.
2763         * testsuite/libffi.call/return_fl3.c (main): Ditto.
2764         * testsuite/libffi.call/closure_fn5.c (main): Ditto.
2765         * testsuite/libffi.call/nested_struct.c (main): Ditto.
2766         * testsuite/libffi.call/nested_struct10.c (main): Ditto.
2767         * testsuite/libffi.call/return_ll1.c (main): Ditto.
2768         * testsuite/libffi.call/cls_8byte.c (main): Ditto.
2769         * testsuite/libffi.call/cls_align_uint32.c (main): Ditto.
2770         * testsuite/libffi.call/cls_align_sint16.c (main): Ditto.
2771         * testsuite/libffi.call/cls_20byte.c (main): Ditto.
2772         * testsuite/libffi.call/nested_struct2.c (main): Ditto.
2773         * testsuite/libffi.call/cls_24byte.c (main): Ditto.
2774         * testsuite/libffi.call/nested_struct6.c (main): Ditto.
2775         * testsuite/libffi.call/cls_uint.c (main): Ditto.
2776         * testsuite/libffi.call/cls_12byte.c (main): Ditto.
2777         * testsuite/libffi.call/cls_16byte.c (main): Ditto.
2778         * testsuite/libffi.call/closure_fn0.c (main): Ditto.
2779         * testsuite/libffi.call/cls_9byte2.c (main): Ditto.
2780         * testsuite/libffi.call/closure_fn2.c (main): Ditto.
2781         * testsuite/libffi.call/return_dbl1.c (main): Ditto.
2782         * testsuite/libffi.call/closure_fn4.c (main): Ditto.
2783         * testsuite/libffi.call/closure_fn6.c (main): Ditto.
2784         * testsuite/libffi.call/cls_align_sint32.c (main): Ditto.
2785
2786 2007-08-07  Andrew Haley  <aph@redhat.com>
2787
2788         * src/x86/sysv.S (ffi_closure_raw_SYSV): Fix typo in previous
2789         checkin.
2790
2791 2007-08-06  Andrew Haley  <aph@redhat.com>
2792
2793         PR testsuite/32843
2794         * src/x86/sysv.S (ffi_closure_raw_SYSV): Handle FFI_TYPE_UINT8,
2795         FFI_TYPE_SINT8, FFI_TYPE_UINT16, FFI_TYPE_SINT16, FFI_TYPE_UINT32,
2796         FFI_TYPE_SINT32.
2797
2798 2007-08-02  David Daney  <ddaney@avtrex.com>
2799
2800         * testsuite/libffi.call/return_ul.c (main): Define return type as
2801         ffi_arg.  Use proper printf conversion specifier.
2802
2803 2007-07-30  Andrew Haley  <aph@redhat.com>
2804
2805         PR testsuite/32843
2806         * src/x86/ffi.c (ffi_prep_cif_machdep): in x86 case, add code for
2807         signed/unsigned int8/16.
2808         * src/x86/sysv.S (ffi_call_SYSV): Rewrite to:
2809         Use a jump table.
2810         Remove code to pop args from the stack after call.
2811         Special-case signed/unsigned int8/16.
2812         * testsuite/libffi.call/return_sc.c (main): Revert.
2813
2814 2007-07-26  Richard Guenther  <rguenther@suse.de>
2815
2816         PR testsuite/32843
2817         * testsuite/libffi.call/return_sc.c (main): Verify call
2818         result as signed char, not ffi_arg.
2819
2820 2007-07-16  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
2821
2822         * configure.ac (i?86-*-solaris2.1[0-9]): Set TARGET to X86_64.
2823         * configure: Regenerate.
2824
2825 2007-07-11  David Daney  <ddaney@avtrex.com>
2826
2827         * src/mips/ffi.c: Don't include sys/cachectl.h.
2828         (ffi_prep_closure_loc): Use __builtin___clear_cache() instead of
2829         cacheflush().
2830
2831 2007-05-18  Aurelien Jarno  <aurelien@aurel32.net>
2832
2833         * src/arm/ffi.c (ffi_prep_closure_loc): Renamed and ajusted
2834         from (ffi_prep_closure): ... this.
2835         (FFI_INIT_TRAMPOLINE): Adjust.
2836
2837 2005-12-31  Phil Blundell  <pb@reciva.com>
2838
2839         * src/arm/ffi.c (ffi_prep_incoming_args_SYSV,
2840         ffi_closure_SYSV_inner, ffi_prep_closure): New, add closure support.
2841         * src/arm/sysv.S(ffi_closure_SYSV): Likewise.
2842         * src/arm/ffitarget.h (FFI_TRAMPOLINE_SIZE): Likewise.
2843         (FFI_CLOSURES): Enable closure support.
2844
2845 2007-07-03  Andrew Haley  <aph@hedges.billgatliff.com>
2846
2847         * testsuite/libffi.call/cls_multi_ushort.c,
2848         testsuite/libffi.call/cls_align_uint16.c,
2849         testsuite/libffi.call/nested_struct1.c,
2850         testsuite/libffi.call/nested_struct3.c,
2851         testsuite/libffi.call/cls_7_1_byte.c,
2852         testsuite/libffi.call/cls_double.c,
2853         testsuite/libffi.call/nested_struct5.c,
2854         testsuite/libffi.call/nested_struct7.c,
2855         testsuite/libffi.call/cls_sint.c,
2856         testsuite/libffi.call/nested_struct9.c,
2857         testsuite/libffi.call/cls_20byte1.c,
2858         testsuite/libffi.call/cls_multi_sshortchar.c,
2859         testsuite/libffi.call/cls_align_sint64.c,
2860         testsuite/libffi.call/cls_3byte2.c,
2861         testsuite/libffi.call/cls_multi_schar.c,
2862         testsuite/libffi.call/cls_multi_uchar.c,
2863         testsuite/libffi.call/cls_19byte.c,
2864         testsuite/libffi.call/cls_9byte1.c,
2865         testsuite/libffi.call/cls_align_float.c,
2866         testsuite/libffi.call/closure_fn1.c,
2867         testsuite/libffi.call/problem1.c,
2868         testsuite/libffi.call/closure_fn3.c,
2869         testsuite/libffi.call/cls_sshort.c,
2870         testsuite/libffi.call/closure_fn5.c,
2871         testsuite/libffi.call/cls_align_double.c,
2872         testsuite/libffi.call/cls_2byte.c,
2873         testsuite/libffi.call/nested_struct.c,
2874         testsuite/libffi.call/nested_struct10.c,
2875         testsuite/libffi.call/cls_4byte.c,
2876         testsuite/libffi.call/cls_6byte.c,
2877         testsuite/libffi.call/cls_8byte.c,
2878         testsuite/libffi.call/cls_multi_sshort.c,
2879         testsuite/libffi.call/cls_align_uint32.c,
2880         testsuite/libffi.call/cls_align_sint16.c,
2881         testsuite/libffi.call/cls_float.c,
2882         testsuite/libffi.call/cls_20byte.c,
2883         testsuite/libffi.call/cls_5_1_byte.c,
2884         testsuite/libffi.call/nested_struct2.c,
2885         testsuite/libffi.call/cls_24byte.c,
2886         testsuite/libffi.call/nested_struct4.c,
2887         testsuite/libffi.call/nested_struct6.c,
2888         testsuite/libffi.call/cls_64byte.c,
2889         testsuite/libffi.call/nested_struct8.c,
2890         testsuite/libffi.call/cls_uint.c,
2891         testsuite/libffi.call/cls_multi_ushortchar.c,
2892         testsuite/libffi.call/cls_schar.c,
2893         testsuite/libffi.call/cls_uchar.c,
2894         testsuite/libffi.call/cls_align_uint64.c,
2895         testsuite/libffi.call/cls_ulonglong.c,
2896         testsuite/libffi.call/cls_align_longdouble.c,
2897         testsuite/libffi.call/cls_1_1byte.c,
2898         testsuite/libffi.call/cls_12byte.c,
2899         testsuite/libffi.call/cls_3_1byte.c,
2900         testsuite/libffi.call/cls_3byte1.c,
2901         testsuite/libffi.call/cls_4_1byte.c,
2902         testsuite/libffi.call/cls_6_1_byte.c,
2903         testsuite/libffi.call/cls_16byte.c,
2904         testsuite/libffi.call/cls_18byte.c,
2905         testsuite/libffi.call/closure_fn0.c,
2906         testsuite/libffi.call/cls_9byte2.c,
2907         testsuite/libffi.call/closure_fn2.c,
2908         testsuite/libffi.call/closure_fn4.c,
2909         testsuite/libffi.call/cls_ushort.c,
2910         testsuite/libffi.call/closure_fn6.c,
2911         testsuite/libffi.call/cls_5byte.c,
2912         testsuite/libffi.call/cls_align_pointer.c,
2913         testsuite/libffi.call/cls_7byte.c,
2914         testsuite/libffi.call/cls_align_sint32.c,
2915         testsuite/libffi.special/unwindtest_ffi_call.cc,
2916         testsuite/libffi.special/unwindtest.cc: Enable for ARM.
2917
2918 2007-07-05  H.J. Lu  <hongjiu.lu@intel.com>
2919
2920         * aclocal.m4: Regenerated.
2921
2922 2007-06-02  Paolo Bonzini  <bonzini@gnu.org>
2923
2924         * configure: Regenerate.
2925
2926 2007-05-23  Steve Ellcey  <sje@cup.hp.com>
2927
2928         * Makefile.in: Regenerate.
2929         * configure: Regenerate.
2930         * aclocal.m4: Regenerate.
2931         * include/Makefile.in: Regenerate.
2932         * testsuite/Makefile.in: Regenerate.
2933
2934 2007-05-10  Roman Zippel <zippel@linux-m68k.org>
2935
2936         * src/m68k/ffi.c (ffi_prep_incoming_args_SYSV,
2937         ffi_closure_SYSV_inner,ffi_prep_closure): New, add closure support.
2938         * src/m68k/sysv.S(ffi_closure_SYSV,ffi_closure_struct_SYSV): Likewise.
2939         * src/m68k/ffitarget.h (FFI_TRAMPOLINE_SIZE): Likewise.
2940         (FFI_CLOSURES): Enable closure support.
2941
2942 2007-05-10  Roman Zippel <zippel@linux-m68k.org>
2943
2944         * configure.ac (HAVE_AS_CFI_PSEUDO_OP): New test.
2945         * configure: Regenerate.
2946         * fficonfig.h.in: Regenerate.
2947         * src/m68k/sysv.S (CFI_STARTPROC,CFI_ENDPROC,
2948         CFI_OFFSET,CFI_DEF_CFA): New macros.
2949         (ffi_call_SYSV): Add callframe annotation.
2950
2951 2007-05-10  Roman Zippel <zippel@linux-m68k.org>
2952
2953         * src/m68k/ffi.c (ffi_prep_args,ffi_prep_cif_machdep): Fix
2954         numerous test suite failures.
2955         * src/m68k/sysv.S (ffi_call_SYSV): Likewise.
2956
2957 2007-04-11  Paolo Bonzini  <bonzini@gnu.org>
2958
2959         * Makefile.am (EXTRA_DIST): Bring up to date.
2960         * Makefile.in: Regenerate.
2961         * src/frv/eabi.S: Remove RCS keyword.
2962
2963 2007-04-06  Richard Henderson  <rth@redhat.com>
2964
2965         * configure.ac: Tidy target case.
2966         (HAVE_LONG_DOUBLE): Allow the target to override.
2967         * configure: Regenerate.
2968         * include/ffi.h.in: Don't define ffi_type_foo if
2969         LIBFFI_HIDE_BASIC_TYPES is defined.
2970         (ffi_type_longdouble): If not HAVE_LONG_DOUBLE, define
2971         to ffi_type_double.
2972         * types.c (LIBFFI_HIDE_BASIC_TYPES): Define.
2973         (FFI_TYPEDEF, ffi_type_void): Mark the data const.
2974         (ffi_type_longdouble): Special case for Alpha.  Don't define
2975         if long double == double.
2976
2977         * src/alpha/ffi.c (FFI_TYPE_LONGDOUBLE): Assert unique value.
2978         (ffi_prep_cif_machdep): Handle it as the 128-bit type.
2979         (ffi_call, ffi_closure_osf_inner): Likewise.
2980         (ffi_closure_osf_inner): Likewise.  Mark hidden.
2981         (ffi_call_osf, ffi_closure_osf): Mark hidden.
2982         * src/alpha/ffitarget.h (FFI_LAST_ABI): Tidy definition.
2983         * src/alpha/osf.S (ffi_call_osf, ffi_closure_osf): Mark hidden.
2984         (load_table): Handle 128-bit long double.
2985
2986         * testsuite/libffi.call/float4.c: Add -mieee for alpha.
2987
2988 2007-04-06  Tom Tromey  <tromey@redhat.com>
2989
2990         PR libffi/31491:
2991         * README: Fixed bug in example.
2992
2993 2007-04-03  Jakub Jelinek  <jakub@redhat.com>
2994
2995         * src/closures.c: Include sys/statfs.h.
2996         (_GNU_SOURCE): Define on Linux.
2997         (FFI_MMAP_EXEC_SELINUX): Define.
2998         (selinux_enabled): New variable.
2999         (selinux_enabled_check): New function.
3000         (is_selinux_enabled): Define.
3001         (dlmmap): Use it.
3002
3003 2007-03-24  Uros Bizjak  <ubizjak@gmail.com>
3004
3005         * testsuite/libffi.call/return_fl2.c (return_fl): Mark as static.
3006         Use 'volatile float sum' to create sum of floats to avoid false
3007         negative due to excess precision on ix86 targets.
3008         (main): Ditto.
3009
3010 2007-03-08  Alexandre Oliva  <aoliva@redhat.com>
3011
3012         * src/powerpc/ffi.c (flush_icache): Fix left-over from previous
3013         patch.
3014         (ffi_prep_closure_loc): Remove unneeded casts.  Add needed ones.
3015
3016 2007-03-07  Alexandre Oliva  <aoliva@redhat.com>
3017
3018         * include/ffi.h.in (ffi_closure_alloc, ffi_closure_free): New.
3019         (ffi_prep_closure_loc): New.
3020         (ffi_prep_raw_closure_loc): New.
3021         (ffi_prep_java_raw_closure_loc): New.
3022         * src/closures.c: New file.
3023         * src/dlmalloc.c [FFI_MMAP_EXEC_WRIT] (struct malloc_segment):
3024         Replace sflags with exec_offset.
3025         [FFI_MMAP_EXEC_WRIT] (mmap_exec_offset, add_segment_exec_offset,
3026         sub_segment_exec_offset): New macros.
3027         (get_segment_flags, set_segment_flags, check_segment_merge): New
3028         macros.
3029         (is_mmapped_segment, is_extern_segment): Use get_segment_flags.
3030         (add_segment, sys_alloc, create_mspace, create_mspace_with_base,
3031         destroy_mspace): Use new macros.
3032         (sys_alloc): Silence warning.
3033         * Makefile.am (libffi_la_SOURCES): Add src/closures.c.
3034         * Makefile.in: Rebuilt.
3035         * src/prep_cif [FFI_CLOSURES] (ffi_prep_closure): Implement in
3036         terms of ffi_prep_closure_loc.
3037         * src/raw_api.c (ffi_prep_raw_closure_loc): Renamed and adjusted
3038         from...
3039         (ffi_prep_raw_closure): ... this.  Re-implement in terms of the
3040         renamed version.
3041         * src/java_raw_api (ffi_prep_java_raw_closure_loc): Renamed and
3042         adjusted from...
3043         (ffi_prep_java_raw_closure): ... this.  Re-implement in terms of
3044         the renamed version.
3045         * src/alpha/ffi.c (ffi_prep_closure_loc): Renamed from
3046         (ffi_prep_closure): ... this.
3047         * src/pa/ffi.c: Likewise.
3048         * src/cris/ffi.c: Likewise.  Adjust.
3049         * src/frv/ffi.c: Likewise.
3050         * src/ia64/ffi.c: Likewise.
3051         * src/mips/ffi.c: Likewise.
3052         * src/powerpc/ffi_darwin.c: Likewise.
3053         * src/s390/ffi.c: Likewise.
3054         * src/sh/ffi.c: Likewise.
3055         * src/sh64/ffi.c: Likewise.
3056         * src/sparc/ffi.c: Likewise.
3057         * src/x86/ffi64.c: Likewise.
3058         * src/x86/ffi.c: Likewise.
3059         (FFI_INIT_TRAMPOLINE): Adjust.
3060         (ffi_prep_raw_closure_loc): Renamed and adjusted from...
3061         (ffi_prep_raw_closure): ... this.
3062         * src/powerpc/ffi.c (ffi_prep_closure_loc): Renamed from
3063         (ffi_prep_closure): ... this.
3064         (flush_icache): Adjust.
3065
3066 2007-03-07  Alexandre Oliva  <aoliva@redhat.com>
3067
3068         * src/dlmalloc.c: New file, imported version 2.8.3 of Doug
3069         Lea's malloc.
3070
3071 2007-03-01  Brooks Moses  <brooks.moses@codesourcery.com>
3072
3073         * Makefile.am: Add dummy install-pdf target.
3074         * Makefile.in: Regenerate
3075
3076 2007-02-13  Andreas Krebbel  <krebbel1@de.ibm.com>
3077
3078         * src/s390/ffi.c (ffi_prep_args, ffi_prep_cif_machdep,
3079         ffi_closure_helper_SYSV): Add long double handling.
3080
3081 2007-02-02  Jakub Jelinek  <jakub@redhat.com>
3082
3083         * src/powerpc/linux64.S (ffi_call_LINUX64): Move restore of r2
3084         immediately after bctrl instruction.
3085
3086 2007-01-18  Alexandre Oliva  <aoliva@redhat.com>
3087
3088         * Makefile.am (all-recursive, install-recursive,
3089         mostlyclean-recursive, clean-recursive, distclean-recursive,
3090         maintainer-clean-recursive): Add missing targets.
3091         * Makefile.in: Rebuilt.
3092
3093 2006-12-14  Andreas Tobler  <a.tobler@schweiz.org>
3094
3095         * configure.ac: Add TARGET for x86_64-*-darwin*.
3096         * Makefile.am (nodist_libffi_la_SOURCES): Add rules for 64-bit sources
3097         for X86_DARWIN.
3098         * src/x86/ffitarget.h: Set trampoline size for x86_64-*-darwin*.
3099         * src/x86/darwin64.S: New file for x86_64-*-darwin* support.
3100         * configure: Regenerate.
3101         * Makefile.in: Regenerate.
3102         * include/Makefile.in: Regenerate.
3103         * testsuite/Makefile.in: Regenerate.
3104         * testsuite/libffi.special/unwindtest_ffi_call.cc: New test case for
3105         ffi_call only.
3106
3107 2006-12-13  Andreas Tobler <a.tobler@schweiz.org>
3108
3109         * aclocal.m4: Regenerate with aclocal -I .. as written in the
3110         Makefile.am.
3111
3112 2006-10-31  Geoffrey Keating  <geoffk@apple.com>
3113
3114         * src/powerpc/ffi_darwin.c (darwin_adjust_aggregate_sizes): New.
3115         (ffi_prep_cif_machdep): Call darwin_adjust_aggregate_sizes for
3116         Darwin.
3117         * testsuite/libffi.call/nested_struct4.c: Remove Darwin XFAIL.
3118         * testsuite/libffi.call/nested_struct6.c: Remove Darwin XFAIL.
3119
3120 2006-10-10  Paolo Bonzini  <bonzini@gnu.org>
3121             Sandro Tolaini  <tolaini@libero.it>
3122
3123         * configure.ac [i*86-*-darwin*]: Set X86_DARWIN symbol and
3124         conditional.
3125         * configure: Regenerated.
3126         * Makefile.am (nodist_libffi_la_SOURCES) [X86_DARWIN]: New case.
3127         (EXTRA_DIST): Add src/x86/darwin.S.
3128         * Makefile.in: Regenerated.
3129         * include/Makefile.in: Regenerated.
3130         * testsuite/Makefile.in: Regenerated.
3131
3132         * src/x86/ffi.c (ffi_prep_cif_machdep) [X86_DARWIN]: Treat like
3133         X86_WIN32, and additionally align stack to 16 bytes.
3134         * src/x86/darwin.S: New, based on sysv.S.
3135         * src/prep_cif.c (ffi_prep_cif) [X86_DARWIN]: Align > 8-byte structs.
3136
3137 2006-09-12  David Daney  <ddaney@avtrex.com>
3138
3139         PR libffi/23935
3140         * include/Makefile.am: Install both ffi.h and ffitarget.h in
3141         $(libdir)/gcc/$(target_alias)/$(gcc_version)/include.
3142         * aclocal.m4: Regenerated for automake 1.9.6.
3143         * Makefile.in: Regenerated.
3144         * include/Makefile.in: Regenerated.
3145         * testsuite/Makefile.in: Regenerated.
3146
3147 2006-08-17  Andreas Tobler  <a.tobler@schweiz.ch>
3148
3149         * include/ffi_common.h (struct): Revert accidental commit.
3150
3151 2006-08-15  Andreas Tobler  <a.tobler@schweiz.ch>
3152
3153         * include/ffi_common.h: Remove lint directives.
3154         * include/ffi.h.in: Likewise.
3155
3156 2006-07-25  Torsten Schoenfeld  <kaffeetisch@gmx.de>
3157
3158         * include/ffi.h.in (ffi_type_ulong, ffi_type_slong): Define correctly
3159         for 32-bit architectures.
3160         * testsuite/libffi.call/return_ul.c: New test case.
3161
3162 2006-07-19  David Daney  <ddaney@avtrex.com>
3163
3164         * testsuite/libffi.call/closure_fn6.c: Remove xfail for mips,
3165         xfail remains for mips64.
3166
3167 2006-05-23  Carlos O'Donell  <carlos@codesourcery.com>
3168
3169         * Makefile.am: Add install-html target. Add install-html to .PHONY
3170         * Makefile.in: Regenerate.
3171         * aclocal.m4: Regenerate.
3172         * include/Makefile.in: Regenerate.
3173         * testsuite/Makefile.in: Regenerate.
3174
3175 2006-05-18  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
3176
3177         * pa/ffi.c (ffi_prep_args_pa32): Load floating point arguments from
3178         stack slot.
3179
3180 2006-04-22  Andreas Tobler  <a.tobler@schweiz.ch>
3181
3182         * README: Remove notice about 'Crazy Comments'.
3183         * src/debug.c: Remove lint directives. Cleanup white spaces.
3184         * src/java_raw_api.c: Likewise.
3185         * src/prep_cif.c: Likewise.
3186         * src/raw_api.c: Likewise.
3187         * src/ffitest.c: Delete. No longer needed, all test cases migrated
3188         to the testsuite.
3189         * src/arm/ffi.c: Remove lint directives.
3190         * src/m32r/ffi.c: Likewise.
3191         * src/pa/ffi.c: Likewise.
3192         * src/powerpc/ffi.c: Likewise.
3193         * src/powerpc/ffi_darwin.c: Likewise.
3194         * src/sh/ffi.c: Likewise.
3195         * src/sh64/ffi.c: Likewise.
3196         * src/x86/ffi.c: Likewise.
3197         * testsuite/libffi.call/float2.c: Likewise.
3198         * testsuite/libffi.call/promotion.c: Likewise.
3199         * testsuite/libffi.call/struct1.c: Likewise.
3200
3201 2006-04-13  Andreas Tobler  <a.tobler@schweiz.ch>
3202
3203         * src/pa/hpux32.S: Correct unwind offset calculation for
3204         ffi_closure_pa32.
3205         * src/pa/linux.S: Likewise.
3206
3207 2006-04-12  James E Wilson  <wilson@specifix.com>
3208
3209         PR libgcj/26483
3210         * src/ia64/ffi.c (stf_spill, ldf_fill): Rewrite as macros.
3211         (hfa_type_load): Call stf_spill.
3212         (hfa_type_store): Call ldf_fill.
3213         (ffi_call): Adjust calls to above routines.  Add local temps for
3214         macro result.
3215
3216 2006-04-10  Matthias Klose  <doko@debian.org>
3217
3218         * testsuite/lib/libffi-dg.exp (libffi-init): Recognize multilib
3219         directory names containing underscores.
3220
3221 2006-04-07  James E Wilson  <wilson@specifix.com>
3222
3223         * testsuite/libffi.call/float4.c: New testcase.
3224
3225 2006-04-05  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
3226             Andreas Tobler  <a.tobler@schweiz.ch>
3227
3228         * Makefile.am: Add PA_HPUX port.
3229         * Makefile.in: Regenerate.
3230         * include/Makefile.in: Likewise.
3231         * testsuite/Makefile.in: Likewise.
3232         * configure.ac: Add PA_HPUX rules.
3233         * configure: Regenerate.
3234         * src/pa/ffitarget.h: Rename linux target to PA_LINUX.
3235         Add PA_HPUX and PA64_HPUX.
3236         Rename FFI_LINUX ABI to FFI_PA32 ABI.
3237         (FFI_TRAMPOLINE_SIZE): Define for 32-bit HP-UX targets.
3238         (FFI_TYPE_SMALL_STRUCT2): Define.
3239         (FFI_TYPE_SMALL_STRUCT4): Likewise.
3240         (FFI_TYPE_SMALL_STRUCT8): Likewise.
3241         (FFI_TYPE_SMALL_STRUCT3): Redefine.
3242         (FFI_TYPE_SMALL_STRUCT5): Likewise.
3243         (FFI_TYPE_SMALL_STRUCT6): Likewise.
3244         (FFI_TYPE_SMALL_STRUCT7): Likewise.
3245         * src/pa/ffi.c (ROUND_DOWN): Delete.
3246         (fldw, fstw, fldd, fstd): Use '__asm__'.
3247         (ffi_struct_type): Add support for FFI_TYPE_SMALL_STRUCT2,
3248         FFI_TYPE_SMALL_STRUCT4 and FFI_TYPE_SMALL_STRUCT8.
3249         (ffi_prep_args_LINUX): Rename to ffi_prep_args_pa32. Update comment.
3250         Simplify incrementing of stack slot variable. Change type of local
3251         'n' to unsigned int.
3252         (ffi_size_stack_LINUX): Rename to ffi_size_stack_pa32. Handle long
3253         double on PA_HPUX.
3254         (ffi_prep_cif_machdep): Likewise.
3255         (ffi_call): Likewise.
3256         (ffi_closure_inner_LINUX): Rename to ffi_closure_inner_pa32. Change
3257         return type to ffi_status. Simplify incrementing of stack slot
3258         variable. Only copy floating point argument registers when PA_LINUX
3259         is true. Reformat debug statement.
3260         Add support for FFI_TYPE_SMALL_STRUCT2, FFI_TYPE_SMALL_STRUCT4 and
3261         FFI_TYPE_SMALL_STRUCT8.
3262         (ffi_closure_LINUX): Rename to ffi_closure_pa32. Add 'extern' to
3263         declaration.
3264         (ffi_prep_closure): Make linux trampoline conditional on PA_LINUX.
3265         Add nops to cache flush.  Add trampoline for PA_HPUX.
3266         * src/pa/hpux32.S: New file.
3267         * src/pa/linux.S (ffi_call_LINUX): Rename to ffi_call_pa32. Rename
3268         ffi_prep_args_LINUX to ffi_prep_args_pa32.
3269         Localize labels. Add support for 2, 4 and 8-byte small structs. Handle
3270         unaligned destinations in 3, 5, 6 and 7-byte small structs. Order
3271         argument type checks so that common argument types appear first.
3272         (ffi_closure_LINUX): Rename to ffi_closure_pa32. Rename
3273         ffi_closure_inner_LINUX to ffi_closure_inner_pa32.
3274
3275 2006-03-24  Alan Modra  <amodra@bigpond.net.au>
3276
3277         * src/powerpc/ffitarget.h (enum ffi_abi): Add FFI_LINUX.  Default
3278         for 32-bit using IBM extended double format.  Fix FFI_LAST_ABI.
3279         * src/powerpc/ffi.c (ffi_prep_args_SYSV): Handle linux variant of
3280         FFI_TYPE_LONGDOUBLE.
3281         (ffi_prep_args64): Assert using IBM extended double.
3282         (ffi_prep_cif_machdep): Don't munge FFI_TYPE_LONGDOUBLE type.
3283         Handle FFI_LINUX FFI_TYPE_LONGDOUBLE return and args.
3284         (ffi_call): Handle FFI_LINUX.
3285         (ffi_closure_helper_SYSV): Non FFI_LINUX long double return needs
3286         gpr3 return pointer as for struct return.  Handle FFI_LINUX
3287         FFI_TYPE_LONGDOUBLE return and args.  Don't increment "nf"
3288         unnecessarily.
3289         * src/powerpc/ppc_closure.S (ffi_closure_SYSV): Load both f1 and f2
3290         for FFI_TYPE_LONGDOUBLE.  Move epilogue insns into case table.
3291         Don't use r6 as pointer to results, instead use sp offset.  Don't
3292         make a special call to load lr with case table address, instead
3293         use offset from previous call.
3294         * src/powerpc/sysv.S (ffi_call_SYSV): Save long double return.
3295         * src/powerpc/linux64.S (ffi_call_LINUX64): Simplify long double
3296         return.
3297
3298 2006-03-15  Kaz Kojima  <kkojima@gcc.gnu.org>
3299
3300         * src/sh64/ffi.c (ffi_prep_cif_machdep): Handle float arguments
3301         passed with FP registers correctly.
3302         (ffi_closure_helper_SYSV): Likewise.
3303         * src/sh64/sysv.S: Likewise.
3304
3305 2006-03-01  Andreas Tobler  <a.tobler@schweiz.ch>
3306
3307         * testsuite/libffi.special/unwindtest.cc (closure_test_fn): Mark cif,
3308         args and userdata unused.
3309         (closure_test_fn1): Mark cif and userdata unused.
3310         (main): Remove unused res.
3311
3312 2006-02-28  Andreas Tobler  <a.tobler@schweiz.ch>
3313
3314         * testsuite/libffi.call/call.exp: Adjust FSF address. Add test runs for
3315         -O2, -O3, -Os and the warning flags -W -Wall.
3316         * testsuite/libffi.special/special.exp: Likewise.
3317         * testsuite/libffi.call/ffitest.h: Add an __UNUSED__ macro to mark
3318         unused parameter unused for gcc or else do nothing.
3319         * testsuite/libffi.special/ffitestcxx.h: Likewise.
3320         * testsuite/libffi.call/cls_12byte.c (cls_struct_12byte_gn): Mark cif
3321         and userdata unused.
3322         * testsuite/libffi.call/cls_16byte.c (cls_struct_16byte_gn): Likewise.
3323         * testsuite/libffi.call/cls_18byte.c (cls_struct_18byte_gn): Likewise.
3324         * testsuite/libffi.call/cls_19byte.c (cls_struct_19byte_gn): Likewise.
3325         * testsuite/libffi.call/cls_1_1byte.c (cls_struct_1_1byte_gn): Likewise.
3326         * testsuite/libffi.call/cls_20byte.c (cls_struct_20byte_gn): Likewise.
3327         * testsuite/libffi.call/cls_20byte1.c (cls_struct_20byte_gn): Likewise.
3328         * testsuite/libffi.call/cls_24byte.c (cls_struct_24byte_gn): Likewise.
3329         * testsuite/libffi.call/cls_2byte.c (cls_struct_2byte_gn): Likewise.
3330         * testsuite/libffi.call/cls_3_1byte.c (cls_struct_3_1byte_gn): Likewise.
3331         * testsuite/libffi.call/cls_3byte1.c (cls_struct_3byte_gn): Likewise.
3332         * testsuite/libffi.call/cls_3byte2.c (cls_struct_3byte_gn1): Likewise.
3333         * testsuite/libffi.call/cls_4_1byte.c (cls_struct_4_1byte_gn): Likewise.
3334         * testsuite/libffi.call/cls_4byte.c (cls_struct_4byte_gn): Likewise.
3335         * testsuite/libffi.call/cls_5_1_byte.c (cls_struct_5byte_gn): Likewise.
3336         * testsuite/libffi.call/cls_5byte.c (cls_struct_5byte_gn): Likewise.
3337         * testsuite/libffi.call/cls_64byte.c (cls_struct_64byte_gn): Likewise.
3338         * testsuite/libffi.call/cls_6_1_byte.c (cls_struct_6byte_gn): Likewise.
3339         * testsuite/libffi.call/cls_6byte.c (cls_struct_6byte_gn): Likewise.
3340         * testsuite/libffi.call/cls_7_1_byte.c (cls_struct_7byte_gn): Likewise.
3341         * testsuite/libffi.call/cls_7byte.c (cls_struct_7byte_gn): Likewise.
3342         * testsuite/libffi.call/cls_8byte.c (cls_struct_8byte_gn): Likewise.
3343         * testsuite/libffi.call/cls_9byte1.c (cls_struct_9byte_gn): Likewise.
3344         * testsuite/libffi.call/cls_9byte2.c (cls_struct_9byte_gn): Likewise.
3345         * testsuite/libffi.call/cls_align_double.c (cls_struct_align_gn):
3346         Likewise.
3347         * testsuite/libffi.call/cls_align_float.c (cls_struct_align_gn):
3348         Likewise.
3349         * testsuite/libffi.call/cls_align_longdouble.c (cls_struct_align_gn):
3350         Likewise.
3351         * testsuite/libffi.call/cls_align_pointer.c (cls_struct_align_fn): Cast
3352         void* to avoid compiler warning.
3353         (main): Likewise.
3354         (cls_struct_align_gn): Mark cif and userdata unused.
3355         * testsuite/libffi.call/cls_align_sint16.c (cls_struct_align_gn):
3356         Likewise.
3357         * testsuite/libffi.call/cls_align_sint32.c (cls_struct_align_gn):
3358         Likewise.
3359         * testsuite/libffi.call/cls_align_sint64.c (cls_struct_align_gn):
3360         Likewise.
3361         * testsuite/libffi.call/cls_align_uint16.c (cls_struct_align_gn):
3362         Likewise.
3363         * testsuite/libffi.call/cls_align_uint32.c (cls_struct_align_gn):
3364         Likewise.
3365         * testsuite/libffi.call/cls_double.c (cls_ret_double_fn): Likewise.
3366         * testsuite/libffi.call/cls_float.c (cls_ret_float_fn): Likewise.
3367         * testsuite/libffi.call/cls_multi_schar.c (test_func_gn): Mark cif and
3368         data unused.
3369         (main): Cast res_call to silence gcc.
3370         * testsuite/libffi.call/cls_multi_sshort.c (test_func_gn): Mark cif and
3371         data unused.
3372         (main): Cast res_call to silence gcc.
3373         * testsuite/libffi.call/cls_multi_sshortchar.c (test_func_gn): Mark cif
3374         and data unused.
3375         (main): Cast res_call to silence gcc.
3376         * testsuite/libffi.call/cls_multi_uchar.c (test_func_gn): Mark cif and
3377         data unused.
3378         (main): Cast res_call to silence gcc.
3379         * testsuite/libffi.call/cls_multi_ushort.c (test_func_gn): Mark cif and
3380         data unused.
3381         (main): Cast res_call to silence gcc.
3382         * testsuite/libffi.call/cls_multi_ushortchar.c (test_func_gn): Mark cif
3383         and data unused.
3384         (main): Cast res_call to silence gcc.
3385         * testsuite/libffi.call/cls_schar.c (cls_ret_schar_fn): Mark cif and
3386         userdata unused.
3387         (cls_ret_schar_fn): Cast printf parameter to silence gcc.
3388         * testsuite/libffi.call/cls_sint.c (cls_ret_sint_fn): Mark cif and
3389         userdata unused.
3390         (cls_ret_sint_fn): Cast printf parameter to silence gcc.
3391         * testsuite/libffi.call/cls_sshort.c (cls_ret_sshort_fn): Mark cif and
3392         userdata unused.
3393         (cls_ret_sshort_fn): Cast printf parameter to silence gcc.
3394         * testsuite/libffi.call/cls_uchar.c (cls_ret_uchar_fn):  Mark cif and
3395         userdata unused.
3396         (cls_ret_uchar_fn): Cast printf parameter to silence gcc.
3397         * testsuite/libffi.call/cls_uint.c (cls_ret_uint_fn): Mark cif and
3398         userdata unused.
3399         (cls_ret_uint_fn): Cast printf parameter to silence gcc.
3400         * testsuite/libffi.call/cls_ulonglong.c (cls_ret_ulonglong_fn): Mark cif
3401         and userdata unused.
3402         * testsuite/libffi.call/cls_ushort.c (cls_ret_ushort_fn): Mark cif and
3403         userdata unused.
3404         (cls_ret_ushort_fn): Cast printf parameter to silence gcc.
3405         * testsuite/libffi.call/float.c (floating): Remove unused parameter e.
3406         * testsuite/libffi.call/float1.c (main): Remove unused variable i.
3407         Cleanup white spaces.
3408         * testsuite/libffi.call/negint.c (checking): Remove unused variable i.
3409         * testsuite/libffi.call/nested_struct.c (cls_struct_combined_gn): Mark
3410         cif and userdata unused.
3411         * testsuite/libffi.call/nested_struct1.c (cls_struct_combined_gn):
3412         Likewise.
3413         * testsuite/libffi.call/nested_struct10.c (B_gn): Likewise.
3414         * testsuite/libffi.call/nested_struct2.c (B_fn): Adjust printf
3415         formatters to silence gcc.
3416         (B_gn): Mark cif and userdata unused.
3417         * testsuite/libffi.call/nested_struct3.c (B_gn): Mark cif and userdata
3418         unused.
3419         * testsuite/libffi.call/nested_struct4.c: Mention related PR.
3420         (B_gn): Mark cif and userdata unused.
3421         * testsuite/libffi.call/nested_struct5.c (B_gn): Mark cif and userdata
3422         unused.
3423         * testsuite/libffi.call/nested_struct6.c: Mention related PR.
3424         (B_gn): Mark cif and userdata unused.
3425         * testsuite/libffi.call/nested_struct7.c (B_gn): Mark cif and userdata
3426         unused.
3427         * testsuite/libffi.call/nested_struct8.c (B_gn): Likewise.
3428         * testsuite/libffi.call/nested_struct9.c (B_gn): Likewise.
3429         * testsuite/libffi.call/problem1.c (stub): Likewise.
3430         * testsuite/libffi.call/pyobjc-tc.c (main): Cast the result to silence
3431         gcc.
3432         * testsuite/libffi.call/return_fl2.c (return_fl): Add the note mentioned
3433         in the last commit for this test case in the test case itself.
3434         * testsuite/libffi.call/closure_fn0.c (closure_test_fn0): Mark cif as
3435         unused.
3436         * testsuite/libffi.call/closure_fn1.c (closure_test_fn1): Likewise.
3437         * testsuite/libffi.call/closure_fn2.c (closure_test_fn2): Likewise.
3438         * testsuite/libffi.call/closure_fn3.c (closure_test_fn3): Likewise.
3439         * testsuite/libffi.call/closure_fn4.c (closure_test_fn0): Likewise.
3440         * testsuite/libffi.call/closure_fn5.c (closure_test_fn5): Likewise.
3441         * testsuite/libffi.call/closure_fn6.c (closure_test_fn0): Likewise.
3442
3443 2006-02-22  Kaz Kojima  <kkojima@gcc.gnu.org>
3444
3445         * src/sh/sysv.S: Fix register numbers in the FDE for
3446         ffi_closure_SYSV.
3447
3448 2006-02-20  Andreas Tobler  <a.tobler@schweiz.ch>
3449
3450         * testsuite/libffi.call/return_fl2.c (return_fl): Remove static
3451         declaration to avoid a false negative on ix86. See PR323.
3452
3453 2006-02-18  Kaz Kojima  <kkojima@gcc.gnu.org>
3454
3455         * src/sh/ffi.c (ffi_closure_helper_SYSV): Remove unused variable
3456         and cast integer to void * if needed.  Update the pointer to
3457         the FP register saved area correctly.
3458
3459 2006-02-17  Andreas Tobler  <a.tobler@schweiz.ch>
3460
3461         * testsuite/libffi.call/nested_struct6.c: XFAIL this test until PR25630
3462         is fixed.
3463         * testsuite/libffi.call/nested_struct4.c: Likewise.
3464
3465 2006-02-16  Andreas Tobler  <a.tobler@schweiz.ch>
3466
3467         * testsuite/libffi.call/return_dbl.c: New test case.
3468         * testsuite/libffi.call/return_dbl1.c: Likewise.
3469         * testsuite/libffi.call/return_dbl2.c: Likewise.
3470         * testsuite/libffi.call/return_fl.c: Likewise.
3471         * testsuite/libffi.call/return_fl1.c: Likewise.
3472         * testsuite/libffi.call/return_fl2.c: Likewise.
3473         * testsuite/libffi.call/return_fl3.c: Likewise.
3474         * testsuite/libffi.call/closure_fn6.c: Likewise.
3475
3476         * testsuite/libffi.call/nested_struct2.c: Remove ffi_type_mylong
3477         definition.
3478         * testsuite/libffi.call/ffitest.h: Add ffi_type_mylong definition
3479         here to be used by other test cases too.
3480
3481         * testsuite/libffi.call/nested_struct10.c: New test case.
3482         * testsuite/libffi.call/nested_struct9.c: Likewise.
3483         * testsuite/libffi.call/nested_struct8.c: Likewise.
3484         * testsuite/libffi.call/nested_struct7.c: Likewise.
3485         * testsuite/libffi.call/nested_struct6.c: Likewise.
3486         * testsuite/libffi.call/nested_struct5.c: Likewise.
3487         * testsuite/libffi.call/nested_struct4.c: Likewise.
3488
3489 2006-01-21  Andreas Tobler  <a.tobler@schweiz.ch>
3490
3491         * configure.ac: Enable libffi for sparc64-*-freebsd*.
3492         * configure: Rebuilt.
3493
3494 2006-01-18  Jakub Jelinek  <jakub@redhat.com>
3495
3496         * src/powerpc/sysv.S (smst_two_register): Don't call __ashldi3,
3497         instead do the shifting inline.
3498         * src/powerpc/ppc_closure.S (ffi_closure_SYSV): Don't compute %r5
3499         shift count unconditionally.  Simplify load sequences for 1, 2, 3, 4
3500         and 8 byte structs, for the remaining struct sizes don't call
3501         __lshrdi3, instead do the shifting inline.
3502
3503 2005-12-07  Thiemo Seufer  <ths@networkno.de>
3504
3505         * src/mips/ffitarget.h: Remove obsolete sgidefs.h include. Add
3506         missing parentheses.
3507         * src/mips/o32.S (ffi_call_O32): Code formatting. Define
3508         and use A3_OFF, FP_OFF, RA_OFF. Micro-optimizations.
3509         (ffi_closure_O32): Likewise, but with newly defined A3_OFF2,
3510         A2_OFF2, A1_OFF2, A0_OFF2, RA_OFF2, FP_OFF2, S0_OFF2, GP_OFF2,
3511         V1_OFF2, V0_OFF2, FA_1_1_OFF2, FA_1_0_OFF2, FA_0_1_OFF2,
3512         FA_0_0_OFF2.
3513         * src/mips/ffi.c (ffi_prep_args): Code formatting. Fix
3514         endianness bugs.
3515         (ffi_prep_closure): Improve trampoline instruction scheduling.
3516         (ffi_closure_mips_inner_O32): Fix endianness bugs.
3517
3518 2005-12-03  Alan Modra  <amodra@bigpond.net.au>
3519
3520         * src/powerpc/ffi.c: Formatting.
3521         (ffi_prep_args_SYSV): Avoid possible aliasing problems by using unions.
3522         (ffi_prep_args64): Likewise.
3523
3524 2005-09-30  Geoffrey Keating  <geoffk@apple.com>
3525
3526         * testsuite/lib/libffi-dg.exp (libffi_target_compile): For
3527         darwin, use -shared-libgcc not -lgcc_s, and explain why.
3528
3529 2005-09-26  Tom Tromey  <tromey@redhat.com>
3530
3531         * testsuite/libffi.call/float1.c (value_type): New typedef.
3532         (CANARY): New define.
3533         (main): Check for result buffer overflow.
3534         * src/powerpc/linux64.S: Handle linux64 long double returns.
3535         * src/powerpc/ffi.c (FLAG_RETURNS_128BITS): New constant.
3536         (ffi_prep_cif_machdep): Handle linux64 long double returns.
3537
3538 2005-08-25  Alan Modra  <amodra@bigpond.net.au>
3539
3540         PR target/23404
3541         * src/powerpc/ffi.c (ffi_prep_args_SYSV): Correct placement of stack
3542         homed fp args.
3543         (ffi_status ffi_prep_cif_machdep): Correct stack sizing for same.
3544
3545 2005-08-11  Jakub Jelinek  <jakub@redhat.com>
3546
3547         * configure.ac (HAVE_HIDDEN_VISIBILITY_ATTRIBUTE): New test.
3548         (AH_BOTTOM): Add FFI_HIDDEN definition.
3549         * configure: Rebuilt.
3550         * fficonfig.h.in: Rebuilt.
3551         * src/powerpc/ffi.c (hidden): Remove.
3552         (ffi_closure_LINUX64, ffi_prep_args64, ffi_call_LINUX64,
3553         ffi_closure_helper_LINUX64): Use FFI_HIDDEN instead of hidden.
3554         * src/powerpc/linux64_closure.S (ffi_closure_LINUX64,
3555         .ffi_closure_LINUX64): Use FFI_HIDDEN instead of .hidden.
3556         * src/x86/ffi.c (ffi_closure_SYSV, ffi_closure_raw_SYSV): Remove,
3557         add FFI_HIDDEN to its prototype.
3558         (ffi_closure_SYSV_inner): New.
3559         * src/x86/sysv.S (ffi_closure_SYSV, ffi_closure_raw_SYSV): New.
3560         * src/x86/win32.S (ffi_closure_SYSV, ffi_closure_raw_SYSV): New.
3561
3562 2005-08-10  Alfred M. Szmidt  <ams@gnu.org>
3563
3564         PR libffi/21819:
3565         * configure: Rebuilt.
3566         * configure.ac: Handle i*86-*-gnu*.
3567
3568 2005-08-09  Jakub Jelinek  <jakub@redhat.com>
3569
3570         * src/powerpc/ppc_closure.S (ffi_closure_SYSV): Use
3571         DW_CFA_offset_extended_sf rather than
3572         DW_CFA_GNU_negative_offset_extended.
3573         * src/powerpc/sysv.S (ffi_call_SYSV): Likewise.
3574
3575 2005-07-22  SUGIOKA Toshinobu  <sugioka@itonet.co.jp>
3576
3577         * src/sh/sysv.S (ffi_call_SYSV): Stop argument popping correctly
3578         on sh3.
3579         (ffi_closure_SYSV): Change the stack layout for sh3 struct argument.
3580         * src/sh/ffi.c (ffi_prep_args): Fix sh3 argument copy, when it is
3581         partially on register.
3582         (ffi_closure_helper_SYSV): Likewise.
3583         (ffi_prep_cif_machdep): Don't set too many cif->flags.
3584
3585 2005-07-20  Kaz Kojima  <kkojima@gcc.gnu.org>
3586
3587         * src/sh/ffi.c (ffi_call): Handle small structures correctly.
3588         Remove empty line.
3589         * src/sh64/ffi.c (simple_type): Remove.
3590         (return_type): Handle small structures correctly.
3591         (ffi_prep_args): Likewise.
3592         (ffi_call): Likewise.
3593         (ffi_closure_helper_SYSV): Likewise.
3594         * src/sh64/sysv.S (ffi_call_SYSV): Handle 1, 2 and 4-byte return.
3595         Emit position independent code if PIC and remove wrong datalabel
3596         prefixes from EH data.
3597
3598 2005-07-19  Andreas Tobler  <a.tobler@schweiz.ch>
3599
3600         * Makefile.am (nodist_libffi_la_SOURCES): Add POWERPC_FREEBSD.
3601         * Makefile.in: Regenerate.
3602         * include/Makefile.in: Likewise.
3603         * testsuite/Makefile.in: Likewise.
3604         * configure.ac: Add POWERPC_FREEBSD rules.
3605         * configure: Regenerate.
3606         * src/powerpc/ffitarget.h: Add POWERPC_FREEBSD rules.
3607         (FFI_SYSV_TYPE_SMALL_STRUCT): Define.
3608         * src/powerpc/ffi.c: Add flags to handle small structure returns
3609         in ffi_call_SYSV.
3610         (ffi_prep_cif_machdep): Handle small structures for SYSV 4 ABI.
3611         Aka FFI_SYSV.
3612         (ffi_closure_helper_SYSV): Likewise.
3613         * src/powerpc/ppc_closure.S: Add return types for small structures.
3614         * src/powerpc/sysv.S: Add bits to handle small structures for
3615         final SYSV 4 ABI.
3616
3617 2005-07-10  Andreas Tobler  <a.tobler@schweiz.ch>
3618
3619         * testsuite/libffi.call/cls_5_1_byte.c: New test file.
3620         * testsuite/libffi.call/cls_6_1_byte.c: Likewise.
3621         * testsuite/libffi.call/cls_7_1_byte.c: Likewise.
3622
3623 2005-07-05  Randolph Chung  <tausq@debian.org>
3624
3625         * src/pa/ffi.c (ffi_struct_type): Rename FFI_TYPE_SMALL_STRUCT1
3626         as FFI_TYPE_SMALL_STRUCT3.  Break out handling for 5-7 byte
3627         structures.  Kill compilation warnings.
3628         (ffi_closure_inner_LINUX): Print return values as hex in debug
3629         message.  Rename FFI_TYPE_SMALL_STRUCT1 as FFI_TYPE_SMALL_STRUCT3.
3630         Properly handle 5-7 byte structure returns.
3631         * src/pa/ffitarget.h (FFI_TYPE_SMALL_STRUCT1)
3632         (FFI_TYPE_SMALL_STRUCT2): Remove.
3633         (FFI_TYPE_SMALL_STRUCT3, FFI_TYPE_SMALL_STRUCT5)
3634         (FFI_TYPE_SMALL_STRUCT6, FFI_TYPE_SMALL_STRUCT7): Define.
3635         * src/pa/linux.S: Mark source file as using PA1.1 assembly.
3636         (checksmst1, checksmst2): Remove.
3637         (checksmst3): Optimize handling of 3-byte struct returns.
3638         (checksmst567): Properly handle 5-7 byte struct returns.
3639
3640 2005-06-15  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
3641
3642         PR libgcj/21943
3643         * src/mips/n32.S: Enforce PIC code.
3644         * src/mips/o32.S: Likewise.
3645
3646 2005-06-15  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
3647
3648         * configure.ac: Treat i*86-*-solaris2.10 and up as X86_64.
3649         * configure: Regenerate.
3650
3651 2005-06-01  Alan Modra  <amodra@bigpond.net.au>
3652
3653         * src/powerpc/ppc_closure.S (ffi_closure_SYSV): Don't use JUMPTARGET
3654         to call ffi_closure_helper_SYSV.  Append @local instead.
3655         * src/powerpc/sysv.S (ffi_call_SYSV): Likewise for ffi_prep_args_SYSV.
3656
3657 2005-05-17  Kelley Cook  <kcook@gcc.gnu.org>
3658
3659         * configure.ac: Use AC_C_BIGENDIAN instead of AC_C_BIGENDIAN_CROSS.
3660         Use AC_CHECK_SIZEOF instead of AC_COMPILE_CHECK_SIZEOF.
3661         * Makefile.am (ACLOCAL_AMFLAGS): Remove -I ../config.
3662         * aclocal.m4, configure, fficonfig.h.in, Makefile.in,
3663         include/Makefile.in, testsuite/Makefile.in: Regenerate.
3664
3665 2005-05-09  Mike Stump  <mrs@apple.com>
3666
3667         * configure: Regenerate.
3668
3669 2005-05-08  Richard Henderson  <rth@redhat.com>
3670
3671         PR libffi/21285
3672         * src/alpha/osf.S: Update unwind into to match code.
3673
3674 2005-05-04  Andreas Degert <ad@papyrus-gmbh.de>
3675             Richard Henderson  <rth@redhat.com>
3676
3677         * src/x86/ffi64.c (ffi_prep_cif_machdep): Save sse-used flag in
3678         bit 11 of flags.
3679         (ffi_call): Mask return type field.  Pass ssecount to ffi_call_unix64.
3680         (ffi_prep_closure): Set carry bit if sse-used flag set.
3681         * src/x86/unix64.S (ffi_call_unix64): Add ssecount argument.
3682         Only load sse registers if ssecount non-zero.
3683         (ffi_closure_unix64): Only save sse registers if carry set on entry.
3684
3685 2005-04-29  Ralf Corsepius  <ralf.corsepius@rtems.org>
3686
3687         * configure.ac: Add i*86-*-rtems*, sparc*-*-rtems*,
3688         powerpc-*rtems*, arm*-*-rtems*, sh-*-rtems*.
3689         * configure: Regenerate.
3690
3691 2005-04-20  Hans-Peter Nilsson  <hp@axis.com>
3692
3693         * testsuite/lib/libffi-dg.exp (libffi-dg-test-1): In regsub use,
3694         have Tcl8.3-compatible intermediate variable.
3695
3696 2005-04-18  Simon Posnjak <simon.posnjak@siol.net>
3697             Hans-Peter Nilsson  <hp@axis.com>
3698
3699         * Makefile.am: Add CRIS support.
3700         * configure.ac: Likewise.
3701         * Makefile.in, configure, testsuite/Makefile.in,
3702         include/Makefile.in: Regenerate.
3703         * src/cris: New directory.
3704         * src/cris/ffi.c, src/cris/sysv.S, src/cris/ffitarget.h: New files.
3705         * src/prep_cif.c (ffi_prep_cif): Wrap in #ifndef __CRIS__.
3706
3707         * testsuite/lib/libffi-dg.exp (libffi-dg-test-1): Replace \n with
3708         \r?\n in output tests.
3709
3710 2005-04-12  Mike Stump  <mrs@apple.com>
3711
3712         * configure: Regenerate.
3713
3714 2005-03-30  Hans Boehm  <Hans.Boehm@hp.com>
3715
3716         * src/ia64/ffitarget.h (ffi_arg): Use long long instead of DI.
3717
3718 2005-03-30  Steve Ellcey  <sje@cup.hp.com>
3719
3720         * src/ia64/ffitarget.h (ffi_arg) ADD DI attribute.
3721         (ffi_sarg) Ditto.
3722         * src/ia64/unix.S (ffi_closure_unix): Extend gp
3723         to 64 bits in ILP32 mode.
3724         Load 64 bits even for short data.
3725
3726 2005-03-23  Mike Stump  <mrs@apple.com>
3727
3728         * src/powerpc/darwin.S: Update for -m64 multilib.
3729         * src/powerpc/darwin_closure.S: Likewise.
3730
3731 2005-03-21  Zack Weinberg  <zack@codesourcery.com>
3732
3733         * configure.ac: Do not invoke TL_AC_GCC_VERSION.
3734         Do not set tool_include_dir.
3735         * aclocal.m4, configure, Makefile.in, testsuite/Makefile.in:
3736         Regenerate.
3737         * include/Makefile.am: Set gcc_version and toollibffidir.
3738         * include/Makefile.in: Regenerate.
3739
3740 2005-02-22  Andrew Haley  <aph@redhat.com>
3741
3742         * src/powerpc/ffi.c (ffi_prep_cif_machdep): Bump alignment to
3743         odd-numbered register pairs for 64-bit integer types.
3744
3745 2005-02-23  Andreas Tobler  <a.tobler@schweiz.ch>
3746
3747         PR libffi/20104
3748         * testsuite/libffi.call/return_ll1.c: New test case.
3749
3750 2005-02-11  Janis Johnson  <janis187@us.ibm.com>
3751
3752         * testsuite/libffi.call/cls_align_longdouble.c: Remove dg-options.
3753         * testsuite/libffi.call/float.c: Ditto.
3754         * testsuite/libffi.call/float2.c: Ditto.
3755         * testsuite/libffi.call/float3.c: Ditto.
3756
3757 2005-02-08  Andreas Tobler  <a.tobler@schweiz.ch>
3758
3759         * src/frv/ffitarget.h: Remove PPC stuff which does not belong to frv.
3760
3761 2005-01-12  Eric Botcazou  <ebotcazou@libertysurf.fr>
3762
3763         * testsuite/libffi.special/special.exp (cxx_options): Add
3764         -shared-libgcc.
3765
3766 2004-12-31  Richard Henderson  <rth@redhat.com>
3767
3768         * src/types.c (FFI_AGGREGATE_TYPEDEF): Remove.
3769         (FFI_TYPEDEF): Rename from FFI_INTEGRAL_TYPEDEF.  Replace size and
3770         offset parameters with a type parameter; deduce size and structure
3771         alignment.  Update all users.
3772
3773 2004-12-31  Richard Henderson  <rth@redhat.com>
3774
3775         * src/types.c (FFI_TYPE_POINTER): Define with sizeof.
3776         (FFI_TYPE_LONGDOUBLE): Fix for ia64.
3777         * src/ia64/ffitarget.h (struct ffi_ia64_trampoline_struct): Move
3778         into ffi_prep_closure.
3779         * src/ia64/ia64_flags.h, src/ia64/ffi.c, src/ia64/unix.S: Rewrite
3780         from scratch.
3781
3782 2004-12-27  Richard Henderson  <rth@redhat.com>
3783
3784         * src/x86/unix64.S: Fix typo in unwind info.
3785
3786 2004-12-25  Richard Henderson  <rth@redhat.com>
3787
3788         * src/x86/ffi64.c (struct register_args): Rename from stackLayout.
3789         (enum x86_64_reg_class): Add X86_64_COMPLEX_X87_CLASS.
3790         (merge_classes): Check for it.
3791         (SSE_CLASS_P): New.
3792         (classify_argument): Pass byte_offset by value; perform all updates
3793         inside struct case.
3794         (examine_argument): Add classes argument; handle
3795         X86_64_COMPLEX_X87_CLASS.
3796         (ffi_prep_args): Merge into ...
3797         (ffi_call): ... here.  Share stack frame with ffi_call_unix64.
3798         (ffi_prep_cif_machdep): Setup cif->flags for proper structure return.
3799         (ffi_fill_return_value): Remove.
3800         (ffi_prep_closure): Remove dead assert.
3801         (ffi_closure_unix64_inner): Rename from ffi_closure_UNIX64_inner.
3802         Rewrite to use struct register_args instead of va_list.  Create
3803         flags for handling structure returns.
3804         * src/x86/unix64.S: Remove dead strings.
3805         (ffi_call_unix64): Rename from ffi_call_UNIX64.  Rewrite to share
3806         stack frame with ffi_call.  Handle structure returns properly.
3807         (float2sse, floatfloat2sse, double2sse): Remove.
3808         (sse2float, sse2double, sse2floatfloat): Remove.
3809         (ffi_closure_unix64): Rename from ffi_closure_UNIX64.  Rewrite
3810         to handle structure returns properly.
3811
3812 2004-12-08  David Edelsohn  <edelsohn@gnu.org>
3813
3814         * Makefile.am (AM_MAKEFLAGS): Remove duplicate LIBCFLAGS and
3815         PICFLAG.
3816         * Makefile.in: Regenerated.
3817
3818 2004-12-02  Richard Sandiford  <rsandifo@redhat.com>
3819
3820         * configure.ac: Use TL_AC_GCC_VERSION to set gcc_version.
3821         * configure, aclocal.m4, Makefile.in: Regenerate.
3822         * include/Makefile.in, testsuite/Makefile.in: Regenerate.
3823
3824 2004-11-29  Kelley Cook  <kcook@gcc.gnu.org>
3825
3826         * configure: Regenerate for libtool change.
3827
3828 2004-11-25  Kelley Cook  <kcook@gcc.gnu.org>
3829
3830         * configure: Regenerate for libtool reversion.
3831
3832 2004-11-24  Kelley Cook  <kcook@gcc.gnu.org>
3833
3834         * configure: Regenerate for libtool change.
3835
3836 2004-11-23  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
3837
3838         * testsuite/lib/libffi-dg.exp: Use new procs in target-libpath.exp.
3839
3840 2004-11-23  Richard Sandiford  <rsandifo@redhat.com>
3841
3842         * src/mips/o32.S (ffi_call_O32, ffi_closure_O32): Use jalr instead
3843         of jal.  Use an absolute encoding for the frame information.
3844
3845 2004-11-23  Kelley Cook  <kcook@gcc.gnu.org>
3846
3847         * Makefile.am: Remove no-dependencies.  Add ACLOCAL_AMFLAGS.
3848         * acinclude.m4: Delete logic for sincludes.
3849         * aclocal.m4, Makefile.in, configure: Regenerate.
3850         * include/Makefile: Likewise.
3851         * testsuite/Makefile: Likewise.
3852
3853 2004-11-22  Eric Botcazou  <ebotcazou@libertysurf.fr>
3854
3855         * src/sparc/ffi.c (ffi_prep_closure): Align doubles and 64-bit integers
3856         on a 8-byte boundary.
3857         * src/sparc/v8.S (ffi_closure_v8): Reserve frame space for arguments.
3858
3859 2004-10-27  Richard Earnshaw  <rearnsha@arm.com>
3860
3861         * src/arm/ffi.c (ffi_prep_cif_machdep): Handle functions that return
3862         long long values.  Round stack allocation to a multiple of 8 bytes
3863         for ATPCS compatibility.
3864         * src/arm/sysv.S (ffi_call_SYSV): Rework to avoid use of APCS register
3865         names.  Handle returning long long types.  Add Thumb and interworking
3866         support.  Improve soft-float code.
3867
3868 2004-10-27  Richard Earnshaw  <rearnsha@arm.com>
3869
3870         * testsuite/lib/libffi-db.exp (load_gcc_lib): New function.
3871         (libffi_exit): New function.
3872         (libffi_init): Build the testglue wrapper if needed.
3873
3874 2004-10-25  Eric Botcazou  <ebotcazou@libertysurf.fr>
3875
3876         PR other/18138
3877         * testsuite/lib/libffi-dg.exp: Accept more than one multilib libgcc.
3878
3879 2004-10-25  Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
3880
3881         * src/m32r/libffitarget.h (FFI_CLOSURES): Set to 0.
3882
3883 2004-10-20  Kaz Kojima  <kkojima@gcc.gnu.org>
3884
3885         * src/sh/sysv.S (ffi_call_SYSV): Don't align for double data.
3886         * testsuite/libffi.call/float3.c: New test case.
3887
3888 2004-10-18  Kaz Kojima  <kkojima@gcc.gnu.org>
3889
3890         * src/sh/ffi.c (ffi_prep_closure): Set T bit in trampoline for
3891         the function returning a structure pointed with R2.
3892         * src/sh/sysv.S (ffi_closure_SYSV): Use R2 as the pointer to
3893         the structure return value if T bit set.  Emit position
3894         independent code and EH data if PIC.
3895
3896 2004-10-13  Kazuhiro Inaoka  <inaoka.kazuhiro@renesas.com>
3897
3898         * Makefile.am: Add m32r support.
3899         * configure.ac: Likewise.
3900         * Makefile.in: Regenerate.
3901         * confiugre: Regenerate.
3902         * src/types.c: Add m32r port to FFI_INTERNAL_TYPEDEF
3903         (uint64, sint64, double, longdouble)
3904         * src/m32r: New directory.
3905         * src/m32r/ffi.c: New file.
3906         * src/m32r/sysv.S: Likewise.
3907         * src/m32r/ffitarget.h: Likewise.
3908
3909 2004-10-02  Kaz Kojima  <kkojima@gcc.gnu.org>
3910
3911         * testsuite/libffi.call/negint.c: New test case.
3912
3913 2004-09-14  H.J. Lu  <hongjiu.lu@intel.com>
3914
3915         PR libgcj/17465
3916         * testsuite/lib/libffi-dg.exp: Don't use global ld_library_path.
3917         Set up LD_LIBRARY_PATH, SHLIB_PATH, LD_LIBRARYN32_PATH,
3918         LD_LIBRARY64_PATH, LD_LIBRARY_PATH_32, LD_LIBRARY_PATH_64 and
3919         DYLD_LIBRARY_PATH.
3920
3921 2004-09-05  Andreas Tobler  <a.tobler@schweiz.ch>
3922
3923         * testsuite/libffi.call/many_win32.c: Remove whitespaces.
3924         * testsuite/libffi.call/promotion.c: Likewise.
3925         * testsuite/libffi.call/return_ll.c: Remove unused var. Cleanup
3926         whitespaces.
3927         * testsuite/libffi.call/return_sc.c: Likewise.
3928         * testsuite/libffi.call/return_uc.c: Likewise.
3929
3930 2004-09-05  Andreas Tobler  <a.tobler@schweiz.ch>
3931
3932         * src/powerpc/darwin.S: Fix comments and identation.
3933         * src/powerpc/darwin_closure.S: Likewise.
3934
3935 2004-09-02  Andreas Tobler  <a.tobler@schweiz.ch>
3936
3937         * src/powerpc/ffi_darwin.c: Add flag for longdouble return values.
3938         (ffi_prep_args): Handle longdouble arguments.
3939         (ffi_prep_cif_machdep): Set flags for longdouble. Calculate space for
3940         longdouble.
3941         (ffi_closure_helper_DARWIN): Add closure handling for longdouble.
3942         * src/powerpc/darwin.S (_ffi_call_DARWIN): Add handling of longdouble
3943         values.
3944         * src/powerpc/darwin_closure.S (_ffi_closure_ASM): Likewise.
3945         * src/types.c: Defined longdouble size and alignment for darwin.
3946
3947 2004-09-02  Andreas Tobler  <a.tobler@schweiz.ch>
3948
3949         * src/powerpc/aix.S: Remove whitespaces.
3950         * src/powerpc/aix_closure.S: Likewise.
3951         * src/powerpc/asm.h: Likewise.
3952         * src/powerpc/ffi.c: Likewise.
3953         * src/powerpc/ffitarget.h: Likewise.
3954         * src/powerpc/linux64.S: Likewise.
3955         * src/powerpc/linux64_closure.S: Likewise.
3956         * src/powerpc/ppc_closure.S: Likewise.
3957         * src/powerpc/sysv.S: Likewise.
3958
3959 2004-08-30  Anthony Green  <green@redhat.com>
3960
3961         * Makefile.am: Add frv support.
3962         * Makefile.in, testsuite/Makefile.in: Rebuilt.
3963         * configure.ac: Read configure.host.
3964         * configure.in: Read configure.host.
3965         * configure.host: New file.  frv-elf needs libgloss.
3966         * include/ffi.h.in: Force ffi_closure to have a nice big (8)
3967         alignment.  This is needed to frv and shouldn't harm the others.
3968         * include/ffi_common.h (ALIGN_DOWN): New macro.
3969         * src/frv/ffi.c, src/frv/ffitarget.h, src/frv/eabi.S: New files.
3970
3971 2004-08-24  David Daney  <daney@avtrex.com>
3972
3973         * testsuite/libffi.call/closure_fn0.c: Xfail mips64* instead of mips*.
3974         * testsuite/libffi.call/closure_fn1.c: Likewise.
3975         * testsuite/libffi.call/closure_fn2.c  Likewise.
3976         * testsuite/libffi.call/closure_fn3.c: Likewise.
3977         * testsuite/libffi.call/closure_fn4.c: Likewise.
3978         * testsuite/libffi.call/closure_fn5.c: Likewise.
3979         * testsuite/libffi.call/cls_18byte.c: Likewise.
3980         * testsuite/libffi.call/cls_19byte.c: Likewise.
3981         * testsuite/libffi.call/cls_1_1byte.c: Likewise.
3982         * testsuite/libffi.call/cls_20byte.c: Likewise.
3983         * testsuite/libffi.call/cls_20byte1.c: Likewise.
3984         * testsuite/libffi.call/cls_24byte.c: Likewise.
3985         * testsuite/libffi.call/cls_2byte.c: Likewise.
3986         * testsuite/libffi.call/cls_3_1byte.c: Likewise.
3987         * testsuite/libffi.call/cls_3byte1.c: Likewise.
3988         * testsuite/libffi.call/cls_3byte2.c: Likewise.
3989         * testsuite/libffi.call/cls_4_1byte.c: Likewise.
3990         * testsuite/libffi.call/cls_4byte.c: Likewise.
3991         * testsuite/libffi.call/cls_64byte.c: Likewise.
3992         * testsuite/libffi.call/cls_6byte.c: Likewise.
3993         * testsuite/libffi.call/cls_7byte.c: Likewise.
3994         * testsuite/libffi.call/cls_8byte.c: Likewise.
3995         * testsuite/libffi.call/cls_9byte1.c: Likewise.
3996         * testsuite/libffi.call/cls_9byte2.c: Likewise.
3997         * testsuite/libffi.call/cls_align_double.c: Likewise.
3998         * testsuite/libffi.call/cls_align_float.c: Likewise.
3999         * testsuite/libffi.call/cls_align_longdouble.c: Likewise.
4000         * testsuite/libffi.call/cls_align_pointer.c: Likewise.
4001         * testsuite/libffi.call/cls_align_sint16.c: Likewise.
4002         * testsuite/libffi.call/cls_align_sint32.c: Likewise.
4003         * testsuite/libffi.call/cls_align_sint64.c: Likewise.
4004         * testsuite/libffi.call/cls_align_uint16.c: Likewise.
4005         * testsuite/libffi.call/cls_align_uint32.c: Likewise.
4006         * testsuite/libffi.call/cls_align_uint64.c: Likewise.
4007         * testsuite/libffi.call/cls_double.c: Likewise.
4008         * testsuite/libffi.call/cls_float.c: Likewise.
4009         * testsuite/libffi.call/cls_multi_schar.c: Likewise.
4010         * testsuite/libffi.call/cls_multi_sshort.c: Likewise.
4011         * testsuite/libffi.call/cls_multi_sshortchar.c: Likewise.
4012         * testsuite/libffi.call/cls_multi_uchar.c: Likewise.
4013         * testsuite/libffi.call/cls_multi_ushort.c: Likewise.
4014         * testsuite/libffi.call/cls_multi_ushortchar.c: Likewise.
4015         * testsuite/libffi.call/cls_schar.c: Likewise.
4016         * testsuite/libffi.call/cls_sint.c: Likewise.
4017         * testsuite/libffi.call/cls_sshort.c: Likewise.
4018         * testsuite/libffi.call/cls_uchar.c: Likewise.
4019         * testsuite/libffi.call/cls_uint.c: Likewise.
4020         * testsuite/libffi.call/cls_ulonglong.c: Likewise.
4021         * testsuite/libffi.call/cls_ushort.c: Likewise.
4022         * testsuite/libffi.call/nested_struct.c: Likewise.
4023         * testsuite/libffi.call/nested_struct1.c: Likewise.
4024         * testsuite/libffi.call/nested_struct2.c: Likewise.
4025         * testsuite/libffi.call/nested_struct3.c: Likewise.
4026         * testsuite/libffi.call/problem1.c: Likewise.
4027         * testsuite/libffi.special/unwindtest.cc: Likewise.
4028         * testsuite/libffi.call/cls_12byte.c: Likewise and set return value
4029         to zero.
4030         * testsuite/libffi.call/cls_16byte.c: Likewise.
4031         * testsuite/libffi.call/cls_5byte.c: Likewise.
4032
4033 2004-08-23  David Daney <daney@avtrex.com>
4034
4035         PR libgcj/13141
4036         * src/mips/ffitarget.h (FFI_O32_SOFT_FLOAT): New ABI.
4037         * src/mips/ffi.c (ffi_prep_args): Fix alignment calculation.
4038         (ffi_prep_cif_machdep): Handle FFI_O32_SOFT_FLOAT floating point
4039         parameters and return types.
4040         (ffi_call): Handle FFI_O32_SOFT_FLOAT ABI.
4041         (ffi_prep_closure): Ditto.
4042         (ffi_closure_mips_inner_O32): Handle FFI_O32_SOFT_FLOAT ABI, fix
4043         alignment calculations.
4044         * src/mips/o32.S (ffi_closure_O32): Don't use floating point
4045         instructions if FFI_O32_SOFT_FLOAT, make stack frame ABI compliant.
4046
4047 2004-08-14  Casey Marshall <csm@gnu.org>
4048
4049         * src/mips/ffi.c (ffi_pref_cif_machdep): set `cif->flags' to
4050         contain `FFI_TYPE_UINT64' as return type for any 64-bit
4051         integer (O32 ABI only).
4052         (ffi_prep_closure): new function.
4053         (ffi_closure_mips_inner_O32): new function.
4054         * src/mips/ffitarget.h: Define `FFI_CLOSURES' and
4055         `FFI_TRAMPOLINE_SIZE' appropriately if the ABI is o32.
4056         * src/mips/o32.S (ffi_call_O32): add labels for .eh_frame. Return
4057         64 bit integers correctly.
4058         (ffi_closure_O32): new function.
4059         Added DWARF-2 unwind info for both functions.
4060
4061 2004-08-10  Andrew Haley  <aph@redhat.com>
4062
4063         * src/x86/ffi64.c (ffi_prep_args ): 8-align all stack arguments.
4064
4065 2004-08-01  Robert Millan  <robertmh@gnu.org>
4066
4067         * configure.ac: Detect knetbsd-gnu and kfreebsd-gnu.
4068         * configure: Regenerate.
4069
4070 2004-07-30  Maciej W. Rozycki  <macro@linux-mips.org>
4071
4072         * acinclude.m4 (AC_FUNC_MMAP_BLACKLIST): Check for <sys/mman.h>
4073         and mmap() explicitly instead of relying on preset autoconf cache
4074         variables.
4075         * aclocal.m4: Regenerate.
4076         * configure: Regenerate.
4077
4078 2004-07-11  Ulrich Weigand  <uweigand@de.ibm.com>
4079
4080         * src/s390/ffi.c (ffi_prep_args): Fix C aliasing violation.
4081         (ffi_check_float_struct): Remove unused prototype.
4082
4083 2004-06-30  Geoffrey Keating  <geoffk@apple.com>
4084
4085         * src/powerpc/ffi_darwin.c (flush_icache): ';' is a comment
4086         character on Darwin, use '\n\t' instead.
4087
4088 2004-06-26  Matthias Klose  <doko@debian.org>
4089
4090         * libtool-version: Fix typo in revision/age.
4091
4092 2004-06-17  Matthias Klose  <doko@debian.org>
4093
4094         * libtool-version: New.
4095         * Makefile.am (libffi_la_LDFLAGS): Use -version-info for soname.
4096         * Makefile.in: Regenerate.
4097
4098 2004-06-15  Paolo Bonzini  <bonzini@gnu.org>
4099
4100         * Makefile.am: Remove useless multilib rules.
4101         * Makefile.in: Regenerate.
4102         * aclocal.m4: Regenerate with automake 1.8.5.
4103         * configure.ac: Remove useless multilib configury.
4104         * configure: Regenerate.
4105
4106 2004-06-15  Paolo Bonzini  <bonzini@gnu.org>
4107
4108         * .cvsignore: New file.
4109
4110 2004-06-10  Jakub Jelinek  <jakub@redhat.com>
4111
4112         * src/ia64/unix.S (ffi_call_unix): Insert group barrier break
4113         fp_done.
4114         (ffi_closure_UNIX): Fix f14/f15 adjustment if FLOAT_SZ is ever
4115         changed from 8.
4116
4117 2004-06-06  Sean McNeil  <sean@mcneil.com>
4118
4119         * configure.ac: Add x86_64-*-freebsd* support.
4120         * configure: Regenerate.
4121
4122 2004-04-26  Joe Buck <jbuck@welsh-buck.org>
4123
4124         Bug 15093
4125         * configure.ac: Test for existence of mmap and sys/mman.h before
4126         checking blacklist.  Fix suggested by Jim Wilson.
4127         * configure: Regenerate.
4128
4129 2004-04-26  Matt Austern  <austern@apple.com>
4130
4131         * src/powerpc/darwin.S: Go through a non-lazy pointer for initial
4132         FDE location.
4133         * src/powerpc/darwin_closure.S: Likewise.
4134
4135 2004-04-24  Andreas Tobler  <a.tobler@schweiz.ch>
4136
4137         * testsuite/libffi.call/cls_multi_schar.c (main): Fix initialization
4138         error. Reported by Thomas Heller <theller@python.net>.
4139         * testsuite/libffi.call/cls_multi_sshort.c (main): Likewise.
4140         * testsuite/libffi.call/cls_multi_ushort.c (main): Likewise.
4141
4142 2004-03-20  Matthias Klose  <doko@debian.org>
4143
4144         * src/pa/linux.S: Fix typo.
4145
4146 2004-03-19  Matthias Klose  <doko@debian.org>
4147
4148         * Makefile.am: Update.
4149         * Makefile.in: Regenerate.
4150         * src/pa/ffi.h.in: Remove.
4151         * src/pa/ffitarget.h: New file.
4152
4153 2004-02-10  Randolph Chung  <tausq@debian.org>
4154
4155         * Makefile.am: Add PA support.
4156         * Makefile.in: Regenerate.
4157         * include/Makefile.in: Regenerate.
4158         * configure.ac: Add PA target.
4159         * configure: Regenerate.
4160         * src/pa/ffi.c: New file.
4161         * src/pa/ffi.h.in: Add PA support.
4162         * src/pa/linux.S: New file.
4163         * prep_cif.c: Add PA support.
4164
4165 2004-03-16  Hosaka Yuji  <hos@tamanegi.org>
4166
4167         * src/types.c: Fix alignment size of X86_WIN32 case int64 and
4168         double.
4169         * src/x86/ffi.c (ffi_prep_args): Replace ecif->cif->rtype->type
4170         with ecif->cif->flags.
4171         (ffi_call, ffi_prep_incoming_args_SYSV): Replace cif->rtype->type
4172         with cif->flags.
4173         (ffi_prep_cif_machdep): Add X86_WIN32 struct case.
4174         (ffi_closure_SYSV): Add 1 or 2-bytes struct case for X86_WIN32.
4175         * src/x86/win32.S (retstruct1b, retstruct2b, sc_retstruct1b,
4176         sc_retstruct2b): Add for 1 or 2-bytes struct case.
4177
4178 2004-03-15 Kelley Cook <kcook@gcc.gnu.org>
4179
4180         * configure.in: Rename file to ...
4181         * configure.ac: ... this.
4182         * fficonfig.h.in: Regenerate.
4183         * Makefile.in: Regenerate.
4184         * include/Makefile.in: Regenerate.
4185         * testsuite/Makefile.in: Regenerate.
4186
4187 2004-03-12  Matt Austern  <austern@apple.com>
4188
4189         * src/powerpc/darwin.S: Fix EH information so it corresponds to
4190         changes in EH format resulting from addition of linkonce support.
4191         * src/powerpc/darwin_closure.S: Likewise.
4192
4193 2004-03-11  Andreas Tobler  <a.tobler@schweiz.ch>
4194             Paolo Bonzini  <bonzini@gnu.org>
4195
4196         * Makefile.am (AUTOMAKE_OPTIONS): Set them.
4197         Remove VPATH. Remove rules for object files. Remove multilib support.
4198         (AM_CCASFLAGS): Add.
4199         * configure.in (AC_CONFIG_HEADERS): Relace AM_CONFIG_HEADER.
4200         (AC_PREREQ): Bump version to 2.59.
4201         (AC_INIT): Fill with version info and bug address.
4202         (ORIGINAL_LD_FOR_MULTILIBS): Remove.
4203         (AM_ENABLE_MULTILIB): Use this instead of AC_ARG_ENABLE.
4204         De-precious CC so that the right flags are passed down to multilibs.
4205         (AC_MSG_ERROR): Replace obsolete macro AC_ERROR.
4206         (AC_CONFIG_FILES): Replace obsolete macro AC_LINK_FILES.
4207         (AC_OUTPUT): Reorganize the output with AC_CONFIG_COMMANDS.
4208         * configure: Rebuilt.
4209         * aclocal.m4: Likewise.
4210         * Makefile.in, include/Makefile.in, testsuite/Makefile.in: Likewise.
4211         * fficonfig.h.in: Likewise.
4212
4213 2004-03-11  Andreas Schwab  <schwab@suse.de>
4214
4215         * src/ia64/ffi.c (ffi_prep_incoming_args_UNIX): Get floating point
4216         arguments from fp registers only for the first 8 parameter slots.
4217         Don't convert a float parameter when passed in memory.
4218
4219 2004-03-09  Hans-Peter Nilsson  <hp@axis.com>
4220
4221         * configure: Regenerate for config/accross.m4 correction.
4222
4223 2004-02-25  Matt Kraai  <kraai@alumni.cmu.edu>
4224
4225         * src/powerpc/ffi.c (ffi_prep_args_SYSV): Change
4226         ecif->cif->bytes to bytes.
4227         (ffi_prep_cif_machdep): Add braces around nested if statement.
4228
4229 2004-02-09  Alan Modra  <amodra@bigpond.net.au>
4230
4231         * src/types.c (pointer): POWERPC64 has 8 byte pointers.
4232
4233         * src/powerpc/ffi.c (ffi_prep_args64): Correct long double handling.
4234         (ffi_closure_helper_LINUX64): Fix typo.
4235         * testsuite/libffi.call/cls_align_longdouble.c: Pass -mlong-double-128
4236         for powerpc64-*-*.
4237         * testsuite/libffi.call/float.c: Likewise.
4238         * testsuite/libffi.call/float2.c: Likewise.
4239
4240 2004-02-08  Alan Modra  <amodra@bigpond.net.au>
4241
4242         * src/powerpc/ffi.c (ffi_prep_cif_machdep <FFI_LINUX64>): Correct
4243         long double function return and long double arg handling.
4244         (ffi_closure_helper_LINUX64): Formatting.  Delete unused "ng" var.
4245         Use "end_pfr" instead of "nf".  Correct long double handling.
4246         Localise "temp".
4247         * src/powerpc/linux64.S (ffi_call_LINUX64): Save f2 long double
4248         return value.
4249         * src/powerpc/linux64_closure.S (ffi_closure_LINUX64): Allocate
4250         space for long double return value.  Adjust stack frame and offsets.
4251         Load f2 long double return.
4252
4253 2004-02-07  Alan Modra  <amodra@bigpond.net.au>
4254
4255         * src/types.c: Use 16 byte long double for POWERPC64.
4256
4257 2004-01-25  Eric Botcazou  <ebotcazou@libertysurf.fr>
4258
4259         * src/sparc/ffi.c (ffi_prep_args_v9): Shift the parameter array
4260         when the structure return address is passed in %o0.
4261         (ffi_V9_return_struct): Rename into ffi_v9_layout_struct.
4262         (ffi_v9_layout_struct): Align the field following a nested structure
4263         on a word boundary.  Use memmove instead of memcpy.
4264         (ffi_call): Update call to ffi_V9_return_struct.
4265         (ffi_prep_closure): Define 'ctx' only for V8.
4266         (ffi_closure_sparc_inner): Clone into ffi_closure_sparc_inner_v8
4267         and ffi_closure_sparc_inner_v9.
4268         (ffi_closure_sparc_inner_v8): Return long doubles by reference.
4269         Always skip the structure return address.  For structures and long
4270         doubles, copy the argument directly.
4271         (ffi_closure_sparc_inner_v9): Skip the structure return address only
4272         if required.  Shift the maximum floating-point slot accordingly.  For
4273         big structures, copy the argument directly; otherwise, left-justify the
4274         argument and call ffi_v9_layout_struct to lay out the structure on
4275         the stack.
4276         * src/sparc/v8.S: Undef STACKFRAME before defining it.
4277         (ffi_closure_v8): Pass the structure return address.  Update call to
4278         ffi_closure_sparc_inner_v8.  Short-circuit FFI_TYPE_INT handling.
4279         Skip the 'unimp' insn when returning long doubles and structures.
4280         * src/sparc/v9.S: Undef STACKFRAME before defining it.
4281         (ffi_closure_v9): Increase the frame size by 2 words.  Short-circuit
4282         FFI_TYPE_INT handling.  Load structures both in integers and
4283         floating-point registers on return.
4284         * README: Update status of the SPARC port.
4285
4286 2004-01-24  Andreas Tobler  <a.tobler@schweiz.ch>
4287
4288         * testsuite/libffi.call/pyobjc-tc.c (main): Treat result value
4289         as of type ffi_arg.
4290         * testsuite/libffi.call/struct3.c (main): Fix CHECK.
4291
4292 2004-01-22  Ulrich Weigand  <uweigand@de.ibm.com>
4293
4294         * testsuite/libffi.call/cls_uint.c (cls_ret_uint_fn): Treat result
4295         value as of type ffi_arg, not unsigned int.
4296
4297 2004-01-21  Michael Ritzert  <ritzert@t-online.de>
4298
4299         * ffi64.c (ffi_prep_args): Cast the RHS of an assignment instead
4300         of the LHS.
4301
4302 2004-01-12  Andreas Tobler  <a.tobler@schweiz.ch>
4303
4304         * testsuite/lib/libffi-dg.exp: Set LD_LIBRARY_PATH_32 for
4305         Solaris.
4306
4307 2004-01-08  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
4308
4309         * testsuite/libffi.call/ffitest.h (allocate_mmap): Cast MAP_FAILED
4310         to void *.
4311
4312 2003-12-10  Richard Henderson  <rth@redhat.com>
4313
4314         * testsuite/libffi.call/cls_align_pointer.c: Cast pointers to
4315         size_t instead of int.
4316
4317 2003-12-04  Hosaka Yuji  <hos@tamanegi.org>
4318
4319         * testsuite/libffi.call/many_win32.c: Include <float.h>.
4320         * testsuite/libffi.call/many_win32.c (main): Replace variable
4321         int i with unsigned long ul.
4322
4323         * testsuite/libffi.call/cls_align_uint64.c: New test case.
4324         * testsuite/libffi.call/cls_align_sint64.c: Likewise.
4325         * testsuite/libffi.call/cls_align_uint32.c: Likewise.
4326         * testsuite/libffi.call/cls_align_sint32.c: Likewise.
4327         * testsuite/libffi.call/cls_align_uint16.c: Likewise.
4328         * testsuite/libffi.call/cls_align_sint16.c: Likewise.
4329         * testsuite/libffi.call/cls_align_float.c: Likewise.
4330         * testsuite/libffi.call/cls_align_double.c: Likewise.
4331         * testsuite/libffi.call/cls_align_longdouble.c: Likewise.
4332         * testsuite/libffi.call/cls_align_pointer.c: Likewise.
4333
4334 2003-12-02  Hosaka Yuji  <hos@tamanegi.org>
4335
4336         PR other/13221
4337         * src/x86/ffi.c (ffi_prep_args, ffi_prep_incoming_args_SYSV):
4338         Align arguments to 32 bits.
4339
4340 2003-12-01  Andreas Tobler  <a.tobler@schweiz.ch>
4341
4342         PR other/13221
4343         * testsuite/libffi.call/cls_multi_sshort.c: New test case.
4344         * testsuite/libffi.call/cls_multi_sshortchar.c: Likewise.
4345         * testsuite/libffi.call/cls_multi_uchar.c: Likewise.
4346         * testsuite/libffi.call/cls_multi_schar.c: Likewise.
4347         * testsuite/libffi.call/cls_multi_ushortchar.c: Likewise.
4348         * testsuite/libffi.call/cls_multi_ushort.c: Likewise.
4349
4350         * testsuite/libffi.special/unwindtest.cc: Cosmetics.
4351
4352 2003-11-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4353
4354         * testsuite/libffi.call/ffitest.h: Include <fcntl.h>.
4355         * testsuite/libffi.special/ffitestcxx.h: Likewise.
4356
4357 2003-11-22  Andreas Tobler