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