prep_cif.c: Remove unnecessary ifdef for X86_WIN32
[platform/upstream/libffi.git] / ChangeLog
1 2014-03-16  Josh Triplett <josh@joshtriplett.org>
2
3         * prep_cif.c: Remove unnecessary ifdef for X86_WIN32.
4         ffi_prep_cif_core had a special case for X86_WIN32, checking for
5         FFI_THISCALL in addition to the FFI_FIRST_ABI-to-FFI_LAST_ABI range
6         before returning FFI_BAD_ABI.  However, on X86_WIN32, FFI_THISCALL
7         already falls in that range, making the special case unnecessary.
8         Remove it.
9
10 2014-03-16  Josh Triplett <josh@joshtriplett.org>
11
12         * testsuite/libffi.call/closure_stdcall.c,
13         testsuite/libffi.call/closure_thiscall.c: Remove fragile stack pointer
14         checks.  These files included inline assembly to save the stack
15         pointer before and after the call, and compare the values.  However,
16         compilers can and do leave the stack in different states for these two
17         pieces of inline assembly, such as by saving a temporary value on the
18         stack across the call; observed with gcc -Os, and verified as spurious
19         through careful inspection of disassembly.
20
21 2014-03-16  Josh Triplett <josh@joshtriplett.org>
22
23         * testsuite/libffi.call/many.c: Avoid spurious failure due to excess
24         floating-point precision.
25         * testsuite/libffi.call/many_win32.c: Ditto.
26
27 2014-03-16  Josh Triplett <josh@joshtriplett.org>
28
29         * libtool-ldflags: Re-add.
30
31 2014-03-16  Josh Triplett <josh@joshtriplett.org>
32
33         * Makefile.in, aclocal.m4, compile, config.guess, config.sub,
34         configure, depcomp, include/Makefile.in, install-sh, libtool-ldflags,
35         ltmain.sh, m4/libtool.m4, m4/ltoptions.m4, m4/ltsugar.m4,
36         m4/ltversion.m4, m4/lt~obsolete.m4, man/Makefile.in, mdate-sh,
37         missing, testsuite/Makefile.in: Delete autogenerated files from
38         version control.
39         * .gitignore: Add autogenerated files.
40         * autogen.sh: New script to generate the autogenerated files.
41         * README: Document requirement to run autogen.sh when building
42         directly from version control.
43         * .travis.yml: Run autogen.sh
44
45 2014-03-14  Anthony Green <green@moxielogic.com>
46
47         * configure, Makefile.in: Rebuilt.
48
49 2014-03-10  Mike Hommey <mh+mozilla@glandium.org>
50
51         * configure.ac: Allow building for mipsel with Android NDK r8.
52         * Makefile.am (AM_MAKEFLAGS): Replace double quotes with single quotes.
53
54 2014-03-10  Landry Breuil <landry@openbsd.org>
55
56         * configure.ac: Ensure the linker supports @unwind sections in libffi.
57
58 2014-03-01  Anthony Green  <green@moxielogic.com>
59
60         * Makefile.am (EXTRA_DIST): Replace old scripts with
61         generate-darwin-source-and-headers.py.
62         * Makefile.in: Rebuilt.
63
64 2014-02-28  Anthony Green  <green@moxielogic.com>
65
66         * Makefile.am (AM_CFLAGS): Reintroduce missing -DFFI_DEBUG for
67         --enable-debug builds.
68         * Makefile.in: Rebuilt.
69
70 2014-02-28  Makoto Kato  <m_kato@ga2.so-net.ne.jp>
71
72         * src/closures.c: Fix build failure when using clang for Android.
73
74 2014-02-28  Marcin Wojdyr  <wojdyr@gmail.com>
75
76         * libffi.pc.in (toolexeclibdir): use -L${toolexeclibdir} instead
77         of -L${libdir}.
78
79 2014-02-28  Paulo Pizarro  <paulo.pizarro@gmail.com>
80
81         * src/bfin/sysv.S: Calling functions in shared libraries requires
82         considering the GOT.
83
84 2014-02-28  Josh Triplett  <josh@joshtriplett.org>
85
86         * src/x86/ffi64.c (classify_argument): Handle case where
87         FFI_TYPE_LONGDOUBLE == FFI_TYPE_DOUBLE.
88
89 2014-02-28  Anthony Green  <green@moxielogic.com>
90
91         * ltmain.sh: Generate with libtool-2.4.2.418.
92         * m4/libtool.m4, m4/ltoptions.m4, m4/ltversion.m4: Ditto.
93         * configure: Rebuilt.
94
95 2014-02-28  Dominik Vogt  <vogt@linux.vnet.ibm.com>
96
97         * configure.ac (AC_ARG_ENABLE struct): Fix typo in help
98         message.
99         (AC_ARG_ENABLE raw_api): Ditto.
100         * configure, fficonfig.h.in: Rebuilt.
101
102 2014-02-28  Will Newton  <will.newton@linaro.org>
103
104         * src/arm/sysv.S: Initialize IP register with FP.
105
106 2014-02-28  Yufeng Zhang  <yufeng.zhang@arm.com>
107
108         * src/aarch64/sysv.S (ffi_closure_SYSV): Use x29 as the
109         main CFA reg; update cfi_rel_offset.
110
111 2014-02-09  Heiher  <r@hev.cc>
112
113         * src/mips/n32.S: Fix call floating point va function.
114
115 2014-01-21  Zachary Waldowski  <zach@waldowski.me>
116
117         * src/aarch64/ffi.c: Fix missing semicolons on assertions under
118         debug mode.
119
120 2013-12-30  Zachary Waldowski  <zach@waldowski.me>
121
122         * .gitignore: Exclude darwin_* generated source and build_* trees.
123         * src/aarch64/ffi.c, src/arm/ffi.c, src/x86/ffi.c: Inhibit Clang
124         previous prototype warnings.
125         * src/arm/ffi.c: Prevent NULL dereference, fix short type warning
126         * src/dlmalloc.c: Fix warnings from set_segment_flags return type,
127         and the native use of size_t for malloc on platforms
128         * src/arm/sysv.S: Use unified syntax. Clang clean-ups for
129         ARM_FUNC_START.
130         * generate-osx-source-and-headers.py: Remove.
131         * build-ios.sh: Remove.
132         * libffi.xcodeproj/project.pbxproj: Rebuild targets. Include
133         x86_64+aarch64 pieces in library.  Export headers properly.
134         * src/x86/ffi64.c: More Clang warning clean-ups.
135         * src/closures.c (open_temp_exec_file_dir): Use size_t.
136         * src/prep_cif.c (ffi_prep_cif_core): Cast ALIGN result.
137         * src/aarch64/sysv.S: Use CNAME for global symbols.  Only use
138         .size for ELF targets.
139         * src/aarch64/ffi.c: Clean up for double == long double.  Clean up
140         from Clang warnings.  Use Clang cache invalidation builtin.  Use
141         size_t in place of unsigned in many places.  Accommodate for
142         differences in Apple AArch64 ABI.
143
144 2013-12-02  Daniel Rodríguez Troitiño  <drodrigueztroitino@yahoo.es>
145
146         * generate-darwin-source-and-headers.py: Clean up, modernize,
147         merged version of previous scripts.
148
149 2013-11-21  Anthony Green  <green@moxielogic.com>
150
151         * configure, Makefile.in, include/Makefile.in, include/ffi.h.in,
152         man/Makefile.in, testsuite/Makefile.in, fficonfig.h.in: Rebuilt.
153
154 2013-11-21  Alan Modra  <amodra@gmail.com>
155
156         * Makefile.am (EXTRA_DIST): Add new src/powerpc files.
157         (nodist_libffi_la_SOURCES <POWERPC, POWERPC_FREEBSD>): Likewise.
158         * configure.ac (HAVE_LONG_DOUBLE_VARIANT): Define for powerpc.
159         * include/ffi.h.in (ffi_prep_types): Declare.
160         * src/prep_cif.c (ffi_prep_cif_core): Call ffi_prep_types.
161         * src/types.c (FFI_NONCONST_TYPEDEF): Define and use for
162         HAVE_LONG_DOUBLE_VARIANT.
163         * src/powerpc/ffi_powerpc.h: New file.
164         * src/powerpc/ffi.c: Split into..
165         * src/powerpc/ffi_sysv.c: ..new file, and..
166         * src/powerpc/ffi_linux64.c: ..new file, rewriting parts.
167         * src/powerpc/ffitarget.h (enum ffi_abi): Rewrite powerpc ABI
168         selection as bits controlling features.
169         * src/powerpc/linux64.S: For consistency, use POWERPC64 rather
170         than __powerpc64__.
171         * src/powerpc/linux64_closure.S: Likewise.
172         * src/powerpc/ppc_closure.S: Likewise.  Move .note.FNU-stack
173         inside guard.
174         * src/powerpc/sysv.S: Likewise.
175         * configure: Regenerate.
176         * fficonfig.h.in: Regenerate.
177         * Makefile.in: Regenerate.
178
179 2013-11-20  Alan Modra  <amodra@gmail.com>
180
181         * src/powerpc/ffi.c (ffi_prep_cif_machdep_core): Use
182         NUM_FPR_ARG_REGISTERS64 and NUM_GPR_ARG_REGISTERS64 not their
183         32-bit versions for 64-bit code.
184         * src/powerpc/linux64_closure.S: Don't use the return value area
185         as a parameter save area on ELFv2.
186
187 2013-11-18  Iain Sandoe  <iain@codesourcery.com>
188
189         * src/powerpc/darwin.S (EH): Correct use of pcrel FDE encoding.
190         * src/powerpc/darwin_closure.S (EH): Likewise. Modernise picbase
191         labels.
192
193 2013-11-18  Anthony Green  <green@moxielogic.com>
194
195         * src/arm/ffi.c (ffi_call): Hoist declaration of temp to top of
196         function.
197         * src/arm/ffi.c (ffi_closure_inner): Moderize function declaration
198         to appease compiler.
199         Thanks for Gregory P. Smith <greg@krypto.org>.
200
201 2013-11-18  Anthony Green  <green@moxielogic.com>
202
203         * README (tested): Mention PowerPC ELFv2.
204
205 2013-11-16  Alan Modra  <amodra@gmail.com>
206
207         * src/powerpc/ppc_closure.S: Move errant #endif to where it belongs.
208         Don't bl .Luint128.
209
210 2013-11-16  Alan Modra  <amodra@gmail.com>
211
212         * src/powerpc/ffi.c (ffi_prep_cif_machdep_core): Use #if _CALL_ELF
213         test to select parameter save sizing for ELFv2 vs. ELFv1.
214         * src/powerpc/ffitarget.h (FFI_V2_TYPE_FLOAT_HOMOG,
215         FFI_V2_TYPE_DOUBLE_HOMOG, FFI_V2_TYPE_SMALL_STRUCT): Define.
216         (FFI_TRAMPOLINE_SIZE): Define variant for ELFv2.
217         * src/powerpc/ffi.c (FLAG_ARG_NEEDS_PSAVE): Define.
218         (discover_homogeneous_aggregate): New function.
219         (ffi_prep_args64): Adjust start of param save area for ELFv2.
220         Handle homogenous floating point struct parms.
221         (ffi_prep_cif_machdep_core): Adjust space calculation for ELFv2.
222         Handle ELFv2 return values.  Set FLAG_ARG_NEEDS_PSAVE.  Handle
223         homogenous floating point structs.
224         (ffi_call): Increase size of smst_buffer for ELFv2.  Handle ELFv2.
225         (flush_icache): Compile for ELFv2.
226         (ffi_prep_closure_loc): Set up ELFv2 trampoline.
227         (ffi_closure_helper_LINUX64): Don't return all structs directly
228         to caller.  Handle homogenous floating point structs.  Handle
229         ELFv2 struct return values.
230         * src/powerpc/linux64.S (ffi_call_LINUX64): Set up r2 for
231         ELFv2.  Adjust toc save location.  Call function pointer using
232         r12.  Handle FLAG_RETURNS_SMST.  Don't predict branches.
233         * src/powerpc/linux64_closure.S (ffi_closure_LINUX64): Set up r2
234         for ELFv2.  Define ELFv2 versions of STACKFRAME, PARMSAVE, and
235         RETVAL.  Handle possibly missing parameter save area.  Handle
236         ELFv2 return values.
237         (.note.GNU-stack): Move inside outer #ifdef.
238
239 2013-11-16  Alan Modra  <amodra@gmail.com>
240
241         * src/powerpc/ffi.c (ffi_prep_cif_machdep): Revert 2013-02-08
242         change.  Do not consume an int arg when returning a small struct
243         for FFI_SYSV ABI.
244         (ffi_call): Only use bounce buffer when FLAG_RETURNS_SMST.
245         Properly copy bounce buffer to destination.
246         * src/powerpc/sysv.S: Revert 2013-02-08 change.
247         * src/powerpc/ppc_closure.S: Remove stray '+'.
248
249 2013-11-16  Alan Modra  <amodra@gmail.com>
250
251         * src/powerpc/ffi.c (ffi_prep_args64): Align struct parameters
252         according to __STRUCT_PARM_ALIGN__.
253         (ffi_prep_cif_machdep_core): Likewise.
254         (ffi_closure_helper_LINUX64): Likewise.
255
256 2013-11-16  Alan Modra  <amodra@gmail.com>
257
258         * src/powerpc/linux64.S (ffi_call_LINUX64): Tweak restore of r28.
259         (.note.GNU-stack): Move inside outer #ifdef.
260         * src/powerpc/linux64_closure.S (STACKFRAME, PARMSAVE,
261         RETVAL): Define and use throughout.
262         (ffi_closure_LINUX64): Save fprs before buying stack.
263         (.note.GNU-stack): Move inside outer #ifdef.
264
265 2013-11-16  Alan Modra  <amodra@gmail.com>
266
267         * src/powerpc/ffitarget.h (FFI_TARGET_SPECIFIC_VARIADIC): Define.
268         (FFI_EXTRA_CIF_FIELDS): Define.
269         * src/powerpc/ffi.c (ffi_prep_args64): Save fprs as per the
270         ABI, not to both fpr and param save area.
271         (ffi_prep_cif_machdep_core): Renamed from ffi_prep_cif_machdep.
272         Keep initial flags.  Formatting.  Remove dead FFI_LINUX_SOFT_FLOAT
273         code.
274         (ffi_prep_cif_machdep, ffi_prep_cif_machdep_var): New functions.
275         (ffi_closure_helper_LINUX64): Pass floating point as per ABI,
276         not to both fpr and parameter save areas.
277
278         * libffi/testsuite/libffi.call/cls_double_va.c (main): Correct
279         function cast and don't call ffi_prep_cif.
280         * libffi/testsuite/libffi.call/cls_longdouble_va.c (main): Likewise.
281
282 2013-11-15  Andrew Haley  <aph@redhat.com>
283
284         * doc/libffi.texi (Closure Example): Fix the sample code.
285         * doc/libffi.info, doc/stamp-vti, doc/version.texi: Rebuilt.
286
287 2013-11-15  Andrew Haley  <aph@redhat.com>
288
289         * testsuite/libffi.call/va_struct1.c (main): Fix broken test.
290         * testsuite/libffi.call/cls_uint_va.c (cls_ret_T_fn): Likewise
291         * testsuite/libffi.call/cls_struct_va1.c (test_fn): Likewise.
292         * testsuite/libffi.call/va_1.c (main): Likewise.
293
294 2013-11-14  David Schneider  <david.schneider@bivab.de>
295
296         * src/arm/ffi.c: Fix register allocation for mixed float and
297         doubles.
298         * testsuite/libffi.call/cls_many_mixed_float_double.c: Testcase
299         for many mixed float and double arguments.
300
301 2013-11-13  Alan Modra  <amodra@gmail.com>
302
303         * doc/libffi.texi (Simple Example): Correct example code.
304         * doc/libffi.info, doc/stamp-vti, doc/version.texi: Rebuilt.
305
306 2013-11-13  Anthony Green  <green@moxielogic.com>
307
308         * include/ffi_common.h: Respect HAVE_ALLOCA_H for GNU compiler
309         based build. (Thanks to tmr111116 on github)
310
311 2013-11-09  Anthony Green  <green@moxielogic.com>
312
313         * m4/libtool.m4: Refresh.
314         * configure, Makefile.in: Rebuilt.
315         * README: Add more notes about next release.
316
317 2013-11-09  Shigeharu TAKENO  <shige@iee.niit.ac.jp>
318
319         * m4/ax_gcc_archflag.m4 (ax_gcc_arch): Don't recognize
320         UltraSPARC-IIi as ultrasparc3.
321
322 2013-11-06  Mark Kettenis  <kettenis@gnu.org>
323
324         * src/x86/freebsd.S (ffi_call_SYSV): Align the stack pointer to
325         16-bytes.
326
327 2013-11-06  Konstantin Belousov <kib@freebsd.org>
328
329         * src/x86/freebsd.S (ffi_closure_raw_SYSV): Mark the assembler
330         source as not requiring executable stack.
331
332 2013-11-02  Anthony Green  <green@moxielogic.com>
333
334         * doc/libffi.texi (The Basics): Clarify return value buffer size
335         requirements.  Also, NULL result buffer pointers are no longer
336         supported.
337         * doc/libffi.info: Rebuilt.
338
339 2013-11-02  Mischa Jonker  <mjonker@synopsys.com>
340
341         * Makefile.am (nodist_libffi_la_SOURCES): Fix build error.
342         * Makefile.in: Rebuilt.
343
344 2013-11-02  David Schneider  <david.schneider@bivab.de>
345
346         * src/arm/ffi.c: more robust argument handling for closures on arm hardfloat
347         * testsuite/libffi.call/many_mixed.c: New file.
348         * testsuite/libffi.call/cls_many_mixed_args.c: More tests.
349
350 2013-11-02  Vitaly Budovski
351
352         * src/x86/ffi.c (ffi_prep_cif_machdep): Don't align stack for win32.
353
354 2013-10-23  Mark H Weaver  <mhw@netris.org>
355
356         * src/mips/ffi.c: Fix handling of uint32_t arguments on the
357         MIPS N32 ABI.
358
359 2013-10-13  Sandra Loosemore  <sandra@codesourcery.com>
360
361         * README: Add Nios II to table of supported platforms.
362         * Makefile.am (EXTRA_DIST): Add nios2 files.
363         (nodist_libffi_la_SOURCES): Likewise.
364         * Makefile.in: Regenerated.
365         * configure.ac (nios2*-linux*): New host.
366         (NIOS2): Add AM_CONDITIONAL.
367         * configure: Regenerated.
368         * src/nios2/ffi.c: New.
369         * src/nios2/ffitarget.h: New.
370         * src/nios2/sysv.S: New.
371         * src/prep_cif.c (initialize_aggregate): Handle extra structure
372         alignment via FFI_AGGREGATE_ALIGNMENT.
373         (ffi_prep_cif_core): Conditionalize structure return for NIOS2.
374
375 2013-10-10  Sandra Loosemore  <sandra@codesourcery.com>
376
377         * testsuite/libffi.call/cls_many_mixed_args.c (cls_ret_double_fn):
378         Fix uninitialized variable.
379
380 2013-10-11  Marcus Shawcroft  <marcus.shawcroft@arm.com>
381
382         * testsuite/libffi.call/many.c (many): Replace * with +.
383
384 2013-10-08  OndÅ™ej Bílka  <neleai@seznam.cz>
385
386         * src/aarch64/ffi.c, src/aarch64/sysv.S, src/arm/ffi.c,
387         src/arm/gentramp.sh, src/bfin/sysv.S, src/closures.c,
388         src/dlmalloc.c, src/ia64/ffi.c, src/microblaze/ffi.c,
389         src/microblaze/sysv.S, src/powerpc/darwin_closure.S,
390         src/powerpc/ffi.c, src/powerpc/ffi_darwin.c, src/sh/ffi.c,
391         src/tile/tile.S, testsuite/libffi.call/nested_struct11.c: Fix
392         spelling errors.
393
394 2013-10-08  Anthony Green  <green@moxielogic.com>
395
396         * aclocal.m4, compile, config.guess, config.sub, depcomp,
397         install-sh, mdate-sh, missing, texinfo.tex: Update from upstream.
398         * configure.ac: Update version to 3.0.14-rc0.
399         * Makefile.in, configure, Makefile.in, include/Makefile.in,
400         man/Makefile.in, testsuite/Makefile.in: Rebuilt.
401         * README: Mention M88K and VAX.
402
403 2013-07-15  Miod Vallat  <miod@openbsd.org>
404
405         * Makefile.am,
406         configure.ac,
407         src/m88k/ffi.c,
408         src/m88k/ffitarget.h,
409         src/m88k/obsd.S,
410         src/vax/elfbsd.S,
411         src/vax/ffi.c,
412         src/vax/ffitarget.h: Add m88k and vax support.
413
414 2013-06-24 Alan Modra  <amodra@gmail.com>
415
416         * src/powerpc/ffi.c (ffi_prep_args_SYSV): Move var declaration
417         before statements.
418         (ffi_prep_args64): Support little-endian.
419         (ffi_closure_helper_SYSV, ffi_closure_helper_LINUX64): Likewise.
420         * src/powerpc/linux64_closure.S (ffi_closure_LINUX64): Likewise.
421         * src/powerpc/ppc_closure.S (ffi_closure_SYSV): Likewise.
422
423 2013-06-12  Mischa Jonker  <mjonker@synopsys.com>
424
425          * configure.ac: Add support for ARC.
426          * Makefile.am: Likewise.
427          * README: Add ARC details.
428          * src/arc/arcompact.S: New.
429          * src/arc/ffi.c: Likewise.
430          * src/arc/ffitarget.h: Likewise.
431
432 2013-03-28  David Schneider  <david.schneider@bivab.de>
433
434          * src/arm/ffi.c: Fix support for ARM hard-float calling convention.
435          * src/arm/sysv.S: call different methods for SYSV and VFP ABIs.
436          * testsuite/libffi.call/cls_many_mixed_args.c: testcase for a closure with
437          mixed arguments, many doubles.
438          * testsuite/libffi.call/many_double.c: testcase for calling a function using
439          more than 8 doubles.
440          * testcase/libffi.call/many.c: use absolute value to check result against an
441          epsilon
442
443 2013-03-17  Anthony Green  <green@moxielogic.com>
444
445         * README: Update for 3.0.13.
446         * configure.ac: Ditto.
447         * configure: Rebuilt.
448         * doc/*: Update version.
449
450 2013-03-17  Dave Korn  <dave.korn.cygwin@gmail.com>
451
452         * src/closures.c (is_emutramp_enabled
453         [!FFI_MMAP_EXEC_EMUTRAMP_PAX]): Move default definition outside
454         enclosing #if scope.
455
456 2013-03-17  Anthony Green  <green@moxielogic.com>
457
458         * configure.ac: Only modify toolexecdir in certain cases.
459         * configure: Rebuilt.
460
461 2013-03-16  Gilles Talis  <gilles.talis@gmail.com>
462
463         * src/powerpc/ffi.c (ffi_prep_args_SYSV): Don't use
464         fparg_count,etc on __NO_FPRS__ targets.
465
466 2013-03-16  Alan Hourihane  <alanh@fairlite.co.uk>
467
468         * src/m68k/sysv.S (epilogue): Don't use extb instruction on
469         m680000 machines.
470
471 2013-03-16  Alex Gaynor <alex.gaynor@gmail.com>
472
473         * src/x86/ffi.c (ffi_prep_cif_machdep): Always align stack.
474
475 2013-03-13  Markos Chandras <markos.chandras@imgtec.com>
476
477         * configure.ac: Add support for Imagination Technologies Meta.
478         * Makefile.am: Likewise.
479         * README: Add Imagination Technologies Meta details.
480         * src/metag/ffi.c: New.
481         * src/metag/ffitarget.h: Likewise.
482         * src/metag/sysv.S: Likewise.
483
484 2013-02-24  Andreas Schwab  <schwab@linux-m68k.org>
485
486         * doc/libffi.texi (Structures): Fix missing category argument of
487         @deftp.
488
489 2013-02-11  Anthony Green <green@moxielogic.com>
490
491         * configure.ac: Update release number to 3.0.12.
492         * configure: Rebuilt.
493         * README: Update release info.
494
495 2013-02-10  Anthony Green <green@moxielogic.com>
496
497         * README: Add Moxie.
498         * src/moxie/ffi.c: Created.
499         * src/moxie/eabi.S: Created.
500         * src/moxie/ffitarget.h: Created.
501         * Makefile.am (nodist_libffi_la_SOURCES): Add Moxie.
502         * Makefile.in: Rebuilt.
503         * configure.ac: Add Moxie.
504         * configure: Rebuilt.
505         * testsuite/libffi.call/huge_struct.c: Disable format string
506         warnings for moxie*-*-elf tests.
507
508 2013-02-10  Anthony Green <green@moxielogic.com>
509
510         * Makefile.am (LTLDFLAGS): Fix reference.
511         * Makefile.in: Rebuilt.
512
513 2013-02-10  Anthony Green <green@moxielogic.com>
514
515         * README: Update supported platforms.  Update test results link.
516
517 2013-02-09  Anthony Green <green@moxielogic.com>
518
519         * testsuite/libffi.call/negint.c: Remove forced -O2.
520         * testsuite/libffi.call/many2.c (foo): Remove GCCism.
521         * testsuite/libffi.call/ffitest.h: Add default PRIuPTR definition.
522
523         * src/sparc/v8.S (ffi_closure_v8): Import ancient ulonglong
524         closure return type fix developed by Martin v. Löwis for cpython
525         fork.
526
527 2013-02-08  Andreas Tobler  <andreast@fgznet.ch>
528
529         * src/powerpc/ffi.c (ffi_prep_cif_machdep): Fix small struct
530         support.
531         * src/powerpc/sysv.S: Ditto.
532
533 2013-02-08  Anthony Green <green@moxielogic.com>
534
535         * testsuite/libffi.call/cls_longdouble.c: Remove xfail for
536         arm*-*-*.
537
538 2013-02-08  Anthony Green <green@moxielogic.com>
539
540         * src/sparc/ffi.c (ffi_prep_closure_loc): Fix cache flushing for GCC.
541
542 2013-02-08  Matthias Klose  <doko@ubuntu.com>
543
544         * man/ffi_prep_cif.3: Clean up for debian linter.
545
546 2013-02-08  Peter Bergner  <bergner@vnet.ibm.com>
547
548         * src/powerpc/ffi.c (ffi_prep_args_SYSV): Account for FP args pushed
549         on the stack.
550
551 2013-02-08  Anthony Green <green@moxielogic.com>
552
553         * Makefile.am (EXTRA_DIST): Add missing files.
554         * testsuite/Makefile.am (EXTRA_DIST): Ditto.
555         * Makefile.in: Rebuilt.
556
557 2013-02-08  Anthony Green <green@moxielogic.com>
558
559         * configure.ac: Move sparc asm config checks to within functions
560         for compatibility with sun tools.
561         * configure: Rebuilt.
562         * src/sparc/ffi.c (ffi_prep_closure_loc): Flush cache on v9
563         systems.
564         * src/sparc/v8.S (ffi_flush_icache): Implement a sparc v9 cache
565         flusher.
566
567 2013-02-08  Nathan Rossi <nathan.rossi@xilinx.com>
568
569         * src/microblaze/ffi.c (ffi_closure_call_SYSV): Fix handling of
570         small big-endian structures.
571         (ffi_prep_args): Ditto.
572
573 2013-02-07  Anthony Green <green@moxielogic.com>
574
575         * src/sparc/v8.S (ffi_call_v8): Fix typo from last patch
576         (effectively hiding ffi_call_v8).
577
578 2013-02-07  Anthony Green <green@moxielogic.com>
579
580         * configure.ac: Update bug reporting address.
581         * configure.in: Rebuild.
582
583         * src/sparc/v8.S (ffi_flush_icache): Out-of-line cache flusher for
584         Sun compiler.
585         * src/sparc/ffi.c (ffi_call): Remove warning.
586         Call ffi_flush_icache for non-GCC builds.
587         (ffi_prep_closure_loc): Use ffi_flush_icache.
588
589         * Makefile.am (EXTRA_DIST): Add libtool-ldflags.
590         * Makefile.in: Rebuilt.
591         * libtool-ldflags: New file.
592
593 2013-02-07  Daniel Schepler <dschepler@gmail.com>
594
595         * configure.ac: Correctly identify x32 systems as 64-bit.
596         * m4/libtool.m4: Remove libtool expr error.
597         * aclocal.m4, configure: Rebuilt.
598
599 2013-02-07  Anthony Green <green@moxielogic.com>
600
601         * configure.ac: Fix GCC usage test.
602         * configure: Rebuilt.
603         * README: Mention LLVM/GCC x86_64 issue.
604         * testsuite/Makefile.in: Rebuilt.
605
606 2013-02-07  Anthony Green <green@moxielogic.com>
607
608         * testsuite/libffi.call/cls_double_va.c (main): Replace // style
609         comments with /* */ for xlc compiler.
610         * testsuite/libffi.call/stret_large.c (main): Ditto.
611         * testsuite/libffi.call/stret_large2.c (main): Ditto.
612         * testsuite/libffi.call/nested_struct1.c (main): Ditto.
613         * testsuite/libffi.call/huge_struct.c (main): Ditto.
614         * testsuite/libffi.call/float_va.c (main): Ditto.
615         * testsuite/libffi.call/cls_struct_va1.c (main): Ditto.
616         * testsuite/libffi.call/cls_pointer_stack.c (main): Ditto.
617         * testsuite/libffi.call/cls_pointer.c (main): Ditto.
618         * testsuite/libffi.call/cls_longdouble_va.c (main): Ditto.
619
620 2013-02-06  Anthony Green <green@moxielogic.com>
621
622         * man/ffi_prep_cif.3: Clean up for debian lintian checker.
623
624 2013-02-06  Anthony Green <green@moxielogic.com>
625
626         * Makefile.am (pkgconfigdir): Add missing pkgconfig install bits.
627         * Makefile.in: Rebuild.
628
629 2013-02-02  Mark H Weaver <mhw@netris.org>
630
631         * src/x86/ffi64.c (ffi_call): Sign-extend integer arguments passed
632         via general purpose registers.
633
634 2013-01-21  Nathan Rossi <nathan.rossi@xilinx.com>
635
636         * README: Add MicroBlaze details.
637         * Makefile.am: Add MicroBlaze support.
638         * configure.ac: Likewise.
639         * src/microblaze/ffi.c: New.
640         * src/microblaze/ffitarget.h: Likewise.
641         * src/microblaze/sysv.S: Likewise.
642
643 2013-01-21  Nathan Rossi <nathan.rossi@xilinx.com>
644         * testsuite/libffi.call/return_uc.c: Fixed issue.
645
646 2013-01-21  Chris Zankel   <chris@zankel.net>
647
648         * README: Add Xtensa support.
649         * Makefile.am: Likewise.
650         * configure.ac: Likewise.
651         * Makefile.in Regenerate.
652         * configure: Likewise.
653         * src/prep_cif.c: Handle Xtensa.
654         * src/xtensa: New directory.
655         * src/xtensa/ffi.c: New file.
656         * src/xtensa/ffitarget.h: Ditto.
657         * src/xtensa/sysv.S: Ditto.
658
659 2013-01-11  Anthony Green  <green@moxielogic.com>
660
661         * src/powerpc/ffi_darwin.c (ffi_prep_args): Replace // style
662         comments with /* */ for xlc compiler.
663         * src/powerpc/aix.S (ffi_call_AIX): Ditto.
664         * testsuite/libffi.call/ffitest.h (allocate_mmap): Delete
665         deprecated inline function.
666         * testsuite/libffi.special/ffitestcxx.h: Ditto.
667         * README: Add update for AIX support.
668
669 2013-01-11  Anthony Green  <green@moxielogic.com>
670
671         * configure.ac: Robustify pc relative reloc check.
672         * m4/ax_cc_maxopt.m4: Don't -malign-double.  This is an ABI
673         changing option for 32-bit x86.
674         * aclocal.m4, configure: Rebuilt.
675         * README: Update supported target list.
676
677 2013-01-10  Anthony Green  <green@moxielogic.com>
678
679         * README (tested): Add Compiler column to table.
680
681 2013-01-10  Anthony Green  <green@moxielogic.com>
682
683         * src/x86/ffi64.c (struct register_args): Make sse array and array
684         of unions for sunpro compiler compatibility.
685
686 2013-01-10  Anthony Green  <green@moxielogic.com>
687
688         * configure.ac: Test target platform size_t size.  Handle both 32
689         and 64-bit builds for x86_64-* and i?86-* targets (allowing for
690         CFLAG option to change default settings).
691         * configure, aclocal.m4: Rebuilt.
692
693 2013-01-10  Anthony Green  <green@moxielogic.com>
694
695         * testsuite/libffi.special/special.exp: Only run exception
696         handling tests when using GNU compiler.
697
698         * m4/ax_compiler_vendor.m4: New file.
699         * configure.ac: Test for compiler vendor and don't use
700         AX_CFLAGS_WARN_ALL with the sun compiler.
701         * aclocal.m4, configure: Rebuilt.
702
703 2013-01-10  Anthony Green  <green@moxielogic.com>
704
705         * include/ffi_common.h: Don't use GCCisms to define types when
706         building with the SUNPRO compiler.
707
708 2013-01-10  Anthony Green  <green@moxielogic.com>
709
710         * configure.ac: Put local.exp in the right place.
711         * configure: Rebuilt.
712
713         * src/x86/ffi.c: Update comment about regparm function attributes.
714         * src/x86/sysv.S (ffi_closure_SYSV): The SUNPRO compiler requires
715         that all function arguments be passed on the stack (no regparm
716         support).
717
718 2013-01-08  Anthony Green  <green@moxielogic.com>
719
720         * configure.ac: Generate local.exp.  This sets CC_FOR_TARGET
721         when we are using the vendor compiler.
722         * testsuite/Makefile.am (EXTRA_DEJAGNU_SITE_CONFIG): Point to
723         ../local.exp.
724         * configure, testsuite/Makefile.in: Rebuilt.
725
726         * testsuite/libffi.call/call.exp: Run tests with different
727         options, depending on whether or not we are using gcc or the
728         vendor compiler.
729         * testsuite/lib/libffi.exp (libffi-init): Set using_gcc based on
730         whether or not we are building/testing with gcc.
731
732 2013-01-08  Anthony Green  <green@moxielogic.com>
733
734         * configure.ac: Switch x86 solaris target to X86 by default.
735         * configure: Rebuilt.
736
737 2013-01-08  Anthony Green  <green@moxielogic.com>
738
739         * configure.ac: Fix test for read-only eh_frame.
740         * configure: Rebuilt.
741
742 2013-01-08  Anthony Green  <green@moxielogic.com>
743
744         * src/x86/sysv.S, src/x86/unix64.S: Only emit DWARF unwind info
745         when building with the GNU toolchain.
746         * testsuite/libffi.call/ffitest.h (CHECK): Fix for Solaris vendor
747         compiler.
748
749 2013-01-07  Thorsten Glaser <tg@mirbsd.org>
750
751         * testsuite/libffi.call/cls_uchar_va.c,
752         testsuite/libffi.call/cls_ushort_va.c,
753         testsuite/libffi.call/va_1.c: Testsuite fixes.
754
755 2013-01-07  Thorsten Glaser <tg@mirbsd.org>
756
757         * src/m68k/ffi.c (CIF_FLAGS_SINT8, CIF_FLAGS_SINT16): Define.
758         (ffi_prep_cif_machdep): Fix 8-bit and 16-bit signed calls.
759         * src/m68k/sysv.S (ffi_call_SYSV, ffi_closure_SYSV): Ditto.
760
761 2013-01-04  Anthony Green  <green@moxielogic.com>
762
763         * Makefile.am (AM_CFLAGS): Don't automatically add -fexceptions
764         and -Wall.  This is set in the configure script after testing for
765         GCC.
766         * Makefile.in: Rebuilt.
767
768 2013-01-02  rofl0r <https://github.com/rofl0r>
769
770         * src/powerpc/ffi.c (ffi_prep_cif_machdep): Fix build error on ppc
771         when long double == double.
772
773 2013-01-02  Reini Urban  <rurban@x-ray.at>
774
775         * Makefile.am (libffi_la_LDFLAGS): Add -no-undefined to LDFLAGS
776         (required for shared libs on cygwin/mingw).
777         * Makefile.in: Rebuilt.
778
779 2012-10-31  Alan Modra  <amodra@gmail.co>
780
781         * src/powerpc/linux64_closure.S: Add new ABI support.
782         * src/powerpc/linux64.S: Likewise.
783
784 2012-10-30  Magnus Granberg  <zorry@gentoo.org>
785             Pavel Labushev  <pavel.labushev@runbox.ru>
786
787         * configure.ac: New options pax_emutramp
788         * configure, fficonfig.h.in: Regenerated
789         * src/closures.c: New function emutramp_enabled_check() and
790         checks.
791
792 2012-10-30  Frederick Cheung  <frederick.cheung@gmail.com>
793
794         * configure.ac: Enable FFI_MAP_EXEC_WRIT for Darwin 12 (mountain
795         lion) and future version.
796         * configure: Rebuild.
797
798 2012-10-30  James Greenhalgh  <james.greenhalgh at arm.com>
799             Marcus Shawcroft  <marcus.shawcroft at arm.com>
800
801         * README: Add details of aarch64 port.
802         * src/aarch64/ffi.c: New.
803         * src/aarch64/ffitarget.h: Likewise.
804         * src/aarch64/sysv.S: Likewise.
805         * Makefile.am: Support aarch64.
806         * configure.ac: Support aarch64.
807         * Makefile.in, configure: Rebuilt.
808
809 2012-10-30  James Greenhalgh  <james.greenhalgh at arm.com>
810             Marcus Shawcroft  <marcus.shawcroft at arm.com>
811
812         * testsuite/lib/libffi.exp: Add support for aarch64.
813         * testsuite/libffi.call/cls_struct_va1.c: New.
814         * testsuite/libffi.call/cls_uchar_va.c: Likewise.
815         * testsuite/libffi.call/cls_uint_va.c: Likewise.
816         * testsuite/libffi.call/cls_ulong_va.c: Likewise.
817         * testsuite/libffi.call/cls_ushort_va.c: Likewise.
818         * testsuite/libffi.call/nested_struct11.c: Likewise.
819         * testsuite/libffi.call/uninitialized.c: Likewise.
820         * testsuite/libffi.call/va_1.c: Likewise.
821         * testsuite/libffi.call/va_struct1.c: Likewise.
822         * testsuite/libffi.call/va_struct2.c: Likewise.
823         * testsuite/libffi.call/va_struct3.c: Likewise.
824
825 2012-10-12  Walter Lee  <walt@tilera.com>
826
827         * Makefile.am: Add TILE-Gx/TILEPro support.
828         * configure.ac: Likewise.
829         * Makefile.in: Regenerate.
830         * configure: Likewise.
831         * src/prep_cif.c (ffi_prep_cif_core): Handle TILE-Gx/TILEPro.
832         * src/tile: New directory.
833         * src/tile/ffi.c: New file.
834         * src/tile/ffitarget.h: Ditto.
835         * src/tile/tile.S: Ditto.
836
837 2012-10-12  Matthias Klose  <doko@ubuntu.com>
838
839         * generate-osx-source-and-headers.py: Normalize whitespace.
840
841 2012-09-14  David Edelsohn  <dje.gcc@gmail.com>
842
843         * configure: Regenerated.
844
845 2012-08-26  Andrew Pinski  <apinski@cavium.com>
846
847         PR libffi/53014
848         * src/mips/ffi.c (ffi_prep_closure_loc): Allow n32 with soft-float and n64 with
849         soft-float.
850
851 2012-08-08  Uros Bizjak  <ubizjak@gmail.com>
852
853         * src/s390/ffi.c (ffi_prep_closure_loc): Don't ASSERT ABI test,
854         just return FFI_BAD_ABI when things are wrong.
855
856 2012-07-18  H.J. Lu  <hongjiu.lu@intel.com>
857
858         PR libffi/53982
859         PR libffi/53973
860         * src/x86/ffitarget.h: Check __ILP32__ instead of __LP64__ for x32.
861         (FFI_SIZEOF_JAVA_RAW): Defined to 4 for x32.
862
863 2012-05-16  H.J. Lu  <hongjiu.lu@intel.com>
864
865         * configure: Regenerated.
866
867 2012-05-05  Nicolas Lelong
868
869         * libffi.xcodeproj/project.pbxproj: Fixes.
870         * README: Update for iOS builds.
871
872 2012-04-23  Alexandre Keunecke I. de Mendonca <alexandre.keunecke@gmail.com>
873
874         * configure.ac: Add Blackfin/sysv support
875         * Makefile.am: Add Blackfin/sysv support
876         * src/bfin/ffi.c:  Add Blackfin/sysv support
877         * src/bfin/ffitarget.h: Add Blackfin/sysv support
878
879 2012-04-11  Anthony Green  <green@moxielogic.com>
880
881         * Makefile.am (EXTRA_DIST): Add new script.
882         * Makefile.in: Rebuilt.
883
884 2012-04-11  Zachary Waldowski  <zwaldowski@gmail.com>
885
886         * generate-ios-source-and-headers.py,
887         libffi.xcodeproj/project.pbxproj: Support a Mac static library via
888         Xcode. Set iOS compatibility to 4.0.  Move iOS trampoline
889         generation into an Xcode "run script" phase.  Include both as
890         Xcode build scripts. Don't always regenerate config files.
891
892 2012-04-10  Anthony Green  <green@moxielogic.com>
893
894         * src/powerpc/ffi_darwin.c (ffi_prep_args): Add missing semicolon.
895
896 2012-04-06  Anthony Green  <green@moxielogic.com>
897
898         * Makefile.am (EXTRA_DIST): Add new iOS/xcode files.
899         * Makefile.in: Rebuilt.
900
901 2012-04-06  Mike Lewis  <mikelikespie@gmail.com>
902
903         * generate-ios-source-and-headers.py: New file.
904         * libffi.xcodeproj/project.pbxproj: New file.
905         * README: Update instructions on building iOS binary.
906         * build-ios.sh: Delete.
907
908 2012-04-06  Anthony Green  <green@moxielogic.com>
909
910         * src/x86/ffi64.c (UINT128): Define differently for Intel and GNU
911         compilers, then use it.
912
913 2012-04-06  H.J. Lu  <hongjiu.lu@intel.com>
914
915         * m4/libtool.m4 (_LT_ENABLE_LOCK): Support x32.
916
917 2012-04-06  Anthony Green  <green@moxielogic.com>
918
919         * testsuite/Makefile.am (EXTRA_DIST): Add missing test cases.
920         * testsuite/Makefile.in: Rebuilt.
921
922 2012-04-05  Zachary Waldowski  <zwaldowski@gmail.com>
923
924         * include/ffi.h.in: Add missing trampoline table fields.
925         * src/arm/sysv.S: Fix ENTRY definition, and wrap symbol references
926         in CNAME.
927         * src/x86/ffi.c: Wrap Windows specific code in ifdefs.
928
929 2012-04-02  Peter Bergner  <bergner@vnet.ibm.com>
930
931         * src/powerpc/ffi.c (ffi_prep_args_SYSV): Declare double_tmp.
932         Silence casting pointer to integer of different size warning.
933         Delete goto to previously deleted label.
934         (ffi_call): Silence possibly undefined warning.
935         (ffi_closure_helper_SYSV): Declare variable type.
936
937 2012-04-02  Peter Rosin  <peda@lysator.liu.se>
938
939         * src/x86/win32.S (ffi_call_win32): Sign/zero extend the return
940         value in the Intel version as is already done for the AT&T version.
941         (ffi_closure_SYSV): Likewise.
942         (ffi_closure_raw_SYSV): Likewise.
943         (ffi_closure_STDCALL): Likewise.
944
945 2012-03-29  Peter Rosin  <peda@lysator.liu.se>
946
947         * src/x86/win32.S (ffi_closure_raw_THISCALL): Unify the frame
948         generation, fix the ENDP label and remove the surplus third arg
949         from the 'lea' insn.
950
951 2012-03-29  Peter Rosin  <peda@lysator.liu.se>
952
953         * src/x86/win32.S (ffi_closure_raw_SYSV): Make the 'stubraw' label
954         visible outside the PROC, so that ffi_closure_raw_THISCALL can see
955         it.  Also instruct the assembler to add a frame to the function.
956
957 2012-03-23  Peter Rosin  <peda@lysator.liu.se>
958
959         * Makefile.am (AM_CPPFLAGS): Add -DFFI_BUILDING.
960         * Makefile.in: Rebuilt.
961         * include/ffi.h.in [MSVC]: Add __declspec(dllimport) decorations
962         to all data exports, when compiling libffi clients using MSVC.
963
964 2012-03-29  Peter Rosin  <peda@lysator.liu.se>
965
966         * src/x86/ffitarget.h (ffi_abi): Add new ABI FFI_MS_CDECL and
967         make it the default for MSVC.
968         (FFI_TYPE_MS_STRUCT): New structure return convention.
969         * src/x86/ffi.c (ffi_prep_cif_machdep): Tweak the structure
970         return convention for FFI_MS_CDECL to be FFI_TYPE_MS_STRUCT
971         instead of an ordinary FFI_TYPE_STRUCT.
972         (ffi_prep_args): Treat FFI_TYPE_MS_STRUCT as FFI_TYPE_STRUCT.
973         (ffi_call): Likewise.
974         (ffi_prep_incoming_args_SYSV): Likewise.
975         (ffi_raw_call): Likewise.
976         (ffi_prep_closure_loc): Treat FFI_MS_CDECL as FFI_SYSV.
977         * src/x86/win32.S (ffi_closure_SYSV): For FFI_TYPE_MS_STRUCT,
978         return a pointer to the result structure in eax and don't pop
979         that pointer from the stack, the caller takes care of it.
980         (ffi_call_win32): Treat FFI_TYPE_MS_STRUCT as FFI_TYPE_STRUCT.
981         (ffi_closure_raw_SYSV): Likewise.
982
983 2012-03-22  Peter Rosin  <peda@lysator.liu.se>
984
985         * testsuite/libffi.call/closure_stdcall.c [MSVC]: Add inline
986         assembly version with Intel syntax.
987         * testsuite/libffi.call/closure_thiscall.c [MSVC]: Likewise.
988
989 2012-03-23  Peter Rosin  <peda@lysator.liu.se>
990
991         * testsuite/libffi.call/ffitest.h: Provide abstration of
992         __attribute__((fastcall)) in the form of a __FASTCALL__
993         define.  Define it to __fastcall for MSVC.
994         * testsuite/libffi.call/fastthis1_win32.c: Use the above.
995         * testsuite/libffi.call/fastthis2_win32.c: Likewise.
996         * testsuite/libffi.call/fastthis3_win32.c: Likewise.
997         * testsuite/libffi.call/strlen2_win32.c: Likewise.
998         * testsuite/libffi.call/struct1_win32.c: Likewise.
999         * testsuite/libffi.call/struct2_win32.c: Likewise.
1000
1001 2012-03-22  Peter Rosin  <peda@lysator.liu.se>
1002
1003         * src/x86/win32.S [MSVC] (ffi_closure_THISCALL): Remove the manual
1004         frame on function entry, MASM adds one automatically.
1005
1006 2012-03-22  Peter Rosin  <peda@lysator.liu.se>
1007
1008         * testsuite/libffi.call/ffitest.h [MSVC]: Add kludge for missing
1009         bits in the MSVC headers.
1010
1011 2012-03-22  Peter Rosin  <peda@lysator.liu.se>
1012
1013         * testsuite/libffi.call/cls_12byte.c: Adjust to the C89 style
1014         with no declarations after statements.
1015         * testsuite/libffi.call/cls_16byte.c: Likewise.
1016         * testsuite/libffi.call/cls_18byte.c: Likewise.
1017         * testsuite/libffi.call/cls_19byte.c: Likewise.
1018         * testsuite/libffi.call/cls_1_1byte.c: Likewise.
1019         * testsuite/libffi.call/cls_20byte.c: Likewise.
1020         * testsuite/libffi.call/cls_20byte1.c: Likewise.
1021         * testsuite/libffi.call/cls_24byte.c: Likewise.
1022         * testsuite/libffi.call/cls_2byte.c: Likewise.
1023         * testsuite/libffi.call/cls_3_1byte.c: Likewise.
1024         * testsuite/libffi.call/cls_3byte1.c: Likewise.
1025         * testsuite/libffi.call/cls_3byte2.c: Likewise.
1026         * testsuite/libffi.call/cls_4_1byte.c: Likewise.
1027         * testsuite/libffi.call/cls_4byte.c: Likewise.
1028         * testsuite/libffi.call/cls_5_1_byte.c: Likewise.
1029         * testsuite/libffi.call/cls_5byte.c: Likewise.
1030         * testsuite/libffi.call/cls_64byte.c: Likewise.
1031         * testsuite/libffi.call/cls_6_1_byte.c: Likewise.
1032         * testsuite/libffi.call/cls_6byte.c: Likewise.
1033         * testsuite/libffi.call/cls_7_1_byte.c: Likewise.
1034         * testsuite/libffi.call/cls_7byte.c: Likewise.
1035         * testsuite/libffi.call/cls_8byte.c: Likewise.
1036         * testsuite/libffi.call/cls_9byte1.c: Likewise.
1037         * testsuite/libffi.call/cls_9byte2.c: Likewise.
1038         * testsuite/libffi.call/cls_align_double.c: Likewise.
1039         * testsuite/libffi.call/cls_align_float.c: Likewise.
1040         * testsuite/libffi.call/cls_align_longdouble.c: Likewise.
1041         * testsuite/libffi.call/cls_align_longdouble_split.c: Likewise.
1042         * testsuite/libffi.call/cls_align_longdouble_split2.c: Likewise.
1043         * testsuite/libffi.call/cls_align_pointer.c: Likewise.
1044         * testsuite/libffi.call/cls_align_sint16.c: Likewise.
1045         * testsuite/libffi.call/cls_align_sint32.c: Likewise.
1046         * testsuite/libffi.call/cls_align_sint64.c: Likewise.
1047         * testsuite/libffi.call/cls_align_uint16.c: Likewise.
1048         * testsuite/libffi.call/cls_align_uint32.c: Likewise.
1049         * testsuite/libffi.call/cls_align_uint64.c: Likewise.
1050         * testsuite/libffi.call/cls_dbls_struct.c: Likewise.
1051         * testsuite/libffi.call/cls_pointer_stack.c: Likewise.
1052         * testsuite/libffi.call/err_bad_typedef.c: Likewise.
1053         * testsuite/libffi.call/huge_struct.c: Likewise.
1054         * testsuite/libffi.call/nested_struct.c: Likewise.
1055         * testsuite/libffi.call/nested_struct1.c: Likewise.
1056         * testsuite/libffi.call/nested_struct10.c: Likewise.
1057         * testsuite/libffi.call/nested_struct2.c: Likewise.
1058         * testsuite/libffi.call/nested_struct3.c: Likewise.
1059         * testsuite/libffi.call/nested_struct4.c: Likewise.
1060         * testsuite/libffi.call/nested_struct5.c: Likewise.
1061         * testsuite/libffi.call/nested_struct6.c: Likewise.
1062         * testsuite/libffi.call/nested_struct7.c: Likewise.
1063         * testsuite/libffi.call/nested_struct8.c: Likewise.
1064         * testsuite/libffi.call/nested_struct9.c: Likewise.
1065         * testsuite/libffi.call/stret_large.c: Likewise.
1066         * testsuite/libffi.call/stret_large2.c: Likewise.
1067         * testsuite/libffi.call/stret_medium.c: Likewise.
1068         * testsuite/libffi.call/stret_medium2.c: Likewise.
1069         * testsuite/libffi.call/struct1.c: Likewise.
1070         * testsuite/libffi.call/struct1_win32.c: Likewise.
1071         * testsuite/libffi.call/struct2.c: Likewise.
1072         * testsuite/libffi.call/struct2_win32.c: Likewise.
1073         * testsuite/libffi.call/struct3.c: Likewise.
1074         * testsuite/libffi.call/struct4.c: Likewise.
1075         * testsuite/libffi.call/struct5.c: Likewise.
1076         * testsuite/libffi.call/struct6.c: Likewise.
1077         * testsuite/libffi.call/struct7.c: Likewise.
1078         * testsuite/libffi.call/struct8.c: Likewise.
1079         * testsuite/libffi.call/struct9.c: Likewise.
1080         * testsuite/libffi.call/testclosure.c: Likewise.
1081
1082 2012-03-21  Peter Rosin  <peda@lysator.liu.se>
1083
1084         * testsuite/libffi.call/float_va.c (float_va_fn): Use %f when
1085         printing doubles (%lf is for long doubles).
1086         (main): Likewise.
1087
1088 2012-03-21  Peter Rosin  <peda@lysator.liu.se>
1089
1090         * testsuite/lib/target-libpath.exp [*-*-cygwin*, *-*-mingw*]
1091         (set_ld_library_path_env_vars): Add the library search dir to PATH
1092         (and save PATH for later).
1093         (restore_ld_library_path_env_vars): Restore PATH.
1094
1095 2012-03-21  Peter Rosin  <peda@lysator.liu.se>
1096
1097         * testsuite/lib/target-libpath.exp [*-*-cygwin*, *-*-mingw*]
1098         (set_ld_library_path_env_vars): Add the library search dir to PATH
1099         (and save PATH for later).
1100         (restore_ld_library_path_env_vars): Restore PATH.
1101
1102 2012-03-20  Peter Rosin  <peda@lysator.liu.se>
1103
1104         * testsuite/libffi.call/strlen2_win32.c (main): Remove bug.
1105         * src/x86/win32.S [MSVC] (ffi_closure_SYSV): Make the 'stub' label
1106         visible outside the PROC, so that ffi_closure_THISCALL can see it.
1107
1108 2012-03-20  Peter Rosin  <peda@lysator.liu.se>
1109
1110         * testsuite/libffi.call/strlen2_win32.c (main): Remove bug.
1111         * src/x86/win32.S [MSVC] (ffi_closure_SYSV): Make the 'stub' label
1112         visible outside the PROC, so that ffi_closure_THISCALL can see it.
1113
1114 2012-03-19  Alan Hourihane  <alanh@fairlite.co.uk>
1115
1116         * src/m68k/ffi.c: Add MINT support.
1117         * src/m68k/sysv.S: Ditto.
1118
1119 2012-03-06  Chung-Lin Tang  <cltang@codesourcery.com>
1120
1121         * src/arm/ffi.c (ffi_call): Add __ARM_EABI__ guard around call to
1122         ffi_call_VFP().
1123         (ffi_prep_closure_loc): Add __ARM_EABI__ guard around use of
1124         ffi_closure_VFP.
1125         * src/arm/sysv.S: Add __ARM_EABI__ guard around VFP code.
1126
1127 2012-03-19  chennam  <csit@axway.com>
1128
1129         * src/powerpc/ffi_darwin.c (ffi_prep_closure_loc): Fix AIX closure
1130         support.
1131
1132 2012-03-13  Kaz Kojima  <kkojima@gcc.gnu.org>
1133
1134         * src/sh/ffi.c (ffi_prep_closure_loc): Don't ASSERT ABI test,
1135         just return FFI_BAD_ABI when things are wrong.
1136         * src/sh64/ffi.c (ffi_prep_closure_loc): Ditto.
1137
1138 2012-03-09  David Edelsohn  <dje.gcc@gmail.com>
1139
1140         * src/powerpc/aix_closure.S (ffi_closure_ASM): Adjust for Darwin64
1141         change to return value of ffi_closure_helper_DARWIN and load type
1142         from return type.
1143
1144 2012-03-03  H.J. Lu  <hongjiu.lu@intel.com>
1145
1146         * src/x86/ffi64.c (ffi_call): Cast the return value to unsigned
1147         long.
1148         (ffi_prep_closure_loc): Cast to 64bit address in trampoline.
1149         (ffi_closure_unix64_inner): Cast return pointer to unsigned long
1150         first.
1151
1152         * src/x86/ffitarget.h (FFI_SIZEOF_ARG): Defined to 8 for x32.
1153         (ffi_arg): Set to unsigned long long for x32.
1154         (ffi_sarg): Set to long long for x32.
1155
1156 2012-03-03  H.J. Lu  <hongjiu.lu@intel.com>
1157
1158         * src/prep_cif.c (ffi_prep_cif_core): Properly check bad ABI.
1159
1160 2012-03-03  Andoni Morales Alastruey  <ylatuya@gmail.com>
1161
1162         * configure.ac: Add -no-undefined for both 32- and 64-bit x86
1163         windows-like hosts.
1164         * configure: Rebuilt.
1165
1166 2012-02-27  Mikael Pettersson  <mikpe@it.uu.se>
1167
1168         PR libffi/52223
1169         * Makefile.am (FLAGS_TO_PASS): Define.
1170         * Makefile.in: Regenerate.
1171
1172 2012-02-23  Anthony Green  <green@moxielogic.com>
1173
1174         * src/*/ffitarget.h: Ensure that users never include ffitarget.h
1175         directly.
1176
1177 2012-02-23  Kai Tietz  <ktietz@redhat.com>
1178
1179         PR libffi/52221
1180         * src/x86/ffi.c (ffi_closure_raw_THISCALL): New
1181         prototype.
1182         (ffi_prep_raw_closure_loc): Use ffi_closure_raw_THISCALL for
1183         thiscall-convention.
1184         (ffi_raw_call): Use ffi_prep_args_raw.
1185         * src/x86/win32.S (ffi_closure_raw_THISCALL): Add
1186         implementation for stub.
1187
1188 2012-02-10  Kai Tietz  <ktietz@redhat.com>
1189
1190         * configure.ac (AM_LTLDFLAGS): Add -no-undefine for x64
1191         windows target.
1192         * configure: Regenerated.
1193
1194 2012-02-08  Kai Tietz  <ktietz@redhat.com>
1195
1196         * src/prep_cif.c (ffi_prep_cif): Allow for X86_WIN32
1197         also FFI_THISCALL.
1198         * src/x86/ffi.c (ffi_closure_THISCALL): Add prototype.
1199         (FFI_INIT_TRAMPOLINE_THISCALL): New trampoline code.
1200         (ffi_prep_closure_loc): Add FFI_THISCALL support.
1201         * src/x86/ffitarget.h (FFI_TRAMPOLINE_SIZE): Adjust size.
1202         * src/x86/win32.S (ffi_closure_THISCALL): New closure code
1203         for thiscall-calling convention.
1204         * testsuite/libffi.call/closure_thiscall.c: New test.
1205
1206 2012-01-28  Kai Tietz  <ktietz@redhat.com>
1207
1208         * src/libffi/src/x86/ffi.c (ffi_call_win32): Add new
1209         argument to prototype for specify calling-convention.
1210         (ffi_call): Add support for stdcall/thiscall convention.
1211         (ffi_prep_args): Likewise.
1212         (ffi_raw_call): Likewise.
1213         * src/x86/ffitarget.h (ffi_abi): Add FFI_THISCALL and
1214         FFI_FASTCALL.
1215         * src/x86/win32.S (_ffi_call_win32): Add support for
1216         fastcall/thiscall calling-convention calls.
1217         * testsuite/libffi.call/fastthis1_win32.c: New test.
1218         * testsuite/libffi.call/fastthis2_win32.c: New test.
1219         * testsuite/libffi.call/fastthis3_win32.c: New test.
1220         * testsuite/libffi.call/strlen2_win32.c: New test.
1221         * testsuite/libffi.call/many2_win32.c: New test.
1222         * testsuite/libffi.call/struct1_win32.c: New test.
1223         * testsuite/libffi.call/struct2_win32.c: New test.
1224
1225 2012-01-23  Uros Bizjak  <ubizjak@gmail.com>
1226
1227         * src/alpha/ffi.c (ffi_prep_closure_loc): Check for bad ABI.
1228
1229 2012-01-23  Anthony Green  <green@moxielogic.com>
1230             Chris Young  <cdyoung@ntlworld.com>
1231
1232         * configure.ac: Add Amiga support.
1233         * configure: Rebuilt.
1234
1235 2012-01-23  Dmitry Nadezhin  <dmitry.nadezhin@gmail.com>
1236
1237         * include/ffi_common.h (LIKELY, UNLIKELY): Fix definitions.
1238
1239 2012-01-23  Andreas Schwab  <schwab@linux-m68k.org>
1240
1241         * src/m68k/sysv.S (ffi_call_SYSV): Properly test for plain
1242         mc68000.  Test for __HAVE_68881__ in addition to __MC68881__.
1243
1244 2012-01-19  Jakub Jelinek  <jakub@redhat.com>
1245
1246         PR rtl-optimization/48496
1247         * src/ia64/ffi.c (ffi_call): Fix up aliasing violations.
1248
1249 2012-01-09  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1250
1251         * configure.ac (i?86-*-*): Set TARGET to X86_64.
1252         * configure: Regenerate.
1253
1254 2011-12-07  Andrew Pinski  <apinski@cavium.com>
1255
1256         PR libffi/50051
1257         * src/mips/n32.S: Add ".set mips4".
1258
1259 2011-11-21  Andreas Tobler  <andreast@fgznet.ch>
1260
1261         * configure: Regenerate.
1262
1263 2011-11-12  David Gilbert <david.gilbert@linaro.org>
1264
1265         * doc/libffi.texi, include/ffi.h.in, include/ffi_common.h,
1266         man/Makefile.am, man/ffi.3, man/ffi_prep_cif.3,
1267         man/ffi_prep_cif_var.3, src/arm/ffi.c, src/arm/ffitarget.h,
1268         src/cris/ffi.c, src/prep_cif.c,
1269         testsuite/libffi.call/cls_double_va.c,
1270         testsuite/libffi.call/cls_longdouble_va.c,
1271         testsuite/libffi.call/float_va.c: Many changes to support variadic
1272         function calls.
1273
1274 2011-11-12  Kyle Moffett <Kyle.D.Moffett@boeing.com>
1275
1276         * src/powerpc/ffi.c, src/powerpc/ffitarget.h,
1277         src/powerpc/ppc_closure.S, src/powerpc/sysv.S: Many changes for
1278         softfloat powerpc variants.
1279
1280 2011-11-12  Petr Salinger <Petr.Salinger@seznam.cz>
1281
1282         * configure.ac (FFI_EXEC_TRAMPOLINE_TABLE): Fix kfreebsd support.
1283         * configure: Rebuilt.
1284
1285 2011-11-12  Timothy Wall  <twall@users.sf.net>
1286
1287         * src/arm/ffi.c (ffi_prep_args, ffi_prep_incoming_args_SYSV): Max
1288         alignment of 4 for wince on ARM.
1289
1290 2011-11-12  Kyle Moffett <Kyle.D.Moffett@boeing.com>
1291             Anthony Green <green@moxielogic.com>
1292
1293         * src/ppc/sysv.S, src/ppc/ffi.c: Remove use of ppc string
1294         instructions (not available on some cores, like the PPC440).
1295
1296 2011-11-12  Kimura Wataru  <kimuraw@i.nifty.jp>
1297
1298         * m4/ax_enable_builddir: Change from string comparison to numeric
1299         comparison for wc output.
1300         * configure.ac: Enable FFI_MMAP_EXEC_WRIT for darwin11 aka Mac OS
1301         X 10.7.
1302         * configure: Rebuilt.
1303
1304 2011-11-12  Anthony Green  <green@moxielogic.com>
1305
1306         * Makefile.am (AM_CCASFLAGS): Add -g option to build assembly
1307         files with debug info.
1308         * Makefile.in: Rebuilt.
1309
1310 2011-11-12  Jasper Lievisse Adriaanse <jasper@openbsd.org>
1311
1312         * README: Update list of supported OpenBSD systems.
1313
1314 2011-11-12  Anthony Green  <green@moxielogic.com>
1315
1316         * libtool-version: Update.
1317         * Makefile.am (nodist_libffi_la_SOURCES): Add src/debug.c if
1318         FFI_DEBUG.
1319         (libffi_la_SOURCES): Remove src/debug.c
1320         (EXTRA_DIST): Add src/debug.c
1321         * Makefile.in: Rebuilt.
1322         * README: Update for 3.0.11.
1323
1324 2011-11-10  Richard Henderson  <rth@redhat.com>
1325
1326         * configure.ac (GCC_AS_CFI_PSEUDO_OP): Use it instead of inline check.
1327         * configure, aclocal.m4: Rebuild.
1328
1329 2011-09-04  Iain Sandoe  <iains@gcc.gnu.org>
1330
1331         PR libffi/49594
1332         * src/powerpc/darwin_closure.S (stubs): Make the stub binding
1333         helper reference track the architecture pointer size.
1334
1335 2011-08-25  Andrew Haley  <aph@redhat.com>
1336
1337         * src/arm/ffi.c (FFI_INIT_TRAMPOLINE): Remove hard-coded assembly
1338         instructions.
1339         * src/arm/sysv.S (ffi_arm_trampoline): Put them here instead.
1340
1341 2011-07-11  Andrew Haley  <aph@redhat.com>
1342
1343         * src/arm/ffi.c (FFI_INIT_TRAMPOLINE): Clear icache.
1344
1345 2011-06-29  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1346
1347         * testsuite/libffi.call/cls_double_va.c: Move PR number to comment.
1348         * testsuite/libffi.call/cls_longdouble_va.c: Likewise.
1349
1350 2011-06-29  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1351
1352         PR libffi/46660
1353         * testsuite/libffi.call/cls_double_va.c: xfail dg-output on
1354         mips-sgi-irix6*.
1355         * testsuite/libffi.call/cls_longdouble_va.c: Likewise.
1356
1357 2011-06-14  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1358
1359         * testsuite/libffi.call/huge_struct.c (test_large_fn): Use PRIu8,
1360         PRId8 instead of %hhu, %hhd.
1361         * testsuite/libffi.call/ffitest.h [__alpha__ && __osf__] (PRId8,
1362         PRIu8): Define.
1363         [__sgi__] (PRId8, PRIu8): Define.
1364
1365 2011-04-29  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1366
1367         * src/alpha/osf.S (UA_SI, FDE_ENCODING, FDE_ENCODE, FDE_ARANGE):
1368         Define.
1369         Use them to handle ELF vs. ECOFF differences.
1370         [__osf__] (_GLOBAL__F_ffi_call_osf): Define.
1371
1372 2011-03-30  Timothy Wall  <twall@users.sf.net>
1373
1374         * src/powerpc/darwin.S: Fix unknown FDE encoding.
1375         * src/powerpc/darwin_closure.S: ditto.
1376
1377 2011-02-25  Anthony Green  <green@moxielogic.com>
1378
1379         * src/powerpc/ffi.c (ffi_prep_closure_loc): Allow for more
1380         32-bit ABIs.
1381
1382 2011-02-15  Anthony Green  <green@moxielogic.com>
1383
1384         * m4/ax_cc_maxopt.m4: Don't -malign-double or use -ffast-math.
1385         * configure: Rebuilt.
1386
1387 2011-02-13  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1388
1389         * configure: Regenerate.
1390
1391 2011-02-13  Anthony Green  <green@moxielogic.com>
1392
1393         * include/ffi_common.h (UNLIKELY, LIKELY): Define.
1394         * src/x86/ffi64.c (UNLIKELY, LIKELY): Remove definition.
1395         * src/prep_cif.c (UNLIKELY, LIKELY): Remove definition.
1396
1397         * src/prep_cif.c (initialize_aggregate): Convert assertion into
1398         FFI_BAD_TYPEDEF return.  Initialize arg size and alignment to 0.
1399
1400         * src/pa/ffi.c (ffi_prep_closure_loc): Don't ASSERT ABI test,
1401         just return FFI_BAD_ABI when things are wrong.
1402         * src/arm/ffi.c (ffi_prep_closure_loc): Ditto.
1403         * src/powerpc/ffi.c (ffi_prep_closure_loc): Ditto.
1404         * src/mips/ffi.c (ffi_prep_closure_loc): Ditto.
1405         * src/ia64/ffi.c (ffi_prep_closure_loc): Ditto.
1406         * src/avr32/ffi.c (ffi_prep_closure_loc): Ditto.
1407
1408 2011-02-11  Anthony Green  <green@moxielogic.com>
1409
1410         * src/sparc/ffi.c (ffi_prep_closure_loc): Don't ASSERT ABI test,
1411         just return FFI_BAD_ABI when things are wrong.
1412
1413 2012-02-11  Eric Botcazou  <ebotcazou@adacore.com>
1414
1415         * src/sparc/v9.S (STACKFRAME): Bump to 176.
1416
1417 2011-02-09  Stuart Shelton  <srcshelton@gmail.com>
1418
1419         http://bugs.gentoo.org/show_bug.cgi?id=286911
1420         * src/mips/ffitarget.h: Clean up error messages.
1421         * src/java_raw_api.c (ffi_java_translate_args): Cast raw arg to
1422         ffi_raw*.
1423         * include/ffi.h.in: Add pragma for SGI compiler.
1424
1425 2011-02-09  Anthony Green  <green@moxielogic.com>
1426
1427         * configure.ac: Add powerpc64-*-darwin* support.
1428
1429 2011-02-09  Anthony Green <green@moxielogic.com>
1430
1431         * README: Mention Interix.
1432
1433 2011-02-09  Jonathan Callen  <abcd@gentoo.org>
1434
1435         * configure.ac: Add Interix to win32/cygwin/mingw case.
1436         * configure: Ditto.
1437         * src/closures.c: Treat Interix like Cygwin, instead of as a
1438         generic win32.
1439
1440 2011-02-09  Anthony Green <green@moxielogic.com>
1441
1442         * testsuite/libffi.call/err_bad_typedef.c: Remove xfail.
1443         * testsuite/libffi.call/err_bad_abi.c: Remove xfail.
1444         * src/x86/ffi64.c (UNLIKELY, LIKELY): Define.
1445         (ffi_prep_closure_loc): Check for bad ABI.
1446         * src/prep_cif.c (UNLIKELY, LIKELY): Define.
1447         (initialize_aggregate): Check for bad types.
1448
1449 2011-02-09  Landon Fuller <landonf@plausible.coop>
1450
1451         * Makefile.am (EXTRA_DIST): Add build-ios.sh, src/arm/gentramp.sh,
1452         src/arm/trampoline.S.
1453         (nodist_libffi_la_SOURCES): Add src/arc/trampoline.S.
1454         * configure.ac (FFI_EXEC_TRAMPOLINE_TABLE): Define.
1455         * src/arm/ffi.c (ffi_trampoline_table)
1456         (ffi_closure_trampoline_table_page, ffi_trampoline_table_entry)
1457         (FFI_TRAMPOLINE_CODELOC_CONFIG, FFI_TRAMPOLINE_CONFIG_PAGE_OFFSET)
1458         (FFI_TRAMPOLINE_COUNT, ffi_trampoline_lock, ffi_trampoline_tables)
1459         (ffi_trampoline_table_alloc, ffi_closure_alloc, ffi_closure_free):
1460         Define for FFI_EXEC_TRAMPOLINE_TABLE case (iOS).
1461         (ffi_prep_closure_loc): Handl FFI_EXEC_TRAMPOLINE_TABLE case
1462         separately.
1463         * src/arm/sysv.S: Handle Apple iOS host.
1464         * src/closures.c: Handle FFI_EXEC_TRAMPOLINE_TABLE case.
1465         * build-ios.sh: New file.
1466         * fficonfig.h.in, configure, Makefile.in: Rebuilt.
1467         * README: Mention ARM iOS.
1468
1469 2011-02-08  Oren Held  <orenhe@il.ibm.com>
1470
1471         * src/dlmalloc.c (_STRUCT_MALLINFO): Define in order to avoid
1472         redefinition of mallinfo on HP-UX.
1473
1474 2011-02-08  Ginn Chen  <ginn.chen@oracle.com>
1475
1476         * src/sparc/ffi.c (ffi_call): Make compatible with Solaris Studio
1477         aggregate return ABI.  Flush cache.
1478         (ffi_prep_closure_loc): Flush cache.
1479
1480 2011-02-11  Anthony Green  <green@moxielogic.com>
1481
1482         From Tom Honermann <tom.honermann@oracle.com>:
1483         * src/powerpc/aix.S (ffi_call_AIX): Support for xlc toolchain on
1484         AIX.  Declare .ffi_prep_args.  Insert nops after branch
1485         instructions so that the AIX linker can insert TOC reload
1486         instructions.
1487         * src/powerpc/aix_closure.S: Declare .ffi_closure_helper_DARWIN.
1488
1489 2011-02-08  Ed  <ed@kdtc.net>
1490
1491         * src/powerpc/asm.h: Fix grammar nit in comment.
1492
1493 2011-02-08  Uli Link  <ul.mcamafia@linkitup.de>
1494
1495         * include/ffi.h.in (FFI_64_BIT_MAX): Define and use.
1496
1497 2011-02-09  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1498
1499         PR libffi/46661
1500         * testsuite/libffi.call/cls_pointer.c (main): Cast void * to
1501         uintptr_t first.
1502         * testsuite/libffi.call/cls_pointer_stack.c (main): Likewise.
1503
1504 2011-02-08  Rafael Avila de Espindola  <respindola@mozilla.com>
1505
1506         * configure.ac: Fix x86 test for pc related relocs.
1507         * configure: Rebuilt.
1508
1509 2011-02-07  Joel Sherrill <joel.sherrill@oarcorp.com>
1510
1511         * libffi/src/m68k/ffi.c: Add RTEMS support for cache flushing.
1512         Handle case when CPU variant does not have long double support.
1513         * libffi/src/m68k/sysv.S: Add support for mc68000, Coldfire,
1514         and cores with soft floating point.
1515
1516 2011-02-07  Joel Sherrill <joel.sherrill@oarcorp.com>
1517
1518         * configure.ac: Add mips*-*-rtems* support.
1519         * configure: Regenerate.
1520         * src/mips/ffitarget.h: Ensure needed constants are available
1521         for targets which do not have sgidefs.h.
1522
1523 2011-01-26  Dave Korn  <dave.korn.cygwin@gmail.com>
1524
1525         PR target/40125
1526         * configure.ac (AM_LTLDFLAGS): Add -bindir option for windows DLLs.
1527         * configure: Regenerate.
1528
1529 2010-12-18  Iain Sandoe  <iains@gcc.gnu.org>
1530
1531         PR libffi/29152
1532         PR libffi/42378
1533         * src/powerpc/darwin_closure.S: Provide Darwin64 implementation,
1534         update comments.
1535         * src/powerpc/ffitarget.h (POWERPC_DARWIN64): New,
1536         (FFI_TRAMPOLINE_SIZE): Update for Darwin64.
1537         * src/powerpc/darwin.S: Provide Darwin64 implementation,
1538         update comments.
1539         * src/powerpc/ffi_darwin.c: Likewise.
1540
1541 2010-12-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1542
1543         * configure.ac (libffi_cv_as_ascii_pseudo_op): Use double
1544         backslashes.
1545         (libffi_cv_as_string_pseudo_op): Likewise.
1546         * configure: Regenerate.
1547
1548 2010-12-03  Chung-Lin Tang  <cltang@codesourcery.com>
1549
1550         * src/arm/sysv.S (ffi_closure_SYSV): Add UNWIND to .pad directive.
1551         (ffi_closure_VFP): Same.
1552         (ffi_call_VFP): Move down to before ffi_closure_VFP. Add '.fpu vfp'
1553         directive.
1554
1555 2010-12-01  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1556
1557         * testsuite/libffi.call/ffitest.h [__sgi] (PRId64, PRIu64): Define.
1558         (PRIuPTR): Define.
1559
1560 2010-11-29  Richard Henderson  <rth@redhat.com>
1561             Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1562
1563         * src/x86/sysv.S (FDE_ENCODING, FDE_ENCODE): Define.
1564         (.eh_frame): Use FDE_ENCODING.
1565         (.LASFDE1, .LASFDE2, LASFDE3): Simplify with FDE_ENCODE.
1566
1567 2010-11-22  Jacek Caban <jacek@codeweavers.com>
1568
1569         * configure.ac: Check for symbol underscores on mingw-w64.
1570         * configure: Rebuilt.
1571         * src/x86/win64.S: Correctly access extern symbols in respect to
1572         underscores.
1573
1574 2010-11-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1575
1576         * testsuite/lib/libffi-dg.exp: Rename ...
1577         * testsuite/lib/libffi.exp: ... to this.
1578         * libffi/testsuite/libffi.call/call.exp: Don't load libffi-dg.exp.
1579         * libffi/testsuite/libffi.special/special.exp: Likewise.
1580
1581 2010-10-28  Chung-Lin Tang  <cltang@codesourcery.com>
1582
1583         * src/arm/ffi.c (ffi_prep_args): Add VFP register argument handling
1584         code, new parameter, and return value. Update comments.
1585         (ffi_prep_cif_machdep): Add case for VFP struct return values. Add
1586         call to layout_vfp_args().
1587         (ffi_call_SYSV): Update declaration.
1588         (ffi_call_VFP): New declaration.
1589         (ffi_call): Add VFP struct return conditions. Call ffi_call_VFP()
1590         when ABI is FFI_VFP.
1591         (ffi_closure_VFP): New declaration.
1592         (ffi_closure_SYSV_inner): Add new vfp_args parameter, update call to
1593         ffi_prep_incoming_args_SYSV().
1594         (ffi_prep_incoming_args_SYSV): Update parameters. Add VFP argument
1595         case handling.
1596         (ffi_prep_closure_loc): Pass ffi_closure_VFP to trampoline
1597         construction under VFP hard-float.
1598         (rec_vfp_type_p): New function.
1599         (vfp_type_p): Same.
1600         (place_vfp_arg): Same.
1601         (layout_vfp_args): Same.
1602         * src/arm/ffitarget.h (ffi_abi): Add FFI_VFP. Define FFI_DEFAULT_ABI
1603         based on __ARM_PCS_VFP.
1604         (FFI_EXTRA_CIF_FIELDS): Define for adding VFP hard-float specific
1605         fields.
1606         (FFI_TYPE_STRUCT_VFP_FLOAT): Define internally used type code.
1607         (FFI_TYPE_STRUCT_VFP_DOUBLE): Same.
1608         * src/arm/sysv.S (ffi_call_SYSV): Change call of ffi_prep_args() to
1609         direct call. Move function pointer load upwards.
1610         (ffi_call_VFP): New function.
1611         (ffi_closure_VFP): Same.
1612
1613         * testsuite/lib/libffi-dg.exp (check-flags): New function.
1614         (dg-skip-if): New function.
1615         * testsuite/libffi.call/cls_double_va.c: Skip if target is arm*-*-*
1616         and compiler options include -mfloat-abi=hard.
1617         * testsuite/libffi.call/cls_longdouble_va.c: Same.
1618
1619 2010-10-01  Jakub Jelinek  <jakub@redhat.com>
1620
1621         PR libffi/45677
1622         * src/x86/ffi64.c (ffi_prep_cif_machdep): Ensure cif->bytes is
1623         a multiple of 8.
1624         * testsuite/libffi.call/many2.c: New test.
1625
1626 2010-08-20  Mark Wielaard  <mjw@redhat.com>
1627
1628         * src/closures.c (open_temp_exec_file_mnt): Check if getmntent_r
1629         returns NULL.
1630
1631 2010-08-09  Andreas Tobler  <andreast@fgznet.ch>
1632
1633         * configure.ac: Add target powerpc64-*-freebsd*.
1634         * configure: Regenerate.
1635         * testsuite/libffi.call/cls_align_longdouble_split.c: Pass
1636         -mlong-double-128 only to linux targets.
1637         * testsuite/libffi.call/cls_align_longdouble_split2.c: Likewise.
1638         * testsuite/libffi.call/cls_longdouble.c: Likewise.
1639         * testsuite/libffi.call/huge_struct.c: Likewise.
1640
1641 2010-08-05  Dan Witte  <dwitte@mozilla.com>
1642
1643         * Makefile.am: Pass FFI_DEBUG define to msvcc.sh for linking to the
1644         debug CRT when --enable-debug is given.
1645         * configure.ac: Define it.
1646         * msvcc.sh: Translate -g and -DFFI_DEBUG appropriately.
1647
1648 2010-08-04  Dan Witte  <dwitte@mozilla.com>
1649
1650         * src/x86/ffitarget.h: Add X86_ANY define for all x86/x86_64
1651         platforms.
1652         * src/x86/ffi.c: Remove redundant ifdef checks.
1653         * src/prep_cif.c: Push stack space computation into src/x86/ffi.c
1654         for X86_ANY so return value space doesn't get added twice.
1655
1656 2010-08-03  Neil Rashbrooke <neil@parkwaycc.co.uk>
1657
1658         * msvcc.sh: Don't pass -safeseh to ml64 because behavior is buggy.
1659
1660 2010-07-22  Dan Witte  <dwitte@mozilla.com>
1661
1662         * src/*/ffitarget.h: Make FFI_LAST_ABI one past the last valid ABI.
1663         * src/prep_cif.c: Fix ABI assertion.
1664         * src/cris/ffi.c: Ditto.
1665
1666 2010-07-10  Evan Phoenix  <evan@fallingsnow.net>
1667
1668         * src/closures.c (selinux_enabled_check): Fix strncmp usage bug.
1669
1670 2010-07-07  Dan Horák <dan@danny.cz>
1671
1672         * include/ffi.h.in: Protect #define with #ifndef.
1673         * src/powerpc/ffitarget.h: Ditto.
1674         * src/s390/ffitarget.h: Ditto.
1675         * src/sparc/ffitarget.h: Ditto.
1676
1677 2010-07-07   Neil Roberts <neil@linux.intel.com>
1678
1679         * src/x86/sysv.S (ffi_call_SYSV): Align the stack pointer to
1680         16-bytes.
1681
1682 2010-07-02  Jakub Jelinek  <jakub@redhat.com>
1683
1684         * Makefile.am (AM_MAKEFLAGS): Pass also mandir to submakes.
1685         * Makefile.in: Regenerated.
1686
1687 2010-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1688
1689         * configure.ac (libffi_cv_as_x86_pcrel): Check for illegal in as
1690         output, too.
1691         (libffi_cv_as_ascii_pseudo_op): Check for .ascii.
1692         (libffi_cv_as_string_pseudo_op): Check for .string.
1693         * configure: Regenerate.
1694         * fficonfig.h.in: Regenerate.
1695         * src/x86/sysv.S (.eh_frame): Use .ascii, .string or error.
1696
1697 2010-05-11  Dan Witte  <dwitte@mozilla.com>
1698
1699         * doc/libffi.tex: Document previous change.
1700
1701 2010-05-11  Makoto Kato <m_kato@ga2.so-net.ne.jp>
1702
1703         * src/x86/ffi.c (ffi_call): Don't copy structs passed by value.
1704
1705 2010-05-05  Michael Kohler <michaelkohler@live.com>
1706
1707         * src/dlmalloc.c (dlfree): Fix spelling.
1708         * src/ia64/ffi.c (ffi_prep_cif_machdep): Ditto.
1709         * configure.ac: Ditto.
1710         * configure: Rebuilt.
1711
1712 2010-04-13  Dan Witte  <dwitte@mozilla.com>
1713
1714         * msvcc.sh: Build with -W3 instead of -Wall.
1715         * src/powerpc/ffi_darwin.c: Remove build warnings.
1716         * src/x86/ffi.c: Ditto.
1717         * src/x86/ffitarget.h: Ditto.
1718
1719 2010-04-12  Dan Witte  <dwitte@mozilla.com>
1720             Walter Meinl <wuno@lsvw.de>
1721
1722         * configure.ac: Add OS/2 support.
1723         * configure: Rebuilt.
1724         * src/closures.c: Ditto.
1725         * src/dlmalloc.c: Ditto.
1726         * src/x86/win32.S: Ditto.
1727
1728 2010-04-07  Jakub Jelinek  <jakub@redhat.com>
1729
1730         * testsuite/libffi.call/err_bad_abi.c: Remove unused args variable.
1731
1732 2010-04-02  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1733
1734         * Makefile.in: Regenerate.
1735         * aclocal.m4: Regenerate.
1736         * include/Makefile.in: Regenerate.
1737         * man/Makefile.in: Regenerate.
1738         * testsuite/Makefile.in: Regenerate.
1739
1740 2010-03-30  Dan Witte  <dwitte@mozilla.com>
1741
1742         * msvcc.sh: Disable build warnings.
1743         * README (tested): Clarify windows build procedure.
1744
1745 2010-03-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1746
1747         * configure.ac (libffi_cv_as_x86_64_unwind_section_type): New test.
1748         * configure: Regenerate.
1749         * fficonfig.h.in: Regenerate.
1750         * libffi/src/x86/unix64.S (.eh_frame)
1751         [HAVE_AS_X86_64_UNWIND_SECTION_TYPE]: Use @unwind section type.
1752
1753 2010-03-14  Matthias Klose  <doko@ubuntu.com>
1754
1755         * src/x86/ffi64.c: Fix typo in comment.
1756         * src/x86/ffi.c: Use /* ... */ comment style.
1757
1758 2010-02-24  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1759
1760         * doc/libffi.texi (The Closure API): Fix typo.
1761         * doc/libffi.info: Remove.
1762
1763 2010-02-15  Matthias Klose  <doko@ubuntu.com>
1764
1765         * src/arm/sysv.S (__ARM_ARCH__): Define for processor
1766         __ARM_ARCH_7EM__.
1767
1768 2010-01-15  Anthony Green  <green@redhat.com>
1769
1770         * README: Add notes on building with Microsoft Visual C++.
1771
1772 2010-01-15  Daniel Witte  <dwitte@mozilla.com>
1773
1774         * msvcc.sh: New file.
1775
1776         * src/x86/win32.S: Port assembly routines to MSVC and #ifdef.
1777         * src/x86/ffi.c: Tweak function declaration and remove excess
1778         parens.
1779         * include/ffi.h.in: Add __declspec(align(8)) to typedef struct
1780         ffi_closure.
1781
1782         * src/x86/ffi.c: Merge ffi_call_SYSV and ffi_call_STDCALL into new
1783         function ffi_call_win32 on X86_WIN32.
1784         * src/x86/win32.S (ffi_call_SYSV): Rename to ffi_call_win32.
1785         (ffi_call_STDCALL): Remove.
1786
1787         * src/prep_cif.c (ffi_prep_cif): Move stack space allocation code
1788         to ffi_prep_cif_machdep for x86.
1789         * src/x86/ffi.c (ffi_prep_cif_machdep): To here.
1790
1791 2010-01-15  Oliver Kiddle  <okiddle@yahoo.co.uk>
1792
1793         * src/x86/ffitarget.h (ffi_abi): Check for __i386 and __amd64 for
1794         Sun Studio compiler compatibility.
1795
1796 2010-01-12  Conrad Irwin <conrad.irwin@gmail.com>
1797
1798         * doc/libffi.texi: Add closure example.
1799
1800 2010-01-07  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1801
1802         PR libffi/40701
1803         * testsuite/libffi.call/ffitest.h [__alpha__ && __osf__] (PRIdLL,
1804         PRIuLL, PRId64, PRIu64, PRIuPTR): Define.
1805         * testsuite/libffi.call/cls_align_sint64.c: Add -Wno-format on
1806         alpha*-dec-osf*.
1807         * testsuite/libffi.call/cls_align_uint64.c: Likewise.
1808         * testsuite/libffi.call/cls_ulonglong.c: Likewise.
1809         * testsuite/libffi.call/return_ll1.c: Likewise.
1810         * testsuite/libffi.call/stret_medium2.c: Likewise.
1811         * testsuite/libffi.special/ffitestcxx.h (allocate_mmap): Cast
1812         MAP_FAILED to char *.
1813
1814 2010-01-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1815
1816         * src/mips/n32.S: Use .abicalls and .eh_frame with __GNUC__.
1817
1818 2009-12-31  Anthony Green  <green@redhat.com>
1819
1820         * README: Update for libffi 3.0.9.
1821
1822 2009-12-27  Matthias Klose  <doko@ubuntu.com>
1823
1824         * configure.ac (HAVE_LONG_DOUBLE): Define for mips when
1825         appropriate.
1826         * configure: Rebuilt.
1827
1828 2009-12-26  Anthony Green  <green@redhat.com>
1829
1830         * testsuite/libffi.call/cls_longdouble_va.c: Mark as xfail for
1831         avr32*-*-*.
1832         * testsuite/libffi.call/cls_double_va.c: Ditto.
1833
1834 2009-12-26  Andreas Tobler  <a.tobler@schweiz.org>
1835
1836         * testsuite/libffi.call/ffitest.h: Conditionally include stdint.h
1837         and inttypes.h.
1838         * testsuite/libffi.special/unwindtest.cc: Ditto.
1839
1840 2009-12-26  Andreas Tobler  <a.tobler@schweiz.org>
1841
1842         * configure.ac: Add amd64-*-openbsd*.
1843         * configure: Rebuilt.
1844         * testsuite/lib/libffi-dg.exp (libffi_target_compile): Link
1845         openbsd programs with -lpthread.
1846
1847 2009-12-26  Anthony Green  <green@redhat.com>
1848
1849         * testsuite/libffi.call/cls_double_va.c,
1850         testsuite/libffi.call/cls_longdouble.c,
1851         testsuite/libffi.call/cls_longdouble_va.c,
1852         testsuite/libffi.call/cls_pointer.c,
1853         testsuite/libffi.call/cls_pointer_stack.c: Remove xfail for
1854         mips*-*-* and arm*-*-*.
1855         * testsuite/libffi.call/cls_align_longdouble_split.c,
1856         testsuite/libffi.call/cls_align_longdouble_split2.c,
1857         testsuite/libffi.call/stret_medium2.c,
1858         testsuite/libffi.call/stret_medium.c,
1859         testsuite/libffi.call/stret_large.c,
1860         testsuite/libffi.call/stret_large2.c: Remove xfail for arm*-*-*.
1861
1862 2009-12-31  Kay Tietz  <ktietz70@googlemail.com>
1863
1864         * testsuite/libffi.call/ffitest.h,
1865         testsuite/libffi.special/ffitestcxx.h (PRIdLL, PRuLL): Fix
1866         definitions.
1867
1868 2009-12-31  Carlo Bramini  <carlo.bramix@libero.it>
1869
1870         * configure.ac (AM_LTLDFLAGS): Define for windows hosts.
1871         * Makefile.am (libffi_la_LDFLAGS): Add AM_LTLDFLAGS.
1872         * configure: Rebuilt.
1873         * Makefile.in: Rebuilt.
1874
1875 2009-12-31  Anthony Green  <green@redhat.com>
1876             Blake Chaffin.
1877
1878         * testsuite/libffi.call/huge_struct.c: New test case from Blake
1879         Chaffin @ Apple.
1880
1881 2009-12-28  David Edelsohn  <edelsohn@gnu.org>
1882
1883         * src/powerpc/ffi_darwin.c (ffi_prep_args): Copy abi and nargs to
1884         local variables.
1885         (aix_adjust_aggregate_sizes): New function.
1886         (ffi_prep_cif_machdep): Call it.
1887
1888 2009-12-26  Andreas Tobler  <a.tobler@schweiz.org>
1889
1890         * configure.ac: Define FFI_MMAP_EXEC_WRIT for the given targets.
1891         * configure: Regenerate.
1892         * fficonfig.h.in: Likewise.
1893         * src/closures.c: Remove the FFI_MMAP_EXEC_WRIT definition for
1894         Solaris/x86.
1895
1896 2009-12-26  Andreas Schwab  <schwab@linux-m68k.org>
1897
1898         * src/powerpc/ffi.c (ffi_prep_args_SYSV): Advance intarg_count
1899         when a float arguments is passed in memory.
1900         (ffi_closure_helper_SYSV): Mark general registers as used up when
1901         a 64bit or soft-float long double argument is passed in memory.
1902
1903 2009-12-25  Matthias Klose  <doko@ubuntu.com>
1904
1905         * man/ffi_call.3: Fix #include in examples.
1906         * doc/libffi.texi: Add dircategory.
1907
1908 2009-12-25  Frank Everdij <f.p.x.everdij@tudelft.nl>
1909
1910         * include/ffi.h.in: Placed '__GNUC__' ifdef around
1911         '__attribute__((aligned(8)))' in ffi_closure, fixes compile for
1912         IRIX MIPSPro c99.
1913         * include/ffi_common.h: Added '__sgi' define to non
1914         '__attribute__((__mode__()))' integer typedefs.
1915         * src/mips/ffi.c (ffi_call, ffi_closure_mips_inner_O32,
1916         ffi_closure_mips_inner_N32): Added 'defined(_MIPSEB)' to BE check.
1917         (ffi_closure_mips_inner_O32, ffi_closure_mips_inner_N32): Added
1918         FFI_LONGDOUBLE support and alignment(N32 only).
1919         * src/mips/ffitarget.h: Corrected '#include <sgidefs.h>' for IRIX and
1920         fixed non '__attribute__((__mode__()))' integer typedefs.
1921         * src/mips/n32.S: Put '#ifdef linux' around '.abicalls' and '.eh_frame'
1922         since they are Linux/GNU Assembler specific.
1923
1924 2009-12-25  Bradley Smith  <brad@brad-smith.co.uk>
1925
1926         * configure.ac, Makefile.am, src/avr32/ffi.c,
1927         src/avr32/ffitarget.h,
1928         src/avr32/sysv.S: Add AVR32 port.
1929         * configure, Makefile.in: Rebuilt.
1930
1931 2009-12-21  Andreas Tobler  <a.tobler@schweiz.org>
1932
1933         * configure.ac: Make i?86 build on FreeBSD and OpenBSD.
1934         * configure: Regenerate.
1935
1936 2009-12-15  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
1937
1938         * testsuite/libffi.call/ffitest.h: Define PRIuPTR on PA HP-UX.
1939
1940 2009-12-13  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
1941
1942         * src/pa/ffi.c (ffi_closure_inner_pa32): Handle FFI_TYPE_LONGDOUBLE
1943         type on HP-UX.
1944
1945 2012-02-13  Kai Tietz  <ktietz@redhat.com>
1946
1947         PR libffi/52221
1948         * src/x86/ffi.c (ffi_prep_raw_closure_loc): Add thiscall
1949         support for X86_WIN32.
1950         (FFI_INIT_TRAMPOLINE_THISCALL): Fix displacement.
1951
1952 2009-12-11  Eric Botcazou  <ebotcazou@adacore.com>
1953
1954         * src/sparc/ffi.c (ffi_closure_sparc_inner_v9): Properly align 'long
1955         double' arguments.
1956
1957 2009-12-11  Eric Botcazou  <ebotcazou@adacore.com>
1958
1959         * testsuite/libffi.call/ffitest.h: Define PRIuPTR on Solaris < 10.
1960
1961 2009-12-10  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1962
1963         PR libffi/40700
1964         * src/closures.c [X86_64 && __sun__ && __svr4__]
1965         (FFI_MMAP_EXEC_WRIT): Define.
1966
1967 2009-12-08  David Daney  <ddaney@caviumnetworks.com>
1968
1969         * testsuite/libffi.call/stret_medium.c: Remove xfail for mips*-*-*
1970         * testsuite/libffi.call/cls_align_longdouble_split2.c: Same.
1971         * testsuite/libffi.call/stret_large.c: Same.
1972         * testsuite/libffi.call/cls_align_longdouble_split.c: Same.
1973         * testsuite/libffi.call/stret_large2.c: Same.
1974         * testsuite/libffi.call/stret_medium2.c: Same.
1975
1976 2009-12-07  David Edelsohn  <edelsohn@gnu.org>
1977
1978         * src/powerpc/aix_closure.S (libffi_closure_ASM): Fix tablejump
1979         typo.
1980
1981 2009-12-05  David Edelsohn  <edelsohn@gnu.org>
1982
1983         * src/powerpc/aix.S: Update AIX32 code to be consistent with AIX64
1984         code.
1985         * src/powerpc/aix_closure.S: Same.
1986
1987 2009-12-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1988
1989         * Makefile.in: Regenerate.
1990         * configure: Regenerate.
1991         * include/Makefile.in: Regenerate.
1992         * man/Makefile.in: Regenerate.
1993         * testsuite/Makefile.in: Regenerate.
1994
1995 2009-12-04  David Edelsohn  <edelsohn@gnu.org>
1996
1997         * src/powerpc/aix_closure.S: Reorganize 64-bit code to match
1998         linux64_closure.S.
1999
2000 2009-12-04  Uros Bizjak  <ubizjak@gmail.com>
2001
2002         PR libffi/41908
2003         * src/x86/ffi64.c (classify_argument): Update from
2004         gcc/config/i386/i386.c.
2005         (ffi_closure_unix64_inner): Do not use the address of two consecutive
2006         SSE registers directly.
2007         * testsuite/libffi.call/cls_dbls_struct.c (main): Remove xfail
2008         for x86_64 linux targets.
2009
2010 2009-12-04  David Edelsohn  <edelsohn@gnu.org>
2011
2012         * src/powerpc/ffi_darwin.c (ffi_closure_helper_DARWIN): Increment
2013         pfr for long double split between fpr13 and stack.
2014
2015 2009-12-03  David Edelsohn  <edelsohn@gnu.org>
2016
2017         * src/powerpc/ffi_darwin.c (ffi_prep_args): Increment next_arg and
2018         fparg_count twice for long double.
2019
2020 2009-12-03  David Edelsohn  <edelsohn@gnu.org>
2021
2022         PR libffi/42243
2023         * src/powerpc/ffi_darwin.c (ffi_prep_args): Remove extra parentheses.
2024
2025 2009-12-03  Uros Bizjak  <ubizjak@gmail.com>
2026
2027         * testsuite/libffi.call/cls_longdouble_va.c (main): Fix format string.
2028         Remove xfails for x86 linux targets.
2029
2030 2009-12-02  David Edelsohn  <edelsohn@gnu.org>
2031
2032         * src/powerpc/ffi_darwin.c (ffi_prep_args): Fix typo in INT64
2033         case.
2034
2035 2009-12-01  David Edelsohn  <edelsohn@gnu.org>
2036
2037         * src/powerpc/aix.S (ffi_call_AIX): Convert to more standard
2038         register usage.  Call ffi_prep_args directly.  Add long double
2039         return value support.
2040         * src/powerpc/ffi_darwin.c (ffi_prep_args): Double arg increment
2041         applies to FFI_TYPE_DOUBLE.  Correct fpr_base increment typo.
2042         Separate FFI_TYPE_SINT32 and FFI_TYPE_UINT32 cases.
2043         (ffi_prep_cif_machdep): Only 16 byte stack alignment in 64 bit
2044         mode.
2045         (ffi_closure_helper_DARWIN): Remove nf and ng counters.  Move temp
2046         into case.
2047         * src/powerpc/aix_closure.S: Maintain 16 byte stack alignment.
2048         Allocate result area between params and FPRs.
2049
2050 2009-11-30  David Edelsohn  <edelsohn@gnu.org>
2051
2052         PR target/35484
2053         * src/powerpc/ffitarget.h (POWERPC64): Define for PPC64 Linux and
2054         AIX64.
2055         * src/powerpc/aix.S: Implement AIX64 version.
2056         * src/powerpc/aix_closure.S: Implement AIX64 version.
2057         (ffi_closure_ASM): Use extsb, lha and displament addresses.
2058         * src/powerpc/ffi_darwin.c (ffi_prep_args): Implement AIX64
2059         support.
2060         (ffi_prep_cif_machdep): Same.
2061         (ffi_call): Same.
2062         (ffi_closure_helper_DARWIN): Same.
2063
2064 2009-11-02  Andreas Tobler  <a.tobler@schweiz.org>
2065
2066         PR libffi/41908
2067         * testsuite/libffi.call/testclosure.c: New test.
2068
2069 2009-09-28  Kai Tietz  <kai.tietz@onevision.com>
2070
2071         * src/x86/win64.S (_ffi_call_win64 stack): Remove for gnu
2072         assembly version use of ___chkstk.
2073
2074 2009-09-23  Matthias Klose  <doko@ubuntu.com>
2075
2076         PR libffi/40242, PR libffi/41443
2077         * src/arm/sysv.S (__ARM_ARCH__): Define for processors
2078         __ARM_ARCH_6T2__, __ARM_ARCH_6M__, __ARM_ARCH_7__,
2079         __ARM_ARCH_7A__, __ARM_ARCH_7R__, __ARM_ARCH_7M__.
2080         Change the conditionals to __SOFTFP__ || __ARM_EABI__
2081         for -mfloat-abi=softfp to work.
2082
2083 2009-09-17  Loren J. Rittle  <ljrittle@acm.org>
2084
2085         PR testsuite/32843 (strikes again)
2086         * src/x86/ffi.c (ffi_prep_cif_machdep): Add X86_FREEBSD to
2087         enable proper extension on char and short.
2088
2089 2009-09-15  David Daney  <ddaney@caviumnetworks.com>
2090
2091         * src/java_raw_api.c (ffi_java_raw_to_rvalue): Remove special
2092         handling for FFI_TYPE_POINTER.
2093         * src/mips/ffitarget.h (FFI_TYPE_STRUCT_D_SOFT,
2094         FFI_TYPE_STRUCT_F_SOFT, FFI_TYPE_STRUCT_DD_SOFT,
2095         FFI_TYPE_STRUCT_FF_SOFT, FFI_TYPE_STRUCT_FD_SOFT,
2096         FFI_TYPE_STRUCT_DF_SOFT, FFI_TYPE_STRUCT_SOFT): New defines.
2097         (FFI_N32_SOFT_FLOAT, FFI_N64_SOFT_FLOAT): New ffi_abi enumerations.
2098         (enum ffi_abi): Set FFI_DEFAULT_ABI for soft-float.
2099         * src/mips/n32.S (ffi_call_N32): Add handling for soft-float
2100         structure and pointer returns.
2101         (ffi_closure_N32): Add handling for pointer returns.
2102         * src/mips/ffi.c (ffi_prep_args, calc_n32_struct_flags,
2103         calc_n32_return_struct_flags): Handle soft-float.
2104         (ffi_prep_cif_machdep):  Handle soft-float, fix pointer handling.
2105         (ffi_call_N32): Declare proper argument types.
2106         (ffi_call, copy_struct_N32, ffi_closure_mips_inner_N32): Handle
2107         soft-float.
2108
2109 2009-08-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2110
2111         * configure.ac (AC_PREREQ): Bump to 2.64.
2112
2113 2009-08-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2114
2115         * Makefile.am (install-html, install-pdf): Remove.
2116         * Makefile.in: Regenerate.
2117
2118         * Makefile.in: Regenerate.
2119         * aclocal.m4: Regenerate.
2120         * configure: Regenerate.
2121         * fficonfig.h.in: Regenerate.
2122         * include/Makefile.in: Regenerate.
2123         * man/Makefile.in: Regenerate.
2124         * testsuite/Makefile.in: Regenerate.
2125
2126 2011-08-22  Jasper Lievisse Adriaanse <jasper@openbsd.org>
2127
2128         * configure.ac: Add OpenBSD/hppa and OpenBSD/powerpc support.
2129         * configure: Rebuilt.
2130
2131 2009-07-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2132
2133         * configure.ac (_AC_ARG_VAR_PRECIOUS): Use m4_rename_force.
2134
2135 2009-07-24  Dave Korn  <dave.korn.cygwin@gmail.com>
2136
2137         PR libffi/40807
2138         * src/x86/ffi.c (ffi_prep_cif_machdep): Also use sign/zero-extending
2139         return types for X86_WIN32.
2140         * src/x86/win32.S (_ffi_call_SYSV): Handle omitted return types.
2141         (_ffi_call_STDCALL, _ffi_closure_SYSV, _ffi_closure_raw_SYSV,
2142         _ffi_closure_STDCALL): Likewise.
2143
2144         * src/closures.c (is_selinux_enabled): Define to const 0 for Cygwin.
2145         (dlmmap, dlmunmap): Also use these functions on Cygwin.
2146
2147 2009-07-11  Richard Sandiford  <rdsandiford@googlemail.com>
2148
2149         PR testsuite/40699
2150         PR testsuite/40707
2151         PR testsuite/40709
2152         * testsuite/lib/libffi-dg.exp: Revert 2009-07-02, 2009-07-01 and
2153         2009-06-30 commits.
2154
2155 2009-07-01  Richard Sandiford  <r.sandiford@uk.ibm.com>
2156
2157         * testsuite/lib/libffi-dg.exp (libffi-init): Set ld_library_path
2158         to "" before adding paths.  (This reinstates an assignment that
2159         was removed by my 2009-06-30 commit, but changes the initial
2160         value from "." to "".)
2161
2162 2009-07-01  H.J. Lu  <hongjiu.lu@intel.com>
2163
2164         PR testsuite/40601
2165         * testsuite/lib/libffi-dg.exp (libffi-init): Properly set
2166         gccdir.  Adjust ld_library_path for gcc only if gccdir isn't
2167         empty.
2168
2169 2009-06-30  Richard Sandiford  <r.sandiford@uk.ibm.com>
2170
2171         * testsuite/lib/libffi-dg.exp (libffi-init): Don't add "."
2172         to ld_library_path.  Use add_path.  Add just find_libgcc_s
2173         to ld_library_path, not every libgcc multilib directory.
2174
2175 2009-06-16  Wim Lewis  <wiml@hhhh.org>
2176
2177         * src/powerpc/ffi.c: Avoid clobbering cr3 and cr4, which are
2178         supposed to be callee-saved.
2179         * src/powerpc/sysv.S (small_struct_return_value): Fix overrun of
2180         return buffer for odd-size structs.
2181
2182 2009-06-16  Andreas Tobler  <a.tobler@schweiz.org>
2183
2184         PR libffi/40444
2185         * testsuite/lib/libffi-dg.exp (libffi_target_compile): Add
2186         allow_stack_execute for Darwin.
2187
2188 2009-06-16  Andrew Haley  <aph@redhat.com>
2189
2190         * configure.ac (TARGETDIR): Add missing blank lines.
2191         * configure: Regenerate.
2192
2193 2009-06-16  Andrew Haley  <aph@redhat.com>
2194
2195         * testsuite/libffi.call/cls_align_sint64.c,
2196         testsuite/libffi.call/cls_align_uint64.c,
2197         testsuite/libffi.call/cls_longdouble_va.c,
2198         testsuite/libffi.call/cls_ulonglong.c,
2199         testsuite/libffi.call/return_ll1.c,
2200         testsuite/libffi.call/stret_medium2.c: Fix printf format
2201         specifiers.
2202         * testsuite/libffi.call/ffitest.h,
2203         testsuite/libffi.special/ffitestcxx.h (PRIdLL, PRIuLL): Define.
2204
2205 2009-06-15  Andrew Haley  <aph@redhat.com>
2206
2207         * testsuite/libffi.call/err_bad_typedef.c: xfail everywhere.
2208         * testsuite/libffi.call/err_bad_abi.c: Likewise.
2209
2210 2009-06-12  Andrew Haley  <aph@redhat.com>
2211
2212         * Makefile.am: Remove info_TEXINFOS.
2213
2214 2009-06-12  Andrew Haley  <aph@redhat.com>
2215
2216         * ChangeLog.libffi: testsuite/libffi.call/cls_align_sint64.c,
2217         testsuite/libffi.call/cls_align_uint64.c,
2218         testsuite/libffi.call/cls_ulonglong.c,
2219         testsuite/libffi.call/return_ll1.c,
2220         testsuite/libffi.call/stret_medium2.c: Fix printf format
2221         specifiers.
2222         testsuite/libffi.special/unwindtest.cc: include stdint.h.
2223
2224 2009-06-11  Timothy Wall  <twall@users.sf.net>
2225
2226         * Makefile.am,
2227         configure.ac,
2228         include/ffi.h.in,
2229         include/ffi_common.h,
2230         src/closures.c,
2231         src/dlmalloc.c,
2232         src/x86/ffi.c,
2233         src/x86/ffitarget.h,
2234         src/x86/win64.S (new),
2235         README: Added win64 support (mingw or MSVC)
2236         * Makefile.in,
2237         include/Makefile.in,
2238         man/Makefile.in,
2239         testsuite/Makefile.in,
2240         configure,
2241         aclocal.m4: Regenerated
2242         * ltcf-c.sh: properly escape cygwin/w32 path
2243         * man/ffi_call.3: Clarify size requirements for return value.
2244         * src/x86/ffi64.c: Fix filename in comment.
2245         * src/x86/win32.S: Remove unused extern.
2246
2247         * testsuite/libffi.call/closure_fn0.c,
2248         testsuite/libffi.call/closure_fn1.c,
2249         testsuite/libffi.call/closure_fn2.c,
2250         testsuite/libffi.call/closure_fn3.c,
2251         testsuite/libffi.call/closure_fn4.c,
2252         testsuite/libffi.call/closure_fn5.c,
2253         testsuite/libffi.call/closure_fn6.c,
2254         testsuite/libffi.call/closure_stdcall.c,
2255         testsuite/libffi.call/cls_12byte.c,
2256         testsuite/libffi.call/cls_16byte.c,
2257         testsuite/libffi.call/cls_18byte.c,
2258         testsuite/libffi.call/cls_19byte.c,
2259         testsuite/libffi.call/cls_1_1byte.c,
2260         testsuite/libffi.call/cls_20byte.c,
2261         testsuite/libffi.call/cls_20byte1.c,
2262         testsuite/libffi.call/cls_24byte.c,
2263         testsuite/libffi.call/cls_2byte.c,
2264         testsuite/libffi.call/cls_3_1byte.c,
2265         testsuite/libffi.call/cls_3byte1.c,
2266         testsuite/libffi.call/cls_3byte2.c,
2267         testsuite/libffi.call/cls_4_1byte.c,
2268         testsuite/libffi.call/cls_4byte.c,
2269         testsuite/libffi.call/cls_5_1_byte.c,
2270         testsuite/libffi.call/cls_5byte.c,
2271         testsuite/libffi.call/cls_64byte.c,
2272         testsuite/libffi.call/cls_6_1_byte.c,
2273         testsuite/libffi.call/cls_6byte.c,
2274         testsuite/libffi.call/cls_7_1_byte.c,
2275         testsuite/libffi.call/cls_7byte.c,
2276         testsuite/libffi.call/cls_8byte.c,
2277         testsuite/libffi.call/cls_9byte1.c,
2278         testsuite/libffi.call/cls_9byte2.c,
2279         testsuite/libffi.call/cls_align_double.c,
2280         testsuite/libffi.call/cls_align_float.c,
2281         testsuite/libffi.call/cls_align_longdouble.c,
2282         testsuite/libffi.call/cls_align_longdouble_split.c,
2283         testsuite/libffi.call/cls_align_longdouble_split2.c,
2284         testsuite/libffi.call/cls_align_pointer.c,
2285         testsuite/libffi.call/cls_align_sint16.c,
2286         testsuite/libffi.call/cls_align_sint32.c,
2287         testsuite/libffi.call/cls_align_sint64.c,
2288         testsuite/libffi.call/cls_align_uint16.c,
2289         testsuite/libffi.call/cls_align_uint32.c,
2290         testsuite/libffi.call/cls_align_uint64.c,
2291         testsuite/libffi.call/cls_dbls_struct.c,
2292         testsuite/libffi.call/cls_double.c,
2293         testsuite/libffi.call/cls_double_va.c,
2294         testsuite/libffi.call/cls_float.c,
2295         testsuite/libffi.call/cls_longdouble.c,
2296         testsuite/libffi.call/cls_longdouble_va.c,
2297         testsuite/libffi.call/cls_multi_schar.c,
2298         testsuite/libffi.call/cls_multi_sshort.c,
2299         testsuite/libffi.call/cls_multi_sshortchar.c,
2300         testsuite/libffi.call/cls_multi_uchar.c,
2301         testsuite/libffi.call/cls_multi_ushort.c,
2302         testsuite/libffi.call/cls_multi_ushortchar.c,
2303         testsuite/libffi.call/cls_pointer.c,
2304         testsuite/libffi.call/cls_pointer_stack.c,
2305         testsuite/libffi.call/cls_schar.c,
2306         testsuite/libffi.call/cls_sint.c,
2307         testsuite/libffi.call/cls_sshort.c,
2308         testsuite/libffi.call/cls_uchar.c,
2309         testsuite/libffi.call/cls_uint.c,
2310         testsuite/libffi.call/cls_ulonglong.c,
2311         testsuite/libffi.call/cls_ushort.c,
2312         testsuite/libffi.call/err_bad_abi.c,
2313         testsuite/libffi.call/err_bad_typedef.c,
2314         testsuite/libffi.call/float2.c,
2315         testsuite/libffi.call/huge_struct.c,
2316         testsuite/libffi.call/nested_struct.c,
2317         testsuite/libffi.call/nested_struct1.c,
2318         testsuite/libffi.call/nested_struct10.c,
2319         testsuite/libffi.call/nested_struct2.c,
2320         testsuite/libffi.call/nested_struct3.c,
2321         testsuite/libffi.call/nested_struct4.c,
2322         testsuite/libffi.call/nested_struct5.c,
2323         testsuite/libffi.call/nested_struct6.c,
2324         testsuite/libffi.call/nested_struct7.c,
2325         testsuite/libffi.call/nested_struct8.c,
2326         testsuite/libffi.call/nested_struct9.c,
2327         testsuite/libffi.call/problem1.c,
2328         testsuite/libffi.call/return_ldl.c,
2329         testsuite/libffi.call/return_ll1.c,
2330         testsuite/libffi.call/stret_large.c,
2331         testsuite/libffi.call/stret_large2.c,
2332         testsuite/libffi.call/stret_medium.c,
2333         testsuite/libffi.call/stret_medium2.c,
2334         testsuite/libffi.special/unwindtest.cc: use ffi_closure_alloc instead
2335         of checking for MMAP.  Use intptr_t instead of long casts.
2336
2337 2009-06-11  Kaz Kojima  <kkojima@gcc.gnu.org>
2338
2339         * testsuite/libffi.call/cls_longdouble_va.c: Add xfail sh*-*-linux-*.
2340         * testsuite/libffi.call/err_bad_abi.c: Add xfail sh*-*-*.
2341         * testsuite/libffi.call/err_bad_typedef.c: Likewise.
2342
2343 2009-06-09  Andrew Haley  <aph@redhat.com>
2344
2345         * src/x86/freebsd.S: Add missing file.
2346
2347 2009-06-08  Andrew Haley  <aph@redhat.com>
2348
2349         Import from libffi 3.0.8:
2350
2351         * doc/libffi.texi: New file.
2352         * doc/libffi.info: Likewise.
2353         * doc/stamp-vti: Likewise.
2354         * man/Makefile.am: New file.
2355         * man/ffi_call.3: New file.
2356
2357         * Makefile.am (EXTRA_DIST): Add src/x86/darwin64.S,
2358         src/dlmalloc.c.
2359         (nodist_libffi_la_SOURCES): Add X86_FREEBSD.
2360
2361         * configure.ac: Bump version to 3.0.8.
2362         parisc*-*-linux*: Add.
2363         i386-*-freebsd* | i386-*-openbsd*: Add.
2364         powerpc-*-beos*: Add.
2365         AM_CONDITIONAL X86_FREEBSD: Add.
2366         AC_CONFIG_FILES: Add man/Makefile.
2367
2368         * include/ffi.h.in (FFI_FN): Change void (*)() to void (*)(void).
2369
2370 2009-06-08  Andrew Haley  <aph@redhat.com>
2371
2372         * README: Import from libffi 3.0.8.
2373
2374 2009-06-08  Andrew Haley  <aph@redhat.com>
2375
2376         * testsuite/libffi.call/err_bad_abi.c: Add xfails.
2377         * testsuite/libffi.call/cls_longdouble_va.c: Add xfails.
2378         * testsuite/libffi.call/cls_dbls_struct.c: Add xfail x86_64-*-linux-*.
2379         * testsuite/libffi.call/err_bad_typedef.c: Add xfails.
2380
2381         * testsuite/libffi.call/stret_medium2.c: Add __UNUSED__ to args.
2382         * testsuite/libffi.call/stret_medium.c: Likewise.
2383         * testsuite/libffi.call/stret_large2.c: Likewise.
2384         * testsuite/libffi.call/stret_large.c:  Likewise.
2385
2386 2008-12-26  Timothy Wall  <twall@users.sf.net>
2387
2388         * testsuite/libffi.call/cls_longdouble.c,
2389         testsuite/libffi.call/cls_longdouble_va.c,
2390         testsuite/libffi.call/cls_align_longdouble.c,
2391         testsuite/libffi.call/cls_align_longdouble_split.c,
2392         testsuite/libffi.call/cls_align_longdouble_split2.c: mark expected
2393         failures on x86_64 cygwin/mingw.
2394
2395 2008-12-22  Timothy Wall  <twall@users.sf.net>
2396
2397         * testsuite/libffi.call/closure_fn0.c,
2398         testsuite/libffi.call/closure_fn1.c,
2399         testsuite/libffi.call/closure_fn2.c,
2400         testsuite/libffi.call/closure_fn3.c,
2401         testsuite/libffi.call/closure_fn4.c,
2402         testsuite/libffi.call/closure_fn5.c,
2403         testsuite/libffi.call/closure_fn6.c,
2404         testsuite/libffi.call/closure_loc_fn0.c,
2405         testsuite/libffi.call/closure_stdcall.c,
2406         testsuite/libffi.call/cls_align_pointer.c,
2407         testsuite/libffi.call/cls_pointer.c,
2408         testsuite/libffi.call/cls_pointer_stack.c: use portable cast from
2409         pointer to integer (intptr_t).
2410         * testsuite/libffi.call/cls_longdouble.c: disable for win64.
2411
2412 2008-07-24  Anthony Green  <green@redhat.com>
2413
2414         * testsuite/libffi.call/cls_dbls_struct.c,
2415         testsuite/libffi.call/cls_double_va.c,
2416         testsuite/libffi.call/cls_longdouble.c,
2417         testsuite/libffi.call/cls_longdouble_va.c,
2418         testsuite/libffi.call/cls_pointer.c,
2419         testsuite/libffi.call/cls_pointer_stack.c,
2420         testsuite/libffi.call/err_bad_abi.c: Clean up failures from
2421         compiler warnings.
2422
2423 2008-03-04  Anthony Green  <green@redhat.com>
2424             Blake Chaffin
2425             hos@tamanegi.org
2426
2427         * testsuite/libffi.call/cls_align_longdouble_split2.c
2428           testsuite/libffi.call/cls_align_longdouble_split.c
2429           testsuite/libffi.call/cls_dbls_struct.c
2430           testsuite/libffi.call/cls_double_va.c
2431           testsuite/libffi.call/cls_longdouble.c
2432           testsuite/libffi.call/cls_longdouble_va.c
2433           testsuite/libffi.call/cls_pointer.c
2434           testsuite/libffi.call/cls_pointer_stack.c
2435           testsuite/libffi.call/err_bad_abi.c
2436           testsuite/libffi.call/err_bad_typedef.c
2437           testsuite/libffi.call/stret_large2.c
2438           testsuite/libffi.call/stret_large.c
2439           testsuite/libffi.call/stret_medium2.c
2440           testsuite/libffi.call/stret_medium.c: New tests from Apple.
2441
2442 2009-06-05  Andrew Haley  <aph@redhat.com>
2443
2444         * src/x86/ffitarget.h, src/x86/ffi.c: Merge stdcall changes from
2445         libffi.
2446
2447 2009-06-04  Andrew Haley  <aph@redhat.com>
2448
2449         * src/x86/ffitarget.h, src/x86/win32.S, src/x86/ffi.c: Back out
2450         stdcall changes.
2451
2452 2008-02-26  Anthony Green  <green@redhat.com>
2453             Thomas Heller  <theller@ctypes.org>
2454
2455         * src/x86/ffi.c (ffi_closure_SYSV_inner): Change C++ comment to C
2456         comment.
2457
2458 2008-02-03  Timothy Wall  <twall@users.sf.net>
2459
2460         * src/x86/ffi.c (FFI_INIT_TRAMPOLINE_STDCALL): Calculate jump return
2461           offset based on code pointer, not data pointer.
2462
2463 2008-01-31  Timothy Wall <twall@users.sf.net>
2464
2465         * testsuite/libffi.call/closure_stdcall.c: Add test for stdcall
2466         closures.
2467         * src/x86/ffitarget.h: Increase size of trampoline for stdcall
2468         closures.
2469         * src/x86/win32.S: Add assembly for stdcall closure.
2470         * src/x86/ffi.c: Initialize stdcall closure trampoline.
2471
2472 2009-06-04  Andrew Haley  <aph@redhat.com>
2473
2474         * include/ffi.h.in: Change void (*)() to void (*)(void).
2475         * src/x86/ffi.c: Likewise.
2476
2477 2009-06-04  Andrew Haley  <aph@redhat.com>
2478
2479         * src/powerpc/ppc_closure.S: Insert licence header.
2480         * src/powerpc/linux64_closure.S: Likewise.
2481         * src/m68k/sysv.S: Likewise.
2482
2483         * src/sh64/ffi.c: Change void (*)() to void (*)(void).
2484         * src/powerpc/ffi.c: Likewise.
2485         * src/powerpc/ffi_darwin.c: Likewise.
2486         * src/m32r/ffi.c: Likewise.
2487         * src/sh64/ffi.c: Likewise.
2488         * src/x86/ffi64.c: Likewise.
2489         * src/alpha/ffi.c: Likewise.
2490         * src/alpha/osf.S: Likewise.
2491         * src/frv/ffi.c: Likewise.
2492         * src/s390/ffi.c: Likewise.
2493         * src/pa/ffi.c: Likewise.
2494         * src/pa/hpux32.S: Likewise.
2495         * src/ia64/unix.S: Likewise.
2496         * src/ia64/ffi.c: Likewise.
2497         * src/sparc/ffi.c: Likewise.
2498         * src/mips/ffi.c: Likewise.
2499         * src/sh/ffi.c: Likewise.
2500
2501 2008-02-15  David Daney  <ddaney@avtrex.com>
2502
2503         * src/mips/ffi.c (USE__BUILTIN___CLEAR_CACHE):
2504         Define (conditionally), and use it to include cachectl.h.
2505         (ffi_prep_closure_loc): Fix cache flushing.
2506         * src/mips/ffitarget.h (_ABIN32, _ABI64, _ABIO32): Define.
2507
2508 2009-06-04  Andrew Haley  <aph@redhat.com>
2509
2510         include/ffi.h.in,
2511         src/arm/ffitarget.h,
2512         src/arm/ffi.c,
2513         src/arm/sysv.S,
2514         src/powerpc/ffitarget.h,
2515         src/closures.c,
2516         src/sh64/ffitarget.h,
2517         src/sh64/ffi.c,
2518         src/sh64/sysv.S,
2519         src/types.c,
2520         src/x86/ffi64.c,
2521         src/x86/ffitarget.h,
2522         src/x86/win32.S,
2523         src/x86/darwin.S,
2524         src/x86/ffi.c,
2525         src/x86/sysv.S,
2526         src/x86/unix64.S,
2527         src/alpha/ffitarget.h,
2528         src/alpha/ffi.c,
2529         src/alpha/osf.S,
2530         src/m68k/ffitarget.h,
2531         src/frv/ffitarget.h,
2532         src/frv/ffi.c,
2533         src/s390/ffitarget.h,
2534         src/s390/sysv.S,
2535         src/cris/ffitarget.h,
2536         src/pa/linux.S,
2537         src/pa/ffitarget.h,
2538         src/pa/ffi.c,
2539         src/raw_api.c,
2540         src/ia64/ffitarget.h,
2541         src/ia64/unix.S,
2542         src/ia64/ffi.c,
2543         src/ia64/ia64_flags.h,
2544         src/java_raw_api.c,
2545         src/debug.c,
2546         src/sparc/v9.S,
2547         src/sparc/ffitarget.h,
2548         src/sparc/ffi.c,
2549         src/sparc/v8.S,
2550         src/mips/ffitarget.h,
2551         src/mips/n32.S,
2552         src/mips/o32.S,
2553         src/mips/ffi.c,
2554         src/prep_cif.c,
2555         src/sh/ffitarget.h,
2556         src/sh/ffi.c,
2557         src/sh/sysv.S: Update license text.
2558
2559 2009-05-22  Dave Korn  <dave.korn.cygwin@gmail.com>
2560
2561         * src/x86/win32.S (_ffi_closure_STDCALL):  New function.
2562         (.eh_frame):  Add FDE for it.
2563
2564 2009-05-22  Dave Korn  <dave.korn.cygwin@gmail.com>
2565
2566         * configure.ac:  Also check if assembler supports pc-relative
2567         relocs on X86_WIN32 targets.
2568         * configure:  Regenerate.
2569         * src/x86/win32.S (ffi_prep_args):  Declare extern, not global.
2570         (_ffi_call_SYSV):  Add missing function type symbol .def and
2571         add EH markup labels.
2572         (_ffi_call_STDCALL):  Likewise.
2573         (_ffi_closure_SYSV):  Likewise.
2574         (_ffi_closure_raw_SYSV):  Likewise.
2575         (.eh_frame):  Add hand-crafted EH data.
2576
2577 2009-04-09  Jakub Jelinek  <jakub@redhat.com>
2578
2579         * testsuite/lib/libffi-dg.exp: Change copyright header to refer to
2580         version 3 of the GNU General Public License and to point readers
2581         at the COPYING3 file and the FSF's license web page.
2582         * testsuite/libffi.call/call.exp: Likewise.
2583         * testsuite/libffi.special/special.exp: Likewise.
2584
2585 2009-03-01  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2586
2587         * configure: Regenerate.
2588
2589 2008-12-18  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
2590
2591         PR libffi/26048
2592         * configure.ac (HAVE_AS_X86_PCREL): New test.
2593         * configure: Regenerate.
2594         * fficonfig.h.in: Regenerate.
2595         * src/x86/sysv.S [!FFI_NO_RAW_API]: Precalculate
2596         RAW_CLOSURE_CIF_OFFSET, RAW_CLOSURE_FUN_OFFSET,
2597         RAW_CLOSURE_USER_DATA_OFFSET for the Solaris 10/x86 assembler.
2598         (.eh_frame): Only use SYMBOL-. iff HAVE_AS_X86_PCREL.
2599         * src/x86/unix64.S (.Lstore_table): Move to .text section.
2600         (.Lload_table): Likewise.
2601         (.eh_frame): Only use SYMBOL-. iff HAVE_AS_X86_PCREL.
2602
2603 2008-12-18  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2604
2605         * configure: Regenerate.
2606
2607 2008-11-21  Eric Botcazou  <ebotcazou@adacore.com>
2608
2609         * src/sparc/ffi.c (ffi_prep_cif_machdep): Add support for
2610         signed/unsigned int8/16 return values.
2611         * src/sparc/v8.S (ffi_call_v8): Likewise.
2612         (ffi_closure_v8): Likewise.
2613
2614 2008-09-26  Peter O'Gorman  <pogma@thewrittenword.com>
2615             Steve Ellcey  <sje@cup.hp.com>
2616
2617         * configure: Regenerate for new libtool.
2618         * Makefile.in: Ditto.
2619         * include/Makefile.in: Ditto.
2620         * aclocal.m4: Ditto.
2621
2622 2008-08-25  Andreas Tobler  <a.tobler@schweiz.org>
2623
2624         * src/powerpc/ffitarget.h (ffi_abi): Add FFI_LINUX and
2625         FFI_LINUX_SOFT_FLOAT to the POWERPC_FREEBSD enum.
2626         Add note about flag bits used for FFI_SYSV_TYPE_SMALL_STRUCT.
2627         Adjust copyright notice.
2628         * src/powerpc/ffi.c: Add two new flags to indicate if we have one
2629         register or two register to use for FFI_SYSV structs.
2630         (ffi_prep_cif_machdep): Pass the right register flag introduced above.
2631         (ffi_closure_helper_SYSV): Fix the return type for
2632         FFI_SYSV_TYPE_SMALL_STRUCT. Comment.
2633         Adjust copyright notice.
2634
2635 2008-07-16  Kaz Kojima  <kkojima@gcc.gnu.org>
2636
2637         * src/sh/ffi.c (ffi_prep_closure_loc): Turn INSN into an unsigned
2638         int.
2639
2640 2008-06-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2641
2642         * configure: Regenerate.
2643         * include/Makefile.in: Regenerate.
2644         * testsuite/Makefile.in: Regenerate.
2645
2646 2008-06-07  Joseph Myers  <joseph@codesourcery.com>
2647
2648         * configure.ac (parisc*-*-linux*, powerpc-*-sysv*,
2649         powerpc-*-beos*): Remove.
2650         * configure: Regenerate.
2651
2652 2008-05-09  Julian Brown  <julian@codesourcery.com>
2653
2654         * Makefile.am (LTLDFLAGS): New.
2655         (libffi_la_LDFLAGS): Use above.
2656         * Makefile.in: Regenerate.
2657
2658 2008-04-18  Paolo Bonzini  <bonzini@gnu.org>
2659
2660         PR bootstrap/35457
2661         * aclocal.m4: Regenerate.
2662         * configure: Regenerate.
2663
2664 2008-03-26  Kaz Kojima  <kkojima@gcc.gnu.org>
2665
2666         * src/sh/sysv.S: Add .note.GNU-stack on Linux.
2667         * src/sh64/sysv.S: Likewise.
2668
2669 2008-03-26  Daniel Jacobowitz  <dan@debian.org>
2670
2671         * src/arm/sysv.S: Fix ARM comment marker.
2672
2673 2008-03-26  Jakub Jelinek  <jakub@redhat.com>
2674
2675         * src/alpha/osf.S: Add .note.GNU-stack on Linux.
2676         * src/s390/sysv.S: Likewise.
2677         * src/powerpc/ppc_closure.S: Likewise.
2678         * src/powerpc/sysv.S: Likewise.
2679         * src/x86/unix64.S: Likewise.
2680         * src/x86/sysv.S: Likewise.
2681         * src/sparc/v8.S: Likewise.
2682         * src/sparc/v9.S: Likewise.
2683         * src/m68k/sysv.S: Likewise.
2684         * src/arm/sysv.S: Likewise.
2685
2686 2008-03-16  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2687
2688         * aclocal.m4: Regenerate.
2689         * configure: Likewise.
2690         * Makefile.in: Likewise.
2691         * include/Makefile.in: Likewise.
2692         * testsuite/Makefile.in: Likewise.
2693
2694 2008-02-12  Bjoern Koenig  <bkoenig@alpha-tierchen.de>
2695             Andreas Tobler  <a.tobler@schweiz.org>
2696
2697         * configure.ac: Add amd64-*-freebsd* target.
2698         * configure: Regenerate.
2699
2700 2008-01-30  H.J. Lu  <hongjiu.lu@intel.com>
2701
2702         PR libffi/34612
2703         * src/x86/sysv.S (ffi_closure_SYSV): Pop 4 byte from stack when
2704         returning struct.
2705
2706         * testsuite/libffi.call/call.exp: Add "-O2 -fomit-frame-pointer"
2707         tests.
2708
2709 2008-01-24  David Edelsohn  <edelsohn@gnu.org>
2710
2711         * configure: Regenerate.
2712
2713 2008-01-06  Andreas Tobler  <a.tobler@schweiz.org>
2714
2715         * src/x86/ffi.c (ffi_prep_cif_machdep): Fix thinko.
2716
2717 2008-01-05  Andreas Tobler  <a.tobler@schweiz.org>
2718
2719         PR testsuite/32843
2720         * src/x86/ffi.c (ffi_prep_cif_machdep): Add code for
2721         signed/unsigned int8/16 for X86_DARWIN.
2722         Updated copyright info.
2723         Handle one and two byte structs with special cif->flags.
2724         * src/x86/ffitarget.h: Add special types for one and two byte structs.
2725         Updated copyright info.
2726         * src/x86/darwin.S (ffi_call_SYSV): Rewrite to use a jump table like
2727         sysv.S
2728         Remove code to pop args from the stack after call.
2729         Special-case signed/unsigned for int8/16, one and two byte structs.
2730         (ffi_closure_raw_SYSV): Handle FFI_TYPE_UINT8,
2731         FFI_TYPE_SINT8, FFI_TYPE_UINT16, FFI_TYPE_SINT16, FFI_TYPE_UINT32,
2732         FFI_TYPE_SINT32.
2733         Updated copyright info.
2734
2735 2007-12-08  David Daney  <ddaney@avtrex.com>
2736
2737         * src/mips/n32.S (ffi_call_N32):  Replace dadd with ADDU, dsub with
2738         SUBU, add with ADDU and use smaller code sequences.
2739
2740 2007-12-07  David Daney  <ddaney@avtrex.com>
2741
2742         * src/mips/ffi.c (ffi_prep_cif_machdep): Handle long double return
2743         type.
2744
2745 2007-12-06  David Daney  <ddaney@avtrex.com>
2746
2747         * include/ffi.h.in (FFI_SIZEOF_JAVA_RAW): Define if not already
2748         defined.
2749         (ffi_java_raw): New typedef.
2750         (ffi_java_raw_call, ffi_java_ptrarray_to_raw,
2751         ffi_java_raw_to_ptrarray): Change parameter types from ffi_raw to
2752         ffi_java_raw.
2753         (ffi_java_raw_closure) : Same.
2754         (ffi_prep_java_raw_closure, ffi_prep_java_raw_closure_loc): Change
2755         parameter types.
2756         * src/java_raw_api.c (ffi_java_raw_size):  Replace FFI_SIZEOF_ARG with
2757         FFI_SIZEOF_JAVA_RAW.
2758         (ffi_java_raw_to_ptrarray): Change type of raw to ffi_java_raw.
2759         Replace FFI_SIZEOF_ARG with FFI_SIZEOF_JAVA_RAW. Use
2760         sizeof(ffi_java_raw) for alignment calculations.
2761         (ffi_java_ptrarray_to_raw): Same.
2762         (ffi_java_rvalue_to_raw): Add special handling for FFI_TYPE_POINTER
2763         if FFI_SIZEOF_JAVA_RAW == 4.
2764         (ffi_java_raw_to_rvalue): Same.
2765         (ffi_java_raw_call): Change type of raw to ffi_java_raw.
2766         (ffi_java_translate_args): Same.
2767         (ffi_prep_java_raw_closure_loc, ffi_prep_java_raw_closure): Change
2768         parameter types.
2769         * src/mips/ffitarget.h (FFI_SIZEOF_JAVA_RAW): Define for N32 ABI.
2770
2771 2007-12-06  David Daney  <ddaney@avtrex.com>
2772
2773         * src/mips/n32.S (ffi_closure_N32): Use 64-bit add instruction on
2774         pointer values.
2775
2776 2007-12-01  Andreas Tobler  <a.tobler@schweiz.org>
2777
2778         PR libffi/31937
2779         * src/powerpc/ffitarget.h: Introduce new ABI FFI_LINUX_SOFT_FLOAT.
2780         Add local FFI_TYPE_UINT128 to handle soft-float long-double-128.
2781         * src/powerpc/ffi.c: Distinguish between __NO_FPRS__ and not and
2782         set the NUM_FPR_ARG_REGISTERS according to.
2783         Add support for potential soft-float support under hard-float
2784         architecture.
2785         (ffi_prep_args_SYSV): Set NUM_FPR_ARG_REGISTERS to 0 in case of
2786         FFI_LINUX_SOFT_FLOAT, handle float, doubles and long-doubles according
2787         to the FFI_LINUX_SOFT_FLOAT ABI.
2788         (ffi_prep_cif_machdep): Likewise.
2789         (ffi_closure_helper_SYSV): Likewise.
2790         * src/powerpc/ppc_closure.S: Make sure not to store float/double
2791         on archs where __NO_FPRS__ is true.
2792         Add FFI_TYPE_UINT128 support.
2793         * src/powerpc/sysv.S: Add support for soft-float long-double-128.
2794         Adjust copyright notice.
2795
2796 2007-11-25  Andreas Tobler  <a.tobler@schweiz.org>
2797
2798         * src/closures.c: Move defintion of MAYBE_UNUSED from here to ...
2799         * include/ffi_common.h: ... here.
2800         Update copyright.
2801
2802 2007-11-17  Andreas Tobler  <a.tobler@schweiz.org>
2803
2804         * src/powerpc/sysv.S: Load correct cr to compare if we have long double.
2805         * src/powerpc/linux64.S: Likewise.
2806         * src/powerpc/ffi.c: Add a comment to show which part goes into cr6.
2807         * testsuite/libffi.call/return_ldl.c: New test.
2808
2809 2007-09-04    <aph@redhat.com>
2810
2811         * src/arm/sysv.S (UNWIND): New.
2812         (Whole file): Conditionally compile unwinder directives.
2813         * src/arm/sysv.S: Add unwinder directives.
2814
2815         * src/arm/ffi.c (ffi_prep_args): Align structs by at least 4 bytes.
2816         Only treat r0 as a struct address if we're actually returning a
2817         struct by address.
2818         Only copy the bytes that are actually within a struct.
2819         (ffi_prep_cif_machdep): A Composite Type not larger than 4 bytes
2820         is returned in r0, not passed by address.
2821         (ffi_call): Allocate a word-sized temporary for the case where
2822         a composite is returned in r0.
2823         (ffi_prep_incoming_args_SYSV): Align as necessary.
2824
2825 2007-08-05  Steven Newbury  <s_j_newbury@yahoo.co.uk>
2826
2827         * src/arm/ffi.c (FFI_INIT_TRAMPOLINE): Use __clear_cache instead of
2828         directly using the sys_cacheflush syscall.
2829
2830 2007-07-27  Andrew Haley  <aph@redhat.com>
2831
2832         * src/arm/sysv.S (ffi_closure_SYSV): Add soft-float.
2833
2834 2007-09-03  Maciej W. Rozycki  <macro@linux-mips.org>
2835
2836         * Makefile.am: Unify MIPS_IRIX and MIPS_LINUX into MIPS.
2837         * configure.ac: Likewise.
2838         * Makefile.in: Regenerate.
2839         * include/Makefile.in: Likewise.
2840         * testsuite/Makefile.in: Likewise.
2841         * configure: Likewise.
2842
2843 2007-08-24  David Daney  <ddaney@avtrex.com>
2844
2845         * testsuite/libffi.call/return_sl.c: New test.
2846
2847 2007-08-10  David Daney  <ddaney@avtrex.com>
2848
2849         * testsuite/libffi.call/cls_multi_ushort.c,
2850         testsuite/libffi.call/cls_align_uint16.c,
2851         testsuite/libffi.call/nested_struct1.c,
2852         testsuite/libffi.call/nested_struct3.c,
2853         testsuite/libffi.call/cls_7_1_byte.c,
2854         testsuite/libffi.call/nested_struct5.c,
2855         testsuite/libffi.call/cls_double.c,
2856         testsuite/libffi.call/nested_struct7.c,
2857         testsuite/libffi.call/cls_sint.c,
2858         testsuite/libffi.call/nested_struct9.c,
2859         testsuite/libffi.call/cls_20byte1.c,
2860         testsuite/libffi.call/cls_multi_sshortchar.c,
2861         testsuite/libffi.call/cls_align_sint64.c,
2862         testsuite/libffi.call/cls_3byte2.c,
2863         testsuite/libffi.call/cls_multi_schar.c,
2864         testsuite/libffi.call/cls_multi_uchar.c,
2865         testsuite/libffi.call/cls_19byte.c,
2866         testsuite/libffi.call/cls_9byte1.c,
2867         testsuite/libffi.call/cls_align_float.c,
2868         testsuite/libffi.call/closure_fn1.c,
2869         testsuite/libffi.call/problem1.c,
2870         testsuite/libffi.call/closure_fn3.c,
2871         testsuite/libffi.call/cls_sshort.c,
2872         testsuite/libffi.call/closure_fn5.c,
2873         testsuite/libffi.call/cls_align_double.c,
2874         testsuite/libffi.call/nested_struct.c,
2875         testsuite/libffi.call/cls_2byte.c,
2876         testsuite/libffi.call/nested_struct10.c,
2877         testsuite/libffi.call/cls_4byte.c,
2878         testsuite/libffi.call/cls_6byte.c,
2879         testsuite/libffi.call/cls_8byte.c,
2880         testsuite/libffi.call/cls_multi_sshort.c,
2881         testsuite/libffi.call/cls_align_sint16.c,
2882         testsuite/libffi.call/cls_align_uint32.c,
2883         testsuite/libffi.call/cls_20byte.c,
2884         testsuite/libffi.call/cls_float.c,
2885         testsuite/libffi.call/nested_struct2.c,
2886         testsuite/libffi.call/cls_5_1_byte.c,
2887         testsuite/libffi.call/nested_struct4.c,
2888         testsuite/libffi.call/cls_24byte.c,
2889         testsuite/libffi.call/nested_struct6.c,
2890         testsuite/libffi.call/cls_64byte.c,
2891         testsuite/libffi.call/nested_struct8.c,
2892         testsuite/libffi.call/cls_uint.c,
2893         testsuite/libffi.call/cls_multi_ushortchar.c,
2894         testsuite/libffi.call/cls_schar.c,
2895         testsuite/libffi.call/cls_uchar.c,
2896         testsuite/libffi.call/cls_align_uint64.c,
2897         testsuite/libffi.call/cls_ulonglong.c,
2898         testsuite/libffi.call/cls_align_longdouble.c,
2899         testsuite/libffi.call/cls_1_1byte.c,
2900         testsuite/libffi.call/cls_12byte.c,
2901         testsuite/libffi.call/cls_3_1byte.c,
2902         testsuite/libffi.call/cls_3byte1.c,
2903         testsuite/libffi.call/cls_4_1byte.c,
2904         testsuite/libffi.call/cls_6_1_byte.c,
2905         testsuite/libffi.call/cls_16byte.c,
2906         testsuite/libffi.call/cls_18byte.c,
2907         testsuite/libffi.call/closure_fn0.c,
2908         testsuite/libffi.call/cls_9byte2.c,
2909         testsuite/libffi.call/closure_fn2.c,
2910         testsuite/libffi.call/closure_fn4.c,
2911         testsuite/libffi.call/cls_ushort.c,
2912         testsuite/libffi.call/closure_fn6.c,
2913         testsuite/libffi.call/cls_5byte.c,
2914         testsuite/libffi.call/cls_align_pointer.c,
2915         testsuite/libffi.call/cls_7byte.c,
2916         testsuite/libffi.call/cls_align_sint32.c,
2917         testsuite/libffi.special/unwindtest_ffi_call.cc,
2918         testsuite/libffi.special/unwindtest.cc: Remove xfail for mips64*-*-*.
2919
2920 2007-08-10  David Daney  <ddaney@avtrex.com>
2921
2922         PR libffi/28313
2923         * configure.ac: Don't treat mips64 as a special case.
2924         * Makefile.am (nodist_libffi_la_SOURCES): Add n32.S.
2925         * configure: Regenerate
2926         * Makefile.in: Ditto.
2927         * fficonfig.h.in: Ditto.
2928         * src/mips/ffitarget.h (REG_L, REG_S, SUBU, ADDU, SRL, LI): Indent.
2929         (LA, EH_FRAME_ALIGN, FDE_ADDR_BYTES): New preprocessor macros.
2930         (FFI_DEFAULT_ABI): Set for n64 case.
2931         (FFI_CLOSURES, FFI_TRAMPOLINE_SIZE): Define for n32 and n64 cases.
2932         * src/mips/n32.S (ffi_call_N32): Add debug macros and labels for FDE.
2933         (ffi_closure_N32): New function.
2934         (.eh_frame): New section
2935         * src/mips/o32.S: Clean up comments.
2936         (ffi_closure_O32): Pass ffi_closure parameter in $12.
2937         * src/mips/ffi.c: Use FFI_MIPS_N32 instead of
2938         _MIPS_SIM == _ABIN32 throughout.
2939         (FFI_MIPS_STOP_HERE): New, use in place of
2940         ffi_stop_here.
2941         (ffi_prep_args): Use unsigned long to hold pointer values.  Rewrite
2942         to support n32/n64 ABIs.
2943         (calc_n32_struct_flags): Rewrite.
2944         (calc_n32_return_struct_flags): Remove unused variable.  Reverse
2945         position of flag bits.
2946         (ffi_prep_cif_machdep): Rewrite n32 portion.
2947         (ffi_call): Enable for n64.  Add special handling for small structure
2948         return values.
2949         (ffi_prep_closure_loc): Add n32 and n64 support.
2950         (ffi_closure_mips_inner_O32): Add cast to silence warning.
2951         (copy_struct_N32, ffi_closure_mips_inner_N32): New functions.
2952
2953 2007-08-08  David Daney  <ddaney@avtrex.com>
2954
2955         * testsuite/libffi.call/ffitest.h (ffi_type_mylong): Remove definition.
2956         * testsuite/libffi.call/cls_align_uint16.c (main): Use correct type
2957         specifiers.
2958         * testsuite/libffi.call/nested_struct1.c (main): Ditto.
2959         * testsuite/libffi.call/cls_sint.c (main): Ditto.
2960         * testsuite/libffi.call/nested_struct9.c (main): Ditto.
2961         * testsuite/libffi.call/cls_20byte1.c (main): Ditto.
2962         * testsuite/libffi.call/cls_9byte1.c (main): Ditto.
2963         * testsuite/libffi.call/closure_fn1.c (main): Ditto.
2964         * testsuite/libffi.call/closure_fn3.c (main): Ditto.
2965         * testsuite/libffi.call/return_dbl2.c (main): Ditto.
2966         * testsuite/libffi.call/cls_sshort.c (main): Ditto.
2967         * testsuite/libffi.call/return_fl3.c (main): Ditto.
2968         * testsuite/libffi.call/closure_fn5.c (main): Ditto.
2969         * testsuite/libffi.call/nested_struct.c (main): Ditto.
2970         * testsuite/libffi.call/nested_struct10.c (main): Ditto.
2971         * testsuite/libffi.call/return_ll1.c (main): Ditto.
2972         * testsuite/libffi.call/cls_8byte.c (main): Ditto.
2973         * testsuite/libffi.call/cls_align_uint32.c (main): Ditto.
2974         * testsuite/libffi.call/cls_align_sint16.c (main): Ditto.
2975         * testsuite/libffi.call/cls_20byte.c (main): Ditto.
2976         * testsuite/libffi.call/nested_struct2.c (main): Ditto.
2977         * testsuite/libffi.call/cls_24byte.c (main): Ditto.
2978         * testsuite/libffi.call/nested_struct6.c (main): Ditto.
2979         * testsuite/libffi.call/cls_uint.c (main): Ditto.
2980         * testsuite/libffi.call/cls_12byte.c (main): Ditto.
2981         * testsuite/libffi.call/cls_16byte.c (main): Ditto.
2982         * testsuite/libffi.call/closure_fn0.c (main): Ditto.
2983         * testsuite/libffi.call/cls_9byte2.c (main): Ditto.
2984         * testsuite/libffi.call/closure_fn2.c (main): Ditto.
2985         * testsuite/libffi.call/return_dbl1.c (main): Ditto.
2986         * testsuite/libffi.call/closure_fn4.c (main): Ditto.
2987         * testsuite/libffi.call/closure_fn6.c (main): Ditto.
2988         * testsuite/libffi.call/cls_align_sint32.c (main): Ditto.
2989
2990 2007-08-07  Andrew Haley  <aph@redhat.com>
2991
2992         * src/x86/sysv.S (ffi_closure_raw_SYSV): Fix typo in previous
2993         checkin.
2994
2995 2007-08-06  Andrew Haley  <aph@redhat.com>
2996
2997         PR testsuite/32843
2998         * src/x86/sysv.S (ffi_closure_raw_SYSV): Handle FFI_TYPE_UINT8,
2999         FFI_TYPE_SINT8, FFI_TYPE_UINT16, FFI_TYPE_SINT16, FFI_TYPE_UINT32,
3000         FFI_TYPE_SINT32.
3001
3002 2007-08-02  David Daney  <ddaney@avtrex.com>
3003
3004         * testsuite/libffi.call/return_ul.c (main): Define return type as
3005         ffi_arg.  Use proper printf conversion specifier.
3006
3007 2007-07-30  Andrew Haley  <aph@redhat.com>
3008
3009         PR testsuite/32843
3010         * src/x86/ffi.c (ffi_prep_cif_machdep): in x86 case, add code for
3011         signed/unsigned int8/16.
3012         * src/x86/sysv.S (ffi_call_SYSV): Rewrite to:
3013         Use a jump table.
3014         Remove code to pop args from the stack after call.
3015         Special-case signed/unsigned int8/16.
3016         * testsuite/libffi.call/return_sc.c (main): Revert.
3017
3018 2007-07-26  Richard Guenther  <rguenther@suse.de>
3019
3020         PR testsuite/32843
3021         * testsuite/libffi.call/return_sc.c (main): Verify call
3022         result as signed char, not ffi_arg.
3023
3024 2007-07-16  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
3025
3026         * configure.ac (i?86-*-solaris2.1[0-9]): Set TARGET to X86_64.
3027         * configure: Regenerate.
3028
3029 2007-07-11  David Daney  <ddaney@avtrex.com>
3030
3031         * src/mips/ffi.c: Don't include sys/cachectl.h.
3032         (ffi_prep_closure_loc): Use __builtin___clear_cache() instead of
3033         cacheflush().
3034
3035 2007-05-18  Aurelien Jarno  <aurelien@aurel32.net>
3036
3037         * src/arm/ffi.c (ffi_prep_closure_loc): Renamed and ajusted
3038         from (ffi_prep_closure): ... this.
3039         (FFI_INIT_TRAMPOLINE): Adjust.
3040
3041 2005-12-31  Phil Blundell  <pb@reciva.com>
3042
3043         * src/arm/ffi.c (ffi_prep_incoming_args_SYSV,
3044         ffi_closure_SYSV_inner, ffi_prep_closure): New, add closure support.
3045         * src/arm/sysv.S(ffi_closure_SYSV): Likewise.
3046         * src/arm/ffitarget.h (FFI_TRAMPOLINE_SIZE): Likewise.
3047         (FFI_CLOSURES): Enable closure support.
3048
3049 2007-07-03  Andrew Haley  <aph@hedges.billgatliff.com>
3050
3051         * testsuite/libffi.call/cls_multi_ushort.c,
3052         testsuite/libffi.call/cls_align_uint16.c,
3053         testsuite/libffi.call/nested_struct1.c,
3054         testsuite/libffi.call/nested_struct3.c,
3055         testsuite/libffi.call/cls_7_1_byte.c,
3056         testsuite/libffi.call/cls_double.c,
3057         testsuite/libffi.call/nested_struct5.c,
3058         testsuite/libffi.call/nested_struct7.c,
3059         testsuite/libffi.call/cls_sint.c,
3060         testsuite/libffi.call/nested_struct9.c,
3061         testsuite/libffi.call/cls_20byte1.c,
3062         testsuite/libffi.call/cls_multi_sshortchar.c,
3063         testsuite/libffi.call/cls_align_sint64.c,
3064         testsuite/libffi.call/cls_3byte2.c,
3065         testsuite/libffi.call/cls_multi_schar.c,
3066         testsuite/libffi.call/cls_multi_uchar.c,
3067         testsuite/libffi.call/cls_19byte.c,
3068         testsuite/libffi.call/cls_9byte1.c,
3069         testsuite/libffi.call/cls_align_float.c,
3070         testsuite/libffi.call/closure_fn1.c,
3071         testsuite/libffi.call/problem1.c,
3072         testsuite/libffi.call/closure_fn3.c,
3073         testsuite/libffi.call/cls_sshort.c,
3074         testsuite/libffi.call/closure_fn5.c,
3075         testsuite/libffi.call/cls_align_double.c,
3076         testsuite/libffi.call/cls_2byte.c,
3077         testsuite/libffi.call/nested_struct.c,
3078         testsuite/libffi.call/nested_struct10.c,
3079         testsuite/libffi.call/cls_4byte.c,
3080         testsuite/libffi.call/cls_6byte.c,
3081         testsuite/libffi.call/cls_8byte.c,
3082         testsuite/libffi.call/cls_multi_sshort.c,
3083         testsuite/libffi.call/cls_align_uint32.c,
3084         testsuite/libffi.call/cls_align_sint16.c,
3085         testsuite/libffi.call/cls_float.c,
3086         testsuite/libffi.call/cls_20byte.c,
3087         testsuite/libffi.call/cls_5_1_byte.c,
3088         testsuite/libffi.call/nested_struct2.c,
3089         testsuite/libffi.call/cls_24byte.c,
3090         testsuite/libffi.call/nested_struct4.c,
3091         testsuite/libffi.call/nested_struct6.c,
3092         testsuite/libffi.call/cls_64byte.c,
3093         testsuite/libffi.call/nested_struct8.c,
3094         testsuite/libffi.call/cls_uint.c,
3095         testsuite/libffi.call/cls_multi_ushortchar.c,
3096         testsuite/libffi.call/cls_schar.c,
3097         testsuite/libffi.call/cls_uchar.c,
3098         testsuite/libffi.call/cls_align_uint64.c,
3099         testsuite/libffi.call/cls_ulonglong.c,
3100         testsuite/libffi.call/cls_align_longdouble.c,
3101         testsuite/libffi.call/cls_1_1byte.c,
3102         testsuite/libffi.call/cls_12byte.c,
3103         testsuite/libffi.call/cls_3_1byte.c,
3104         testsuite/libffi.call/cls_3byte1.c,
3105         testsuite/libffi.call/cls_4_1byte.c,
3106         testsuite/libffi.call/cls_6_1_byte.c,
3107         testsuite/libffi.call/cls_16byte.c,
3108         testsuite/libffi.call/cls_18byte.c,
3109         testsuite/libffi.call/closure_fn0.c,
3110         testsuite/libffi.call/cls_9byte2.c,
3111         testsuite/libffi.call/closure_fn2.c,
3112         testsuite/libffi.call/closure_fn4.c,
3113         testsuite/libffi.call/cls_ushort.c,
3114         testsuite/libffi.call/closure_fn6.c,
3115         testsuite/libffi.call/cls_5byte.c,
3116         testsuite/libffi.call/cls_align_pointer.c,
3117         testsuite/libffi.call/cls_7byte.c,
3118         testsuite/libffi.call/cls_align_sint32.c,
3119         testsuite/libffi.special/unwindtest_ffi_call.cc,
3120         testsuite/libffi.special/unwindtest.cc: Enable for ARM.
3121
3122 2007-07-05  H.J. Lu  <hongjiu.lu@intel.com>
3123
3124         * aclocal.m4: Regenerated.
3125
3126 2007-06-02  Paolo Bonzini  <bonzini@gnu.org>
3127
3128         * configure: Regenerate.
3129
3130 2007-05-23  Steve Ellcey  <sje@cup.hp.com>
3131
3132         * Makefile.in: Regenerate.
3133         * configure: Regenerate.
3134         * aclocal.m4: Regenerate.
3135         * include/Makefile.in: Regenerate.
3136         * testsuite/Makefile.in: Regenerate.
3137
3138 2007-05-10  Roman Zippel <zippel@linux-m68k.org>
3139
3140         * src/m68k/ffi.c (ffi_prep_incoming_args_SYSV,
3141         ffi_closure_SYSV_inner,ffi_prep_closure): New, add closure support.
3142         * src/m68k/sysv.S(ffi_closure_SYSV,ffi_closure_struct_SYSV): Likewise.
3143         * src/m68k/ffitarget.h (FFI_TRAMPOLINE_SIZE): Likewise.
3144         (FFI_CLOSURES): Enable closure support.
3145
3146 2007-05-10  Roman Zippel <zippel@linux-m68k.org>
3147
3148         * configure.ac (HAVE_AS_CFI_PSEUDO_OP): New test.
3149         * configure: Regenerate.
3150         * fficonfig.h.in: Regenerate.
3151         * src/m68k/sysv.S (CFI_STARTPROC,CFI_ENDPROC,
3152         CFI_OFFSET,CFI_DEF_CFA): New macros.
3153         (ffi_call_SYSV): Add callframe annotation.
3154
3155 2007-05-10  Roman Zippel <zippel@linux-m68k.org>
3156
3157         * src/m68k/ffi.c (ffi_prep_args,ffi_prep_cif_machdep): Fix
3158         numerous test suite failures.
3159         * src/m68k/sysv.S (ffi_call_SYSV): Likewise.
3160
3161 2007-04-11  Paolo Bonzini  <bonzini@gnu.org>
3162
3163         * Makefile.am (EXTRA_DIST): Bring up to date.
3164         * Makefile.in: Regenerate.
3165         * src/frv/eabi.S: Remove RCS keyword.
3166
3167 2007-04-06  Richard Henderson  <rth@redhat.com>
3168
3169         * configure.ac: Tidy target case.
3170         (HAVE_LONG_DOUBLE): Allow the target to override.
3171         * configure: Regenerate.
3172         * include/ffi.h.in: Don't define ffi_type_foo if
3173         LIBFFI_HIDE_BASIC_TYPES is defined.
3174         (ffi_type_longdouble): If not HAVE_LONG_DOUBLE, define
3175         to ffi_type_double.
3176         * types.c (LIBFFI_HIDE_BASIC_TYPES): Define.
3177         (FFI_TYPEDEF, ffi_type_void): Mark the data const.
3178         (ffi_type_longdouble): Special case for Alpha.  Don't define
3179         if long double == double.
3180
3181         * src/alpha/ffi.c (FFI_TYPE_LONGDOUBLE): Assert unique value.
3182         (ffi_prep_cif_machdep): Handle it as the 128-bit type.
3183         (ffi_call, ffi_closure_osf_inner): Likewise.
3184         (ffi_closure_osf_inner): Likewise.  Mark hidden.
3185         (ffi_call_osf, ffi_closure_osf): Mark hidden.
3186         * src/alpha/ffitarget.h (FFI_LAST_ABI): Tidy definition.
3187         * src/alpha/osf.S (ffi_call_osf, ffi_closure_osf): Mark hidden.
3188         (load_table): Handle 128-bit long double.
3189
3190         * testsuite/libffi.call/float4.c: Add -mieee for alpha.
3191
3192 2007-04-06  Tom Tromey  <tromey@redhat.com>
3193
3194         PR libffi/31491:
3195         * README: Fixed bug in example.
3196
3197 2007-04-03  Jakub Jelinek  <jakub@redhat.com>
3198
3199         * src/closures.c: Include sys/statfs.h.
3200         (_GNU_SOURCE): Define on Linux.
3201         (FFI_MMAP_EXEC_SELINUX): Define.
3202         (selinux_enabled): New variable.
3203         (selinux_enabled_check): New function.
3204         (is_selinux_enabled): Define.
3205         (dlmmap): Use it.
3206
3207 2007-03-24  Uros Bizjak  <ubizjak@gmail.com>
3208
3209         * testsuite/libffi.call/return_fl2.c (return_fl): Mark as static.
3210         Use 'volatile float sum' to create sum of floats to avoid false
3211         negative due to excess precision on ix86 targets.
3212         (main): Ditto.
3213
3214 2007-03-08  Alexandre Oliva  <aoliva@redhat.com>
3215
3216         * src/powerpc/ffi.c (flush_icache): Fix left-over from previous
3217         patch.
3218         (ffi_prep_closure_loc): Remove unneeded casts.  Add needed ones.
3219
3220 2007-03-07  Alexandre Oliva  <aoliva@redhat.com>
3221
3222         * include/ffi.h.in (ffi_closure_alloc, ffi_closure_free): New.
3223         (ffi_prep_closure_loc): New.
3224         (ffi_prep_raw_closure_loc): New.
3225         (ffi_prep_java_raw_closure_loc): New.
3226         * src/closures.c: New file.
3227         * src/dlmalloc.c [FFI_MMAP_EXEC_WRIT] (struct malloc_segment):
3228         Replace sflags with exec_offset.
3229         [FFI_MMAP_EXEC_WRIT] (mmap_exec_offset, add_segment_exec_offset,
3230         sub_segment_exec_offset): New macros.
3231         (get_segment_flags, set_segment_flags, check_segment_merge): New
3232         macros.
3233         (is_mmapped_segment, is_extern_segment): Use get_segment_flags.
3234         (add_segment, sys_alloc, create_mspace, create_mspace_with_base,
3235         destroy_mspace): Use new macros.
3236         (sys_alloc): Silence warning.
3237         * Makefile.am (libffi_la_SOURCES): Add src/closures.c.
3238         * Makefile.in: Rebuilt.
3239         * src/prep_cif [FFI_CLOSURES] (ffi_prep_closure): Implement in
3240         terms of ffi_prep_closure_loc.
3241         * src/raw_api.c (ffi_prep_raw_closure_loc): Renamed and adjusted
3242         from...
3243         (ffi_prep_raw_closure): ... this.  Re-implement in terms of the
3244         renamed version.
3245         * src/java_raw_api (ffi_prep_java_raw_closure_loc): Renamed and
3246         adjusted from...
3247         (ffi_prep_java_raw_closure): ... this.  Re-implement in terms of
3248         the renamed version.
3249         * src/alpha/ffi.c (ffi_prep_closure_loc): Renamed from
3250         (ffi_prep_closure): ... this.
3251         * src/pa/ffi.c: Likewise.
3252         * src/cris/ffi.c: Likewise.  Adjust.
3253         * src/frv/ffi.c: Likewise.
3254         * src/ia64/ffi.c: Likewise.
3255         * src/mips/ffi.c: Likewise.
3256         * src/powerpc/ffi_darwin.c: Likewise.
3257         * src/s390/ffi.c: Likewise.
3258         * src/sh/ffi.c: Likewise.
3259         * src/sh64/ffi.c: Likewise.
3260         * src/sparc/ffi.c: Likewise.
3261         * src/x86/ffi64.c: Likewise.
3262         * src/x86/ffi.c: Likewise.
3263         (FFI_INIT_TRAMPOLINE): Adjust.
3264         (ffi_prep_raw_closure_loc): Renamed and adjusted from...
3265         (ffi_prep_raw_closure): ... this.
3266         * src/powerpc/ffi.c (ffi_prep_closure_loc): Renamed from
3267         (ffi_prep_closure): ... this.
3268         (flush_icache): Adjust.
3269
3270 2007-03-07  Alexandre Oliva  <aoliva@redhat.com>
3271
3272         * src/dlmalloc.c: New file, imported version 2.8.3 of Doug
3273         Lea's malloc.
3274
3275 2007-03-01  Brooks Moses  <brooks.moses@codesourcery.com>
3276
3277         * Makefile.am: Add dummy install-pdf target.
3278         * Makefile.in: Regenerate
3279
3280 2007-02-13  Andreas Krebbel  <krebbel1@de.ibm.com>
3281
3282         * src/s390/ffi.c (ffi_prep_args, ffi_prep_cif_machdep,
3283         ffi_closure_helper_SYSV): Add long double handling.
3284
3285 2007-02-02  Jakub Jelinek  <jakub@redhat.com>
3286
3287         * src/powerpc/linux64.S (ffi_call_LINUX64): Move restore of r2
3288         immediately after bctrl instruction.
3289
3290 2007-01-18  Alexandre Oliva  <aoliva@redhat.com>
3291
3292         * Makefile.am (all-recursive, install-recursive,
3293         mostlyclean-recursive, clean-recursive, distclean-recursive,
3294         maintainer-clean-recursive): Add missing targets.
3295         * Makefile.in: Rebuilt.
3296
3297 2006-12-14  Andreas Tobler  <a.tobler@schweiz.org>
3298
3299         * configure.ac: Add TARGET for x86_64-*-darwin*.
3300         * Makefile.am (nodist_libffi_la_SOURCES): Add rules for 64-bit sources
3301         for X86_DARWIN.
3302         * src/x86/ffitarget.h: Set trampoline size for x86_64-*-darwin*.
3303         * src/x86/darwin64.S: New file for x86_64-*-darwin* support.
3304         * configure: Regenerate.
3305         * Makefile.in: Regenerate.
3306         * include/Makefile.in: Regenerate.
3307         * testsuite/Makefile.in: Regenerate.
3308         * testsuite/libffi.special/unwindtest_ffi_call.cc: New test case for
3309         ffi_call only.
3310
3311 2006-12-13  Andreas Tobler <a.tobler@schweiz.org>
3312
3313         * aclocal.m4: Regenerate with aclocal -I .. as written in the
3314         Makefile.am.
3315
3316 2006-10-31  Geoffrey Keating  <geoffk@apple.com>
3317
3318         * src/powerpc/ffi_darwin.c (darwin_adjust_aggregate_sizes): New.
3319         (ffi_prep_cif_machdep): Call darwin_adjust_aggregate_sizes for
3320         Darwin.
3321         * testsuite/libffi.call/nested_struct4.c: Remove Darwin XFAIL.
3322         * testsuite/libffi.call/nested_struct6.c: Remove Darwin XFAIL.
3323
3324 2006-10-10  Paolo Bonzini  <bonzini@gnu.org>
3325             Sandro Tolaini  <tolaini@libero.it>
3326
3327         * configure.ac [i*86-*-darwin*]: Set X86_DARWIN symbol and
3328         conditional.
3329         * configure: Regenerated.
3330         * Makefile.am (nodist_libffi_la_SOURCES) [X86_DARWIN]: New case.
3331         (EXTRA_DIST): Add src/x86/darwin.S.
3332         * Makefile.in: Regenerated.
3333         * include/Makefile.in: Regenerated.
3334         * testsuite/Makefile.in: Regenerated.
3335
3336         * src/x86/ffi.c (ffi_prep_cif_machdep) [X86_DARWIN]: Treat like
3337         X86_WIN32, and additionally align stack to 16 bytes.
3338         * src/x86/darwin.S: New, based on sysv.S.
3339         * src/prep_cif.c (ffi_prep_cif) [X86_DARWIN]: Align > 8-byte structs.
3340
3341 2006-09-12  David Daney  <ddaney@avtrex.com>
3342
3343         PR libffi/23935
3344         * include/Makefile.am: Install both ffi.h and ffitarget.h in
3345         $(libdir)/gcc/$(target_alias)/$(gcc_version)/include.
3346         * aclocal.m4: Regenerated for automake 1.9.6.
3347         * Makefile.in: Regenerated.
3348         * include/Makefile.in: Regenerated.
3349         * testsuite/Makefile.in: Regenerated.
3350
3351 2006-08-17  Andreas Tobler  <a.tobler@schweiz.ch>
3352
3353         * include/ffi_common.h (struct): Revert accidental commit.
3354
3355 2006-08-15  Andreas Tobler  <a.tobler@schweiz.ch>
3356
3357         * include/ffi_common.h: Remove lint directives.
3358         * include/ffi.h.in: Likewise.
3359
3360 2006-07-25  Torsten Schoenfeld  <kaffeetisch@gmx.de>
3361
3362         * include/ffi.h.in (ffi_type_ulong, ffi_type_slong): Define correctly
3363         for 32-bit architectures.
3364         * testsuite/libffi.call/return_ul.c: New test case.
3365
3366 2006-07-19  David Daney  <ddaney@avtrex.com>
3367
3368         * testsuite/libffi.call/closure_fn6.c: Remove xfail for mips,
3369         xfail remains for mips64.
3370
3371 2006-05-23  Carlos O'Donell  <carlos@codesourcery.com>
3372
3373         * Makefile.am: Add install-html target. Add install-html to .PHONY
3374         * Makefile.in: Regenerate.
3375         * aclocal.m4: Regenerate.
3376         * include/Makefile.in: Regenerate.
3377         * testsuite/Makefile.in: Regenerate.
3378
3379 2006-05-18  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
3380
3381         * pa/ffi.c (ffi_prep_args_pa32): Load floating point arguments from
3382         stack slot.
3383
3384 2006-04-22  Andreas Tobler  <a.tobler@schweiz.ch>
3385
3386         * README: Remove notice about 'Crazy Comments'.
3387         * src/debug.c: Remove lint directives. Cleanup white spaces.
3388         * src/java_raw_api.c: Likewise.
3389         * src/prep_cif.c: Likewise.
3390         * src/raw_api.c: Likewise.
3391         * src/ffitest.c: Delete. No longer needed, all test cases migrated
3392         to the testsuite.
3393         * src/arm/ffi.c: Remove lint directives.
3394         * src/m32r/ffi.c: Likewise.
3395         * src/pa/ffi.c: Likewise.
3396         * src/powerpc/ffi.c: Likewise.
3397         * src/powerpc/ffi_darwin.c: Likewise.
3398         * src/sh/ffi.c: Likewise.
3399         * src/sh64/ffi.c: Likewise.
3400         * src/x86/ffi.c: Likewise.
3401         * testsuite/libffi.call/float2.c: Likewise.
3402         * testsuite/libffi.call/promotion.c: Likewise.
3403         * testsuite/libffi.call/struct1.c: Likewise.
3404
3405 2006-04-13  Andreas Tobler  <a.tobler@schweiz.ch>
3406
3407         * src/pa/hpux32.S: Correct unwind offset calculation for
3408         ffi_closure_pa32.
3409         * src/pa/linux.S: Likewise.
3410
3411 2006-04-12  James E Wilson  <wilson@specifix.com>
3412
3413         PR libgcj/26483
3414         * src/ia64/ffi.c (stf_spill, ldf_fill): Rewrite as macros.
3415         (hfa_type_load): Call stf_spill.
3416         (hfa_type_store): Call ldf_fill.
3417         (ffi_call): Adjust calls to above routines.  Add local temps for
3418         macro result.
3419
3420 2006-04-10  Matthias Klose  <doko@debian.org>
3421
3422         * testsuite/lib/libffi-dg.exp (libffi-init): Recognize multilib
3423         directory names containing underscores.
3424
3425 2006-04-07  James E Wilson  <wilson@specifix.com>
3426
3427         * testsuite/libffi.call/float4.c: New testcase.
3428
3429 2006-04-05  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
3430             Andreas Tobler  <a.tobler@schweiz.ch>
3431
3432         * Makefile.am: Add PA_HPUX port.
3433         * Makefile.in: Regenerate.
3434         * include/Makefile.in: Likewise.
3435         * testsuite/Makefile.in: Likewise.
3436         * configure.ac: Add PA_HPUX rules.
3437         * configure: Regenerate.
3438         * src/pa/ffitarget.h: Rename linux target to PA_LINUX.
3439         Add PA_HPUX and PA64_HPUX.
3440         Rename FFI_LINUX ABI to FFI_PA32 ABI.
3441         (FFI_TRAMPOLINE_SIZE): Define for 32-bit HP-UX targets.
3442         (FFI_TYPE_SMALL_STRUCT2): Define.
3443         (FFI_TYPE_SMALL_STRUCT4): Likewise.
3444         (FFI_TYPE_SMALL_STRUCT8): Likewise.
3445         (FFI_TYPE_SMALL_STRUCT3): Redefine.
3446         (FFI_TYPE_SMALL_STRUCT5): Likewise.
3447         (FFI_TYPE_SMALL_STRUCT6): Likewise.
3448         (FFI_TYPE_SMALL_STRUCT7): Likewise.
3449         * src/pa/ffi.c (ROUND_DOWN): Delete.
3450         (fldw, fstw, fldd, fstd): Use '__asm__'.
3451         (ffi_struct_type): Add support for FFI_TYPE_SMALL_STRUCT2,
3452         FFI_TYPE_SMALL_STRUCT4 and FFI_TYPE_SMALL_STRUCT8.
3453         (ffi_prep_args_LINUX): Rename to ffi_prep_args_pa32. Update comment.
3454         Simplify incrementing of stack slot variable. Change type of local
3455         'n' to unsigned int.
3456         (ffi_size_stack_LINUX): Rename to ffi_size_stack_pa32. Handle long
3457         double on PA_HPUX.
3458         (ffi_prep_cif_machdep): Likewise.
3459         (ffi_call): Likewise.
3460         (ffi_closure_inner_LINUX): Rename to ffi_closure_inner_pa32. Change
3461         return type to ffi_status. Simplify incrementing of stack slot
3462         variable. Only copy floating point argument registers when PA_LINUX
3463         is true. Reformat debug statement.
3464         Add support for FFI_TYPE_SMALL_STRUCT2, FFI_TYPE_SMALL_STRUCT4 and
3465         FFI_TYPE_SMALL_STRUCT8.
3466         (ffi_closure_LINUX): Rename to ffi_closure_pa32. Add 'extern' to
3467         declaration.
3468         (ffi_prep_closure): Make linux trampoline conditional on PA_LINUX.
3469         Add nops to cache flush.  Add trampoline for PA_HPUX.
3470         * src/pa/hpux32.S: New file.
3471         * src/pa/linux.S (ffi_call_LINUX): Rename to ffi_call_pa32. Rename
3472         ffi_prep_args_LINUX to ffi_prep_args_pa32.
3473         Localize labels. Add support for 2, 4 and 8-byte small structs. Handle
3474         unaligned destinations in 3, 5, 6 and 7-byte small structs. Order
3475         argument type checks so that common argument types appear first.
3476         (ffi_closure_LINUX): Rename to ffi_closure_pa32. Rename
3477         ffi_closure_inner_LINUX to ffi_closure_inner_pa32.
3478
3479 2006-03-24  Alan Modra  <amodra@bigpond.net.au>
3480
3481         * src/powerpc/ffitarget.h (enum ffi_abi): Add FFI_LINUX.  Default
3482         for 32-bit using IBM extended double format.  Fix FFI_LAST_ABI.
3483         * src/powerpc/ffi.c (ffi_prep_args_SYSV): Handle linux variant of
3484         FFI_TYPE_LONGDOUBLE.
3485         (ffi_prep_args64): Assert using IBM extended double.
3486         (ffi_prep_cif_machdep): Don't munge FFI_TYPE_LONGDOUBLE type.
3487         Handle FFI_LINUX FFI_TYPE_LONGDOUBLE return and args.
3488         (ffi_call): Handle FFI_LINUX.
3489         (ffi_closure_helper_SYSV): Non FFI_LINUX long double return needs
3490         gpr3 return pointer as for struct return.  Handle FFI_LINUX
3491         FFI_TYPE_LONGDOUBLE return and args.  Don't increment "nf"
3492         unnecessarily.
3493         * src/powerpc/ppc_closure.S (ffi_closure_SYSV): Load both f1 and f2
3494         for FFI_TYPE_LONGDOUBLE.  Move epilogue insns into case table.
3495         Don't use r6 as pointer to results, instead use sp offset.  Don't
3496         make a special call to load lr with case table address, instead
3497         use offset from previous call.
3498         * src/powerpc/sysv.S (ffi_call_SYSV): Save long double return.
3499         * src/powerpc/linux64.S (ffi_call_LINUX64): Simplify long double
3500         return.
3501
3502 2006-03-15  Kaz Kojima  <kkojima@gcc.gnu.org>
3503
3504         * src/sh64/ffi.c (ffi_prep_cif_machdep): Handle float arguments
3505         passed with FP registers correctly.
3506         (ffi_closure_helper_SYSV): Likewise.
3507         * src/sh64/sysv.S: Likewise.
3508
3509 2006-03-01  Andreas Tobler  <a.tobler@schweiz.ch>
3510
3511         * testsuite/libffi.special/unwindtest.cc (closure_test_fn): Mark cif,
3512         args and userdata unused.
3513         (closure_test_fn1): Mark cif and userdata unused.
3514         (main): Remove unused res.
3515
3516 2006-02-28  Andreas Tobler  <a.tobler@schweiz.ch>
3517
3518         * testsuite/libffi.call/call.exp: Adjust FSF address. Add test runs for
3519         -O2, -O3, -Os and the warning flags -W -Wall.
3520         * testsuite/libffi.special/special.exp: Likewise.
3521         * testsuite/libffi.call/ffitest.h: Add an __UNUSED__ macro to mark
3522         unused parameter unused for gcc or else do nothing.
3523         * testsuite/libffi.special/ffitestcxx.h: Likewise.
3524         * testsuite/libffi.call/cls_12byte.c (cls_struct_12byte_gn): Mark cif
3525         and userdata unused.
3526         * testsuite/libffi.call/cls_16byte.c (cls_struct_16byte_gn): Likewise.
3527         * testsuite/libffi.call/cls_18byte.c (cls_struct_18byte_gn): Likewise.
3528         * testsuite/libffi.call/cls_19byte.c (cls_struct_19byte_gn): Likewise.
3529         * testsuite/libffi.call/cls_1_1byte.c (cls_struct_1_1byte_gn): Likewise.
3530         * testsuite/libffi.call/cls_20byte.c (cls_struct_20byte_gn): Likewise.
3531         * testsuite/libffi.call/cls_20byte1.c (cls_struct_20byte_gn): Likewise.
3532         * testsuite/libffi.call/cls_24byte.c (cls_struct_24byte_gn): Likewise.
3533         * testsuite/libffi.call/cls_2byte.c (cls_struct_2byte_gn): Likewise.
3534         * testsuite/libffi.call/cls_3_1byte.c (cls_struct_3_1byte_gn): Likewise.
3535         * testsuite/libffi.call/cls_3byte1.c (cls_struct_3byte_gn): Likewise.
3536         * testsuite/libffi.call/cls_3byte2.c (cls_struct_3byte_gn1): Likewise.
3537         * testsuite/libffi.call/cls_4_1byte.c (cls_struct_4_1byte_gn): Likewise.
3538         * testsuite/libffi.call/cls_4byte.c (cls_struct_4byte_gn): Likewise.
3539         * testsuite/libffi.call/cls_5_1_byte.c (cls_struct_5byte_gn): Likewise.
3540         * testsuite/libffi.call/cls_5byte.c (cls_struct_5byte_gn): Likewise.
3541         * testsuite/libffi.call/cls_64byte.c (cls_struct_64byte_gn): Likewise.
3542         * testsuite/libffi.call/cls_6_1_byte.c (cls_struct_6byte_gn): Likewise.
3543         * testsuite/libffi.call/cls_6byte.c (cls_struct_6byte_gn): Likewise.
3544         * testsuite/libffi.call/cls_7_1_byte.c (cls_struct_7byte_gn): Likewise.
3545         * testsuite/libffi.call/cls_7byte.c (cls_struct_7byte_gn): Likewise.
3546         * testsuite/libffi.call/cls_8byte.c (cls_struct_8byte_gn): Likewise.
3547         * testsuite/libffi.call/cls_9byte1.c (cls_struct_9byte_gn): Likewise.
3548         * testsuite/libffi.call/cls_9byte2.c (cls_struct_9byte_gn): Likewise.
3549         * testsuite/libffi.call/cls_align_double.c (cls_struct_align_gn):
3550         Likewise.
3551         * testsuite/libffi.call/cls_align_float.c (cls_struct_align_gn):
3552         Likewise.
3553         * testsuite/libffi.call/cls_align_longdouble.c (cls_struct_align_gn):
3554         Likewise.
3555         * testsuite/libffi.call/cls_align_pointer.c (cls_struct_align_fn): Cast
3556         void* to avoid compiler warning.
3557         (main): Likewise.
3558         (cls_struct_align_gn): Mark cif and userdata unused.
3559         * testsuite/libffi.call/cls_align_sint16.c (cls_struct_align_gn):
3560         Likewise.
3561         * testsuite/libffi.call/cls_align_sint32.c (cls_struct_align_gn):
3562         Likewise.
3563         * testsuite/libffi.call/cls_align_sint64.c (cls_struct_align_gn):
3564         Likewise.
3565         * testsuite/libffi.call/cls_align_uint16.c (cls_struct_align_gn):
3566         Likewise.
3567         * testsuite/libffi.call/cls_align_uint32.c (cls_struct_align_gn):
3568         Likewise.
3569         * testsuite/libffi.call/cls_double.c (cls_ret_double_fn): Likewise.
3570         * testsuite/libffi.call/cls_float.c (cls_ret_float_fn): Likewise.
3571         * testsuite/libffi.call/cls_multi_schar.c (test_func_gn): Mark cif and
3572         data unused.
3573         (main): Cast res_call to silence gcc.
3574         * testsuite/libffi.call/cls_multi_sshort.c (test_func_gn): Mark cif and
3575         data unused.
3576         (main): Cast res_call to silence gcc.
3577         * testsuite/libffi.call/cls_multi_sshortchar.c (test_func_gn): Mark cif
3578         and data unused.
3579         (main): Cast res_call to silence gcc.
3580         * testsuite/libffi.call/cls_multi_uchar.c (test_func_gn): Mark cif and
3581         data unused.
3582         (main): Cast res_call to silence gcc.
3583         * testsuite/libffi.call/cls_multi_ushort.c (test_func_gn): Mark cif and
3584         data unused.
3585         (main): Cast res_call to silence gcc.
3586         * testsuite/libffi.call/cls_multi_ushortchar.c (test_func_gn): Mark cif
3587         and data unused.
3588         (main): Cast res_call to silence gcc.
3589         * testsuite/libffi.call/cls_schar.c (cls_ret_schar_fn): Mark cif and
3590         userdata unused.
3591         (cls_ret_schar_fn): Cast printf parameter to silence gcc.
3592         * testsuite/libffi.call/cls_sint.c (cls_ret_sint_fn): Mark cif and
3593         userdata unused.
3594         (cls_ret_sint_fn): Cast printf parameter to silence gcc.
3595         * testsuite/libffi.call/cls_sshort.c (cls_ret_sshort_fn): Mark cif and
3596         userdata unused.
3597         (cls_ret_sshort_fn): Cast printf parameter to silence gcc.
3598         * testsuite/libffi.call/cls_uchar.c (cls_ret_uchar_fn):  Mark cif and
3599         userdata unused.
3600         (cls_ret_uchar_fn): Cast printf parameter to silence gcc.
3601         * testsuite/libffi.call/cls_uint.c (cls_ret_uint_fn): Mark cif and
3602         userdata unused.
3603         (cls_ret_uint_fn): Cast printf parameter to silence gcc.
3604         * testsuite/libffi.call/cls_ulonglong.c (cls_ret_ulonglong_fn): Mark cif
3605         and userdata unused.
3606         * testsuite/libffi.call/cls_ushort.c (cls_ret_ushort_fn): Mark cif and
3607         userdata unused.
3608         (cls_ret_ushort_fn): Cast printf parameter to silence gcc.
3609         * testsuite/libffi.call/float.c (floating): Remove unused parameter e.
3610         * testsuite/libffi.call/float1.c (main): Remove unused variable i.
3611         Cleanup white spaces.
3612         * testsuite/libffi.call/negint.c (checking): Remove unused variable i.
3613         * testsuite/libffi.call/nested_struct.c (cls_struct_combined_gn): Mark
3614         cif and userdata unused.
3615         * testsuite/libffi.call/nested_struct1.c (cls_struct_combined_gn):
3616         Likewise.
3617         * testsuite/libffi.call/nested_struct10.c (B_gn): Likewise.
3618         * testsuite/libffi.call/nested_struct2.c (B_fn): Adjust printf
3619         formatters to silence gcc.
3620         (B_gn): Mark cif and userdata unused.
3621         * testsuite/libffi.call/nested_struct3.c (B_gn): Mark cif and userdata
3622         unused.
3623         * testsuite/libffi.call/nested_struct4.c: Mention related PR.
3624         (B_gn): Mark cif and userdata unused.
3625         * testsuite/libffi.call/nested_struct5.c (B_gn): Mark cif and userdata
3626         unused.
3627         * testsuite/libffi.call/nested_struct6.c: Mention related PR.
3628         (B_gn): Mark cif and userdata unused.
3629         * testsuite/libffi.call/nested_struct7.c (B_gn): Mark cif and userdata
3630         unused.
3631         * testsuite/libffi.call/nested_struct8.c (B_gn): Likewise.
3632         * testsuite/libffi.call/nested_struct9.c (B_gn): Likewise.
3633         * testsuite/libffi.call/problem1.c (stub): Likewise.
3634         * testsuite/libffi.call/pyobjc-tc.c (main): Cast the result to silence
3635         gcc.
3636         * testsuite/libffi.call/return_fl2.c (return_fl): Add the note mentioned
3637         in the last commit for this test case in the test case itself.
3638         * testsuite/libffi.call/closure_fn0.c (closure_test_fn0): Mark cif as
3639         unused.
3640         * testsuite/libffi.call/closure_fn1.c (closure_test_fn1): Likewise.
3641         * testsuite/libffi.call/closure_fn2.c (closure_test_fn2): Likewise.
3642         * testsuite/libffi.call/closure_fn3.c (closure_test_fn3): Likewise.
3643         * testsuite/libffi.call/closure_fn4.c (closure_test_fn0): Likewise.
3644         * testsuite/libffi.call/closure_fn5.c (closure_test_fn5): Likewise.
3645         * testsuite/libffi.call/closure_fn6.c (closure_test_fn0): Likewise.
3646
3647 2006-02-22  Kaz Kojima  <kkojima@gcc.gnu.org>
3648
3649         * src/sh/sysv.S: Fix register numbers in the FDE for
3650         ffi_closure_SYSV.
3651
3652 2006-02-20  Andreas Tobler  <a.tobler@schweiz.ch>
3653
3654         * testsuite/libffi.call/return_fl2.c (return_fl): Remove static
3655         declaration to avoid a false negative on ix86. See PR323.
3656
3657 2006-02-18  Kaz Kojima  <kkojima@gcc.gnu.org>
3658
3659         * src/sh/ffi.c (ffi_closure_helper_SYSV): Remove unused variable
3660         and cast integer to void * if needed.  Update the pointer to
3661         the FP register saved area correctly.
3662
3663 2006-02-17  Andreas Tobler  <a.tobler@schweiz.ch>
3664
3665         * testsuite/libffi.call/nested_struct6.c: XFAIL this test until PR25630
3666         is fixed.
3667         * testsuite/libffi.call/nested_struct4.c: Likewise.
3668
3669 2006-02-16  Andreas Tobler  <a.tobler@schweiz.ch>
3670
3671         * testsuite/libffi.call/return_dbl.c: New test case.
3672         * testsuite/libffi.call/return_dbl1.c: Likewise.
3673         * testsuite/libffi.call/return_dbl2.c: Likewise.
3674         * testsuite/libffi.call/return_fl.c: Likewise.
3675         * testsuite/libffi.call/return_fl1.c: Likewise.
3676         * testsuite/libffi.call/return_fl2.c: Likewise.
3677         * testsuite/libffi.call/return_fl3.c: Likewise.
3678         * testsuite/libffi.call/closure_fn6.c: Likewise.
3679
3680         * testsuite/libffi.call/nested_struct2.c: Remove ffi_type_mylong
3681         definition.
3682         * testsuite/libffi.call/ffitest.h: Add ffi_type_mylong definition
3683         here to be used by other test cases too.
3684
3685         * testsuite/libffi.call/nested_struct10.c: New test case.
3686         * testsuite/libffi.call/nested_struct9.c: Likewise.
3687         * testsuite/libffi.call/nested_struct8.c: Likewise.
3688         * testsuite/libffi.call/nested_struct7.c: Likewise.
3689         * testsuite/libffi.call/nested_struct6.c: Likewise.
3690         * testsuite/libffi.call/nested_struct5.c: Likewise.
3691         * testsuite/libffi.call/nested_struct4.c: Likewise.
3692
3693 2006-01-21  Andreas Tobler  <a.tobler@schweiz.ch>
3694
3695         * configure.ac: Enable libffi for sparc64-*-freebsd*.
3696         * configure: Rebuilt.
3697
3698 2006-01-18  Jakub Jelinek  <jakub@redhat.com>
3699
3700         * src/powerpc/sysv.S (smst_two_register): Don't call __ashldi3,
3701         instead do the shifting inline.
3702         * src/powerpc/ppc_closure.S (ffi_closure_SYSV): Don't compute %r5
3703         shift count unconditionally.  Simplify load sequences for 1, 2, 3, 4
3704         and 8 byte structs, for the remaining struct sizes don't call
3705         __lshrdi3, instead do the shifting inline.
3706
3707 2005-12-07  Thiemo Seufer  <ths@networkno.de>
3708
3709         * src/mips/ffitarget.h: Remove obsolete sgidefs.h include. Add
3710         missing parentheses.
3711         * src/mips/o32.S (ffi_call_O32): Code formatting. Define
3712         and use A3_OFF, FP_OFF, RA_OFF. Micro-optimizations.
3713         (ffi_closure_O32): Likewise, but with newly defined A3_OFF2,
3714         A2_OFF2, A1_OFF2, A0_OFF2, RA_OFF2, FP_OFF2, S0_OFF2, GP_OFF2,
3715         V1_OFF2, V0_OFF2, FA_1_1_OFF2, FA_1_0_OFF2, FA_0_1_OFF2,
3716         FA_0_0_OFF2.
3717         * src/mips/ffi.c (ffi_prep_args): Code formatting. Fix
3718         endianness bugs.
3719         (ffi_prep_closure): Improve trampoline instruction scheduling.
3720         (ffi_closure_mips_inner_O32): Fix endianness bugs.
3721
3722 2005-12-03  Alan Modra  <amodra@bigpond.net.au>
3723
3724         * src/powerpc/ffi.c: Formatting.
3725         (ffi_prep_args_SYSV): Avoid possible aliasing problems by using unions.
3726         (ffi_prep_args64): Likewise.
3727
3728 2005-09-30  Geoffrey Keating  <geoffk@apple.com>
3729
3730         * testsuite/lib/libffi-dg.exp (libffi_target_compile): For
3731         darwin, use -shared-libgcc not -lgcc_s, and explain why.
3732
3733 2005-09-26  Tom Tromey  <tromey@redhat.com>
3734
3735         * testsuite/libffi.call/float1.c (value_type): New typedef.
3736         (CANARY): New define.
3737         (main): Check for result buffer overflow.
3738         * src/powerpc/linux64.S: Handle linux64 long double returns.
3739         * src/powerpc/ffi.c (FLAG_RETURNS_128BITS): New constant.
3740         (ffi_prep_cif_machdep): Handle linux64 long double returns.
3741
3742 2005-08-25  Alan Modra  <amodra@bigpond.net.au>
3743
3744         PR target/23404
3745         * src/powerpc/ffi.c (ffi_prep_args_SYSV): Correct placement of stack
3746         homed fp args.
3747         (ffi_status ffi_prep_cif_machdep): Correct stack sizing for same.
3748
3749 2005-08-11  Jakub Jelinek  <jakub@redhat.com>
3750
3751         * configure.ac (HAVE_HIDDEN_VISIBILITY_ATTRIBUTE): New test.
3752         (AH_BOTTOM): Add FFI_HIDDEN definition.
3753         * configure: Rebuilt.
3754         * fficonfig.h.in: Rebuilt.
3755         * src/powerpc/ffi.c (hidden): Remove.
3756         (ffi_closure_LINUX64, ffi_prep_args64, ffi_call_LINUX64,
3757         ffi_closure_helper_LINUX64): Use FFI_HIDDEN instead of hidden.
3758         * src/powerpc/linux64_closure.S (ffi_closure_LINUX64,
3759         .ffi_closure_LINUX64): Use FFI_HIDDEN instead of .hidden.
3760         * src/x86/ffi.c (ffi_closure_SYSV, ffi_closure_raw_SYSV): Remove,
3761         add FFI_HIDDEN to its prototype.
3762         (ffi_closure_SYSV_inner): New.
3763         * src/x86/sysv.S (ffi_closure_SYSV, ffi_closure_raw_SYSV): New.
3764         * src/x86/win32.S (ffi_closure_SYSV, ffi_closure_raw_SYSV): New.
3765
3766 2005-08-10  Alfred M. Szmidt  <ams@gnu.org>
3767
3768         PR libffi/21819:
3769         * configure: Rebuilt.
3770         * configure.ac: Handle i*86-*-gnu*.
3771
3772 2005-08-09  Jakub Jelinek  <jakub@redhat.com>
3773
3774         * src/powerpc/ppc_closure.S (ffi_closure_SYSV): Use
3775         DW_CFA_offset_extended_sf rather than
3776         DW_CFA_GNU_negative_offset_extended.
3777         * src/powerpc/sysv.S (ffi_call_SYSV): Likewise.
3778
3779 2005-07-22  SUGIOKA Toshinobu  <sugioka@itonet.co.jp>
3780
3781         * src/sh/sysv.S (ffi_call_SYSV): Stop argument popping correctly
3782         on sh3.
3783         (ffi_closure_SYSV): Change the stack layout for sh3 struct argument.
3784         * src/sh/ffi.c (ffi_prep_args): Fix sh3 argument copy, when it is
3785         partially on register.
3786         (ffi_closure_helper_SYSV): Likewise.
3787         (ffi_prep_cif_machdep): Don't set too many cif->flags.
3788
3789 2005-07-20  Kaz Kojima  <kkojima@gcc.gnu.org>
3790
3791         * src/sh/ffi.c (ffi_call): Handle small structures correctly.
3792         Remove empty line.
3793         * src/sh64/ffi.c (simple_type): Remove.
3794         (return_type): Handle small structures correctly.
3795         (ffi_prep_args): Likewise.
3796         (ffi_call): Likewise.
3797         (ffi_closure_helper_SYSV): Likewise.
3798         * src/sh64/sysv.S (ffi_call_SYSV): Handle 1, 2 and 4-byte return.
3799         Emit position independent code if PIC and remove wrong datalabel
3800         prefixes from EH data.
3801
3802 2005-07-19  Andreas Tobler  <a.tobler@schweiz.ch>
3803
3804         * Makefile.am (nodist_libffi_la_SOURCES): Add POWERPC_FREEBSD.
3805         * Makefile.in: Regenerate.
3806         * include/Makefile.in: Likewise.
3807         * testsuite/Makefile.in: Likewise.
3808         * configure.ac: Add POWERPC_FREEBSD rules.
3809         * configure: Regenerate.
3810         * src/powerpc/ffitarget.h: Add POWERPC_FREEBSD rules.
3811         (FFI_SYSV_TYPE_SMALL_STRUCT): Define.
3812         * src/powerpc/ffi.c: Add flags to handle small structure returns
3813         in ffi_call_SYSV.
3814         (ffi_prep_cif_machdep): Handle small structures for SYSV 4 ABI.
3815         Aka FFI_SYSV.
3816         (ffi_closure_helper_SYSV): Likewise.
3817         * src/powerpc/ppc_closure.S: Add return types for small structures.
3818         * src/powerpc/sysv.S: Add bits to handle small structures for
3819         final SYSV 4 ABI.
3820
3821 2005-07-10  Andreas Tobler  <a.tobler@schweiz.ch>
3822
3823         * testsuite/libffi.call/cls_5_1_byte.c: New test file.
3824         * testsuite/libffi.call/cls_6_1_byte.c: Likewise.
3825         * testsuite/libffi.call/cls_7_1_byte.c: Likewise.
3826
3827 2005-07-05  Randolph Chung  <tausq@debian.org>
3828
3829         * src/pa/ffi.c (ffi_struct_type): Rename FFI_TYPE_SMALL_STRUCT1
3830         as FFI_TYPE_SMALL_STRUCT3.  Break out handling for 5-7 byte
3831         structures.  Kill compilation warnings.
3832         (ffi_closure_inner_LINUX): Print return values as hex in debug
3833         message.  Rename FFI_TYPE_SMALL_STRUCT1 as FFI_TYPE_SMALL_STRUCT3.
3834         Properly handle 5-7 byte structure returns.
3835         * src/pa/ffitarget.h (FFI_TYPE_SMALL_STRUCT1)
3836         (FFI_TYPE_SMALL_STRUCT2): Remove.
3837         (FFI_TYPE_SMALL_STRUCT3, FFI_TYPE_SMALL_STRUCT5)
3838         (FFI_TYPE_SMALL_STRUCT6, FFI_TYPE_SMALL_STRUCT7): Define.
3839         * src/pa/linux.S: Mark source file as using PA1.1 assembly.
3840         (checksmst1, checksmst2): Remove.
3841         (checksmst3): Optimize handling of 3-byte struct returns.
3842         (checksmst567): Properly handle 5-7 byte struct returns.
3843
3844 2005-06-15  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
3845
3846         PR libgcj/21943
3847         * src/mips/n32.S: Enforce PIC code.
3848         * src/mips/o32.S: Likewise.
3849
3850 2005-06-15  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
3851
3852         * configure.ac: Treat i*86-*-solaris2.10 and up as X86_64.
3853         * configure: Regenerate.
3854
3855 2005-06-01  Alan Modra  <amodra@bigpond.net.au>
3856
3857         * src/powerpc/ppc_closure.S (ffi_closure_SYSV): Don't use JUMPTARGET
3858         to call ffi_closure_helper_SYSV.  Append @local instead.
3859         * src/powerpc/sysv.S (ffi_call_SYSV): Likewise for ffi_prep_args_SYSV.
3860
3861 2005-05-17  Kelley Cook  <kcook@gcc.gnu.org>
3862
3863         * configure.ac: Use AC_C_BIGENDIAN instead of AC_C_BIGENDIAN_CROSS.
3864         Use AC_CHECK_SIZEOF instead of AC_COMPILE_CHECK_SIZEOF.
3865         * Makefile.am (ACLOCAL_AMFLAGS): Remove -I ../config.
3866         * aclocal.m4, configure, fficonfig.h.in, Makefile.in,
3867         include/Makefile.in, testsuite/Makefile.in: Regenerate.
3868
3869 2005-05-09  Mike Stump  <mrs@apple.com>
3870
3871         * configure: Regenerate.
3872
3873 2005-05-08  Richard Henderson  <rth@redhat.com>
3874
3875         PR libffi/21285
3876         * src/alpha/osf.S: Update unwind into to match code.
3877
3878 2005-05-04  Andreas Degert <ad@papyrus-gmbh.de>
3879             Richard Henderson  <rth@redhat.com>
3880
3881         * src/x86/ffi64.c (ffi_prep_cif_machdep): Save sse-used flag in
3882         bit 11 of flags.
3883         (ffi_call): Mask return type field.  Pass ssecount to ffi_call_unix64.
3884         (ffi_prep_closure): Set carry bit if sse-used flag set.
3885         * src/x86/unix64.S (ffi_call_unix64): Add ssecount argument.
3886         Only load sse registers if ssecount non-zero.
3887         (ffi_closure_unix64): Only save sse registers if carry set on entry.
3888
3889 2005-04-29  Ralf Corsepius  <ralf.corsepius@rtems.org>
3890
3891         * configure.ac: Add i*86-*-rtems*, sparc*-*-rtems*,
3892         powerpc-*rtems*, arm*-*-rtems*, sh-*-rtems*.
3893         * configure: Regenerate.
3894
3895 2005-04-20  Hans-Peter Nilsson  <hp@axis.com>
3896
3897         * testsuite/lib/libffi-dg.exp (libffi-dg-test-1): In regsub use,
3898         have Tcl8.3-compatible intermediate variable.
3899
3900 2005-04-18  Simon Posnjak <simon.posnjak@siol.net>
3901             Hans-Peter Nilsson  <hp@axis.com>
3902
3903         * Makefile.am: Add CRIS support.
3904         * configure.ac: Likewise.
3905         * Makefile.in, configure, testsuite/Makefile.in,
3906         include/Makefile.in: Regenerate.
3907         * src/cris: New directory.
3908         * src/cris/ffi.c, src/cris/sysv.S, src/cris/ffitarget.h: New files.
3909         * src/prep_cif.c (ffi_prep_cif): Wrap in #ifndef __CRIS__.
3910
3911         * testsuite/lib/libffi-dg.exp (libffi-dg-test-1): Replace \n with
3912         \r?\n in output tests.
3913
3914 2005-04-12  Mike Stump  <mrs@apple.com>
3915
3916         * configure: Regenerate.
3917
3918 2005-03-30  Hans Boehm  <Hans.Boehm@hp.com>
3919
3920         * src/ia64/ffitarget.h (ffi_arg): Use long long instead of DI.
3921
3922 2005-03-30  Steve Ellcey  <sje@cup.hp.com>
3923
3924         * src/ia64/ffitarget.h (ffi_arg) ADD DI attribute.
3925         (ffi_sarg) Ditto.
3926         * src/ia64/unix.S (ffi_closure_unix): Extend gp
3927         to 64 bits in ILP32 mode.
3928         Load 64 bits even for short data.
3929
3930 2005-03-23  Mike Stump  <mrs@apple.com>
3931
3932         * src/powerpc/darwin.S: Update for -m64 multilib.
3933         * src/powerpc/darwin_closure.S: Likewise.
3934
3935 2005-03-21  Zack Weinberg  <zack@codesourcery.com>
3936
3937         * configure.ac: Do not invoke TL_AC_GCC_VERSION.
3938         Do not set tool_include_dir.
3939         * aclocal.m4, configure, Makefile.in, testsuite/Makefile.in:
3940         Regenerate.
3941         * include/Makefile.am: Set gcc_version and toollibffidir.
3942         * include/Makefile.in: Regenerate.
3943
3944 2005-02-22  Andrew Haley  <aph@redhat.com>
3945
3946         * src/powerpc/ffi.c (ffi_prep_cif_machdep): Bump alignment to
3947         odd-numbered register pairs for 64-bit integer types.
3948
3949 2005-02-23  Andreas Tobler  <a.tobler@schweiz.ch>
3950
3951         PR libffi/20104
3952         * testsuite/libffi.call/return_ll1.c: New test case.
3953
3954 2005-02-11  Janis Johnson  <janis187@us.ibm.com>
3955
3956         * testsuite/libffi.call/cls_align_longdouble.c: Remove dg-options.
3957         * testsuite/libffi.call/float.c: Ditto.
3958         * testsuite/libffi.call/float2.c: Ditto.
3959         * testsuite/libffi.call/float3.c: Ditto.
3960
3961 2005-02-08  Andreas Tobler  <a.tobler@schweiz.ch>
3962
3963         * src/frv/ffitarget.h: Remove PPC stuff which does not belong to frv.
3964
3965 2005-01-12  Eric Botcazou  <ebotcazou@libertysurf.fr>
3966
3967         * testsuite/libffi.special/special.exp (cxx_options): Add
3968         -shared-libgcc.
3969
3970 2004-12-31  Richard Henderson  <rth@redhat.com>
3971
3972         * src/types.c (FFI_AGGREGATE_TYPEDEF): Remove.
3973         (FFI_TYPEDEF): Rename from FFI_INTEGRAL_TYPEDEF.  Replace size and
3974         offset parameters with a type parameter; deduce size and structure
3975         alignment.  Update all users.
3976
3977 2004-12-31  Richard Henderson  <rth@redhat.com>
3978
3979         * src/types.c (FFI_TYPE_POINTER): Define with sizeof.
3980         (FFI_TYPE_LONGDOUBLE): Fix for ia64.
3981         * src/ia64/ffitarget.h (struct ffi_ia64_trampoline_struct): Move
3982         into ffi_prep_closure.
3983         * src/ia64/ia64_flags.h, src/ia64/ffi.c, src/ia64/unix.S: Rewrite
3984         from scratch.
3985
3986 2004-12-27  Richard Henderson  <rth@redhat.com>
3987
3988         * src/x86/unix64.S: Fix typo in unwind info.
3989
3990 2004-12-25  Richard Henderson  <rth@redhat.com>
3991
3992         * src/x86/ffi64.c (struct register_args): Rename from stackLayout.
3993         (enum x86_64_reg_class): Add X86_64_COMPLEX_X87_CLASS.
3994         (merge_classes): Check for it.
3995         (SSE_CLASS_P): New.
3996         (classify_argument): Pass byte_offset by value; perform all updates
3997         inside struct case.
3998         (examine_argument): Add classes argument; handle
3999         X86_64_COMPLEX_X87_CLASS.
4000         (ffi_prep_args): Merge into ...
4001         (ffi_call): ... here.  Share stack frame with ffi_call_unix64.
4002         (ffi_prep_cif_machdep): Setup cif->flags for proper structure return.
4003         (ffi_fill_return_value): Remove.
4004         (ffi_prep_closure): Remove dead assert.
4005         (ffi_closure_unix64_inner): Rename from ffi_closure_UNIX64_inner.
4006         Rewrite to use struct register_args instead of va_list.  Create
4007         flags for handling structure returns.
4008         * src/x86/unix64.S: Remove dead strings.
4009         (ffi_call_unix64): Rename from ffi_call_UNIX64.  Rewrite to share
4010         stack frame with ffi_call.  Handle structure returns properly.
4011         (float2sse, floatfloat2sse, double2sse): Remove.
4012         (sse2float, sse2double, sse2floatfloat): Remove.
4013         (ffi_closure_unix64): Rename from ffi_closure_UNIX64.  Rewrite
4014         to handle structure returns properly.
4015
4016 2004-12-08  David Edelsohn  <edelsohn@gnu.org>
4017
4018         * Makefile.am (AM_MAKEFLAGS): Remove duplicate LIBCFLAGS and
4019         PICFLAG.
4020         * Makefile.in: Regenerated.
4021
4022 2004-12-02  Richard Sandiford  <rsandifo@redhat.com>
4023
4024         * configure.ac: Use TL_AC_GCC_VERSION to set gcc_version.
4025         * configure, aclocal.m4, Makefile.in: Regenerate.
4026         * include/Makefile.in, testsuite/Makefile.in: Regenerate.
4027
4028 2004-11-29  Kelley Cook  <kcook@gcc.gnu.org>
4029
4030         * configure: Regenerate for libtool change.
4031
4032 2004-11-25  Kelley Cook  <kcook@gcc.gnu.org>
4033
4034         * configure: Regenerate for libtool reversion.
4035
4036 2004-11-24  Kelley Cook  <kcook@gcc.gnu.org>
4037
4038         * configure: Regenerate for libtool change.
4039
4040 2004-11-23  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
4041
4042         * testsuite/lib/libffi-dg.exp: Use new procs in target-libpath.exp.
4043
4044 2004-11-23  Richard Sandiford  <rsandifo@redhat.com>
4045
4046         * src/mips/o32.S (ffi_call_O32, ffi_closure_O32): Use jalr instead
4047         of jal.  Use an absolute encoding for the frame information.
4048
4049 2004-11-23  Kelley Cook  <kcook@gcc.gnu.org>
4050
4051         * Makefile.am: Remove no-dependencies.  Add ACLOCAL_AMFLAGS.
4052         * acinclude.m4: Delete logic for sincludes.
4053         * aclocal.m4, Makefile.in, configure: Regenerate.
4054         * include/Makefile: Likewise.
4055         * testsuite/Makefile: Likewise.
4056
4057 2004-11-22  Eric Botcazou  <ebotcazou@libertysurf.fr>
4058
4059         * src/sparc/ffi.c (ffi_prep_closure): Align doubles and 64-bit integers
4060         on a 8-byte boundary.
4061         * src/sparc/v8.S (ffi_closure_v8): Reserve frame space for arguments.
4062
4063 2004-10-27  Richard Earnshaw  <rearnsha@arm.com>
4064
4065         * src/arm/ffi.c (ffi_prep_cif_machdep): Handle functions that return
4066         long long values.  Round stack allocation to a multiple of 8 bytes
4067         for ATPCS compatibility.
4068         * src/arm/sysv.S (ffi_call_SYSV): Rework to avoid use of APCS register
4069         names.  Handle returning long long types.  Add Thumb and interworking
4070         support.  Improve soft-float code.
4071
4072 2004-10-27  Richard Earnshaw  <rearnsha@arm.com>
4073
4074         * testsuite/lib/libffi-db.exp (load_gcc_lib): New function.
4075         (libffi_exit): New function.
4076         (libffi_init): Build the testglue wrapper if needed.
4077
4078 2004-10-25  Eric Botcazou  <ebotcazou@libertysurf.fr>
4079
4080         PR other/18138
4081         * testsuite/lib/libffi-dg.exp: Accept more than one multilib libgcc.
4082
4083 2004-10-25  Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
4084
4085         * src/m32r/libffitarget.h (FFI_CLOSURES): Set to 0.
4086
4087 2004-10-20  Kaz Kojima  <kkojima@gcc.gnu.org>
4088
4089         * src/sh/sysv.S (ffi_call_SYSV): Don't align for double data.
4090         * testsuite/libffi.call/float3.c: New test case.
4091
4092 2004-10-18  Kaz Kojima  <kkojima@gcc.gnu.org>
4093
4094         * src/sh/ffi.c (ffi_prep_closure): Set T bit in trampoline for
4095         the function returning a structure pointed with R2.
4096         * src/sh/sysv.S (ffi_closure_SYSV): Use R2 as the pointer to
4097         the structure return value if T bit set.  Emit position
4098         independent code and EH data if PIC.
4099
4100 2004-10-13  Kazuhiro Inaoka  <inaoka.kazuhiro@renesas.com>
4101
4102         * Makefile.am: Add m32r support.
4103         * configure.ac: Likewise.
4104         * Makefile.in: Regenerate.
4105         * confiugre: Regenerate.
4106         * src/types.c: Add m32r port to FFI_INTERNAL_TYPEDEF
4107         (uint64, sint64, double, longdouble)
4108         * src/m32r: New directory.
4109         * src/m32r/ffi.c: New file.
4110         * src/m32r/sysv.S: Likewise.
4111         * src/m32r/ffitarget.h: Likewise.
4112
4113 2004-10-02  Kaz Kojima  <kkojima@gcc.gnu.org>
4114
4115         * testsuite/libffi.call/negint.c: New test case.
4116
4117 2004-09-14  H.J. Lu  <hongjiu.lu@intel.com>
4118
4119         PR libgcj/17465
4120         * testsuite/lib/libffi-dg.exp: Don't use global ld_library_path.
4121         Set up LD_LIBRARY_PATH, SHLIB_PATH, LD_LIBRARYN32_PATH,
4122         LD_LIBRARY64_PATH, LD_LIBRARY_PATH_32, LD_LIBRARY_PATH_64 and
4123         DYLD_LIBRARY_PATH.
4124
4125 2004-09-05  Andreas Tobler  <a.tobler@schweiz.ch>
4126
4127         * testsuite/libffi.call/many_win32.c: Remove whitespaces.
4128         * testsuite/libffi.call/promotion.c: Likewise.
4129         * testsuite/libffi.call/return_ll.c: Remove unused var. Cleanup
4130         whitespaces.
4131         * testsuite/libffi.call/return_sc.c: Likewise.
4132         * testsuite/libffi.call/return_uc.c: Likewise.
4133
4134 2004-09-05  Andreas Tobler  <a.tobler@schweiz.ch>
4135
4136         * src/powerpc/darwin.S: Fix comments and identation.
4137         * src/powerpc/darwin_closure.S: Likewise.
4138
4139 2004-09-02  Andreas Tobler  <a.tobler@schweiz.ch>
4140
4141         * src/powerpc/ffi_darwin.c: Add flag for longdouble return values.
4142         (ffi_prep_args): Handle longdouble arguments.
4143         (ffi_prep_cif_machdep): Set flags for longdouble. Calculate space for
4144         longdouble.
4145         (ffi_closure_helper_DARWIN): Add closure handling for longdouble.
4146         * src/powerpc/darwin.S (_ffi_call_DARWIN): Add handling of longdouble
4147         values.
4148         * src/powerpc/darwin_closure.S (_ffi_closure_ASM): Likewise.
4149         * src/types.c: Defined longdouble size and alignment for darwin.
4150
4151 2004-09-02  Andreas Tobler  <a.tobler@schweiz.ch>
4152
4153         * src/powerpc/aix.S: Remove whitespaces.
4154         * src/powerpc/aix_closure.S: Likewise.
4155         * src/powerpc/asm.h: Likewise.
4156         * src/powerpc/ffi.c: Likewise.
4157         * src/powerpc/ffitarget.h: Likewise.
4158         * src/powerpc/linux64.S: Likewise.
4159         * src/powerpc/linux64_closure.S: Likewise.
4160         * src/powerpc/ppc_closure.S: Likewise.
4161         * src/powerpc/sysv.S: Likewise.
4162
4163 2004-08-30  Anthony Green  <green@redhat.com>
4164
4165         * Makefile.am: Add frv support.
4166         * Makefile.in, testsuite/Makefile.in: Rebuilt.
4167         * configure.ac: Read configure.host.
4168         * configure.in: Read configure.host.
4169         * configure.host: New file.  frv-elf needs libgloss.
4170         * include/ffi.h.in: Force ffi_closure to have a nice big (8)
4171         alignment.  This is needed to frv and shouldn't harm the others.
4172         * include/ffi_common.h (ALIGN_DOWN): New macro.
4173         * src/frv/ffi.c, src/frv/ffitarget.h, src/frv/eabi.S: New files.
4174
4175 2004-08-24  David Daney  <daney@avtrex.com>
4176
4177         * testsuite/libffi.call/closure_fn0.c: Xfail mips64* instead of mips*.
4178         * testsuite/libffi.call/closure_fn1.c: Likewise.
4179         * testsuite/libffi.call/closure_fn2.c  Likewise.
4180         * testsuite/libffi.call/closure_fn3.c: Likewise.
4181         * testsuite/libffi.call/closure_fn4.c: Likewise.
4182         * testsuite/libffi.call/closure_fn5.c: Likewise.
4183         * testsuite/libffi.call/cls_18byte.c: Likewise.
4184         * testsuite/libffi.call/cls_19byte.c: Likewise.
4185         * testsuite/libffi.call/cls_1_1byte.c: Likewise.
4186         * testsuite/libffi.call/cls_20byte.c: Likewise.
4187         * testsuite/libffi.call/cls_20byte1.c: Likewise.
4188         * testsuite/libffi.call/cls_24byte.c: Likewise.
4189         * testsuite/libffi.call/cls_2byte.c: Likewise.
4190         * testsuite/libffi.call/cls_3_1byte.c: Likewise.
4191         * testsuite/libffi.call/cls_3byte1.c: Likewise.
4192         * testsuite/libffi.call/cls_3byte2.c: Likewise.
4193         * testsuite/libffi.call/cls_4_1byte.c: Likewise.
4194         * testsuite/libffi.call/cls_4byte.c: Likewise.
4195         * testsuite/libffi.call/cls_64byte.c: Likewise.
4196         * testsuite/libffi.call/cls_6byte.c: Likewise.
4197         * testsuite/libffi.call/cls_7byte.c: Likewise.
4198         * testsuite/libffi.call/cls_8byte.c: Likewise.
4199         * testsuite/libffi.call/cls_9byte1.c: Likewise.
4200         * testsuite/libffi.call/cls_9byte2.c: Likewise.
4201         * testsuite/libffi.call/cls_align_double.c: Likewise.
4202         * testsuite/libffi.call/cls_align_float.c: Likewise.
4203         * testsuite/libffi.call/cls_align_longdouble.c: Likewise.
4204         * testsuite/libffi.call/cls_align_pointer.c: Likewise.
4205         * testsuite/libffi.call/cls_align_sint16.c: Likewise.
4206         * testsuite/libffi.call/cls_align_sint32.c: Likewise.
4207         * testsuite/libffi.call/cls_align_sint64.c: Likewise.
4208         * testsuite/libffi.call/cls_align_uint16.c: Likewise.
4209         * testsuite/libffi.call/cls_align_uint32.c: Likewise.
4210         * testsuite/libffi.call/cls_align_uint64.c: Likewise.
4211         * testsuite/libffi.call/cls_double.c: Likewise.
4212         * testsuite/libffi.call/cls_float.c: Likewise.
4213         * testsuite/libffi.call/cls_multi_schar.c: Likewise.
4214         * testsuite/libffi.call/cls_multi_sshort.c: Likewise.
4215         * testsuite/libffi.call/cls_multi_sshortchar.c: Likewise.
4216         * testsuite/libffi.call/cls_multi_uchar.c: Likewise.
4217         * testsuite/libffi.call/cls_multi_ushort.c: Likewise.
4218         * testsuite/libffi.call/cls_multi_ushortchar.c: Likewise.
4219         * testsuite/libffi.call/cls_schar.c: Likewise.
4220         * testsuite/libffi.call/cls_sint.c: Likewise.
4221         * testsuite/libffi.call/cls_sshort.c: Likewise.
4222         * testsuite/libffi.call/cls_uchar.c: Likewise.
4223         * testsuite/libffi.call/cls_uint.c: Likewise.
4224         * testsuite/libffi.call/cls_ulonglong.c: Likewise.
4225         * testsuite/libffi.call/cls_ushort.c: Likewise.
4226         * testsuite/libffi.call/nested_struct.c: Likewise.
4227         * testsuite/libffi.call/nested_struct1.c: Likewise.
4228         * testsuite/libffi.call/nested_struct2.c: Likewise.
4229         * testsuite/libffi.call/nested_struct3.c: Likewise.
4230         * testsuite/libffi.call/problem1.c: Likewise.
4231         * testsuite/libffi.special/unwindtest.cc: Likewise.
4232         * testsuite/libffi.call/cls_12byte.c: Likewise and set return value
4233         to zero.
4234         * testsuite/libffi.call/cls_16byte.c: Likewise.
4235         * testsuite/libffi.call/cls_5byte.c: Likewise.
4236
4237 2004-08-23  David Daney <daney@avtrex.com>
4238
4239         PR libgcj/13141
4240         * src/mips/ffitarget.h (FFI_O32_SOFT_FLOAT): New ABI.
4241         * src/mips/ffi.c (ffi_prep_args): Fix alignment calculation.
4242         (ffi_prep_cif_machdep): Handle FFI_O32_SOFT_FLOAT floating point
4243         parameters and return types.
4244         (ffi_call): Handle FFI_O32_SOFT_FLOAT ABI.
4245         (ffi_prep_closure): Ditto.
4246         (ffi_closure_mips_inner_O32): Handle FFI_O32_SOFT_FLOAT ABI, fix
4247         alignment calculations.
4248         * src/mips/o32.S (ffi_closure_O32): Don't use floating point
4249         instructions if FFI_O32_SOFT_FLOAT, make stack frame ABI compliant.
4250
4251 2004-08-14  Casey Marshall <csm@gnu.org>
4252
4253         * src/mips/ffi.c (ffi_pref_cif_machdep): set `cif->flags' to
4254         contain `FFI_TYPE_UINT64' as return type for any 64-bit
4255         integer (O32 ABI only).
4256         (ffi_prep_closure): new function.
4257         (ffi_closure_mips_inner_O32): new function.
4258         * src/mips/ffitarget.h: Define `FFI_CLOSURES' and
4259         `FFI_TRAMPOLINE_SIZE' appropriately if the ABI is o32.
4260         * src/mips/o32.S (ffi_call_O32): add labels for .eh_frame. Return
4261         64 bit integers correctly.
4262         (ffi_closure_O32): new function.
4263         Added DWARF-2 unwind info for both functions.
4264
4265 2004-08-10  Andrew Haley  <aph@redhat.com>
4266
4267         * src/x86/ffi64.c (ffi_prep_args ): 8-align all stack arguments.
4268
4269 2004-08-01  Robert Millan  <robertmh@gnu.org>
4270
4271         * configure.ac: Detect knetbsd-gnu and kfreebsd-gnu.
4272         * configure: Regenerate.
4273
4274 2004-07-30  Maciej W. Rozycki  <macro@linux-mips.org>
4275
4276         * acinclude.m4 (AC_FUNC_MMAP_BLACKLIST): Check for <sys/mman.h>
4277         and mmap() explicitly instead of relying on preset autoconf cache
4278         variables.
4279         * aclocal.m4: Regenerate.
4280         * configure: Regenerate.
4281
4282 2004-07-11  Ulrich Weigand  <uweigand@de.ibm.com>
4283
4284         * src/s390/ffi.c (ffi_prep_args): Fix C aliasing violation.
4285         (ffi_check_float_struct): Remove unused prototype.
4286
4287 2004-06-30  Geoffrey Keating  <geoffk@apple.com>
4288
4289         * src/powerpc/ffi_darwin.c (flush_icache): ';' is a comment
4290         character on Darwin, use '\n\t' instead.
4291
4292 2004-06-26  Matthias Klose  <doko@debian.org>
4293
4294         * libtool-version: Fix typo in revision/age.
4295
4296 2004-06-17  Matthias Klose  <doko@debian.org>
4297
4298         * libtool-version: New.
4299         * Makefile.am (libffi_la_LDFLAGS): Use -version-info for soname.
4300         * Makefile.in: Regenerate.
4301
4302 2004-06-15  Paolo Bonzini  <bonzini@gnu.org>
4303
4304         * Makefile.am: Remove useless multilib rules.
4305         * Makefile.in: Regenerate.
4306         * aclocal.m4: Regenerate with automake 1.8.5.
4307         * configure.ac: Remove useless multilib configury.
4308         * configure: Regenerate.
4309
4310 2004-06-15  Paolo Bonzini  <bonzini@gnu.org>
4311
4312         * .cvsignore: New file.
4313
4314 2004-06-10  Jakub Jelinek  <jakub@redhat.com>
4315
4316         * src/ia64/unix.S (ffi_call_unix): Insert group barrier break
4317         fp_done.
4318         (ffi_closure_UNIX): Fix f14/f15 adjustment if FLOAT_SZ is ever
4319         changed from 8.
4320
4321 2004-06-06  Sean McNeil  <sean@mcneil.com>
4322
4323         * configure.ac: Add x86_64-*-freebsd* support.
4324         * configure: Regenerate.
4325
4326 2004-04-26  Joe Buck <jbuck@welsh-buck.org>
4327
4328         Bug 15093
4329         * configure.ac: Test for existence of mmap and sys/mman.h before
4330         checking blacklist.  Fix suggested by Jim Wilson.
4331         * configure: Regenerate.
4332
4333 2004-04-26  Matt Austern  <austern@apple.com>
4334
4335         * src/powerpc/darwin.S: Go through a non-lazy pointer for initial
4336         FDE location.
4337         * src/powerpc/darwin_closure.S: Likewise.
4338
4339 2004-04-24  Andreas Tobler  <a.tobler@schweiz.ch>
4340
4341         * testsuite/libffi.call/cls_multi_schar.c (main): Fix initialization
4342         error. Reported by Thomas Heller <theller@python.net>.
4343         * testsuite/libffi.call/cls_multi_sshort.c (main): Likewise.
4344         * testsuite/libffi.call/cls_multi_ushort.c (main): Likewise.
4345
4346 2004-03-20  Matthias Klose  <doko@debian.org>
4347
4348         * src/pa/linux.S: Fix typo.
4349
4350 2004-03-19  Matthias Klose  <doko@debian.org>
4351
4352         * Makefile.am: Update.
4353         * Makefile.in: Regenerate.
4354         * src/pa/ffi.h.in: Remove.
4355         * src/pa/ffitarget.h: New file.
4356
4357 2004-02-10  Randolph Chung  <tausq@debian.org>
4358
4359         * Makefile.am: Add PA support.
4360         * Makefile.in: Regenerate.
4361         * include/Makefile.in: Regenerate.
4362         * configure.ac: Add PA target.
4363         * configure: Regenerate.
4364         * src/pa/ffi.c: New file.
4365         * src/pa/ffi.h.in: Add PA support.
4366         * src/pa/linux.S: New file.
4367         * prep_cif.c: Add PA support.
4368
4369 2004-03-16  Hosaka Yuji  <hos@tamanegi.org>
4370
4371         * src/types.c: Fix alignment size of X86_WIN32 case int64 and
4372         double.
4373         * src/x86/ffi.c (ffi_prep_args): Replace ecif->cif->rtype->type
4374         with ecif->cif->flags.
4375         (ffi_call, ffi_prep_incoming_args_SYSV): Replace cif->rtype->type
4376         with cif->flags.
4377         (ffi_prep_cif_machdep): Add X86_WIN32 struct case.
4378         (ffi_closure_SYSV): Add 1 or 2-bytes struct case for X86_WIN32.
4379         * src/x86/win32.S (retstruct1b, retstruct2b, sc_retstruct1b,
4380         sc_retstruct2b): Add for 1 or 2-bytes struct case.
4381
4382 2004-03-15 Kelley Cook <kcook@gcc.gnu.org>
4383
4384         * configure.in: Rename file to ...
4385         * configure.ac: ... this.
4386         * fficonfig.h.in: Regenerate.
4387         * Makefile.in: Regenerate.
4388         * include/Makefile.in: Regenerate.
4389         * testsuite/Makefile.in: Regenerate.
4390
4391 2004-03-12  Matt Austern  <austern@apple.com>
4392
4393         * src/powerpc/darwin.S: Fix EH information so it corresponds to
4394         changes in EH format resulting from addition of linkonce support.
4395         * src/powerpc/darwin_closure.S: Likewise.
4396
4397 2004-03-11  Andreas Tobler  <a.tobler@schweiz.ch>
4398             Paolo Bonzini  <bonzini@gnu.org>
4399
4400         * Makefile.am (AUTOMAKE_OPTIONS): Set them.
4401         Remove VPATH. Remove rules for object files. Remove multilib support.
4402         (AM_CCASFLAGS): Add.
4403         * configure.in (AC_CONFIG_HEADERS): Relace AM_CONFIG_HEADER.
4404         (AC_PREREQ): Bump version to 2.59.
4405         (AC_INIT): Fill with version info and bug address.
4406         (ORIGINAL_LD_FOR_MULTILIBS): Remove.
4407         (AM_ENABLE_MULTILIB): Use this instead of AC_ARG_ENABLE.
4408         De-precious CC so that the right flags are passed down to multilibs.
4409         (AC_MSG_ERROR): Replace obsolete macro AC_ERROR.
4410         (AC_CONFIG_FILES): Replace obsolete macro AC_LINK_FILES.
4411         (AC_OUTPUT): Reorganize the output with AC_CONFIG_COMMANDS.
4412         * configure: Rebuilt.
4413         * aclocal.m4: Likewise.
4414         * Makefile.in, include/Makefile.in, testsuite/Makefile.in: Likewise.
4415         * fficonfig.h.in: Likewise.
4416
4417 2004-03-11  Andreas Schwab  <schwab@suse.de>
4418
4419         * src/ia64/ffi.c (ffi_prep_incoming_args_UNIX): Get floating point
4420         arguments from fp registers only for the first 8 parameter slots.
4421         Don't convert a float parameter when passed in memory.
4422
4423 2004-03-09  Hans-Peter Nilsson  <hp@axis.com>
4424
4425         * configure: Regenerate for config/accross.m4 correction.
4426
4427 2004-02-25  Matt Kraai  <kraai@alumni.cmu.edu>
4428
4429         * src/powerpc/ffi.c (ffi_prep_args_SYSV): Change
4430         ecif->cif->bytes to bytes.
4431         (ffi_prep_cif_machdep): Add braces around nested if statement.
4432
4433 2004-02-09  Alan Modra  <amodra@bigpond.net.au>
4434
4435         * src/types.c (pointer): POWERPC64 has 8 byte pointers.
4436
4437         * src/powerpc/ffi.c (ffi_prep_args64): Correct long double handling.
4438         (ffi_closure_helper_LINUX64): Fix typo.
4439         * testsuite/libffi.call/cls_align_longdouble.c: Pass -mlong-double-128
4440         for powerpc64-*-*.
4441         * testsuite/libffi.call/float.c: Likewise.
4442         * testsuite/libffi.call/float2.c: Likewise.
4443
4444 2004-02-08  Alan Modra  <amodra@bigpond.net.au>
4445
4446         * src/powerpc/ffi.c (ffi_prep_cif_machdep <FFI_LINUX64>): Correct
4447         long double function return and long double arg handling.
4448         (ffi_closure_helper_LINUX64): Formatting.  Delete unused "ng" var.
4449         Use "end_pfr" instead of "nf".  Correct long double handling.
4450         Localise "temp".
4451         * src/powerpc/linux64.S (ffi_call_LINUX64): Save f2 long double
4452         return value.
4453         * src/powerpc/linux64_closure.S (ffi_closure_LINUX64): Allocate
4454         space for long double return value.  Adjust stack frame and offsets.
4455         Load f2 long double return.
4456
4457 2004-02-07  Alan Modra  <amodra@bigpond.net.au>
4458
4459         * src/types.c: Use 16 byte long double for POWERPC64.
4460
4461 2004-01-25  Eric Botcazou  <ebotcazou@libertysurf.fr>
4462
4463         * src/sparc/ffi.c (ffi_prep_args_v9): Shift the parameter array
4464         when the structure return address is passed in %o0.
4465         (ffi_V9_return_struct): Rename into ffi_v9_layout_struct.
4466         (ffi_v9_layout_struct): Align the field following a nested structure
4467         on a word boundary.  Use memmove instead of memcpy.
4468         (ffi_call): Update call to ffi_V9_return_struct.
4469         (ffi_prep_closure): Define 'ctx' only for V8.
4470         (ffi_closure_sparc_inner): Clone into ffi_closure_sparc_inner_v8
4471         and ffi_closure_sparc_inner_v9.
4472         (ffi_closure_sparc_inner_v8): Return long doubles by reference.
4473         Always skip the structure return address.  For structures and long
4474         doubles, copy the argument directly.
4475         (ffi_closure_sparc_inner_v9): Skip the structure return address only
4476         if required.  Shift the maximum floating-point slot accordingly.  For
4477         big structures, copy the argument directly; otherwise, left-justify the
4478         argument and call ffi_v9_layout_struct to lay out the structure on
4479         the stack.
4480         * src/sparc/v8.S: Undef STACKFRAME before defining it.
4481         (ffi_closure_v8): Pass the structure return address.  Update call to
4482         ffi_closure_sparc_inner_v8.  Short-circuit FFI_TYPE_INT handling.
4483         Skip the 'unimp' insn when returning long doubles and structures.
4484         * src/sparc/v9.S: Undef STACKFRAME before defining it.
4485         (ffi_closure_v9): Increase the frame size by 2 words.  Short-circuit
4486         FFI_TYPE_INT handling.  Load structures both in integers and
4487         floating-point registers on return.
4488         * README: Update status of the SPARC port.
4489
4490 2004-01-24  Andreas Tobler  <a.tobler@schweiz.ch>
4491
4492         * testsuite/libffi.call/pyobjc-tc.c (main): Treat result value
4493         as of type ffi_arg.
4494         * testsuite/libffi.call/struct3.c (main): Fix CHECK.
4495
4496 2004-01-22  Ulrich Weigand  <uweigand@de.ibm.com>
4497
4498         * testsuite/libffi.call/cls_uint.c (cls_ret_uint_fn): Treat result
4499         value as of type ffi_arg, not unsigned int.
4500
4501 2004-01-21  Michael Ritzert  <ritzert@t-online.de>
4502
4503         * ffi64.c (ffi_prep_args): Cast the RHS of an assignment instead
4504         of the LHS.
4505
4506 2004-01-12  Andreas Tobler  <a.tobler@schweiz.ch>
4507
4508         * testsuite/lib/libffi-dg.exp: Set LD_LIBRARY_PATH_32 for
4509         Solaris.
4510
4511 2004-01-08  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
4512
4513         * testsuite/libffi.call/ffitest.h (allocate_mmap): Cast MAP_FAILED
4514         to void *.
4515
4516 2003-12-10  Richard Henderson  <rth@redhat.com>
4517
4518         * testsuite/libffi.call/cls_align_pointer.c: Cast pointers to
4519         size_t instead of int.
4520
4521 2003-12-04  Hosaka Yuji  <hos@tamanegi.org>
4522
4523         * testsuite/libffi.call/many_win32.c: Include <float.h>.
4524         * testsuite/libffi.call/many_win32.c (main): Replace variable
4525         int i with unsigned long ul.
4526
4527         * testsuite/libffi.call/cls_align_uint64.c: New test case.
4528         * testsuite/libffi.call/cls_align_sint64.c: Likewise.
4529         * testsuite/libffi.call/cls_align_uint32.c: Likewise.
4530         * testsuite/libffi.call/cls_align_sint32.c: Likewise.
4531         * testsuite/libffi.call/cls_align_uint16.c: Likewise.
4532         * testsuite/libffi.call/cls_align_sint16.c: Likewise.
4533         * testsuite/libffi.call/cls_align_float.c: Likewise.
4534         * testsuite/libffi.call/cls_align_double.c: Likewise.
4535         * testsuite/libffi.call/cls_align_longdouble.c: Likewise.
4536         * testsuite/libffi.call/cls_align_pointer.c: Likewise.
4537
4538 2003-12-02  Hosaka Yuji  <hos@tamanegi.org>
4539
4540         PR other/13221
4541         * src/x86/ffi.c (ffi_prep_args, ffi_prep_incoming_args_SYSV):
4542         Align arguments to 32 bits.
4543
4544 2003-12-01  Andreas Tobler  <a.tobler@schweiz.ch>
4545
4546         PR other/13221
4547         * testsuite/libffi.call/cls_multi_sshort.c: New test case.
4548         * testsuite/libffi.call/cls_multi_sshortchar.c: Likewise.
4549         * testsuite/libffi.call/cls_multi_uchar.c: Likewise.
4550         * testsuite/libffi.call/cls_multi_schar.c: Likewise.
4551         * testsuite/libffi.call/cls_multi_ushortchar.c: Likewise.
4552         * testsuite/libffi.call/cls_multi_ushort.c: Likewise.
4553
4554         * testsuite/libffi.special/unwindtest.cc: Cosmetics.
4555
4556 2003-11-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4557
4558         * testsuite/libffi.call/ffitest.h: Include <fcntl.h>.
4559         * testsuite/libffi.special/ffitestcxx.h: Likewise.
4560
4561 2003-11-22  Andreas Tobler  <a.tobler@schweiz.ch>
4562
4563         * Makefile.in: Rebuilt.
4564         * configure: Likewise.
4565         * testsuite/libffi.special/unwindtest.cc: Convert the mmap to
4566         the right type.
4567
4568 2003-11-21  Andreas Jaeger  <aj@suse.de>
4569             Andreas Tobler  <a.tobler@schweiz.ch>
4570
4571         * acinclude.m4: Add AC_FUNC_MMAP_BLACKLIST.
4572         * configure.in: Call AC_FUNC_MMAP_BLACKLIST.
4573         * Makefile.in: Rebuilt.
4574         * aclocal.m4: Likewise.
4575         * configure: Likewise.
4576         * fficonfig.h.in: Likewise.
4577         * testsuite/lib/libffi-dg.exp: Add include dir.
4578         * testsuite/libffi.call/ffitest.h: Add MMAP definitions.
4579         * testsuite/libffi.special/ffitestcxx.h: Likewise.
4580         * testsuite/libffi.call/closure_fn0.c: Use MMAP functionality
4581         for ffi_closure if available.
4582         * testsuite/libffi.call/closure_fn1.c: Likewise.
4583         * testsuite/libffi.call/closure_fn2.c: Likewise.
4584         * testsuite/libffi.call/closure_fn3.c: Likewise.
4585         * testsuite/libffi.call/closure_fn4.c: Likewise.
4586         * testsuite/libffi.call/closure_fn5.c: Likewise.
4587         * testsuite/libffi.call/cls_12byte.c: Likewise.
4588         * testsuite/libffi.call/cls_16byte.c: Likewise.
4589         * testsuite/libffi.call/cls_18byte.c: Likewise.
4590         * testsuite/libffi.call/cls_19byte.c: Likewise.
4591         * testsuite/libffi.call/cls_1_1byte.c: Likewise.
4592         * testsuite/libffi.call/cls_20byte.c: Likewise.
4593         * testsuite/libffi.call/cls_20byte1.c: Likewise.
4594         * testsuite/libffi.call/cls_24byte.c: Likewise.
4595         * testsuite/libffi.call/cls_2byte.c: Likewise.
4596         * testsuite/libffi.call/cls_3_1byte.c: Likewise.
4597         * testsuite/libffi.call/cls_3byte1.c: Likewise.
4598         * testsuite/libffi.call/cls_3byte2.c: Likewise.
4599         * testsuite/libffi.call/cls_4_1byte.c: Likewise.
4600         * testsuite/libffi.call/cls_4byte.c: Likewise.
4601         * testsuite/libffi.call/cls_5byte.c: Likewise.
4602         * testsuite/libffi.call/cls_64byte.c: Likewise.
4603         * testsuite/libffi.call/cls_6byte.c: Likewise.
4604         * testsuite/libffi.call/cls_7byte.c: Likewise.
4605         * testsuite/libffi.call/cls_8byte.c: Likewise.
4606         * testsuite/libffi.call/cls_9byte1.c: Likewise.
4607         * testsuite/libffi.call/cls_9byte2.c: Likewise.
4608         * testsuite/libffi.call/cls_double.c: Likewise.
4609         * testsuite/libffi.call/cls_float.c: Likewise.
4610         * testsuite/libffi.call/cls_schar.c: Likewise.
4611         * testsuite/libffi.call/cls_sint.c: Likewise.
4612         * testsuite/libffi.call/cls_sshort.c: Likewise.
4613         * testsuite/libffi.call/cls_uchar.c: Likewise.
4614         * testsuite/libffi.call/cls_uint.c: Likewise.
4615         * testsuite/libffi.call/cls_ulonglong.c: Likewise.
4616         * testsuite/libffi.call/cls_ushort.c: Likewise.
4617         * testsuite/libffi.call/nested_struct.c: Likewise.
4618         * testsuite/libffi.call/nested_struct1.c: Likewise.
4619         * testsuite/libffi.call/nested_struct2.c: Likewise.
4620         * testsuite/libffi.call/nested_struct3.c: Likewise.
4621         * testsuite/libffi.call/problem1.c: Likewise.
4622         * testsuite/libffi.special/unwindtest.cc: Likewise.
4623
4624 2003-11-20  Andreas Tobler  <a.tobler@schweiz.ch>
4625
4626         * testsuite/lib/libffi-dg.exp: Make the -lgcc_s conditional.
4627
4628 2003-11-19  Andreas Tobler  <a.tobler@schweiz.ch>
4629
4630         * testsuite/lib/libffi-dg.exp: Add DYLD_LIBRARY_PATH for darwin.
4631         Add -lgcc_s to additional flags.
4632
4633 2003-11-12  Andreas Tobler  <a.tobler@schweiz.ch>
4634
4635         * configure.in, include/Makefile.am: PR libgcj/11147, install
4636         the ffitarget.h header file in a gcc versioned and target
4637         dependent place.
4638         * configure: Regenerated.
4639         * Makefile.in, include/Makefile.in: Likewise.
4640         * testsuite/Makefile.in: Likewise.
4641
4642 2003-11-09  Andreas Tobler  <a.tobler@schweiz.ch>
4643
4644         * testsuite/libffi.call/closure_fn0.c: Print result and check
4645         with dg-output to make debugging easier.
4646         * testsuite/libffi.call/closure_fn1.c: Likewise.
4647         * testsuite/libffi.call/closure_fn2.c: Likewise.
4648         * testsuite/libffi.call/closure_fn3.c: Likewise.
4649         * testsuite/libffi.call/closure_fn4.c: Likewise.
4650         * testsuite/libffi.call/closure_fn5.c: Likewise.
4651         * testsuite/libffi.call/cls_12byte.c: Likewise.
4652         * testsuite/libffi.call/cls_16byte.c: Likewise.
4653         * testsuite/libffi.call/cls_18byte.c: Likewise.
4654         * testsuite/libffi.call/cls_19byte.c: Likewise.
4655         * testsuite/libffi.call/cls_1_1byte.c: Likewise.
4656         * testsuite/libffi.call/cls_20byte.c: Likewise.
4657         * testsuite/libffi.call/cls_20byte1.c: Likewise.
4658         * testsuite/libffi.call/cls_24byte.c: Likewise.
4659         * testsuite/libffi.call/cls_2byte.c: Likewise.
4660         * testsuite/libffi.call/cls_3_1byte.c: Likewise.
4661         * testsuite/libffi.call/cls_3byte1.c: Likewise.
4662         * testsuite/libffi.call/cls_3byte2.c: Likewise.
4663         * testsuite/libffi.call/cls_4_1byte.c: Likewise.
4664         * testsuite/libffi.call/cls_4byte.c: Likewise.
4665         * testsuite/libffi.call/cls_5byte.c: Likewise.
4666         * testsuite/libffi.call/cls_64byte.c: Likewise.
4667         * testsuite/libffi.call/cls_6byte.c: Likewise.
4668         * testsuite/libffi.call/cls_7byte.c: Likewise.
4669         * testsuite/libffi.call/cls_8byte.c: Likewise.
4670         * testsuite/libffi.call/cls_9byte1.c: Likewise.
4671         * testsuite/libffi.call/cls_9byte2.c: Likewise.
4672         * testsuite/libffi.call/cls_double.c: Likewise.
4673         * testsuite/libffi.call/cls_float.c: Likewise.
4674         * testsuite/libffi.call/cls_schar.c: Likewise.
4675         * testsuite/libffi.call/cls_sint.c: Likewise.
4676         * testsuite/libffi.call/cls_sshort.c: Likewise.
4677         * testsuite/libffi.call/cls_uchar.c: Likewise.
4678         * testsuite/libffi.call/cls_uint.c: Likewise.
4679         * testsuite/libffi.call/cls_ulonglong.c: Likewise.
4680         * testsuite/libffi.call/cls_ushort.c: Likewise.
4681         * testsuite/libffi.call/problem1.c: Likewise.
4682
4683         * testsuite/libffi.special/unwindtest.cc: Make ffi_closure
4684         static.
4685
4686 2003-11-08  Andreas Tobler  <a.tobler@schweiz.ch>
4687
4688         * testsuite/libffi.call/cls_9byte2.c: New test case.
4689         * testsuite/libffi.call/cls_9byte1.c: Likewise.
4690         * testsuite/libffi.call/cls_64byte.c: Likewise.
4691         * testsuite/libffi.call/cls_20byte1.c: Likewise.
4692         * testsuite/libffi.call/cls_19byte.c: Likewise.
4693         * testsuite/libffi.call/cls_18byte.c: Likewise.
4694         * testsuite/libffi.call/closure_fn4.c: Likewise.
4695         * testsuite/libffi.call/closure_fn5.c: Likewise.
4696         * testsuite/libffi.call/cls_schar.c: Likewise.
4697         * testsuite/libffi.call/cls_sint.c: Likewise.
4698         * testsuite/libffi.call/cls_sshort.c: Likewise.
4699         * testsuite/libffi.call/nested_struct2.c: Likewise.
4700         * testsuite/libffi.call/nested_struct3.c: Likewise.
4701
4702 2003-11-08  Andreas Tobler  <a.tobler@schweiz.ch>
4703
4704         * testsuite/libffi.call/cls_double.c: Do a check on the result.
4705         * testsuite/libffi.call/cls_uchar.c: Likewise.
4706         * testsuite/libffi.call/cls_uint.c: Likewise.
4707         * testsuite/libffi.call/cls_ulonglong.c: Likewise.
4708         * testsuite/libffi.call/cls_ushort.c: Likewise.
4709         * testsuite/libffi.call/return_sc.c: Cleanup whitespaces.
4710
4711 2003-11-06  Andreas Tobler  <a.tobler@schweiz.ch>
4712
4713         * src/prep_cif.c (ffi_prep_cif): Move the validity check after
4714         the initialization.
4715
4716 2003-10-23  Andreas Tobler  <a.tobler@schweiz.ch>
4717
4718         * src/java_raw_api.c (ffi_java_ptrarray_to_raw): Replace
4719         FFI_ASSERT(FALSE) with FFI_ASSERT(0).
4720
4721 2003-10-22  David Daney  <ddaney@avtrex.com>
4722
4723         * src/mips/ffitarget.h: Replace undefined UINT32 and friends with
4724         __attribute__((__mode__(__SI__))) and friends.
4725
4726 2003-10-22  Andreas Schwab  <schwab@suse.de>
4727
4728         * src/ia64/ffi.c: Replace FALSE/TRUE with false/true.
4729
4730 2003-10-21  Andreas Tobler  <a.tobler@schweiz.ch>
4731
4732         * configure.in: AC_LINK_FILES(ffitarget.h).
4733         * configure: Regenerate.
4734         * Makefile.in: Likewise.
4735         * include/Makefile.in: Likewise.
4736         * testsuite/Makefile.in: Likewise.
4737         * fficonfig.h.in: Likewise.
4738
4739 2003-10-21  Paolo Bonzini  <bonzini@gnu.org>
4740             Richard Henderson  <rth@redhat.com>
4741
4742         Avoid that ffi.h includes fficonfig.h.
4743
4744         * Makefile.am (EXTRA_DIST): Include ffitarget.h files
4745         (TARGET_SRC_MIPS_GCC): Renamed to TARGET_SRC_MIPS_IRIX.
4746         (TARGET_SRC_MIPS_SGI): Removed.
4747         (MIPS_GCC): Renamed to TARGET_SRC_MIPS_IRIX.
4748         (MIPS_SGI): Removed.
4749         (CLEANFILES): Removed.
4750         (mostlyclean-am, clean-am, mostlyclean-sub, clean-sub): New
4751         targets.
4752         * acconfig.h: Removed.
4753         * configure.in: Compute sizeofs only for double and long double.
4754         Use them to define and subst HAVE_LONG_DOUBLE.  Include comments
4755         into AC_DEFINE instead of using acconfig.h.  Create
4756         include/ffitarget.h instead of include/fficonfig.h.  Rename
4757         MIPS_GCC to MIPS_IRIX, drop MIPS_SGI since we are in gcc's tree.
4758         AC_DEFINE EH_FRAME_FLAGS.
4759         * include/Makefile.am (DISTCLEANFILES): New automake macro.
4760         (hack_DATA): Add ffitarget.h.
4761         * include/ffi.h.in: Remove all system specific definitions.
4762         Declare raw API even if it is not installed, why bother?
4763         Use limits.h instead of SIZEOF_* to define ffi_type_*.  Do
4764         not define EH_FRAME_FLAGS, it is in fficonfig.h now.  Include
4765         ffitarget.h instead of fficonfig.h.  Remove ALIGN macro.
4766         (UINT_ARG, INT_ARG): Removed, use ffi_arg and ffi_sarg instead.
4767         * include/ffi_common.h (bool): Do not define.
4768         (ffi_assert): Accept failed assertion.
4769         (ffi_type_test): Return void and accept file/line.
4770         (FFI_ASSERT): Pass stringized failed assertion.
4771         (FFI_ASSERT_AT): New macro.
4772         (FFI_ASSERT_VALID_TYPE): New macro.
4773         (UINT8, SINT8, UINT16, SINT16, UINT32, SINT32,
4774         UINT64, SINT64): Define here with gcc's __attribute__ macro
4775         instead of in ffi.h
4776         (FLOAT32, ALIGN): Define here instead of in ffi.h
4777         * include/ffi-mips.h: Removed.  Its content moved to
4778         src/mips/ffitarget.h after separating assembly and C sections.
4779         * src/alpha/ffi.c, src/alpha/ffi.c, src/java_raw_api.c
4780         src/prep_cif.c, src/raw_api.c, src/ia64/ffi.c,
4781         src/mips/ffi.c, src/mips/n32.S, src/mips/o32.S,
4782         src/mips/ffitarget.h, src/sparc/ffi.c, src/x86/ffi64.c:
4783         SIZEOF_ARG -> FFI_SIZEOF_ARG.
4784         * src/ia64/ffi.c: Include stdbool.h (provided by GCC 2.95+).
4785         * src/debug.c (ffi_assert): Accept stringized failed assertion.
4786         (ffi_type_test): Rewritten.
4787         * src/prep-cif.c (initialize_aggregate, ffi_prep_cif): Call
4788         FFI_ASSERT_VALID_TYPE.
4789         * src/alpha/ffitarget.h, src/arm/ffitarget.h,
4790         src/ia64/ffitarget.h, src/m68k/ffitarget.h,
4791         src/mips/ffitarget.h, src/powerpc/ffitarget.h,
4792         src/s390/ffitarget.h, src/sh/ffitarget.h,
4793         src/sh64/ffitarget.h, src/sparc/ffitarget.h,
4794         src/x86/ffitarget.h: New files.
4795         * src/alpha/osf.S, src/arm/sysv.S, src/ia64/unix.S,
4796         src/m68k/sysv.S, src/mips/n32.S, src/mips/o32.S,
4797         src/powerpc/aix.S, src/powerpc/darwin.S,
4798         src/powerpc/ffi_darwin.c, src/powerpc/linux64.S,
4799         src/powerpc/linux64_closure.S, src/powerpc/ppc_closure.S,
4800         src/powerpc/sysv.S, src/s390/sysv.S, src/sh/sysv.S,
4801         src/sh64/sysv.S, src/sparc/v8.S, src/sparc/v9.S,
4802         src/x86/sysv.S, src/x86/unix64.S, src/x86/win32.S:
4803         include fficonfig.h
4804
4805 2003-10-20  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
4806
4807         * src/mips/ffi.c: Use _ABIN32, _ABIO32 instead of external
4808         _MIPS_SIM_NABI32, _MIPS_SIM_ABI32.
4809
4810 2003-10-19  Andreas Tobler  <a.tobler@schweiz.ch>
4811
4812         * src/powerpc/ffi_darwin.c (ffi_prep_args): Declare bytes again.
4813         Used when FFI_DEBUG = 1.
4814
4815 2003-10-14  Alan Modra  <amodra@bigpond.net.au>
4816
4817         * src/types.c (double, longdouble): Default POWERPC64 to 8 byte size
4818         and align.
4819
4820 2003-10-06  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
4821
4822         * include/ffi_mips.h: Define FFI_MIPS_N32 for N32/N64 ABIs,
4823         FFI_MIPS_O32 for O32 ABI.
4824
4825 2003-10-01  Andreas Tobler  <a.tobler@schweiz.ch>
4826
4827         * testsuite/lib/libffi-dg.exp: Set LD_LIBRARY_PATH_64 for
4828         SPARC64. Cleanup whitespaces.
4829
4830 2003-09-19  Andreas Tobler  <a.tobler@schweiz.ch>
4831
4832         * testsuite/libffi.call/closure_fn0.c: Xfail mips, arm,
4833         strongarm, xscale. Cleanup whitespaces.
4834         * testsuite/libffi.call/closure_fn1.c: Likewise.
4835         * testsuite/libffi.call/closure_fn2.c: Likewise.
4836         * testsuite/libffi.call/closure_fn3.c: Likewise.
4837         * testsuite/libffi.call/cls_12byte.c: Likewise.
4838         * testsuite/libffi.call/cls_16byte.c: Likewise.
4839         * testsuite/libffi.call/cls_1_1byte.c: Likewise.
4840         * testsuite/libffi.call/cls_20byte.c: Likewise.
4841         * testsuite/libffi.call/cls_24byte.c: Likewise.
4842         * testsuite/libffi.call/cls_2byte.c: Likewise.
4843         * testsuite/libffi.call/cls_3_1byte.c: Likewise.
4844         * testsuite/libffi.call/cls_3byte1.c: Likewise.
4845         * testsuite/libffi.call/cls_3byte2.c: Likewise.
4846         * testsuite/libffi.call/cls_4_1byte.c: Likewise.
4847         * testsuite/libffi.call/cls_4byte.c: Likewise.
4848         * testsuite/libffi.call/cls_5byte.c: Likewise.
4849         * testsuite/libffi.call/cls_6byte.c: Likewise.
4850         * testsuite/libffi.call/cls_7byte.c: Likewise.
4851         * testsuite/libffi.call/cls_8byte.c: Likewise.
4852         * testsuite/libffi.call/cls_double.c: Likewise.
4853         * testsuite/libffi.call/cls_float.c: Likewise.
4854         * testsuite/libffi.call/cls_uchar.c: Likewise.
4855         * testsuite/libffi.call/cls_uint.c: Likewise.
4856         * testsuite/libffi.call/cls_ulonglong.c: Likewise.
4857         * testsuite/libffi.call/cls_ushort.c: Likewise.
4858         * testsuite/libffi.call/nested_struct.c: Likewise.
4859         * testsuite/libffi.call/nested_struct1.c: Likewise.
4860         * testsuite/libffi.call/problem1.c: Likewise.
4861         * testsuite/libffi.special/unwindtest.cc: Likewise.
4862         * testsuite/libffi.call/pyobjc-tc.c: Cleanup whitespaces.
4863
4864 2003-09-18  David Edelsohn  <edelsohn@gnu.org>
4865
4866         * src/powerpc/aix.S: Cleanup whitespaces.
4867         * src/powerpc/aix_closure.S: Likewise.
4868
4869 2003-09-18  Andreas Tobler  <a.tobler@schweiz.ch>
4870
4871         * src/powerpc/darwin.S: Cleanup whitespaces, comment formatting.
4872         * src/powerpc/darwin_closure.S: Likewise.
4873         * src/powerpc/ffi_darwin.c: Likewise.
4874
4875 2003-09-18  Andreas Tobler  <a.tobler@schweiz.ch>
4876             David Edelsohn  <edelsohn@gnu.org>
4877
4878         * src/types.c (double): Add AIX and Darwin to the right TYPEDEF.
4879         * src/powerpc/aix_closure.S: Remove the pointer to the outgoing
4880         parameter stack.
4881         * src/powerpc/darwin_closure.S: Likewise.
4882         * src/powerpc/ffi_darwin.c (ffi_prep_args): Handle structures
4883         according to the Darwin/AIX ABI.
4884         (ffi_prep_cif_machdep): Likewise.
4885         (ffi_closure_helper_DARWIN): Likewise.
4886         Remove the outgoing parameter stack logic. Simplify the evaluation
4887         of the different CASE types.
4888         (ffi_prep_clousure): Avoid the casts on lvalues. Change the branch
4889         statement in the trampoline code.
4890
4891 2003-09-18  Kaz Kojima  <kkojima@gcc.gnu.org>
4892
4893         * src/sh/ffi.c (ffi_prep_args): Take account into the alignement
4894         for the register size.
4895         (ffi_closure_helper_SYSV): Handle the structure return value
4896         address correctly.
4897         (ffi_closure_helper_SYSV): Return the appropriate type when
4898         the registers are used for the structure return value.
4899         * src/sh/sysv.S (ffi_closure_SYSV): Fix the stack layout for
4900         the 64-bit return value.  Update copyright years.
4901
4902 2003-09-17  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
4903
4904         * testsuite/lib/libffi-dg.exp (libffi_target_compile): Search in
4905         srcdir for ffi_mips.h.
4906
4907 2003-09-12  Alan Modra  <amodra@bigpond.net.au>
4908
4909         * src/prep_cif.c (initialize_aggregate): Include tail padding in
4910         structure size.
4911         * src/powerpc/linux64_closure.S (ffi_closure_LINUX64): Correct
4912         placement of float result.
4913         * testsuite/libffi.special/unwindtest.cc (closure_test_fn1): Correct
4914         cast of "resp" for big-endian 64 bit machines.
4915
4916 2003-09-11  Alan Modra  <amodra@bigpond.net.au>
4917
4918         * src/types.c (double, longdouble): Merge identical SH and ARM
4919         typedefs, and add POWERPC64.
4920         * src/powerpc/ffi.c (ffi_prep_args64): Correct next_arg calc for
4921         struct split over gpr and rest.
4922         (ffi_prep_cif_machdep): Correct intarg_count for structures.
4923         * src/powerpc/linux64.S (ffi_call_LINUX64): Fix gpr offsets.
4924
4925 2003-09-09  Andreas Tobler  <a.tobler@schweiz.ch>
4926
4927         * src/powerpc/ffi.c (ffi_closure_helper_SYSV) Handle struct
4928         passing correctly.
4929
4930 2003-09-09  Alan Modra  <amodra@bigpond.net.au>
4931
4932         * configure: Regenerate.
4933
4934 2003-09-04  Andreas Tobler  <a.tobler@schweiz.ch>
4935
4936         * Makefile.am: Remove build rules for ffitest.
4937         * Makefile.in: Rebuilt.
4938
4939 2003-09-04  Andreas Tobler  <a.tobler@schweiz.ch>
4940
4941         * src/java_raw_api.c: Include <stdlib.h> to fix compiler warning
4942         about implicit declaration of abort().
4943
4944 2003-09-04  Andreas Tobler  <a.tobler@schweiz.ch>
4945
4946         * Makefile.am: Add dejagnu test framework. Fixes PR other/11411.
4947         * Makefile.in: Rebuilt.
4948         * configure.in: Add dejagnu test framework.
4949         * configure: Rebuilt.
4950
4951         * testsuite/Makefile.am: New file.
4952         * testsuite/Makefile.in: Built
4953         * testsuite/lib/libffi-dg.exp: New file.
4954         * testsuite/config/default.exp: Likewise.
4955         * testsuite/libffi.call/call.exp: Likewise.
4956         * testsuite/libffi.call/ffitest.h: Likewise.
4957         * testsuite/libffi.call/closure_fn0.c: Likewise.
4958         * testsuite/libffi.call/closure_fn1.c: Likewise.
4959         * testsuite/libffi.call/closure_fn2.c: Likewise.
4960         * testsuite/libffi.call/closure_fn3.c: Likewise.
4961         * testsuite/libffi.call/cls_1_1byte.c: Likewise.
4962         * testsuite/libffi.call/cls_3_1byte.c: Likewise.
4963         * testsuite/libffi.call/cls_4_1byte.c: Likewise.
4964         * testsuite/libffi.call/cls_2byte.c: Likewise.
4965         * testsuite/libffi.call/cls_3byte1.c: Likewise.
4966         * testsuite/libffi.call/cls_3byte2.c: Likewise.
4967         * testsuite/libffi.call/cls_4byte.c: Likewise.
4968         * testsuite/libffi.call/cls_5byte.c: Likewise.
4969         * testsuite/libffi.call/cls_6byte.c: Likewise.
4970         * testsuite/libffi.call/cls_7byte.c: Likewise.
4971         * testsuite/libffi.call/cls_8byte.c: Likewise.
4972         * testsuite/libffi.call/cls_12byte.c: Likewise.
4973         * testsuite/libffi.call/cls_16byte.c: Likewise.
4974         * testsuite/libffi.call/cls_20byte.c: Likewise.
4975         * testsuite/libffi.call/cls_24byte.c: Likewise.
4976         * testsuite/libffi.call/cls_double.c: Likewise.
4977         * testsuite/libffi.call/cls_float.c: Likewise.
4978         * testsuite/libffi.call/cls_uchar.c: Likewise.
4979         * testsuite/libffi.call/cls_uint.c: Likewise.
4980         * testsuite/libffi.call/cls_ulonglong.c: Likewise.
4981         * testsuite/libffi.call/cls_ushort.c: Likewise.
4982         * testsuite/libffi.call/float.c: Likewise.
4983         * testsuite/libffi.call/float1.c: Likewise.
4984         * testsuite/libffi.call/float2.c: Likewise.
4985         * testsuite/libffi.call/many.c: Likewise.
4986         * testsuite/libffi.call/many_win32.c: Likewise.
4987         * testsuite/libffi.call/nested_struct.c: Likewise.
4988         * testsuite/libffi.call/nested_struct1.c: Likewise.
4989         * testsuite/libffi.call/pyobjc-tc.c: Likewise.
4990         * testsuite/libffi.call/problem1.c: Likewise.
4991         * testsuite/libffi.call/promotion.c: Likewise.
4992         * testsuite/libffi.call/return_ll.c: Likewise.
4993         * testsuite/libffi.call/return_sc.c: Likewise.
4994         * testsuite/libffi.call/return_uc.c: Likewise.
4995         * testsuite/libffi.call/strlen.c: Likewise.
4996         * testsuite/libffi.call/strlen_win32.c: Likewise.
4997         * testsuite/libffi.call/struct1.c: Likewise.
4998         * testsuite/libffi.call/struct2.c: Likewise.
4999         * testsuite/libffi.call/struct3.c: Likewise.
5000         * testsuite/libffi.call/struct4.c: Likewise.
5001         * testsuite/libffi.call/struct5.c: Likewise.
5002         * testsuite/libffi.call/struct6.c: Likewise.
5003         * testsuite/libffi.call/struct7.c: Likewise.
5004         * testsuite/libffi.call/struct8.c: Likewise.
5005         * testsuite/libffi.call/struct9.c: Likewise.
5006         * testsuite/libffi.special/special.exp: New file.
5007         * testsuite/libffi.special/ffitestcxx.h: Likewise.
5008         * testsuite/libffi.special/unwindtest.cc: Likewise.
5009
5010
5011 2003-08-13  Kaz Kojima  <kkojima@gcc.gnu.org>
5012
5013         * src/sh/ffi.c (OFS_INT16): Set 0 for little endian case.  Update
5014         copyright years.
5015
5016 2003-08-02  Alan Modra  <amodra@bigpond.net.au>
5017
5018         * src/powerpc/ffi.c (ffi_prep_args64): Modify for changed gcc
5019         structure passing.
5020         (ffi_closure_helper_LINUX64): Likewise.
5021         * src/powerpc/linux64.S: Remove code writing to parm save area.
5022         * src/powerpc/linux64_closure.S (ffi_closure_LINUX64): Use return
5023         address in lr from ffi_closure_helper_LINUX64 call to calculate
5024         table address.  Optimize function tail.
5025
5026 2003-07-28  Andreas Tobler  <a.tobler@schweiz.ch>
5027
5028         * src/sparc/ffi.c: Handle all floating point registers.
5029         * src/sparc/v9.S: Likewise. Fixes second part of PR target/11410.
5030
5031 2003-07-11  Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
5032
5033         * README: Note that libffi is not part of GCC.  Update the project
5034         URL and status.
5035
5036 2003-06-19  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
5037
5038         * src/powerpc/ppc_closure.S: Include ffi.h.
5039
5040 2003-06-13  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
5041
5042         * src/x86/sysv.S: Avoid gas-only .uleb128/.sleb128 directives.
5043         Use C style comments.
5044
5045 2003-06-13  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5046
5047         * Makefile.am: Add SHmedia support.  Fix a typo of SH support.
5048         * Makefile.in: Regenerate.
5049         * configure.in (sh64-*-linux*, sh5*-*-linux*): Add target.
5050         * configure: Regenerate.
5051         * include/ffi.h.in: Add SHmedia support.
5052         * src/sh64/ffi.c: New file.
5053         * src/sh64/sysv.S: New file.
5054
5055 2003-05-16  Jakub Jelinek  <jakub@redhat.com>
5056
5057         * configure.in (HAVE_RO_EH_FRAME): Check whether .eh_frame section
5058         should be read-only.
5059         * configure: Rebuilt.
5060         * fficonfig.h.in: Rebuilt.
5061         * include/ffi.h.in (EH_FRAME_FLAGS): Define.
5062         * src/alpha/osf.S: Use EH_FRAME_FLAGS.
5063         * src/powerpc/linux64.S: Likewise.
5064         * src/powerpc/linux64_closure.S: Likewise.  Include ffi.h.
5065         * src/powerpc/sysv.S: Use EH_FRAME_FLAGS.  Use pcrel encoding
5066         if -fpic/-fPIC/-mrelocatable.
5067         * src/powerpc/powerpc_closure.S: Likewise.
5068         * src/sparc/v8.S: If HAVE_RO_EH_FRAME is defined, don't include
5069         #write in .eh_frame flags.
5070         * src/sparc/v9.S: Likewise.
5071         * src/x86/unix64.S: Use EH_FRAME_FLAGS.
5072         * src/x86/sysv.S: Likewise.  Use pcrel encoding if -fpic/-fPIC.
5073         * src/s390/sysv.S: Use EH_FRAME_FLAGS.  Include ffi.h.
5074
5075 2003-05-07  Jeff Sturm  <jsturm@one-point.com>
5076
5077         Fixes PR bootstrap/10656
5078         * configure.in (HAVE_AS_REGISTER_PSEUDO_OP): Test assembler
5079         support for .register pseudo-op.
5080         * src/sparc/v8.S: Use it.
5081         * fficonfig.h.in: Rebuilt.
5082         * configure: Rebuilt.
5083
5084 2003-04-18  Jakub Jelinek  <jakub@redhat.com>
5085
5086         * include/ffi.h.in (POWERPC64): Define if 64-bit.
5087         (enum ffi_abi): Add FFI_LINUX64 on POWERPC.
5088         Make it the default on POWERPC64.
5089         (FFI_TRAMPOLINE_SIZE): Define to 24 on POWERPC64.
5090         * configure.in: Change powerpc-*-linux* into powerpc*-*-linux*.
5091         * configure: Rebuilt.
5092         * src/powerpc/ffi.c (hidden): Define.
5093         (ffi_prep_args_SYSV): Renamed from
5094         ffi_prep_args.  Cast pointers to unsigned long to shut up warnings.
5095         (NUM_GPR_ARG_REGISTERS64, NUM_FPR_ARG_REGISTERS64,
5096         ASM_NEEDS_REGISTERS64): New.
5097         (ffi_prep_args64): New function.
5098         (ffi_prep_cif_machdep): Handle FFI_LINUX64 ABI.
5099         (ffi_call): Likewise.
5100         (ffi_prep_closure): Likewise.
5101         (flush_icache): Surround by #ifndef POWERPC64.
5102         (ffi_dblfl): New union type.
5103         (ffi_closure_helper_SYSV): Use it to avoid aliasing problems.
5104         (ffi_closure_helper_LINUX64): New function.
5105         * src/powerpc/ppc_closure.S: Surround whole file by #ifndef
5106         __powerpc64__.
5107         * src/powerpc/sysv.S: Likewise.
5108         (ffi_call_SYSV): Rename ffi_prep_args to ffi_prep_args_SYSV.
5109         * src/powerpc/linux64.S: New file.
5110         * src/powerpc/linux64_closure.S: New file.
5111         * Makefile.am (EXTRA_DIST): Add src/powerpc/linux64.S and
5112         src/powerpc/linux64_closure.S.
5113         (TARGET_SRC_POWERPC): Likewise.
5114
5115         * src/ffitest.c (closure_test_fn, closure_test_fn1, closure_test_fn2,
5116         closure_test_fn3): Fix result printing on big-endian 64-bit
5117         machines.
5118         (main): Print tst2_arg instead of uninitialized tst2_result.
5119
5120         * src/ffitest.c (main): Hide what closure pointer really points to
5121         from the compiler.
5122
5123 2003-04-16  Richard Earnshaw  <rearnsha@arm.com>
5124
5125         * configure.in (arm-*-netbsdelf*): Add configuration.
5126         (configure): Regenerated.
5127
5128 2003-04-04  Loren J. Rittle  <ljrittle@acm.org>
5129
5130         * include/Makefile.in: Regenerate.
5131
5132 2003-03-21  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>
5133
5134         * libffi/include/ffi.h.in: Define X86 instead of X86_64 in 32
5135         bit mode.
5136         * libffi/src/x86/ffi.c (ffi_closure_SYSV, ffi_closure_raw_SYSV):
5137         Receive closure pointer through parameter, read args using
5138         __builtin_dwarf_cfa.
5139         (FFI_INIT_TRAMPOLINE): Send closure reference through eax.
5140
5141 2003-03-12  Andreas Schwab  <schwab@suse.de>
5142
5143         * configure.in: Avoid trailing /. in toolexeclibdir.
5144         * configure: Rebuilt.
5145
5146 2003-03-03  Andreas Tobler <a.tobler@schweiz.ch>
5147
5148         * src/powerpc/darwin_closure.S: Recode to fit dynamic libraries.
5149
5150 2003-02-06  Andreas Tobler <a.tobler@schweiz.ch>
5151
5152         * libffi/src/powerpc/darwin_closure.S:
5153         Fix alignement bug, allocate 8 bytes for the result.
5154         * libffi/src/powerpc/aix_closure.S:
5155         Likewise.
5156         * libffi/src/powerpc/ffi_darwin.c:
5157         Update stackframe description for aix/darwin_closure.S.
5158
5159 2003-02-06  Jakub Jelinek  <jakub@redhat.com>
5160
5161         * src/s390/ffi.c (ffi_closure_helper_SYSV): Add hidden visibility
5162         attribute.
5163
5164 2003-01-31  Christian Cornelssen  <ccorn@cs.tu-berlin.de>,
5165             Andreas Schwab  <schwab@suse.de>
5166
5167         * configure.in: Adjust command to source config-ml.in to account
5168         for changes to the libffi_basedir definition.
5169         (libffi_basedir): Remove ${srcdir} from value and include trailing
5170         slash if nonempty.
5171
5172         * configure: Regenerate.
5173
5174 2003-01-29  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
5175
5176         * src/powerpc/ppc_closure.S: Recode to fit shared libs.
5177
5178 2003-01-28  Andrew Haley  <aph@redhat.com>
5179
5180         * include/ffi.h.in: Enable FFI_CLOSURES for x86_64.
5181         * src/x86/ffi64.c (ffi_prep_closure): New.
5182         (ffi_closure_UNIX64_inner): New.
5183         * src/x86/unix64.S (ffi_closure_UNIX64): New.
5184
5185 2003-01-27  Alexandre Oliva  <aoliva@redhat.com>
5186
5187         * configure.in (toolexecdir, toolexeclibdir): Set and AC_SUBST.
5188         Remove USE_LIBDIR conditional.
5189         * Makefile.am (toolexecdir, toolexeclibdir): Don't override.
5190         * Makefile.in, configure: Rebuilt.
5191
5192 2003-01027  David Edelsohn  <edelsohn@gnu.org>
5193
5194         * Makefile.am (TARGET_SRC_POWERPC_AIX): Fix typo.
5195         * Makefile.in: Regenerate.
5196
5197 2003-01-22  Andrew Haley  <aph@redhat.com>
5198
5199         * src/powerpc/darwin.S (_ffi_call_AIX): Add Augmentation size to
5200         unwind info.
5201
5202 2003-01-21  Andreas Tobler  <a.tobler@schweiz.ch>
5203
5204         * src/powerpc/darwin.S: Add unwind info.
5205         * src/powerpc/darwin_closure.S: Likewise.
5206
5207 2003-01-14  Andrew Haley  <aph@redhat.com>
5208
5209         * src/x86/ffi64.c (ffi_prep_args): Check for void retval.
5210         (ffi_prep_cif_machdep): Likewise.
5211         * src/x86/unix64.S: Add unwind info.
5212
5213 2003-01-14  Andreas Jaeger  <aj@suse.de>
5214
5215         * src/ffitest.c (main): Only use ffi_closures if those are
5216         supported.
5217
5218 2003-01-13 Andreas Tobler <a.tobler@schweiz.ch>
5219
5220         * libffi/src/ffitest.c
5221          add closure testcases
5222
5223 2003-01-13 Kevin B. Hendricks <khendricks@ivey.uwo.ca>
5224
5225         * libffi/src/powerpc/ffi.c
5226          fix alignment bug for float (4 byte aligned iso 8 byte)
5227
5228 2003-01-09  Geoffrey Keating  <geoffk@apple.com>
5229
5230         * src/powerpc/ffi_darwin.c: Remove RCS version string.
5231         * src/powerpc/darwin.S: Remove RCS version string.
5232
5233 2003-01-03  Jeff Sturm  <jsturm@one-point.com>
5234
5235         * include/ffi.h.in: Add closure defines for SPARC, SPARC64.
5236         * src/ffitest.c (main): Use static storage for closure.
5237         * src/sparc/ffi.c (ffi_prep_closure, ffi_closure_sparc_inner): New.
5238         * src/sparc/v8.S (ffi_closure_v8): New.
5239         * src/sparc/v9.S (ffi_closure_v9): New.
5240
5241 2002-11-10  Ranjit Mathew <rmathew@hotmail.com>
5242
5243         * include/ffi.h.in: Added FFI_STDCALL ffi_type
5244           enumeration for X86_WIN32.
5245         * src/x86/win32.S: Added ffi_call_STDCALL function
5246           definition.
5247         * src/x86/ffi.c (ffi_call/ffi_raw_call): Added
5248           switch cases for recognising FFI_STDCALL and
5249           calling ffi_call_STDCALL if target is X86_WIN32.
5250         * src/ffitest.c (my_stdcall_strlen/stdcall_many):
5251           stdcall versions of the "my_strlen" and "many"
5252           test functions (for X86_WIN32).
5253           Added test cases to test stdcall invocation using
5254           these functions.
5255
5256 2002-12-02  Kaz Kojima  <kkojima@gcc.gnu.org>
5257
5258         * src/sh/sysv.S: Add DWARF2 unwind info.
5259
5260 2002-11-27  Ulrich Weigand  <uweigand@de.ibm.com>
5261
5262         * src/s390/sysv.S (.eh_frame section): Make section read-only.
5263
5264 2002-11-26  Jim Wilson  <wilson@redhat.com>
5265
5266         * src/types.c (FFI_TYPE_POINTER): Has size 8 on IA64.
5267
5268 2002-11-23  H.J. Lu <hjl@gnu.org>
5269
5270         * acinclude.m4: Add dummy AM_PROG_LIBTOOL.
5271         Include ../config/accross.m4.
5272         * aclocal.m4; Rebuild.
5273         * configure: Likewise.
5274
5275 2002-11-15  Ulrich Weigand  <uweigand@de.ibm.com>
5276
5277         * src/s390/sysv.S (.eh_frame section): Adapt to pcrel FDE encoding.
5278
5279 2002-11-11  DJ Delorie  <dj@redhat.com>
5280
5281         * configure.in: Look for common files in the right place.
5282
5283 2002-10-08  Ulrich Weigand  <uweigand@de.ibm.com>
5284
5285         * src/java_raw_api.c (ffi_java_raw_to_ptrarray): Interpret
5286         raw data as _Jv_word values, not ffi_raw.
5287         (ffi_java_ptrarray_to_raw): Likewise.
5288         (ffi_java_rvalue_to_raw): New function.
5289         (ffi_java_raw_call): Call it.
5290         (ffi_java_raw_to_rvalue): New function.
5291         (ffi_java_translate_args): Call it.
5292         * src/ffitest.c (closure_test_fn): Interpret return value
5293         as ffi_arg, not int.
5294         * src/s390/ffi.c (ffi_prep_cif_machdep): Add missing
5295         FFI_TYPE_POINTER case.
5296         (ffi_closure_helper_SYSV): Likewise.  Also, assume return
5297         values extended to word size.
5298
5299 2002-10-02  Andreas Jaeger  <aj@suse.de>
5300
5301         * src/x86/ffi64.c (ffi_prep_cif_machdep): Remove debug output.
5302
5303 2002-10-01  Bo Thorsen  <bo@smetana.suse.de>
5304
5305         * include/ffi.h.in: Fix i386 win32 compilation.
5306
5307 2002-09-30  Ulrich Weigand  <uweigand@de.ibm.com>
5308
5309         * configure.in: Add s390x-*-linux-* target.
5310         * configure: Regenerate.
5311         * include/ffi.h.in: Define S390X for s390x targets.
5312         (FFI_CLOSURES): Define for s390/s390x.
5313         (FFI_TRAMPOLINE_SIZE): Likewise.
5314         (FFI_NATIVE_RAW_API): Likewise.
5315         * src/prep_cif.c (ffi_prep_cif): Do not compute stack space for s390.
5316         * src/types.c (FFI_TYPE_POINTER): Use 8-byte pointers on s390x.
5317         * src/s390/ffi.c: Major rework of existing code.  Add support for
5318         s390x targets.  Add closure support.
5319         * src/s390/sysv.S: Likewise.
5320
5321 2002-09-29  Richard Earnshaw  <rearnsha@arm.com>
5322
5323         * src/arm/sysv.S: Fix typo.
5324
5325 2002-09-28  Richard Earnshaw  <rearnsha@arm.com>
5326
5327         * src/arm/sysv.S: If we don't have machine/asm.h and the pre-processor
5328         has defined __USER_LABEL_PREFIX__, then use it in CNAME.
5329         (ffi_call_SYSV): Handle soft-float.
5330
5331 2002-09-27  Bo Thorsen  <bo@suse.de>
5332
5333         * include/ffi.h.in: Fix multilib x86-64 support.
5334
5335 2002-09-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5336
5337         * Makefile.am (all-multi): Fix multilib parallel build.
5338
5339 2002-07-19  Kaz Kojima  <kkojima@gcc.gnu.org>
5340
5341         * configure.in (sh[34]*-*-linux*): Add brackets.
5342         * configure: Regenerate.
5343
5344 2002-07-18  Kaz Kojima  <kkojima@gcc.gnu.org>
5345
5346         * Makefile.am: Add SH support.
5347         * Makefile.in: Regenerate.
5348         * configure.in (sh-*-linux*, sh[34]*-*-linux*): Add target.
5349         * configure: Regenerate.
5350         * include/ffi.h.in: Add SH support.
5351         * src/sh/ffi.c: New file.
5352         * src/sh/sysv.S: New file.
5353         * src/types.c: Add SH support.
5354
5355 2002-07-16  Bo Thorsen  <bo@suse.de>
5356
5357         * src/x86/ffi64.c: New file that adds x86-64 support.
5358         * src/x86/unix64.S: New file that handles argument setup for
5359         x86-64.
5360         * src/x86/sysv.S: Don't use this on x86-64.
5361         * src/x86/ffi.c: Don't use this on x86-64.
5362         Remove unused vars.
5363         * src/prep_cif.c (ffi_prep_cif): Don't do stack size calculation
5364         for x86-64.
5365         * src/ffitest.c (struct6): New test that tests a special case in
5366         the x86-64 ABI.
5367         (struct7): Likewise.
5368         (struct8): Likewise.
5369         (struct9): Likewise.
5370         (closure_test_fn): Silence warning about this when it's not used.
5371         (main): Add the new tests.
5372         (main): Fix a couple of wrong casts and silence some compiler warnings.
5373         * include/ffi.h.in: Add x86-64 ABI definition.
5374         * fficonfig.h.in: Regenerate.
5375         * Makefile.am: Add x86-64 support.
5376         * configure.in: Likewise.
5377         * Makefile.in: Regenerate.
5378         * configure: Likewise.
5379
5380 2002-06-24  Bo Thorsen  <bo@suse.de>
5381
5382         * src/types.c: Merge settings for similar architectures.
5383         Add x86-64 sizes and alignments.
5384
5385 2002-06-23  Bo Thorsen  <bo@suse.de>
5386
5387         * src/arm/ffi.c (ffi_prep_args): Remove unused vars.
5388         * src/sparc/ffi.c (ffi_prep_args_v8): Likewise.
5389         * src/mips/ffi.c (ffi_prep_args): Likewise.
5390         * src/m68k/ffi.c (ffi_prep_args): Likewise.
5391
5392 2002-07-18  H.J. Lu  (hjl@gnu.org)
5393
5394         * Makefile.am (TARGET_SRC_MIPS_LINUX): New.
5395         (libffi_la_SOURCES): Support MIPS_LINUX.
5396         (libffi_convenience_la_SOURCES): Likewise.
5397         * Makefile.in: Regenerated.
5398
5399         * configure.in (mips64*-*): Skip.
5400         (mips*-*-linux*): New.
5401         * configure: Regenerated.
5402
5403         * src/mips/ffi.c: Include <sgidefs.h>.
5404
5405 2002-06-06  Ulrich Weigand  <uweigand@de.ibm.com>
5406
5407         * src/s390/sysv.S: Save/restore %r6.  Add DWARF-2 unwind info.
5408
5409 2002-05-27  Roger Sayle  <roger@eyesopen.com>
5410
5411         * src/x86/ffi.c (ffi_prep_args): Remove reference to avn.
5412
5413 2002-05-27  Bo Thorsen  <bo@suse.de>
5414
5415         * src/x86/ffi.c (ffi_prep_args): Remove unused variable and
5416         fix formatting.
5417
5418 2002-05-13  Andreas Tobler  <a.tobler@schweiz.ch>
5419
5420         * src/powerpc/ffi_darwin.c (ffi_prep_closure): Declare fd at
5421         beginning of function (for older apple cc).
5422
5423 2002-05-08  Alexandre Oliva  <aoliva@redhat.com>
5424
5425         * configure.in (ORIGINAL_LD_FOR_MULTILIBS): Preserve LD at
5426         script entry, and set LD to it when configuring multilibs.
5427         * configure: Rebuilt.
5428
5429 2002-05-05  Jason Thorpe  <thorpej@wasabisystems.com>
5430
5431         * configure.in (sparc64-*-netbsd*): Add target.
5432         (sparc-*-netbsdelf*): Likewise.
5433         * configure: Regenerate.
5434
5435 2002-04-28  David S. Miller  <davem@redhat.com>
5436
5437         * configure.in, configure: Fix SPARC test in previous change.
5438
5439 2002-04-29  Gerhard Tonn  <GerhardTonn@swol.de>
5440
5441         * Makefile.am: Add Linux for S/390 support.
5442         * Makefile.in: Regenerate.
5443         * configure.in: Add Linux for S/390 support.
5444         * configure: Regenerate.
5445         * include/ffi.h.in: Add Linux for S/390 support.
5446         * src/s390/ffi.c: New file from libffi CVS tree.
5447         * src/s390/sysv.S: New file from libffi CVS tree.
5448
5449 2002-04-28  Jakub Jelinek  <jakub@redhat.com>
5450
5451         * configure.in (HAVE_AS_SPARC_UA_PCREL): Check for working
5452         %r_disp32().
5453         * src/sparc/v8.S: Use it.
5454         * src/sparc/v9.S: Likewise.
5455         * fficonfig.h.in: Rebuilt.
5456         * configure: Rebuilt.
5457
5458 2002-04-08  Hans Boehm  <Hans_Boehm@hp.com>
5459
5460         * src/java_raw_api.c (ffi_java_raw_size): Handle FFI_TYPE_DOUBLE
5461         correctly.
5462         * src/ia64/unix.S: Add unwind information. Fix comments.
5463         Save sp in a way that's compatible with unwind info.
5464         (ffi_call_unix): Correctly restore sp in all cases.
5465         * src/ia64/ffi.c: Add, fix comments.
5466
5467 2002-04-08  Jakub Jelinek  <jakub@redhat.com>
5468
5469         * src/sparc/v8.S: Make .eh_frame dependent on target word size.
5470
5471 2002-04-06  Jason Thorpe  <thorpej@wasabisystems.com>
5472
5473         * configure.in (alpha*-*-netbsd*): Add target.
5474         * configure: Regenerate.
5475
5476 2002-04-04  Jeff Sturm  <jsturm@one-point.com>
5477
5478         * src/sparc/v8.S: Add unwind info.
5479         * src/sparc/v9.S: Likewise.
5480
5481 2002-03-30  Krister Walfridsson  <cato@df.lth.se>
5482
5483         * configure.in: Enable i*86-*-netbsdelf*.
5484         * configure: Rebuilt.
5485
5486 2002-03-29  David Billinghurst <David.Billinghurst@riotinto.com>
5487
5488         PR other/2620
5489         * src/mips/n32.s: Delete
5490         * src/mips/o32.s: Delete
5491
5492 2002-03-21  Loren J. Rittle  <ljrittle@acm.org>
5493
5494         * configure.in: Enable alpha*-*-freebsd*.
5495         * configure: Rebuilt.
5496
5497 2002-03-17  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
5498
5499         * Makefile.am: libfficonvenience -> libffi_convenience.
5500         * Makefile.in: Rebuilt.
5501
5502         * Makefile.am: Define ffitest_OBJECTS.
5503         * Makefile.in: Rebuilt.
5504
5505 2002-03-07  Andreas Tobler  <toa@pop.agri.ch>
5506             David Edelsohn  <edelsohn@gnu.org>
5507
5508         * Makefile.am (EXTRA_DIST): Add Darwin and AIX closure files.
5509         (TARGET_SRC_POWERPC_AIX): Add aix_closure.S.
5510         (TARGET_SRC_POWERPC_DARWIN): Add darwin_closure.S.
5511         * Makefile.in: Regenerate.
5512         * include/ffi.h.in: Add AIX and Darwin closure definitions.
5513         * src/powerpc/ffi_darwin.c (ffi_prep_closure): New function.
5514         (flush_icache, flush_range): New functions.
5515         (ffi_closure_helper_DARWIN): New function.
5516         * src/powerpc/aix_closure.S: New file.
5517         * src/powerpc/darwin_closure.S: New file.
5518
5519 2002-02-24  Jeff Sturm  <jsturm@one-point.com>
5520
5521         * include/ffi.h.in: Add typedef for ffi_arg.
5522         * src/ffitest.c (main): Declare rint with ffi_arg.
5523
5524 2002-02-21  Andreas Tobler  <toa@pop.agri.ch>
5525
5526         * src/powerpc/ffi_darwin.c (ffi_prep_args): Skip appropriate
5527         number of GPRs for floating-point arguments.
5528
5529 2002-01-31  Anthony Green  <green@redhat.com>
5530
5531         * configure: Rebuilt.
5532         * configure.in: Replace CHECK_SIZEOF and endian tests with
5533         cross-compiler friendly macros.
5534         * aclocal.m4 (AC_COMPILE_CHECK_SIZEOF, AC_C_BIGENDIAN_CROSS): New
5535         macros.
5536
5537 2002-01-18  David Edelsohn  <edelsohn@gnu.org>
5538
5539         * src/powerpc/darwin.S (_ffi_call_AIX): New.
5540         * src/powerpc/aix.S (ffi_call_DARWIN): New.
5541
5542 2002-01-17  David Edelsohn  <edelsohn@gnu.org>
5543
5544         * Makefile.am (EXTRA_DIST): Add Darwin and AIX files.
5545         (TARGET_SRC_POWERPC_AIX): New.
5546         (POWERPC_AIX): New stanza.
5547         * Makefile.in: Regenerate.
5548         * configure.in: Add AIX case.
5549         * configure: Regenerate.
5550         * include/ffi.h.in (ffi_abi): Add FFI_AIX.
5551         * src/powerpc/ffi_darwin.c (ffi_status): Use "long" to scale frame
5552         size.  Fix "long double" support.
5553         (ffi_call): Add FFI_AIX case.
5554         * src/powerpc/aix.S: New.
5555
5556 2001-10-09  John Hornkvist  <john@toastedmarshmallow.com>
5557
5558         Implement Darwin PowerPC ABI.
5559         * configure.in: Handle powerpc-*-darwin*.
5560         * Makefile.am: Set source files for POWERPC_DARWIN.
5561         * configure: Rebuilt.
5562         * Makefile.in: Rebuilt.
5563         * include/ffi.h.in: Define FFI_DARWIN and FFI_DEFAULT_ABI for
5564         POWERPC_DARWIN.
5565         * src/powerpc/darwin.S: New file.
5566         * src/powerpc/ffi_darwin.c: New file.
5567
5568 2001-10-07  Joseph S. Myers  <jsm28@cam.ac.uk>
5569
5570         * src/x86/ffi.c: Fix spelling error of "separate" as "seperate".
5571
5572 2001-07-16  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
5573
5574         * src/x86/sysv.S: Avoid gas-only .balign directive.
5575         Use C style comments.
5576
5577 2001-07-16  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
5578
5579         * src/alpha/ffi.c (ffi_prep_closure): Avoid gas-only mnemonic.
5580         Fixes PR bootstrap/3563.
5581
5582 2001-06-26  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
5583
5584         * src/alpha/osf.S (ffi_closure_osf): Use .rdata for ECOFF.
5585
5586 2001-06-25  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
5587
5588         * configure.in: Recognize sparc*-sun-* host.
5589         * configure: Regenerate.
5590
5591 2001-06-06  Andrew Haley  <aph@redhat.com>
5592
5593         * src/alpha/osf.S (__FRAME_BEGIN__): Conditionalize for ELF.
5594
5595 2001-06-03  Andrew Haley  <aph@redhat.com>
5596
5597         * src/alpha/osf.S: Add unwind info.
5598         * src/powerpc/sysv.S: Add unwind info.
5599         * src/powerpc/ppc_closure.S: Likewise.
5600
5601 2000-05-31  Jeff Sturm  <jsturm@one-point.com>
5602
5603         * configure.in: Fix AC_ARG_ENABLE usage.
5604         * configure: Rebuilt.
5605
5606 2001-05-06  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
5607
5608         * configure.in: Remove warning about beta code.
5609         * configure: Rebuilt.
5610
5611 2001-04-25  Hans Boehm <Hans_Boehm@hp.com>
5612
5613         * src/ia64/unix.S: Restore stack pointer when returning from
5614         ffi_closure_UNIX.
5615         * src/ia64/ffi.c: Fix typo in comment.
5616
5617 2001-04-18  Jim Wilson  <wilson@redhat.com>
5618
5619         * src/ia64/unix.S: Delete unnecessary increment and decrement of loc2
5620         to eliminate RAW DV.
5621
5622 2001-04-12  Bryce McKinlay  <bryce@albatross.co.nz>
5623
5624         * Makefile.am: Make a libtool convenience library.
5625         * Makefile.in: Rebuilt.
5626
5627 2001-03-29  Bryce McKinlay  <bryce@albatross.co.nz>
5628
5629         * configure.in: Use different syntax for subdirectory creation.
5630         * configure: Rebuilt.
5631
5632 2001-03-27  Jon Beniston  <jon@beniston.com>
5633
5634         * configure.in: Added X86_WIN32 target (Win32, CygWin, MingW).
5635         * configure: Rebuilt.
5636         * Makefile.am: Added X86_WIN32 target support.
5637         * Makefile.in: Rebuilt.
5638
5639         * include/ffi.h.in: Added X86_WIN32 target support.
5640
5641         * src/ffitest.c: Doesn't run structure tests for X86_WIN32 targets.
5642         * src/types.c: Added X86_WIN32 target support.
5643
5644         * src/x86/win32.S: New file. Based on sysv.S, but with EH
5645         stuff removed and made to work with CygWin's gas.
5646
5647 2001-03-26  Bryce McKinlay  <bryce@albatross.co.nz>
5648
5649         * configure.in: Make target subdirectory in build dir.
5650         * Makefile.am: Override suffix based rules to specify correct output
5651         subdirectory.
5652         * Makefile.in: Rebuilt.
5653         * configure: Rebuilt.
5654
5655 2001-03-23  Kevin B Hendricks  <khendricks@ivey.uwo.ca>
5656
5657         * src/powerpc/ppc_closure.S: New file.
5658         * src/powerpc/ffi.c (ffi_prep_args): Fixed ABI compatibility bug
5659         involving long long and register pairs.
5660         (ffi_prep_closure): New function.
5661         (flush_icache): Likewise.
5662         (ffi_closure_helper_SYSV): Likewise.
5663         * include/ffi.h.in (FFI_CLOSURES): Define on PPC.
5664         (FFI_TRAMPOLINE_SIZE): Likewise.
5665         (FFI_NATIVE_RAW_API): Likewise.
5666         * Makefile.in: Rebuilt.
5667         * Makefile.am (EXTRA_DIST): Added src/powerpc/ppc_closure.S.
5668         (TARGET_SRC_POWERPC): Likewise.
5669
5670 2001-03-19  Tom Tromey  <tromey@redhat.com>
5671
5672         * Makefile.in: Rebuilt.
5673         * Makefile.am (ffitest_LDFLAGS): New macro.
5674
5675 2001-03-02  Nick Clifton  <nickc@redhat.com>
5676
5677         * include/ffi.h.in: Remove RCS ident string.
5678         * include/ffi_mips.h: Remove RCS ident string.
5679         * src/debug.c: Remove RCS ident string.
5680         * src/ffitest.c: Remove RCS ident string.
5681         * src/prep_cif.c: Remove RCS ident string.
5682         * src/types.c: Remove RCS ident string.
5683         * src/alpha/ffi.c: Remove RCS ident string.
5684         * src/alpha/osf.S: Remove RCS ident string.
5685         * src/arm/ffi.c: Remove RCS ident string.
5686         * src/arm/sysv.S: Remove RCS ident string.
5687         * src/mips/ffi.c: Remove RCS ident string.
5688         * src/mips/n32.S: Remove RCS ident string.
5689         * src/mips/o32.S: Remove RCS ident string.
5690         * src/sparc/ffi.c: Remove RCS ident string.
5691         * src/sparc/v8.S: Remove RCS ident string.
5692         * src/sparc/v9.S: Remove RCS ident string.
5693         * src/x86/ffi.c: Remove RCS ident string.
5694         * src/x86/sysv.S: Remove RCS ident string.
5695
5696 2001-02-08  Joseph S. Myers  <jsm28@cam.ac.uk>
5697
5698         * include/ffi.h.in: Change sourceware.cygnus.com references to
5699         gcc.gnu.org.
5700
5701 2000-12-09  Richard Henderson  <rth@redhat.com>
5702
5703         * src/alpha/ffi.c (ffi_call): Simplify struct return test.
5704         (ffi_closure_osf_inner): Index rather than increment avalue
5705         and arg_types.  Give ffi_closure_osf the raw return value type.
5706         * src/alpha/osf.S (ffi_closure_osf): Handle return value type
5707         promotion.
5708
5709 2000-12-07  Richard Henderson  <rth@redhat.com>
5710
5711         * src/raw_api.c (ffi_translate_args): Fix typo.
5712         (ffi_prep_closure): Likewise.
5713
5714         * include/ffi.h.in [ALPHA]: Define FFI_CLOSURES and
5715         FFI_TRAMPOLINE_SIZE.
5716         * src/alpha/ffi.c (ffi_prep_cif_machdep): Adjust minimal
5717         cif->bytes for new ffi_call_osf implementation.
5718         (ffi_prep_args): Absorb into ...
5719         (ffi_call): ... here.  Do all stack allocation here and
5720         avoid a callback function.
5721         (ffi_prep_closure, ffi_closure_osf_inner): New.
5722         * src/alpha/osf.S (ffi_call_osf): Reimplement with no callback.
5723         (ffi_closure_osf): New.
5724
5725 2000-09-10  Alexandre Oliva  <aoliva@redhat.com>
5726
5727         * config.guess, config.sub, install-sh: Removed.
5728         * ltconfig, ltmain.sh, missing, mkinstalldirs: Likewise.
5729         * Makefile.in: Rebuilt.
5730
5731         * acinclude.m4: Include libtool macros from the top level.
5732         * aclocal.m4, configure: Rebuilt.
5733
5734 2000-08-22  Alexandre Oliva  <aoliva@redhat.com>
5735
5736         * configure.in [i*86-*-freebsd*] (TARGET, TARGETDIR): Set.
5737         * configure: Rebuilt.
5738
5739 2000-05-11  Scott Bambrough  <scottb@netwinder.org>
5740
5741         * libffi/src/arm/sysv.S (ffi_call_SYSV): Doubles are not saved to
5742         memory correctly.  Use conditional instructions, not branches where
5743         possible.
5744
5745 2000-05-04  Tom Tromey  <tromey@cygnus.com>
5746
5747         * configure: Rebuilt.
5748         * configure.in: Match `arm*-*-linux-*'.
5749         From Chris Dornan <cdornan@arm.com>.
5750
5751 2000-04-28  Jakub Jelinek  <jakub@redhat.com>
5752
5753         * Makefile.am (SUBDIRS): Define.
5754         (AM_MAKEFLAGS): Likewise.
5755         (Multilib support.): Add section.
5756         * Makefile.in: Rebuilt.
5757         * ltconfig (extra_compiler_flags, extra_compiler_flags_value):
5758         New variables. Set for gcc using -print-multi-lib. Export them
5759         to libtool.
5760         (sparc64-*-linux-gnu*): Use libsuff 64 for search paths.
5761         * ltmain.sh (B|b|V): Don't throw away gcc's -B, -b and -V options
5762         for -shared links.
5763         (extra_compiler_flags_value, extra_compiler_flags): Check these
5764         for extra compiler options which need to be passed down in
5765         compiler_flags.
5766
5767 2000-04-16  Anthony Green  <green@redhat.com>
5768
5769         * configure: Rebuilt.
5770         * configure.in: Change i*86-pc-linux* to i*86-*-linux*.
5771
5772 2000-04-14  Jakub Jelinek  <jakub@redhat.com>
5773
5774         * include/ffi.h.in (SPARC64): Define for 64bit SPARC builds.
5775         Set SPARC FFI_DEFAULT_ABI based on SPARC64 define.
5776         * src/sparc/ffi.c (ffi_prep_args_v8): Renamed from ffi_prep_args.
5777         Replace all void * sizeofs with sizeof(int).
5778         Only compare type with FFI_TYPE_LONGDOUBLE if LONGDOUBLE is
5779         different than DOUBLE.
5780         Remove FFI_TYPE_SINT32 and FFI_TYPE_UINT32 cases (handled elsewhere).
5781         (ffi_prep_args_v9): New function.
5782         (ffi_prep_cif_machdep): Handle V9 ABI and long long on V8.
5783         (ffi_V9_return_struct): New function.
5784         (ffi_call): Handle FFI_V9 ABI from 64bit code and FFI_V8 ABI from
5785         32bit code (not yet cross-arch calls).
5786         * src/sparc/v8.S: Add struct return delay nop.
5787         Handle long long.
5788         * src/sparc/v9.S: New file.
5789         * src/prep_cif.c (ffi_prep_cif): Return structure pointer
5790         is used on sparc64 only for structures larger than 32 bytes.
5791         Pass by reference for structures is done for structure arguments
5792         larger than 16 bytes.
5793         * src/ffitest.c (main): Use 64bit rint on sparc64.
5794         Run long long tests on sparc.
5795         * src/types.c (FFI_TYPE_POINTER): Pointer is 64bit on alpha and
5796         sparc64.
5797         (FFI_TYPE_LONGDOUBLE): long double is 128 bit aligned to 128 bits
5798         on sparc64.
5799         * configure.in (sparc-*-linux*): New supported target.
5800         (sparc64-*-linux*): Likewise.
5801         * configure: Rebuilt.
5802         * Makefile.am: Add v9.S to SPARC files.
5803         * Makefile.in: Likewise.
5804         (LINK): Surround $(CCLD) into double quotes, so that multilib
5805         compiles work correctly.
5806
5807 2000-04-04  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5808
5809         * configure: Rebuilt.
5810         * configure.in: (i*86-*-solaris*): New libffi target. Patch
5811         proposed by Bryce McKinlay.
5812
5813 2000-03-20  Tom Tromey  <tromey@cygnus.com>
5814
5815         * Makefile.in: Hand edit for java_raw_api.lo.
5816
5817 2000-03-08  Bryce McKinlay  <bryce@albatross.co.nz>
5818
5819         * config.guess, config.sub: Update from the gcc tree.
5820         Fix for PR libgcj/168.
5821
5822 2000-03-03  Tom Tromey  <tromey@cygnus.com>
5823
5824         * Makefile.in: Fixed ia64 by hand.
5825
5826         * configure: Rebuilt.
5827         * configure.in (--enable-multilib): New option.
5828         (libffi_basedir): New subst.
5829         (AC_OUTPUT): Added multilib code.
5830
5831 2000-03-02  Tom Tromey  <tromey@cygnus.com>
5832
5833         * Makefile.in: Rebuilt.
5834         * Makefile.am (TARGET_SRC_IA64): Use `ia64', not `alpha', as
5835         directory name.
5836
5837 2000-02-25  Hans Boehm <boehm@acm.org>
5838
5839         * src/ia64/ffi.c, src/ia64/ia64_flags.h, src/ia64/unix.S: New
5840         files.
5841         * src/raw_api.c (ffi_translate_args): Fixed typo in argument
5842         list.
5843         (ffi_prep_raw_closure): Use ffi_translate_args, not
5844         ffi_closure_translate.
5845         * src/java_raw_api.c: New file.
5846         * src/ffitest.c (closure_test_fn): New function.
5847         (main): Define `rint' as long long on IA64.  Added new test when
5848         FFI_CLOSURES is defined.
5849         * include/ffi.h.in (ALIGN): Use size_t, not unsigned.
5850         (ffi_abi): Recognize IA64.
5851         (ffi_raw): Added `flt' field.
5852         Added "Java raw API" code.
5853         * configure.in: Recognize ia64.
5854         * Makefile.am (TARGET_SRC_IA64): New macro.
5855         (libffi_la_common_SOURCES): Added java_raw_api.c.
5856         (libffi_la_SOURCES): Define in IA64 case.
5857
5858 2000-01-04  Tom Tromey  <tromey@cygnus.com>
5859
5860         * Makefile.in: Rebuilt with newer automake.
5861
5862 1999-12-31  Tom Tromey  <tromey@cygnus.com>
5863
5864         * Makefile.am (INCLUDES): Added -I$(top_srcdir)/src.
5865
5866 1999-09-01  Tom Tromey  <tromey@cygnus.com>
5867
5868         * include/ffi.h.in: Removed PACKAGE and VERSION defines and
5869         undefs.
5870         * fficonfig.h.in: Rebuilt.
5871         * configure: Rebuilt.
5872         * configure.in: Pass 3rd argument to AM_INIT_AUTOMAKE.
5873         Use AM_PROG_LIBTOOL (automake 1.4 compatibility).
5874         * acconfig.h: Don't #undef PACKAGE or VERSION.
5875
5876 1999-08-09  Anthony Green  <green@cygnus.com>
5877
5878         * include/ffi.h.in: Try to work around messy header problem
5879         with PACKAGE and VERSION.
5880
5881         * configure: Rebuilt.
5882         * configure.in: Change version to 2.00-beta.
5883
5884         * fficonfig.h.in: Rebuilt.
5885         * acconfig.h (FFI_NO_STRUCTS, FFI_NO_RAW_API): Define.
5886
5887         * src/x86/ffi.c (ffi_raw_call): Rename.
5888
5889 1999-08-02  Kresten Krab Thorup  <krab@dominiq.is.s.u-tokyo.ac.jp>
5890
5891         * src/x86/ffi.c (ffi_closure_SYSV): New function.
5892         (ffi_prep_incoming_args_SYSV): Ditto.
5893         (ffi_prep_closure): Ditto.
5894         (ffi_closure_raw_SYSV): Ditto.
5895         (ffi_prep_raw_closure): More ditto.
5896         (ffi_call_raw): Final ditto.
5897
5898         * include/ffi.h.in: Add definitions for closure and raw API.
5899
5900         * src/x86/ffi.c (ffi_prep_cif_machdep): Added case for
5901         FFI_TYPE_UINT64.
5902
5903         * Makefile.am (libffi_la_common_SOURCES): Added raw_api.c
5904
5905         * src/raw_api.c: New file.
5906
5907         * include/ffi.h.in (ffi_raw): New type.
5908         (UINT_ARG, SINT_ARG): New defines.
5909         (ffi_closure, ffi_raw_closure): New types.
5910         (ffi_prep_closure, ffi_prep_raw_closure): New declarations.
5911
5912         * configure.in: Add check for endianness and sizeof void*.
5913
5914         * src/x86/sysv.S (ffi_call_SYSV): Call fixup routine via argument,
5915         instead of directly.
5916
5917         * configure: Rebuilt.
5918
5919 Thu Jul  8 14:28:42 1999  Anthony Green  <green@cygnus.com>
5920
5921         * configure.in: Add x86 and powerpc BeOS configurations.
5922         From Makoto Kato <m_kato@ga2.so-net.ne.jp>.
5923
5924 1999-05-09  Anthony Green  <green@cygnus.com>
5925
5926         * configure.in: Add warning about this being beta code.
5927         Remove src/Makefile.am from the picture.
5928         * configure: Rebuilt.
5929
5930         * Makefile.am: Move logic from src/Makefile.am.  Add changes
5931         to support libffi as a target library.
5932         * Makefile.in: Rebuilt.
5933
5934         * aclocal.m4, config.guess, config.sub, ltconfig, ltmain.sh:
5935         Upgraded to new autoconf, automake, libtool.
5936
5937         * README: Tweaks.
5938
5939         * LICENSE: Update copyright date.
5940
5941         * src/Makefile.am, src/Makefile.in: Removed.
5942
5943 1998-11-29  Anthony Green  <green@cygnus.com>
5944
5945         * include/ChangeLog: Removed.
5946         * src/ChangeLog: Removed.
5947         * src/mips/ChangeLog: Removed.
5948         * src/sparc/ChangeLog: Remboved.
5949         * src/x86/ChangeLog: Removed.
5950
5951         * ChangeLog.v1: Created.