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