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