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