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