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