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