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