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