OSDN Git Service

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