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