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