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