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