OSDN Git Service

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