blob: 952ad32d988d2a6b0eb074f57b8d73d66f35c6fb [file] [log] [blame]
Anthony Greenb40aeda2014-02-28 01:01:29 -050012014-02-28 Marcin Wojdyr <wojdyr@gmail.com>
2
3 * libffi.pc.in (toolexeclibdir): use -L${toolexeclibdir} instead
4 of -L${libdir}.
5
Anthony Green20698ab2014-02-28 00:56:27 -050062014-02-28 Paulo Pizarro <paulo.pizarro@gmail.com>
7
8 * src/bfin/sysv.S: Calling functions in shared libraries requires
9 considering the GOT.
10
Anthony Green64bd0692014-02-28 00:52:56 -0500112014-02-28 Josh Triplett <josh@joshtriplett.org>
12
13 * src/x86/ffi64.c (classify_argument): Handle case where
14 FFI_TYPE_LONGDOUBLE == FFI_TYPE_DOUBLE.
15
Anthony Green33c99542014-02-28 00:38:41 -0500162014-02-28 Anthony Green <green@moxielogic.com>
17
18 * ltmain.sh: Generate with libtool-2.4.2.418.
19 * m4/libtool.m4, m4/ltoptions.m4, m4/ltversion.m4: Ditto.
20 * configure: Rebuilt.
21
Anthony Green5a88c852014-02-28 00:23:04 -0500222014-02-28 Dominik Vogt <vogt@linux.vnet.ibm.com>
23
24 * configure.ac (AC_ARG_ENABLE struct): Fix typo in help
25 message.
26 (AC_ARG_ENABLE raw_api): Ditto.
27 * configure, fficonfig.h.in: Rebuilt.
28
Anthony Green001aaf42014-02-28 00:20:17 -0500292014-02-28 Will Newton <will.newton@linaro.org>
30
31 * src/arm/sysv.S: Initialize IP register with FP.
32
Anthony Green49f77292014-02-28 00:17:16 -0500332014-02-28 Yufeng Zhang <yufeng.zhang@arm.com>
34
35 * src/aarch64/sysv.S (ffi_closure_SYSV): Use x29 as the
36 main CFA reg; update cfi_rel_offset.
37
Heiher40927bd2014-01-21 23:18:27 +0800382014-02-09 Heiher <r@hev.cc>
39
40 * src/mips/n32.S: Fix call floating point va function.
41
Zachary Waldowskif466aad2014-01-21 16:38:31 -0500422014-01-21 Zachary Waldowski <zach@waldowski.me>
43
44 * src/aarch64/ffi.c: Fix missing semicolons on assertions under
45 debug mode.
Zachary Waldowskibfc06b32013-12-30 17:36:39 -050046
472013-12-30 Zachary Waldowski <zach@waldowski.me>
48
49 * .gitignore: Exclude darwin_* generated source and build_* trees.
50 * src/aarch64/ffi.c, src/arm/ffi.c, src/x86/ffi.c: Inhibit Clang
51 previous prototype warnings.
52 * src/arm/ffi.c: Prevent NULL dereference, fix short type warning
53 * src/dlmalloc.c: Fix warnings from set_segment_flags return type,
54 and the native use of size_t for malloc on platforms
55 * src/arm/sysv.S: Use unified syntax. Clang clean-ups for
56 ARM_FUNC_START.
57 * generate-osx-source-and-headers.py: Remove.
58 * build-ios.sh: Remove.
59 * libffi.xcodeproj/project.pbxproj: Rebuild targets. Include
60 x86_64+aarch64 pieces in library. Export headers properly.
61 * src/x86/ffi64.c: More Clang warning clean-ups.
62 * src/closures.c (open_temp_exec_file_dir): Use size_t.
63 * src/prep_cif.c (ffi_prep_cif_core): Cast ALIGN result.
64 * src/aarch64/sysv.S: Use CNAME for global symbols. Only use
65 .size for ELF targets.
66 * src/aarch64/ffi.c: Clean up for double == long double. Clean up
Zachary Waldowskif466aad2014-01-21 16:38:31 -050067 from Clang warnings. Use Clang cache invalidation builtin. Use
Zachary Waldowskibfc06b32013-12-30 17:36:39 -050068 size_t in place of unsigned in many places. Accommodate for
69 differences in Apple AArch64 ABI.
70
712013-12-02 Daniel Rodríguez Troitiño <drodrigueztroitino@yahoo.es>
72
73 * generate-darwin-source-and-headers.py: Clean up, modernize,
Anthony Green447483d2014-02-27 15:42:41 -050074 merged version of previous scripts.
Zachary Waldowskibfc06b32013-12-30 17:36:39 -050075
Alan Modraab79d6e2013-11-21 06:12:35 -0500762013-11-21 Anthony Green <green@moxielogic.com>
77
78 * configure, Makefile.in, include/Makefile.in, include/ffi.h.in,
79 man/Makefile.in, testsuite/Makefile.in, fficonfig.h.in: Rebuilt.
80
812013-11-21 Alan Modra <amodra@gmail.com>
82
83 * Makefile.am (EXTRA_DIST): Add new src/powerpc files.
84 (nodist_libffi_la_SOURCES <POWERPC, POWERPC_FREEBSD>): Likewise.
85 * configure.ac (HAVE_LONG_DOUBLE_VARIANT): Define for powerpc.
86 * include/ffi.h.in (ffi_prep_types): Declare.
87 * src/prep_cif.c (ffi_prep_cif_core): Call ffi_prep_types.
88 * src/types.c (FFI_NONCONST_TYPEDEF): Define and use for
89 HAVE_LONG_DOUBLE_VARIANT.
90 * src/powerpc/ffi_powerpc.h: New file.
91 * src/powerpc/ffi.c: Split into..
92 * src/powerpc/ffi_sysv.c: ..new file, and..
93 * src/powerpc/ffi_linux64.c: ..new file, rewriting parts.
94 * src/powerpc/ffitarget.h (enum ffi_abi): Rewrite powerpc ABI
95 selection as bits controlling features.
96 * src/powerpc/linux64.S: For consistency, use POWERPC64 rather
97 than __powerpc64__.
98 * src/powerpc/linux64_closure.S: Likewise.
99 * src/powerpc/ppc_closure.S: Likewise. Move .note.FNU-stack
100 inside guard.
101 * src/powerpc/sysv.S: Likewise.
102 * configure: Regenerate.
103 * fficonfig.h.in: Regenerate.
104 * Makefile.in: Regenerate.
105
1062013-11-20 Alan Modra <amodra@gmail.com>
107
108 * src/powerpc/ffi.c (ffi_prep_cif_machdep_core): Use
109 NUM_FPR_ARG_REGISTERS64 and NUM_GPR_ARG_REGISTERS64 not their
110 32-bit versions for 64-bit code.
111 * src/powerpc/linux64_closure.S: Don't use the return value area
112 as a parameter save area on ELFv2.
113
Iain Sandoeaa1f62c2013-11-18 13:11:56 +00001142013-11-18 Iain Sandoe <iain@codesourcery.com>
115
116 * src/powerpc/darwin.S (EH): Correct use of pcrel FDE encoding.
117 * src/powerpc/darwin_closure.S (EH): Likewise. Modernise picbase
118 labels.
119
Anthony Green2f450822013-11-18 06:52:29 -05001202013-11-18 Anthony Green <green@moxielogic.com>
121
122 * src/arm/ffi.c (ffi_call): Hoist declaration of temp to top of
123 function.
124 * src/arm/ffi.c (ffi_closure_inner): Moderize function declaration
125 to appease compiler.
126 Thanks for Gregory P. Smith <greg@krypto.org>.
127
1282013-11-18 Anthony Green <green@moxielogic.com>
129
130 * README (tested): Mention PowerPC ELFv2.
131
Alan Modra164283f2013-11-16 06:38:55 -05001322013-11-16 Alan Modra <amodra@gmail.com>
133
Alan Modra16d56c52013-11-18 06:36:03 -0500134 * src/powerpc/ppc_closure.S: Move errant #endif to where it belongs.
135 Don't bl .Luint128.
136
1372013-11-16 Alan Modra <amodra@gmail.com>
138
Alan Modra83f65b62013-11-16 06:53:50 -0500139 * src/powerpc/ffi.c (ffi_prep_cif_machdep_core): Use #if _CALL_ELF
140 test to select parameter save sizing for ELFv2 vs. ELFv1.
141 * src/powerpc/ffitarget.h (FFI_V2_TYPE_FLOAT_HOMOG,
142 FFI_V2_TYPE_DOUBLE_HOMOG, FFI_V2_TYPE_SMALL_STRUCT): Define.
143 (FFI_TRAMPOLINE_SIZE): Define variant for ELFv2.
144 * src/powerpc/ffi.c (FLAG_ARG_NEEDS_PSAVE): Define.
145 (discover_homogeneous_aggregate): New function.
146 (ffi_prep_args64): Adjust start of param save area for ELFv2.
147 Handle homogenous floating point struct parms.
148 (ffi_prep_cif_machdep_core): Adjust space calculation for ELFv2.
149 Handle ELFv2 return values. Set FLAG_ARG_NEEDS_PSAVE. Handle
150 homogenous floating point structs.
151 (ffi_call): Increase size of smst_buffer for ELFv2. Handle ELFv2.
152 (flush_icache): Compile for ELFv2.
153 (ffi_prep_closure_loc): Set up ELFv2 trampoline.
154 (ffi_closure_helper_LINUX64): Don't return all structs directly
155 to caller. Handle homogenous floating point structs. Handle
156 ELFv2 struct return values.
157 * src/powerpc/linux64.S (ffi_call_LINUX64): Set up r2 for
158 ELFv2. Adjust toc save location. Call function pointer using
159 r12. Handle FLAG_RETURNS_SMST. Don't predict branches.
160 * src/powerpc/linux64_closure.S (ffi_closure_LINUX64): Set up r2
161 for ELFv2. Define ELFv2 versions of STACKFRAME, PARMSAVE, and
162 RETVAL. Handle possibly missing parameter save area. Handle
163 ELFv2 return values.
164 (.note.GNU-stack): Move inside outer #ifdef.
165
1662013-11-16 Alan Modra <amodra@gmail.com>
167
Alan Modra36285132013-11-16 06:52:43 -0500168 * src/powerpc/ffi.c (ffi_prep_cif_machdep): Revert 2013-02-08
169 change. Do not consume an int arg when returning a small struct
170 for FFI_SYSV ABI.
171 (ffi_call): Only use bounce buffer when FLAG_RETURNS_SMST.
172 Properly copy bounce buffer to destination.
173 * src/powerpc/sysv.S: Revert 2013-02-08 change.
174 * src/powerpc/ppc_closure.S: Remove stray '+'.
175
1762013-11-16 Alan Modra <amodra@gmail.com>
177
Alan Modra1c065152013-11-16 06:41:36 -0500178 * src/powerpc/ffi.c (ffi_prep_args64): Align struct parameters
179 according to __STRUCT_PARM_ALIGN__.
180 (ffi_prep_cif_machdep_core): Likewise.
181 (ffi_closure_helper_LINUX64): Likewise.
182
1832013-11-16 Alan Modra <amodra@gmail.com>
184
Alan Modraa97cf1f2013-11-16 06:40:13 -0500185 * src/powerpc/linux64.S (ffi_call_LINUX64): Tweak restore of r28.
186 (.note.GNU-stack): Move inside outer #ifdef.
187 * src/powerpc/linux64_closure.S (STACKFRAME, PARMSAVE,
188 RETVAL): Define and use throughout.
189 (ffi_closure_LINUX64): Save fprs before buying stack.
190 (.note.GNU-stack): Move inside outer #ifdef.
191
1922013-11-16 Alan Modra <amodra@gmail.com>
193
Alan Modra164283f2013-11-16 06:38:55 -0500194 * src/powerpc/ffitarget.h (FFI_TARGET_SPECIFIC_VARIADIC): Define.
195 (FFI_EXTRA_CIF_FIELDS): Define.
196 * src/powerpc/ffi.c (ffi_prep_args64): Save fprs as per the
197 ABI, not to both fpr and param save area.
198 (ffi_prep_cif_machdep_core): Renamed from ffi_prep_cif_machdep.
199 Keep initial flags. Formatting. Remove dead FFI_LINUX_SOFT_FLOAT
200 code.
201 (ffi_prep_cif_machdep, ffi_prep_cif_machdep_var): New functions.
202 (ffi_closure_helper_LINUX64): Pass floating point as per ABI,
203 not to both fpr and parameter save areas.
204
205 * libffi/testsuite/libffi.call/cls_double_va.c (main): Correct
206 function cast and don't call ffi_prep_cif.
207 * libffi/testsuite/libffi.call/cls_longdouble_va.c (main): Likewise.
208
Andrew Haleydb0ace32013-11-16 06:29:25 -05002092013-11-15 Andrew Haley <aph@redhat.com>
210
Andrew Haley31257b32013-11-16 06:35:51 -0500211 * doc/libffi.texi (Closure Example): Fix the sample code.
212 * doc/libffi.info, doc/stamp-vti, doc/version.texi: Rebuilt.
213
2142013-11-15 Andrew Haley <aph@redhat.com>
215
Andrew Haleydb0ace32013-11-16 06:29:25 -0500216 * testsuite/libffi.call/va_struct1.c (main): Fix broken test.
217 * testsuite/libffi.call/cls_uint_va.c (cls_ret_T_fn): Likewise
218 * testsuite/libffi.call/cls_struct_va1.c (test_fn): Likewise.
219 * testsuite/libffi.call/va_1.c (main): Likewise.
220
David Schneiderf3657da2013-11-14 13:02:16 +01002212013-11-14 David Schneider <david.schneider@bivab.de>
222
Anthony Greende10f502013-11-14 10:56:29 -0500223 * src/arm/ffi.c: Fix register allocation for mixed float and
224 doubles.
225 * testsuite/libffi.call/cls_many_mixed_float_double.c: Testcase
226 for many mixed float and double arguments.
227
Alan Modra58c25772013-11-13 16:55:36 -05002282013-11-13 Alan Modra <amodra@gmail.com>
229
230 * doc/libffi.texi (Simple Example): Correct example code.
231 * doc/libffi.info, doc/stamp-vti, doc/version.texi: Rebuilt.
232
Anthony Green8af42f92013-11-13 16:40:28 -05002332013-11-13 Anthony Green <green@moxielogic.com>
234
235 * include/ffi_common.h: Respect HAVE_ALLOCA_H for GNU compiler
236 based build. (Thanks to tmr111116 on github)
237
Anthony Green2f5b7ce2013-11-09 06:16:32 -05002382013-11-09 Anthony Green <green@moxielogic.com>
239
240 * m4/libtool.m4: Refresh.
241 * configure, Makefile.in: Rebuilt.
242 * README: Add more notes about next release.
243
2442013-11-09 Shigeharu TAKENO <shige@iee.niit.ac.jp>
245
246 * m4/ax_gcc_archflag.m4 (ax_gcc_arch): Don't recognize
247 UltraSPARC-IIi as ultrasparc3.
248
Mark Kettenisbecd7542013-11-06 06:43:49 -05002492013-11-06 Mark Kettenis <kettenis@gnu.org>
250
251 * src/x86/freebsd.S (ffi_call_SYSV): Align the stack pointer to
252 16-bytes.
253
Konstantin Belousov05c31092013-11-06 06:40:58 -05002542013-11-06 Konstantin Belousov <kib@freebsd.org>
255
256 * src/x86/freebsd.S (ffi_closure_raw_SYSV): Mark the assembler
257 source as not requiring executable stack.
258
Anthony Greencf6bf982013-11-02 17:23:59 -04002592013-11-02 Anthony Green <green@moxielogic.com>
260
261 * doc/libffi.texi (The Basics): Clarify return value buffer size
262 requirements. Also, NULL result buffer pointers are no longer
263 supported.
264 * doc/libffi.info: Rebuilt.
265
Anthony Greenc2422172013-11-02 14:08:23 -07002662013-11-02 Mischa Jonker <mjonker@synopsys.com>
267
268 * Makefile.am (nodist_libffi_la_SOURCES): Fix build error.
269 * Makefile.in: Rebuilt.
270
2712013-11-02 David Schneider <david.schneider@bivab.de>
272
273 * src/arm/ffi.c: more robust argument handling for closures on arm hardfloat
274 * testsuite/libffi.call/many_mixed.c: New file.
275 * testsuite/libffi.call/cls_many_mixed_args.c: More tests.
276
Anthony Greenf4b843f2013-11-02 17:01:15 -04002772013-11-02 Vitaly Budovski
278
279 * src/x86/ffi.c (ffi_prep_cif_machdep): Don't align stack for win32.
280
Mark H Weaverd3372c52013-10-26 08:30:06 -04002812013-10-23 Mark H Weaver <mhw@netris.org>
282
283 * src/mips/ffi.c: Fix handling of uint32_t arguments on the
284 MIPS N32 ABI.
285
Sandra Loosemore16b93a22013-10-15 15:33:59 -04002862013-10-13 Sandra Loosemore <sandra@codesourcery.com>
287
288 * README: Add Nios II to table of supported platforms.
289 * Makefile.am (EXTRA_DIST): Add nios2 files.
290 (nodist_libffi_la_SOURCES): Likewise.
291 * Makefile.in: Regenerated.
292 * configure.ac (nios2*-linux*): New host.
293 (NIOS2): Add AM_CONDITIONAL.
294 * configure: Regenerated.
295 * src/nios2/ffi.c: New.
296 * src/nios2/ffitarget.h: New.
297 * src/nios2/sysv.S: New.
298 * src/prep_cif.c (initialize_aggregate): Handle extra structure
299 alignment via FFI_AGGREGATE_ALIGNMENT.
300 (ffi_prep_cif_core): Conditionalize structure return for NIOS2.
301
Sandra Loosemore2f5626c2013-10-15 15:32:16 -04003022013-10-10 Sandra Loosemore <sandra@codesourcery.com>
303
304 * testsuite/libffi.call/cls_many_mixed_args.c (cls_ret_double_fn):
305 Fix uninitialized variable.
306
Marcus Shawcroftf64e4a82013-10-15 15:20:14 -04003072013-10-11 Marcus Shawcroft <marcus.shawcroft@arm.com>
308
309 * testsuite/libffi.call/many.c (many): Replace * with +.
310
Anthony Green128cd1d2013-10-08 06:45:51 -04003112013-10-08 Ondřej Bílka <neleai@seznam.cz>
312
313 * src/aarch64/ffi.c, src/aarch64/sysv.S, src/arm/ffi.c,
314 src/arm/gentramp.sh, src/bfin/sysv.S, src/closures.c,
315 src/dlmalloc.c, src/ia64/ffi.c, src/microblaze/ffi.c,
316 src/microblaze/sysv.S, src/powerpc/darwin_closure.S,
317 src/powerpc/ffi.c, src/powerpc/ffi_darwin.c, src/sh/ffi.c,
318 src/tile/tile.S, testsuite/libffi.call/nested_struct11.c: Fix
319 spelling errors.
320
Anthony Greend2fcbcd2013-10-08 06:27:46 -04003212013-10-08 Anthony Green <green@moxielogic.com>
322
323 * aclocal.m4, compile, config.guess, config.sub, depcomp,
324 install-sh, mdate-sh, missing, texinfo.tex: Update from upstream.
325 * configure.ac: Update version to 3.0.14-rc0.
326 * Makefile.in, configure, Makefile.in, include/Makefile.in,
327 man/Makefile.in, testsuite/Makefile.in: Rebuilt.
Anthony Green128cd1d2013-10-08 06:45:51 -0400328 * README: Mention M88K and VAX.
Anthony Greend2fcbcd2013-10-08 06:27:46 -0400329
3302013-07-15 Miod Vallat <miod@openbsd.org>
331
332 * Makefile.am,
333 configure.ac,
334 src/m88k/ffi.c,
335 src/m88k/ffitarget.h,
336 src/m88k/obsd.S,
337 src/vax/elfbsd.S,
338 src/vax/ffi.c,
339 src/vax/ffitarget.h: Add m88k and vax support.
340
Anthony Greend3d099b2013-07-02 16:11:38 -04003412013-06-24 Alan Modra <amodra@gmail.com>
342
343 * src/powerpc/ffi.c (ffi_prep_args_SYSV): Move var declaration
344 before statements.
345 (ffi_prep_args64): Support little-endian.
346 (ffi_closure_helper_SYSV, ffi_closure_helper_LINUX64): Likewise.
347 * src/powerpc/linux64_closure.S (ffi_closure_LINUX64): Likewise.
348 * src/powerpc/ppc_closure.S (ffi_closure_SYSV): Likewise.
349
Mischa Jonkerb082e152013-06-10 16:19:33 +02003502013-06-12 Mischa Jonker <mjonker@synopsys.com>
351
352 * configure.ac: Add support for ARC.
353 * Makefile.am: Likewise.
354 * README: Add ARC details.
355 * src/arc/arcompact.S: New.
356 * src/arc/ffi.c: Likewise.
357 * src/arc/ffitarget.h: Likewise.
358
David Schneider4750e3c2013-03-28 16:56:36 +01003592013-03-28 David Schneider <david.schneider@bivab.de>
360
361 * src/arm/ffi.c: Fix support for ARM hard-float calling convention.
362 * src/arm/sysv.S: call different methods for SYSV and VFP ABIs.
363 * testsuite/libffi.call/cls_many_mixed_args.c: testcase for a closure with
364 mixed arguments, many doubles.
365 * testsuite/libffi.call/many_double.c: testcase for calling a function using
366 more than 8 doubles.
367 * testcase/libffi.call/many.c: use absolute value to check result against an
368 epsilon
369
Anthony Greencb32c812013-03-17 09:27:55 -04003702013-03-17 Anthony Green <green@moxielogic.com>
371
Anthony Green12b18862013-03-17 18:32:12 -0400372 * README: Update for 3.0.13.
373 * configure.ac: Ditto.
374 * configure: Rebuilt.
375 * doc/*: Update version.
376
3772013-03-17 Dave Korn <dave.korn.cygwin@gmail.com>
378
379 * src/closures.c (is_emutramp_enabled
380 [!FFI_MMAP_EXEC_EMUTRAMP_PAX]): Move default definition outside
381 enclosing #if scope.
382
3832013-03-17 Anthony Green <green@moxielogic.com>
384
Anthony Greencb32c812013-03-17 09:27:55 -0400385 * configure.ac: Only modify toolexecdir in certain cases.
386 * configure: Rebuilt.
387
Anthony Green4acf0052013-03-16 08:18:45 -04003882013-03-16 Gilles Talis <gilles.talis@gmail.com>
389
390 * src/powerpc/ffi.c (ffi_prep_args_SYSV): Don't use
391 fparg_count,etc on __NO_FPRS__ targets.
392
Anthony Green8a286f52013-03-16 08:01:19 -04003932013-03-16 Alan Hourihane <alanh@fairlite.co.uk>
394
Anthony Green4acf0052013-03-16 08:18:45 -0400395 * src/m68k/sysv.S (epilogue): Don't use extb instruction on
Anthony Green8a286f52013-03-16 08:01:19 -0400396 m680000 machines.
397
Anthony Green211a9eb2013-03-16 04:24:40 -07003982013-03-16 Alex Gaynor <alex.gaynor@gmail.com>
399
400 * src/x86/ffi.c (ffi_prep_cif_machdep): Always align stack.
401
Anthony Green2fb527a2013-03-16 07:46:38 -04004022013-03-13 Markos Chandras <markos.chandras@imgtec.com>
403
404 * configure.ac: Add support for Imagination Technologies Meta.
405 * Makefile.am: Likewise.
406 * README: Add Imagination Technologies Meta details.
407 * src/metag/ffi.c: New.
408 * src/metag/ffitarget.h: Likewise.
409 * src/metag/sysv.S: Likewise.
410
Anthony Green675c9832013-03-16 08:12:38 -04004112013-02-24 Andreas Schwab <schwab@linux-m68k.org>
412
413 * doc/libffi.texi (Structures): Fix missing category argument of
414 @deftp.
415
Anthony Greenf308faf2013-02-11 14:25:13 -05004162013-02-11 Anthony Green <green@moxielogic.com>
417
418 * configure.ac: Update release number to 3.0.12.
419 * configure: Rebuilt.
420 * README: Update release info.
421
4222013-02-10 Anthony Green <green@moxielogic.com>
423
424 * README: Add Moxie.
425 * src/moxie/ffi.c: Created.
426 * src/moxie/eabi.S: Created.
427 * src/moxie/ffitarget.h: Created.
428 * Makefile.am (nodist_libffi_la_SOURCES): Add Moxie.
429 * Makefile.in: Rebuilt.
430 * configure.ac: Add Moxie.
431 * configure: Rebuilt.
432 * testsuite/libffi.call/huge_struct.c: Disable format string
433 warnings for moxie*-*-elf tests.
434
4352013-02-10 Anthony Green <green@moxielogic.com>
436
437 * Makefile.am (LTLDFLAGS): Fix reference.
438 * Makefile.in: Rebuilt.
439
Anthony Green4ea22e52013-02-10 08:48:38 -05004402013-02-10 Anthony Green <green@moxielogic.com>
441
442 * README: Update supported platforms. Update test results link.
443
Anthony Green10e77222013-02-10 08:47:26 -05004442013-02-09 Anthony Green <green@moxielogic.com>
445
446 * testsuite/libffi.call/negint.c: Remove forced -O2.
447 * testsuite/libffi.call/many2.c (foo): Remove GCCism.
448 * testsuite/libffi.call/ffitest.h: Add default PRIuPTR definition.
449
450 * src/sparc/v8.S (ffi_closure_v8): Import ancient ulonglong
451 closure return type fix developed by Martin v. Löwis for cpython
452 fork.
453
Anthony Green70b11b42013-02-08 16:12:19 -05004542013-02-08 Andreas Tobler <andreast@fgznet.ch>
455
456 * src/powerpc/ffi.c (ffi_prep_cif_machdep): Fix small struct
457 support.
458 * src/powerpc/sysv.S: Ditto.
459
Anthony Green63ba1fa2013-02-08 15:18:19 -05004602013-02-08 Anthony Green <green@moxielogic.com>
461
462 * testsuite/libffi.call/cls_longdouble.c: Remove xfail for
463 arm*-*-*.
464
4652013-02-08 Anthony Green <green@moxielogic.com>
466
467 * src/sparc/ffi.c (ffi_prep_closure_loc): Fix cache flushing for GCC.
468
Anthony Green24fbca42013-02-08 14:19:56 -05004692013-02-08 Matthias Klose <doko@ubuntu.com>
Anthony Greenb0fa11c2013-02-08 14:17:13 -0500470
471 * man/ffi_prep_cif.3: Clean up for debian linter.
472
Anthony Green24fbca42013-02-08 14:19:56 -05004732013-02-08 Peter Bergner <bergner@vnet.ibm.com>
Anthony Green8bd15d12013-02-08 13:56:37 -0500474
475 * src/powerpc/ffi.c (ffi_prep_args_SYSV): Account for FP args pushed
476 on the stack.
477
Anthony Greencb03ea82013-02-08 12:25:18 -05004782013-02-08 Anthony Green <green@moxielogic.com>
479
Anthony Green7aab8252013-02-08 13:26:21 -0500480 * Makefile.am (EXTRA_DIST): Add missing files.
481 * testsuite/Makefile.am (EXTRA_DIST): Ditto.
482 * Makefile.in: Rebuilt.
483
4842013-02-08 Anthony Green <green@moxielogic.com>
485
Anthony Greencb03ea82013-02-08 12:25:18 -0500486 * configure.ac: Move sparc asm config checks to within functions
487 for compatibility with sun tools.
488 * configure: Rebuilt.
489 * src/sparc/ffi.c (ffi_prep_closure_loc): Flush cache on v9
490 systems.
491 * src/sparc/v8.S (ffi_flush_icache): Implement a sparc v9 cache
492 flusher.
493
Anthony Green35ee8d42013-02-08 07:12:41 -05004942013-02-08 Nathan Rossi <nathan.rossi@xilinx.com>
495
496 * src/microblaze/ffi.c (ffi_closure_call_SYSV): Fix handling of
497 small big-endian structures.
498 (ffi_prep_args): Ditto.
499
Anthony Greened6ae952013-02-07 16:43:36 -05005002013-02-07 Anthony Green <green@moxielogic.com>
501
Anthony Green9db7e1a2013-02-07 21:06:08 -0500502 * src/sparc/v8.S (ffi_call_v8): Fix typo from last patch
503 (effectively hiding ffi_call_v8).
504
5052013-02-07 Anthony Green <green@moxielogic.com>
506
Anthony Greence0138e2013-02-07 18:04:01 -0500507 * configure.ac: Update bug reporting address.
508 * configure.in: Rebuild.
509
Anthony Greenfd07c9e2013-02-07 18:00:36 -0500510 * src/sparc/v8.S (ffi_flush_icache): Out-of-line cache flusher for
511 Sun compiler.
512 * src/sparc/ffi.c (ffi_call): Remove warning.
513 Call ffi_flush_icache for non-GCC builds.
514 (ffi_prep_closure_loc): Use ffi_flush_icache.
515
Anthony Greened6ae952013-02-07 16:43:36 -0500516 * Makefile.am (EXTRA_DIST): Add libtool-ldflags.
517 * Makefile.in: Rebuilt.
518 * libtool-ldflags: New file.
519
Anthony Greenffef2e02013-02-07 15:47:01 -05005202013-02-07 Daniel Schepler <dschepler@gmail.com>
521
522 * configure.ac: Correctly identify x32 systems as 64-bit.
523 * m4/libtool.m4: Remove libtool expr error.
524 * aclocal.m4, configure: Rebuilt.
525
Anthony Greenf3a4f3f2013-02-07 09:57:20 -05005262013-02-07 Anthony Green <green@moxielogic.com>
527
Anthony Green176aa9d2013-02-07 15:29:22 -0500528 * configure.ac: Fix GCC usage test.
529 * configure: Rebuilt.
Anthony Green95eeceb2013-02-07 15:32:46 -0500530 * README: Mention LLVM/GCC x86_64 issue.
531 * testsuite/Makefile.in: Rebuilt.
Anthony Green176aa9d2013-02-07 15:29:22 -0500532
5332013-02-07 Anthony Green <green@moxielogic.com>
534
Anthony Greenf3a4f3f2013-02-07 09:57:20 -0500535 * testsuite/libffi.call/cls_double_va.c (main): Replace // style
536 comments with /* */ for xlc compiler.
537 * testsuite/libffi.call/stret_large.c (main): Ditto.
538 * testsuite/libffi.call/stret_large2.c (main): Ditto.
539 * testsuite/libffi.call/nested_struct1.c (main): Ditto.
540 * testsuite/libffi.call/huge_struct.c (main): Ditto.
541 * testsuite/libffi.call/float_va.c (main): Ditto.
542 * testsuite/libffi.call/cls_struct_va1.c (main): Ditto.
543 * testsuite/libffi.call/cls_pointer_stack.c (main): Ditto.
544 * testsuite/libffi.call/cls_pointer.c (main): Ditto.
545 * testsuite/libffi.call/cls_longdouble_va.c (main): Ditto.
546
Anthony Greenf7cd61e2013-02-06 17:38:04 -05005472013-02-06 Anthony Green <green@moxielogic.com>
548
Anthony Green522f8fe2013-02-06 20:31:31 -0500549 * man/ffi_prep_cif.3: Clean up for debian lintian checker.
550
5512013-02-06 Anthony Green <green@moxielogic.com>
552
Anthony Greenf7cd61e2013-02-06 17:38:04 -0500553 * Makefile.am (pkgconfigdir): Add missing pkgconfig install bits.
554 * Makefile.in: Rebuild.
555
Anthony Green6a790122013-02-06 17:37:15 -05005562013-02-02 Mark H Weaver <mhw@netris.org>
557
558 * src/x86/ffi64.c (ffi_call): Sign-extend integer arguments passed
559 via general purpose registers.
560
Anthony Greenaeb87192013-01-21 07:37:30 -05005612013-01-21 Nathan Rossi <nathan.rossi@xilinx.com>
562
563 * README: Add MicroBlaze details.
564 * Makefile.am: Add MicroBlaze support.
565 * configure.ac: Likewise.
566 * src/microblaze/ffi.c: New.
567 * src/microblaze/ffitarget.h: Likewise.
568 * src/microblaze/sysv.S: Likewise.
569
5702013-01-21 Nathan Rossi <nathan.rossi@xilinx.com>
571 * testsuite/libffi.call/return_uc.c: Fixed issue.
572
Anthony Green20cae322013-01-21 07:07:38 -05005732013-01-21 Chris Zankel <chris@zankel.net>
574
575 * README: Add Xtensa support.
576 * Makefile.am: Likewise.
577 * configure.ac: Likewise.
578 * Makefile.in Regenerate.
579 * configure: Likewise.
580 * src/prep_cif.c: Handle Xtensa.
581 * src/xtensa: New directory.
582 * src/xtensa/ffi.c: New file.
583 * src/xtensa/ffitarget.h: Ditto.
584 * src/xtensa/sysv.S: Ditto.
585
Anthony Greenbff052d2013-01-11 10:24:32 -05005862013-01-11 Anthony Green <green@moxielogic.com>
587
Anthony Green05fbe1f2013-01-11 16:54:40 -0500588 * src/powerpc/ffi_darwin.c (ffi_prep_args): Replace // style
589 comments with /* */ for xlc compiler.
590 * src/powerpc/aix.S (ffi_call_AIX): Ditto.
Anthony Greenf03eab02013-01-11 17:14:11 -0500591 * testsuite/libffi.call/ffitest.h (allocate_mmap): Delete
592 deprecated inline function.
593 * testsuite/libffi.special/ffitestcxx.h: Ditto.
Anthony Green05fbe1f2013-01-11 16:54:40 -0500594 * README: Add update for AIX support.
595
5962013-01-11 Anthony Green <green@moxielogic.com>
597
Anthony Greenbff052d2013-01-11 10:24:32 -0500598 * configure.ac: Robustify pc relative reloc check.
599 * m4/ax_cc_maxopt.m4: Don't -malign-double. This is an ABI
600 changing option for 32-bit x86.
601 * aclocal.m4, configure: Rebuilt.
602 * README: Update supported target list.
603
Anthony Green2d9b3932013-01-09 21:14:54 -05006042013-01-10 Anthony Green <green@moxielogic.com>
605
Anthony Greencd41aea2013-01-10 17:25:45 -0500606 * README (tested): Add Compiler column to table.
607
6082013-01-10 Anthony Green <green@moxielogic.com>
609
Anthony Green8bf987d2013-01-10 17:24:51 -0500610 * src/x86/ffi64.c (struct register_args): Make sse array and array
611 of unions for sunpro compiler compatibility.
612
6132013-01-10 Anthony Green <green@moxielogic.com>
614
Anthony Green13e2d7b2013-01-10 10:52:02 -0500615 * configure.ac: Test target platform size_t size. Handle both 32
616 and 64-bit builds for x86_64-* and i?86-* targets (allowing for
617 CFLAG option to change default settings).
618 * configure, aclocal.m4: Rebuilt.
619
6202013-01-10 Anthony Green <green@moxielogic.com>
621
Anthony Green51415432013-01-10 07:35:53 -0500622 * testsuite/libffi.special/special.exp: Only run exception
623 handling tests when using GNU compiler.
624
Anthony Green56ba8d82013-01-10 07:25:10 -0500625 * m4/ax_compiler_vendor.m4: New file.
626 * configure.ac: Test for compiler vendor and don't use
627 AX_CFLAGS_WARN_ALL with the sun compiler.
628 * aclocal.m4, configure: Rebuilt.
629
6302013-01-10 Anthony Green <green@moxielogic.com>
631
Anthony Green6a028ca2013-01-10 01:19:43 -0500632 * include/ffi_common.h: Don't use GCCisms to define types when
633 building with the SUNPRO compiler.
634
6352013-01-10 Anthony Green <green@moxielogic.com>
636
Anthony Green2d9b3932013-01-09 21:14:54 -0500637 * configure.ac: Put local.exp in the right place.
638 * configure: Rebuilt.
639
640 * src/x86/ffi.c: Update comment about regparm function attributes.
641 * src/x86/sysv.S (ffi_closure_SYSV): The SUNPRO compiler requires
642 that all function arguments be passed on the stack (no regparm
643 support).
644
Anthony Greenf7879bc2013-01-08 07:30:28 -05006452013-01-08 Anthony Green <green@moxielogic.com>
646
Anthony Green83089842013-01-08 15:14:21 -0500647 * configure.ac: Generate local.exp. This sets CC_FOR_TARGET
648 when we are using the vendor compiler.
649 * testsuite/Makefile.am (EXTRA_DEJAGNU_SITE_CONFIG): Point to
650 ../local.exp.
651 * configure, testsuite/Makefile.in: Rebuilt.
652
Anthony Greenf26c7ca2013-01-08 14:47:05 -0500653 * testsuite/libffi.call/call.exp: Run tests with different
654 options, depending on whether or not we are using gcc or the
655 vendor compiler.
656 * testsuite/lib/libffi.exp (libffi-init): Set using_gcc based on
657 whether or not we are building/testing with gcc.
658
6592013-01-08 Anthony Green <green@moxielogic.com>
660
Anthony Green74c776e2013-01-08 12:25:54 -0500661 * configure.ac: Switch x86 solaris target to X86 by default.
662 * configure: Rebuilt.
663
6642013-01-08 Anthony Green <green@moxielogic.com>
665
Anthony Green8962c8c2013-01-08 12:22:24 -0500666 * configure.ac: Fix test for read-only eh_frame.
667 * configure: Rebuilt.
668
6692013-01-08 Anthony Green <green@moxielogic.com>
670
Anthony Green35ddb692013-01-08 07:53:37 -0500671 * src/x86/sysv.S, src/x86/unix64.S: Only emit DWARF unwind info
672 when building with the GNU toolchain.
Anthony Greenf7879bc2013-01-08 07:30:28 -0500673 * testsuite/libffi.call/ffitest.h (CHECK): Fix for Solaris vendor
674 compiler.
675
Anthony Green8f4772f2013-01-07 06:14:53 -05006762013-01-07 Thorsten Glaser <tg@mirbsd.org>
677
Anthony Green67cea902013-01-07 06:30:24 -0500678 * testsuite/libffi.call/cls_uchar_va.c,
679 testsuite/libffi.call/cls_ushort_va.c,
680 testsuite/libffi.call/va_1.c: Testsuite fixes.
681
6822013-01-07 Thorsten Glaser <tg@mirbsd.org>
683
Anthony Green8f4772f2013-01-07 06:14:53 -0500684 * src/m68k/ffi.c (CIF_FLAGS_SINT8, CIF_FLAGS_SINT16): Define.
685 (ffi_prep_cif_machdep): Fix 8-bit and 16-bit signed calls.
686 * src/m68k/sysv.S (ffi_call_SYSV, ffi_closure_SYSV): Ditto.
687
Anthony Greenea7f8442013-01-04 09:09:32 -05006882013-01-04 Anthony Green <green@moxielogic.com>
689
690 * Makefile.am (AM_CFLAGS): Don't automatically add -fexceptions
691 and -Wall. This is set in the configure script after testing for
692 GCC.
693 * Makefile.in: Rebuilt.
694
Anthony Greenf06c0f12013-01-02 09:39:17 -05006952013-01-02 rofl0r <https://github.com/rofl0r>
696
697 * src/powerpc/ffi.c (ffi_prep_cif_machdep): Fix build error on ppc
698 when long double == double.
699
7002013-01-02 Reini Urban <rurban@x-ray.at>
701
702 * Makefile.am (libffi_la_LDFLAGS): Add -no-undefined to LDFLAGS
703 (required for shared libs on cygwin/mingw).
704 * Makefile.in: Rebuilt.
705
Anthony Greend3d099b2013-07-02 16:11:38 -04007062012-10-31 Alan Modra <amodra@gmail.co>
Anthony Greendfadfb12012-10-31 06:46:41 -0400707
708 * src/powerpc/linux64_closure.S: Add new ABI support.
709 * src/powerpc/linux64.S: Likewise.
710
Anthony Greene944b8c2012-10-30 14:06:09 -04007112012-10-30 Magnus Granberg <zorry@gentoo.org>
712 Pavel Labushev <pavel.labushev@runbox.ru>
713
714 * configure.ac: New options pax_emutramp
715 * configure, fficonfig.h.in: Regenerated
716 * src/closures.c: New function emutramp_enabled_check() and
717 checks.
718
Anthony Greenf3429962012-10-30 07:42:27 -04007192012-10-30 Frederick Cheung <frederick.cheung@gmail.com>
720
721 * configure.ac: Enable FFI_MAP_EXEC_WRIT for Darwin 12 (mountain
722 lion) and future version.
723 * configure: Rebuild.
724
Anthony Green58e8b662012-10-30 07:07:19 -04007252012-10-30 James Greenhalgh <james.greenhalgh at arm.com>
726 Marcus Shawcroft <marcus.shawcroft at arm.com>
727
728 * README: Add details of aarch64 port.
729 * src/aarch64/ffi.c: New.
730 * src/aarch64/ffitarget.h: Likewise.
731 * src/aarch64/sysv.S: Likewise.
Anthony Greenf680b592012-11-06 16:00:40 -0500732 * Makefile.am: Support aarch64.
733 * configure.ac: Support aarch64.
734 * Makefile.in, configure: Rebuilt.
Anthony Green58e8b662012-10-30 07:07:19 -0400735
7362012-10-30 James Greenhalgh <james.greenhalgh at arm.com>
737 Marcus Shawcroft <marcus.shawcroft at arm.com>
738
739 * testsuite/lib/libffi.exp: Add support for aarch64.
740 * testsuite/libffi.call/cls_struct_va1.c: New.
741 * testsuite/libffi.call/cls_uchar_va.c: Likewise.
742 * testsuite/libffi.call/cls_uint_va.c: Likewise.
Anthony Greenf680b592012-11-06 16:00:40 -0500743 * testsuite/libffi.call/cls_ulong_va.c: Likewise.
Anthony Green58e8b662012-10-30 07:07:19 -0400744 * testsuite/libffi.call/cls_ushort_va.c: Likewise.
745 * testsuite/libffi.call/nested_struct11.c: Likewise.
746 * testsuite/libffi.call/uninitialized.c: Likewise.
747 * testsuite/libffi.call/va_1.c: Likewise.
748 * testsuite/libffi.call/va_struct1.c: Likewise.
749 * testsuite/libffi.call/va_struct2.c: Likewise.
750 * testsuite/libffi.call/va_struct3.c: Likewise.
751
Anthony Green9c00a3f2012-10-12 16:46:06 -04007522012-10-12 Walter Lee <walt@tilera.com>
753
754 * Makefile.am: Add TILE-Gx/TILEPro support.
755 * configure.ac: Likewise.
756 * Makefile.in: Regenerate.
757 * configure: Likewise.
758 * src/prep_cif.c (ffi_prep_cif_core): Handle TILE-Gx/TILEPro.
759 * src/tile: New directory.
760 * src/tile/ffi.c: New file.
761 * src/tile/ffitarget.h: Ditto.
762 * src/tile/tile.S: Ditto.
763
7642012-10-12 Matthias Klose <doko@ubuntu.com>
765
766 * generate-osx-source-and-headers.py: Normalize whitespace.
767
Anthony Green048d2f42012-10-11 10:55:25 -04007682012-09-14 David Edelsohn <dje.gcc@gmail.com>
769
770 * configure: Regenerated.
771
7722012-08-26 Andrew Pinski <apinski@cavium.com>
773
774 PR libffi/53014
775 * src/mips/ffi.c (ffi_prep_closure_loc): Allow n32 with soft-float and n64 with
776 soft-float.
777
7782012-08-08 Uros Bizjak <ubizjak@gmail.com>
779
780 * src/s390/ffi.c (ffi_prep_closure_loc): Don't ASSERT ABI test,
781 just return FFI_BAD_ABI when things are wrong.
782
7832012-07-18 H.J. Lu <hongjiu.lu@intel.com>
784
785 PR libffi/53982
786 PR libffi/53973
787 * src/x86/ffitarget.h: Check __ILP32__ instead of __LP64__ for x32.
788 (FFI_SIZEOF_JAVA_RAW): Defined to 4 for x32.
789
7902012-05-16 H.J. Lu <hongjiu.lu@intel.com>
791
792 * configure: Regenerated.
793
Nicolas Lelongd330f192012-05-05 09:37:02 -04007942012-05-05 Nicolas Lelong
795
796 * libffi.xcodeproj/project.pbxproj: Fixes.
797 * README: Update for iOS builds.
798
Anthony Green213ed152012-04-27 01:34:15 -04007992012-04-23 Alexandre Keunecke I. de Mendonca <alexandre.keunecke@gmail.com>
800
801 * configure.ac: Add Blackfin/sysv support
802 * Makefile.am: Add Blackfin/sysv support
803 * src/bfin/ffi.c: Add Blackfin/sysv support
804 * src/bfin/ffitarget.h: Add Blackfin/sysv support
Anthony Green213ed152012-04-27 01:34:15 -0400805
Anthony Green7e0a4122012-04-11 22:47:44 -04008062012-04-11 Anthony Green <green@moxielogic.com>
807
808 * Makefile.am (EXTRA_DIST): Add new script.
809 * Makefile.in: Rebuilt.
810
Zachary Waldowski39e6a582012-04-11 22:39:46 -04008112012-04-11 Zachary Waldowski <zwaldowski@gmail.com>
812
813 * generate-ios-source-and-headers.py,
814 libffi.xcodeproj/project.pbxproj: Support a Mac static library via
815 Xcode. Set iOS compatibility to 4.0. Move iOS trampoline
816 generation into an Xcode "run script" phase. Include both as
817 Xcode build scripts. Don't always regenerate config files.
818
Anthony Green853cc722012-04-10 06:33:33 -04008192012-04-10 Anthony Green <green@moxielogic.com>
820
821 * src/powerpc/ffi_darwin.c (ffi_prep_args): Add missing semicolon.
822
Anthony Green3f502302012-04-06 20:34:51 -04008232012-04-06 Anthony Green <green@moxielogic.com>
824
825 * Makefile.am (EXTRA_DIST): Add new iOS/xcode files.
826 * Makefile.in: Rebuilt.
827
Mike Lewisebb8e892012-04-06 20:02:08 -04008282012-04-06 Mike Lewis <mikelikespie@gmail.com>
829
830 * generate-ios-source-and-headers.py: New file.
831 * libffi.xcodeproj/project.pbxproj: New file.
832 * README: Update instructions on building iOS binary.
833 * build-ios.sh: Delete.
834
Anthony Greena044a562012-04-06 10:39:10 -04008352012-04-06 Anthony Green <green@moxielogic.com>
836
837 * src/x86/ffi64.c (UINT128): Define differently for Intel and GNU
838 compilers, then use it.
839
Anthony Green048d2f42012-10-11 10:55:25 -04008402012-04-06 H.J. Lu <hongjiu.lu@intel.com>
841
842 * m4/libtool.m4 (_LT_ENABLE_LOCK): Support x32.
843
Anthony Green59bb61a2012-04-06 08:26:14 -04008442012-04-06 Anthony Green <green@moxielogic.com>
845
846 * testsuite/Makefile.am (EXTRA_DIST): Add missing test cases.
847 * testsuite/Makefile.in: Rebuilt.
848
Zachary Waldowski39dccdd2012-04-05 12:32:41 -04008492012-04-05 Zachary Waldowski <zwaldowski@gmail.com>
850
851 * include/ffi.h.in: Add missing trampoline table fields.
852 * src/arm/sysv.S: Fix ENTRY definition, and wrap symbol references
853 in CNAME.
854 * src/x86/ffi.c: Wrap Windows specific code in ifdefs.
855
Anthony Green089dbce2013-01-02 08:37:35 -05008562012-04-02 Peter Bergner <bergner@vnet.ibm.com>
857
858 * src/powerpc/ffi.c (ffi_prep_args_SYSV): Declare double_tmp.
859 Silence casting pointer to integer of different size warning.
860 Delete goto to previously deleted label.
861 (ffi_call): Silence possibly undefined warning.
862 (ffi_closure_helper_SYSV): Declare variable type.
863
8642012-04-02 Peter Rosin <peda@lysator.liu.se>
865
866 * src/x86/win32.S (ffi_call_win32): Sign/zero extend the return
867 value in the Intel version as is already done for the AT&T version.
868 (ffi_closure_SYSV): Likewise.
869 (ffi_closure_raw_SYSV): Likewise.
870 (ffi_closure_STDCALL): Likewise.
871
Peter Rosin0a1ab122012-03-30 08:14:08 -04008722012-03-29 Peter Rosin <peda@lysator.liu.se>
873
874 * src/x86/win32.S (ffi_closure_raw_THISCALL): Unify the frame
875 generation, fix the ENDP label and remove the surplus third arg
876 from the 'lea' insn.
877
8782012-03-29 Peter Rosin <peda@lysator.liu.se>
879
880 * src/x86/win32.S (ffi_closure_raw_SYSV): Make the 'stubraw' label
881 visible outside the PROC, so that ffi_closure_raw_THISCALL can see
882 it. Also instruct the assembler to add a frame to the function.
883
8842012-03-23 Peter Rosin <peda@lysator.liu.se>
885
886 * Makefile.am (AM_CPPFLAGS): Add -DFFI_BUILDING.
887 * Makefile.in: Rebuilt.
888 * include/ffi.h.in [MSVC]: Add __declspec(dllimport) decorations
889 to all data exports, when compiling libffi clients using MSVC.
890
8912012-03-29 Peter Rosin <peda@lysator.liu.se>
892
893 * src/x86/ffitarget.h (ffi_abi): Add new ABI FFI_MS_CDECL and
894 make it the default for MSVC.
895 (FFI_TYPE_MS_STRUCT): New structure return convention.
896 * src/x86/ffi.c (ffi_prep_cif_machdep): Tweak the structure
897 return convention for FFI_MS_CDECL to be FFI_TYPE_MS_STRUCT
898 instead of an ordinary FFI_TYPE_STRUCT.
899 (ffi_prep_args): Treat FFI_TYPE_MS_STRUCT as FFI_TYPE_STRUCT.
900 (ffi_call): Likewise.
901 (ffi_prep_incoming_args_SYSV): Likewise.
902 (ffi_raw_call): Likewise.
903 (ffi_prep_closure_loc): Treat FFI_MS_CDECL as FFI_SYSV.
904 * src/x86/win32.S (ffi_closure_SYSV): For FFI_TYPE_MS_STRUCT,
905 return a pointer to the result structure in eax and don't pop
906 that pointer from the stack, the caller takes care of it.
907 (ffi_call_win32): Treat FFI_TYPE_MS_STRUCT as FFI_TYPE_STRUCT.
908 (ffi_closure_raw_SYSV): Likewise.
909
9102012-03-22 Peter Rosin <peda@lysator.liu.se>
911
912 * testsuite/libffi.call/closure_stdcall.c [MSVC]: Add inline
913 assembly version with Intel syntax.
914 * testsuite/libffi.call/closure_thiscall.c [MSVC]: Likewise.
915
9162012-03-23 Peter Rosin <peda@lysator.liu.se>
917
918 * testsuite/libffi.call/ffitest.h: Provide abstration of
919 __attribute__((fastcall)) in the form of a __FASTCALL__
920 define. Define it to __fastcall for MSVC.
921 * testsuite/libffi.call/fastthis1_win32.c: Use the above.
922 * testsuite/libffi.call/fastthis2_win32.c: Likewise.
923 * testsuite/libffi.call/fastthis3_win32.c: Likewise.
924 * testsuite/libffi.call/strlen2_win32.c: Likewise.
925 * testsuite/libffi.call/struct1_win32.c: Likewise.
926 * testsuite/libffi.call/struct2_win32.c: Likewise.
927
9282012-03-22 Peter Rosin <peda@lysator.liu.se>
929
930 * src/x86/win32.S [MSVC] (ffi_closure_THISCALL): Remove the manual
931 frame on function entry, MASM adds one automatically.
932
9332012-03-22 Peter Rosin <peda@lysator.liu.se>
934
935 * testsuite/libffi.call/ffitest.h [MSVC]: Add kludge for missing
936 bits in the MSVC headers.
937
9382012-03-22 Peter Rosin <peda@lysator.liu.se>
939
940 * testsuite/libffi.call/cls_12byte.c: Adjust to the C89 style
941 with no declarations after statements.
942 * testsuite/libffi.call/cls_16byte.c: Likewise.
943 * testsuite/libffi.call/cls_18byte.c: Likewise.
944 * testsuite/libffi.call/cls_19byte.c: Likewise.
945 * testsuite/libffi.call/cls_1_1byte.c: Likewise.
946 * testsuite/libffi.call/cls_20byte.c: Likewise.
947 * testsuite/libffi.call/cls_20byte1.c: Likewise.
948 * testsuite/libffi.call/cls_24byte.c: Likewise.
949 * testsuite/libffi.call/cls_2byte.c: Likewise.
950 * testsuite/libffi.call/cls_3_1byte.c: Likewise.
951 * testsuite/libffi.call/cls_3byte1.c: Likewise.
952 * testsuite/libffi.call/cls_3byte2.c: Likewise.
953 * testsuite/libffi.call/cls_4_1byte.c: Likewise.
954 * testsuite/libffi.call/cls_4byte.c: Likewise.
955 * testsuite/libffi.call/cls_5_1_byte.c: Likewise.
956 * testsuite/libffi.call/cls_5byte.c: Likewise.
957 * testsuite/libffi.call/cls_64byte.c: Likewise.
958 * testsuite/libffi.call/cls_6_1_byte.c: Likewise.
959 * testsuite/libffi.call/cls_6byte.c: Likewise.
960 * testsuite/libffi.call/cls_7_1_byte.c: Likewise.
961 * testsuite/libffi.call/cls_7byte.c: Likewise.
962 * testsuite/libffi.call/cls_8byte.c: Likewise.
963 * testsuite/libffi.call/cls_9byte1.c: Likewise.
964 * testsuite/libffi.call/cls_9byte2.c: Likewise.
965 * testsuite/libffi.call/cls_align_double.c: Likewise.
966 * testsuite/libffi.call/cls_align_float.c: Likewise.
967 * testsuite/libffi.call/cls_align_longdouble.c: Likewise.
968 * testsuite/libffi.call/cls_align_longdouble_split.c: Likewise.
969 * testsuite/libffi.call/cls_align_longdouble_split2.c: Likewise.
970 * testsuite/libffi.call/cls_align_pointer.c: Likewise.
971 * testsuite/libffi.call/cls_align_sint16.c: Likewise.
972 * testsuite/libffi.call/cls_align_sint32.c: Likewise.
973 * testsuite/libffi.call/cls_align_sint64.c: Likewise.
974 * testsuite/libffi.call/cls_align_uint16.c: Likewise.
975 * testsuite/libffi.call/cls_align_uint32.c: Likewise.
976 * testsuite/libffi.call/cls_align_uint64.c: Likewise.
977 * testsuite/libffi.call/cls_dbls_struct.c: Likewise.
978 * testsuite/libffi.call/cls_pointer_stack.c: Likewise.
979 * testsuite/libffi.call/err_bad_typedef.c: Likewise.
980 * testsuite/libffi.call/huge_struct.c: Likewise.
981 * testsuite/libffi.call/nested_struct.c: Likewise.
982 * testsuite/libffi.call/nested_struct1.c: Likewise.
983 * testsuite/libffi.call/nested_struct10.c: Likewise.
984 * testsuite/libffi.call/nested_struct2.c: Likewise.
985 * testsuite/libffi.call/nested_struct3.c: Likewise.
986 * testsuite/libffi.call/nested_struct4.c: Likewise.
987 * testsuite/libffi.call/nested_struct5.c: Likewise.
988 * testsuite/libffi.call/nested_struct6.c: Likewise.
989 * testsuite/libffi.call/nested_struct7.c: Likewise.
990 * testsuite/libffi.call/nested_struct8.c: Likewise.
991 * testsuite/libffi.call/nested_struct9.c: Likewise.
992 * testsuite/libffi.call/stret_large.c: Likewise.
993 * testsuite/libffi.call/stret_large2.c: Likewise.
994 * testsuite/libffi.call/stret_medium.c: Likewise.
995 * testsuite/libffi.call/stret_medium2.c: Likewise.
996 * testsuite/libffi.call/struct1.c: Likewise.
997 * testsuite/libffi.call/struct1_win32.c: Likewise.
998 * testsuite/libffi.call/struct2.c: Likewise.
999 * testsuite/libffi.call/struct2_win32.c: Likewise.
1000 * testsuite/libffi.call/struct3.c: Likewise.
1001 * testsuite/libffi.call/struct4.c: Likewise.
1002 * testsuite/libffi.call/struct5.c: Likewise.
1003 * testsuite/libffi.call/struct6.c: Likewise.
1004 * testsuite/libffi.call/struct7.c: Likewise.
1005 * testsuite/libffi.call/struct8.c: Likewise.
1006 * testsuite/libffi.call/struct9.c: Likewise.
1007 * testsuite/libffi.call/testclosure.c: Likewise.
1008
Anthony Greene72ed5e2012-03-21 09:52:28 -040010092012-03-21 Peter Rosin <peda@lysator.liu.se>
1010
1011 * testsuite/libffi.call/float_va.c (float_va_fn): Use %f when
1012 printing doubles (%lf is for long doubles).
1013 (main): Likewise.
1014
Anthony Greenbd78c9c2012-03-21 08:09:30 -040010152012-03-21 Peter Rosin <peda@lysator.liu.se>
1016
1017 * testsuite/lib/target-libpath.exp [*-*-cygwin*, *-*-mingw*]
1018 (set_ld_library_path_env_vars): Add the library search dir to PATH
1019 (and save PATH for later).
1020 (restore_ld_library_path_env_vars): Restore PATH.
1021
Anthony Greenccee09a2013-01-02 08:41:55 -050010222012-03-21 Peter Rosin <peda@lysator.liu.se>
1023
1024 * testsuite/lib/target-libpath.exp [*-*-cygwin*, *-*-mingw*]
1025 (set_ld_library_path_env_vars): Add the library search dir to PATH
1026 (and save PATH for later).
1027 (restore_ld_library_path_env_vars): Restore PATH.
1028
Anthony Greenbd78c9c2012-03-21 08:09:30 -040010292012-03-20 Peter Rosin <peda@lysator.liu.se>
1030
1031 * testsuite/libffi.call/strlen2_win32.c (main): Remove bug.
1032 * src/x86/win32.S [MSVC] (ffi_closure_SYSV): Make the 'stub' label
1033 visible outside the PROC, so that ffi_closure_THISCALL can see it.
1034
Anthony Green048d2f42012-10-11 10:55:25 -040010352012-03-20 Peter Rosin <peda@lysator.liu.se>
1036
1037 * testsuite/libffi.call/strlen2_win32.c (main): Remove bug.
1038 * src/x86/win32.S [MSVC] (ffi_closure_SYSV): Make the 'stub' label
1039 visible outside the PROC, so that ffi_closure_THISCALL can see it.
1040
Anthony Greenbd78c9c2012-03-21 08:09:30 -040010412012-03-19 Alan Hourihane <alanh@fairlite.co.uk>
1042
1043 * src/m68k/ffi.c: Add MINT support.
1044 * src/m68k/sysv.S: Ditto.
1045
Anthony Green048d2f42012-10-11 10:55:25 -040010462012-03-06 Chung-Lin Tang <cltang@codesourcery.com>
1047
1048 * src/arm/ffi.c (ffi_call): Add __ARM_EABI__ guard around call to
1049 ffi_call_VFP().
1050 (ffi_prep_closure_loc): Add __ARM_EABI__ guard around use of
1051 ffi_closure_VFP.
1052 * src/arm/sysv.S: Add __ARM_EABI__ guard around VFP code.
1053
Anthony Green089dbce2013-01-02 08:37:35 -050010542012-03-19 chennam <csit@axway.com>
Anthony Green65f40c32012-04-03 07:35:59 -04001055
Anthony Green089dbce2013-01-02 08:37:35 -05001056 * src/powerpc/ffi_darwin.c (ffi_prep_closure_loc): Fix AIX closure
1057 support.
Anthony Green048d2f42012-10-11 10:55:25 -04001058
Anthony Green84d32532012-03-19 23:07:35 -040010592012-03-13 Kaz Kojima <kkojima@gcc.gnu.org>
1060
1061 * src/sh/ffi.c (ffi_prep_closure_loc): Don't ASSERT ABI test,
1062 just return FFI_BAD_ABI when things are wrong.
1063 * src/sh64/ffi.c (ffi_prep_closure_loc): Ditto.
1064
10652012-03-09 David Edelsohn <dje.gcc@gmail.com>
1066
1067 * src/powerpc/aix_closure.S (ffi_closure_ASM): Adjust for Darwin64
1068 change to return value of ffi_closure_helper_DARWIN and load type
1069 from return type.
1070
Anthony Green964c5b92012-03-03 14:46:20 -050010712012-03-03 H.J. Lu <hongjiu.lu@intel.com>
1072
1073 * src/x86/ffi64.c (ffi_call): Cast the return value to unsigned
1074 long.
1075 (ffi_prep_closure_loc): Cast to 64bit address in trampoline.
1076 (ffi_closure_unix64_inner): Cast return pointer to unsigned long
1077 first.
1078
1079 * src/x86/ffitarget.h (FFI_SIZEOF_ARG): Defined to 8 for x32.
1080 (ffi_arg): Set to unsigned long long for x32.
1081 (ffi_sarg): Set to long long for x32.
1082
10832012-03-03 H.J. Lu <hongjiu.lu@intel.com>
1084
1085 * src/prep_cif.c (ffi_prep_cif_core): Properly check bad ABI.
1086
Anthony Green6c194232012-03-03 14:17:54 -050010872012-03-03 Andoni Morales Alastruey <ylatuya@gmail.com>
1088
1089 * configure.ac: Add -no-undefined for both 32- and 64-bit x86
1090 windows-like hosts.
1091 * configure: Rebuilt.
1092
Anthony Green7c5e60b2012-03-29 08:48:22 -040010932012-02-27 Mikael Pettersson <mikpe@it.uu.se>
1094
1095 PR libffi/52223
1096 * Makefile.am (FLAGS_TO_PASS): Define.
1097 * Makefile.in: Regenerate.
1098
Anthony Green8360bf12012-02-23 07:01:13 -050010992012-02-23 Anthony Green <green@moxielogic.com>
1100
1101 * src/*/ffitarget.h: Ensure that users never include ffitarget.h
1102 directly.
1103
Anthony Green7c5e60b2012-03-29 08:48:22 -040011042012-02-23 Kai Tietz <ktietz@redhat.com>
1105
1106 PR libffi/52221
1107 * src/x86/ffi.c (ffi_closure_raw_THISCALL): New
1108 prototype.
1109 (ffi_prep_raw_closure_loc): Use ffi_closure_raw_THISCALL for
1110 thiscall-convention.
1111 (ffi_raw_call): Use ffi_prep_args_raw.
1112 * src/x86/win32.S (ffi_closure_raw_THISCALL): Add
1113 implementation for stub.
1114
Anthony Greendee20f82012-02-10 13:06:46 -050011152012-02-10 Kai Tietz <ktietz@redhat.com>
1116
1117 * configure.ac (AM_LTLDFLAGS): Add -no-undefine for x64
1118 windows target.
1119 * configure: Regenerated.
Anthony Green8360bf12012-02-23 07:01:13 -05001120
Anthony Greendee20f82012-02-10 13:06:46 -050011212012-02-08 Kai Tietz <ktietz@redhat.com>
1122
1123 * src/prep_cif.c (ffi_prep_cif): Allow for X86_WIN32
1124 also FFI_THISCALL.
1125 * src/x86/ffi.c (ffi_closure_THISCALL): Add prototype.
1126 (FFI_INIT_TRAMPOLINE_THISCALL): New trampoline code.
1127 (ffi_prep_closure_loc): Add FFI_THISCALL support.
1128 * src/x86/ffitarget.h (FFI_TRAMPOLINE_SIZE): Adjust size.
1129 * src/x86/win32.S (ffi_closure_THISCALL): New closure code
1130 for thiscall-calling convention.
1131 * testsuite/libffi.call/closure_thiscall.c: New test.
1132
Anthony Green1ff9c602012-02-01 16:34:30 -060011332012-01-28 Kai Tietz <ktietz@redhat.com>
1134
1135 * src/libffi/src/x86/ffi.c (ffi_call_win32): Add new
1136 argument to prototype for specify calling-convention.
1137 (ffi_call): Add support for stdcall/thiscall convention.
1138 (ffi_prep_args): Likewise.
1139 (ffi_raw_call): Likewise.
1140 * src/x86/ffitarget.h (ffi_abi): Add FFI_THISCALL and
1141 FFI_FASTCALL.
1142 * src/x86/win32.S (_ffi_call_win32): Add support for
1143 fastcall/thiscall calling-convention calls.
1144 * testsuite/libffi.call/fastthis1_win32.c: New test.
1145 * testsuite/libffi.call/fastthis2_win32.c: New test.
1146 * testsuite/libffi.call/fastthis3_win32.c: New test.
1147 * testsuite/libffi.call/strlen2_win32.c: New test.
1148 * testsuite/libffi.call/many2_win32.c: New test.
1149 * testsuite/libffi.call/struct1_win32.c: New test.
1150 * testsuite/libffi.call/struct2_win32.c: New test.
1151
Anthony Green211060e2012-01-23 14:24:01 -050011522012-01-23 Uros Bizjak <ubizjak@gmail.com>
1153
1154 * src/alpha/ffi.c (ffi_prep_closure_loc): Check for bad ABI.
1155
Anthony Green1ff9c602012-02-01 16:34:30 -060011562012-01-23 Anthony Green <green@moxielogic.com>
1157 Chris Young <cdyoung@ntlworld.com>
Anthony Green9e9c4ae2012-01-23 14:11:23 -05001158
1159 * configure.ac: Add Amiga support.
1160 * configure: Rebuilt.
1161
11622012-01-23 Dmitry Nadezhin <dmitry.nadezhin@gmail.com>
Anthony Green8efc0b12012-01-23 13:47:38 -05001163
1164 * include/ffi_common.h (LIKELY, UNLIKELY): Fix definitions.
1165
Anthony Green1ff9c602012-02-01 16:34:30 -060011662012-01-23 Andreas Schwab <schwab@linux-m68k.org>
Anthony Greencd2277c2012-01-23 13:43:38 -05001167
1168 * src/m68k/sysv.S (ffi_call_SYSV): Properly test for plain
1169 mc68000. Test for __HAVE_68881__ in addition to __MC68881__.
1170
Anthony Greenc365ee72012-01-23 11:13:18 -050011712012-01-19 Jakub Jelinek <jakub@redhat.com>
1172
1173 PR rtl-optimization/48496
1174 * src/ia64/ffi.c (ffi_call): Fix up aliasing violations.
1175
11762012-01-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1177
1178 * configure.ac (i?86-*-*): Set TARGET to X86_64.
1179 * configure: Regenerate.
1180
11812011-12-07 Andrew Pinski <apinski@cavium.com>
1182
1183 PR libffi/50051
1184 * src/mips/n32.S: Add ".set mips4".
1185
11862011-11-21 Andreas Tobler <andreast@fgznet.ch>
1187
1188 * configure: Regenerate.
1189
Anthony Greenff9454d2011-11-12 17:18:51 -050011902011-11-12 David Gilbert <david.gilbert@linaro.org>
1191
1192 * doc/libffi.texi, include/ffi.h.in, include/ffi_common.h,
1193 man/Makefile.am, man/ffi.3, man/ffi_prep_cif.3,
1194 man/ffi_prep_cif_var.3, src/arm/ffi.c, src/arm/ffitarget.h,
1195 src/cris/ffi.c, src/prep_cif.c,
1196 testsuite/libffi.call/cls_double_va.c,
1197 testsuite/libffi.call/cls_longdouble_va.c,
1198 testsuite/libffi.call/float_va.c: Many changes to support variadic
1199 function calls.
1200
Anthony Green52891f82011-11-12 16:35:55 -050012012011-11-12 Kyle Moffett <Kyle.D.Moffett@boeing.com>
1202
1203 * src/powerpc/ffi.c, src/powerpc/ffitarget.h,
1204 src/powerpc/ppc_closure.S, src/powerpc/sysv.S: Many changes for
1205 softfloat powerpc variants.
1206
Anthony Green6a6e7f82011-11-12 16:20:42 -050012072011-11-12 Petr Salinger <Petr.Salinger@seznam.cz>
1208
1209 * configure.ac (FFI_EXEC_TRAMPOLINE_TABLE): Fix kfreebsd support.
1210 * configure: Rebuilt.
1211
Anthony Greend52fbed2011-11-12 16:13:41 -050012122011-11-12 Timothy Wall <twall@users.sf.net>
1213
1214 * src/arm/ffi.c (ffi_prep_args, ffi_prep_incoming_args_SYSV): Max
1215 alignment of 4 for wince on ARM.
1216
Anthony Greenaf18df22011-11-12 15:52:08 -050012172011-11-12 Kyle Moffett <Kyle.D.Moffett@boeing.com>
1218 Anthony Green <green@moxielogic.com>
1219
1220 * src/ppc/sysv.S, src/ppc/ffi.c: Remove use of ppc string
1221 instructions (not available on some cores, like the PPC440).
1222
Anthony Greenc411f142011-11-12 07:32:36 -050012232011-11-12 Kimura Wataru <kimuraw@i.nifty.jp>
Anthony Green8c019542011-09-06 14:26:32 -04001224
Anthony Greenc411f142011-11-12 07:32:36 -05001225 * m4/ax_enable_builddir: Change from string comparison to numeric
Anthony Green52891f82011-11-12 16:35:55 -05001226 comparison for wc output.
Anthony Green236c9392011-11-12 07:37:40 -05001227 * configure.ac: Enable FFI_MMAP_EXEC_WRIT for darwin11 aka Mac OS
1228 X 10.7.
1229 * configure: Rebuilt.
Anthony Greenee6696f2011-08-23 12:30:29 -04001230
Anthony Green6a6e7f82011-11-12 16:20:42 -050012312011-11-12 Anthony Green <green@moxielogic.com>
1232
1233 * Makefile.am (AM_CCASFLAGS): Add -g option to build assembly
1234 files with debug info.
1235 * Makefile.in: Rebuilt.
1236
12372011-11-12 Jasper Lievisse Adriaanse <jasper@openbsd.org>
1238
1239 * README: Update list of supported OpenBSD systems.
1240
12412011-11-12 Anthony Green <green@moxielogic.com>
1242
1243 * libtool-version: Update.
1244 * Makefile.am (nodist_libffi_la_SOURCES): Add src/debug.c if
1245 FFI_DEBUG.
1246 (libffi_la_SOURCES): Remove src/debug.c
1247 (EXTRA_DIST): Add src/debug.c
1248 * Makefile.in: Rebuilt.
1249 * README: Update for 3.0.11.
1250
Anthony Green3d561062011-11-12 07:20:24 -050012512011-11-10 Richard Henderson <rth@redhat.com>
Anthony Green049d8382011-08-22 14:50:10 -04001252
Anthony Green3d561062011-11-12 07:20:24 -05001253 * configure.ac (GCC_AS_CFI_PSEUDO_OP): Use it instead of inline check.
1254 * configure, aclocal.m4: Rebuild.
1255
12562011-09-04 Iain Sandoe <iains@gcc.gnu.org>
1257
1258 PR libffi/49594
1259 * src/powerpc/darwin_closure.S (stubs): Make the stub binding
1260 helper reference track the architecture pointer size.
1261
12622011-08-25 Andrew Haley <aph@redhat.com>
1263
1264 * src/arm/ffi.c (FFI_INIT_TRAMPOLINE): Remove hard-coded assembly
1265 instructions.
1266 * src/arm/sysv.S (ffi_arm_trampoline): Put them here instead.
Anthony Green049d8382011-08-22 14:50:10 -04001267
Anthony Greend992ac52011-07-29 17:32:53 -040012682011-07-11 Andrew Haley <aph@redhat.com>
1269
1270 * src/arm/ffi.c (FFI_INIT_TRAMPOLINE): Clear icache.
1271
12722011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1273
1274 * testsuite/libffi.call/cls_double_va.c: Move PR number to comment.
1275 * testsuite/libffi.call/cls_longdouble_va.c: Likewise.
1276
12772011-06-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1278
1279 PR libffi/46660
1280 * testsuite/libffi.call/cls_double_va.c: xfail dg-output on
1281 mips-sgi-irix6*.
1282 * testsuite/libffi.call/cls_longdouble_va.c: Likewise.
1283
12842011-06-14 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1285
1286 * testsuite/libffi.call/huge_struct.c (test_large_fn): Use PRIu8,
1287 PRId8 instead of %hhu, %hhd.
1288 * testsuite/libffi.call/ffitest.h [__alpha__ && __osf__] (PRId8,
1289 PRIu8): Define.
1290 [__sgi__] (PRId8, PRIu8): Define.
1291
12922011-04-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1293
1294 * src/alpha/osf.S (UA_SI, FDE_ENCODING, FDE_ENCODE, FDE_ARANGE):
1295 Define.
1296 Use them to handle ELF vs. ECOFF differences.
1297 [__osf__] (_GLOBAL__F_ffi_call_osf): Define.
1298
Anthony Green2d3fb362011-03-30 16:54:42 -040012992011-03-30 Timothy Wall <twall@users.sf.net>
1300
1301 * src/powerpc/darwin.S: Fix unknown FDE encoding.
1302 * src/powerpc/darwin_closure.S: ditto.
1303
Anthony Green25416792011-02-25 15:09:13 -050013042011-02-25 Anthony Green <green@moxielogic.com>
1305
Anthony Green74ee6ea2011-02-25 15:52:14 -05001306 * src/powerpc/ffi.c (ffi_prep_closure_loc): Allow for more
1307 32-bit ABIs.
Anthony Green25416792011-02-25 15:09:13 -05001308
Anthony Green8cf88782011-02-15 15:19:49 -050013092011-02-15 Anthony Green <green@moxielogic.com>
1310
1311 * m4/ax_cc_maxopt.m4: Don't -malign-double or use -ffast-math.
1312 * configure: Rebuilt.
1313
Anthony Greend992ac52011-07-29 17:32:53 -040013142011-02-13 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1315
1316 * configure: Regenerate.
1317
Anthony Green1fbf9dc2011-02-13 08:06:39 -050013182011-02-13 Anthony Green <green@moxielogic.com>
1319
1320 * include/ffi_common.h (UNLIKELY, LIKELY): Define.
1321 * src/x86/ffi64.c (UNLIKELY, LIKELY): Remove definition.
1322 * src/prep_cif.c (UNLIKELY, LIKELY): Remove definition.
1323
1324 * src/prep_cif.c (initialize_aggregate): Convert assertion into
1325 FFI_BAD_TYPEDEF return. Initialize arg size and alignment to 0.
1326
1327 * src/pa/ffi.c (ffi_prep_closure_loc): Don't ASSERT ABI test,
1328 just return FFI_BAD_ABI when things are wrong.
1329 * src/arm/ffi.c (ffi_prep_closure_loc): Ditto.
1330 * src/powerpc/ffi.c (ffi_prep_closure_loc): Ditto.
1331 * src/mips/ffi.c (ffi_prep_closure_loc): Ditto.
1332 * src/ia64/ffi.c (ffi_prep_closure_loc): Ditto.
1333 * src/avr32/ffi.c (ffi_prep_closure_loc): Ditto.
1334
Anthony Green1833aa02011-02-11 07:11:04 -050013352011-02-11 Anthony Green <green@moxielogic.com>
1336
1337 * src/sparc/ffi.c (ffi_prep_closure_loc): Don't ASSERT ABI test,
1338 just return FFI_BAD_ABI when things are wrong.
1339
Anthony Green7c5e60b2012-03-29 08:48:22 -040013402012-02-11 Eric Botcazou <ebotcazou@adacore.com>
1341
1342 * src/sparc/v9.S (STACKFRAME): Bump to 176.
1343
Anthony Green42695e72011-02-09 15:12:35 -050013442011-02-09 Stuart Shelton <srcshelton@gmail.com>
1345
1346 http://bugs.gentoo.org/show_bug.cgi?id=286911
1347 * src/mips/ffitarget.h: Clean up error messages.
1348 * src/java_raw_api.c (ffi_java_translate_args): Cast raw arg to
1349 ffi_raw*.
1350 * include/ffi.h.in: Add pragma for SGI compiler.
1351
Anthony Greena6e56b92011-02-09 15:00:42 -050013522011-02-09 Anthony Green <green@moxielogic.com>
1353
1354 * configure.ac: Add powerpc64-*-darwin* support.
1355
Anthony Green0cad4382011-02-09 06:11:46 -050013562011-02-09 Anthony Green <green@moxielogic.com>
Anthony Green11062292011-02-08 19:20:09 -05001357
Anthony Green747d6c32011-02-09 14:56:23 -05001358 * README: Mention Interix.
1359
13602011-02-09 Jonathan Callen <abcd@gentoo.org>
1361
1362 * configure.ac: Add Interix to win32/cygwin/mingw case.
1363 * configure: Ditto.
1364 * src/closures.c: Treat Interix like Cygwin, instead of as a
1365 generic win32.
1366
13672011-02-09 Anthony Green <green@moxielogic.com>
1368
Anthony Green69dbe842011-02-09 07:38:43 -05001369 * testsuite/libffi.call/err_bad_typedef.c: Remove xfail.
1370 * testsuite/libffi.call/err_bad_abi.c: Remove xfail.
1371 * src/x86/ffi64.c (UNLIKELY, LIKELY): Define.
1372 (ffi_prep_closure_loc): Check for bad ABI.
1373 * src/prep_cif.c (UNLIKELY, LIKELY): Define.
1374 (initialize_aggregate): Check for bad types.
Anthony Green0cad4382011-02-09 06:11:46 -05001375
Anthony Green90af15e2011-02-12 12:29:36 -050013762011-02-09 Landon Fuller <landonf@plausible.coop>
Anthony Green0cad4382011-02-09 06:11:46 -05001377
1378 * Makefile.am (EXTRA_DIST): Add build-ios.sh, src/arm/gentramp.sh,
1379 src/arm/trampoline.S.
1380 (nodist_libffi_la_SOURCES): Add src/arc/trampoline.S.
1381 * configure.ac (FFI_EXEC_TRAMPOLINE_TABLE): Define.
1382 * src/arm/ffi.c (ffi_trampoline_table)
1383 (ffi_closure_trampoline_table_page, ffi_trampoline_table_entry)
1384 (FFI_TRAMPOLINE_CODELOC_CONFIG, FFI_TRAMPOLINE_CONFIG_PAGE_OFFSET)
1385 (FFI_TRAMPOLINE_COUNT, ffi_trampoline_lock, ffi_trampoline_tables)
1386 (ffi_trampoline_table_alloc, ffi_closure_alloc, ffi_closure_free):
1387 Define for FFI_EXEC_TRAMPOLINE_TABLE case (iOS).
1388 (ffi_prep_closure_loc): Handl FFI_EXEC_TRAMPOLINE_TABLE case
1389 separately.
1390 * src/arm/sysv.S: Handle Apple iOS host.
1391 * src/closures.c: Handle FFI_EXEC_TRAMPOLINE_TABLE case.
Anthony Greenf4983182011-02-09 06:26:46 -05001392 * build-ios.sh: New file.
Anthony Green0cad4382011-02-09 06:11:46 -05001393 * fficonfig.h.in, configure, Makefile.in: Rebuilt.
Anthony Green69dbe842011-02-09 07:38:43 -05001394 * README: Mention ARM iOS.
Anthony Green11062292011-02-08 19:20:09 -05001395
Anthony Greendc411e82011-02-08 10:49:29 -050013962011-02-08 Oren Held <orenhe@il.ibm.com>
1397
1398 * src/dlmalloc.c (_STRUCT_MALLINFO): Define in order to avoid
1399 redefinition of mallinfo on HP-UX.
1400
Anthony Green404585d2011-02-08 10:44:36 -050014012011-02-08 Ginn Chen <ginn.chen@oracle.com>
1402
1403 * src/sparc/ffi.c (ffi_call): Make compatible with Solaris Studio
Anthony Green049d8382011-08-22 14:50:10 -04001404 aggregate return ABI. Flush cache.
1405 (ffi_prep_closure_loc): Flush cache.
Anthony Green404585d2011-02-08 10:44:36 -05001406
Anthony Green6972a4f2011-02-11 07:32:51 -050014072011-02-11 Anthony Green <green@moxielogic.com>
1408
1409 From Tom Honermann <tom.honermann@oracle.com>:
1410 * src/powerpc/aix.S (ffi_call_AIX): Support for xlc toolchain on
1411 AIX. Declare .ffi_prep_args. Insert nops after branch
1412 instructions so that the AIX linker can insert TOC reload
1413 instructions.
1414 * src/powerpc/aix_closure.S: Declare .ffi_closure_helper_DARWIN.
1415
Anthony Greend992ac52011-07-29 17:32:53 -040014162011-02-08 Ed <ed@kdtc.net>
1417
1418 * src/powerpc/asm.h: Fix grammar nit in comment.
1419
Anthony Green89284fe2011-02-08 10:19:19 -050014202011-02-08 Uli Link <ul.mcamafia@linkitup.de>
1421
1422 * include/ffi.h.in (FFI_64_BIT_MAX): Define and use.
1423
Anthony Greend992ac52011-07-29 17:32:53 -040014242011-02-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1425
1426 PR libffi/46661
1427 * testsuite/libffi.call/cls_pointer.c (main): Cast void * to
1428 uintptr_t first.
1429 * testsuite/libffi.call/cls_pointer_stack.c (main): Likewise.
1430
Anthony Greened2c5182011-02-08 10:10:07 -050014312011-02-08 Rafael Avila de Espindola <respindola@mozilla.com>
1432
1433 * configure.ac: Fix x86 test for pc related relocs.
Anthony Green09f8f312011-02-28 15:36:07 -05001434 * configure: Rebuilt.
Anthony Greened2c5182011-02-08 10:10:07 -05001435
Anthony Green3b836242011-02-08 14:28:59 -050014362011-02-07 Joel Sherrill <joel.sherrill@oarcorp.com>
1437
1438 * libffi/src/m68k/ffi.c: Add RTEMS support for cache flushing.
1439 Handle case when CPU variant does not have long double support.
1440 * libffi/src/m68k/sysv.S: Add support for mc68000, Coldfire,
1441 and cores with soft floating point.
1442
14432011-02-07 Joel Sherrill <joel.sherrill@oarcorp.com>
1444
1445 * configure.ac: Add mips*-*-rtems* support.
1446 * configure: Regenerate.
1447 * src/mips/ffitarget.h: Ensure needed constants are available
1448 for targets which do not have sgidefs.h.
1449
Anthony Green0e584392011-02-08 07:52:40 -050014502011-01-26 Dave Korn <dave.korn.cygwin@gmail.com>
1451
1452 PR target/40125
1453 * configure.ac (AM_LTLDFLAGS): Add -bindir option for windows DLLs.
1454 * configure: Regenerate.
1455
14562010-12-18 Iain Sandoe <iains@gcc.gnu.org>
1457
1458 PR libffi/29152
1459 PR libffi/42378
1460 * src/powerpc/darwin_closure.S: Provide Darwin64 implementation,
1461 update comments.
1462 * src/powerpc/ffitarget.h (POWERPC_DARWIN64): New,
1463 (FFI_TRAMPOLINE_SIZE): Update for Darwin64.
1464 * src/powerpc/darwin.S: Provide Darwin64 implementation,
1465 update comments.
1466 * src/powerpc/ffi_darwin.c: Likewise.
1467
14682010-12-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1469
1470 * configure.ac (libffi_cv_as_ascii_pseudo_op): Use double
1471 backslashes.
1472 (libffi_cv_as_string_pseudo_op): Likewise.
1473 * configure: Regenerate.
1474
14752010-12-03 Chung-Lin Tang <cltang@codesourcery.com>
1476
1477 * src/arm/sysv.S (ffi_closure_SYSV): Add UNWIND to .pad directive.
1478 (ffi_closure_VFP): Same.
1479 (ffi_call_VFP): Move down to before ffi_closure_VFP. Add '.fpu vfp'
1480 directive.
1481
14822010-12-01 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1483
1484 * testsuite/libffi.call/ffitest.h [__sgi] (PRId64, PRIu64): Define.
1485 (PRIuPTR): Define.
1486
14872010-11-29 Richard Henderson <rth@redhat.com>
1488 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1489
1490 * src/x86/sysv.S (FDE_ENCODING, FDE_ENCODE): Define.
1491 (.eh_frame): Use FDE_ENCODING.
1492 (.LASFDE1, .LASFDE2, LASFDE3): Simplify with FDE_ENCODE.
1493
Anthony Green5b9cd522010-11-22 15:19:57 -050014942010-11-22 Jacek Caban <jacek@codeweavers.com>
1495
1496 * configure.ac: Check for symbol underscores on mingw-w64.
1497 * configure: Rebuilt.
1498 * src/x86/win64.S: Correctly access extern symbols in respect to
1499 underscores.
1500
Anthony Green2db72612010-11-21 10:50:56 -050015012010-11-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1502
1503 * testsuite/lib/libffi-dg.exp: Rename ...
1504 * testsuite/lib/libffi.exp: ... to this.
1505 * libffi/testsuite/libffi.call/call.exp: Don't load libffi-dg.exp.
1506 * libffi/testsuite/libffi.special/special.exp: Likewise.
1507
15082010-10-28 Chung-Lin Tang <cltang@codesourcery.com>
1509
1510 * src/arm/ffi.c (ffi_prep_args): Add VFP register argument handling
1511 code, new parameter, and return value. Update comments.
1512 (ffi_prep_cif_machdep): Add case for VFP struct return values. Add
1513 call to layout_vfp_args().
1514 (ffi_call_SYSV): Update declaration.
1515 (ffi_call_VFP): New declaration.
1516 (ffi_call): Add VFP struct return conditions. Call ffi_call_VFP()
1517 when ABI is FFI_VFP.
1518 (ffi_closure_VFP): New declaration.
1519 (ffi_closure_SYSV_inner): Add new vfp_args parameter, update call to
1520 ffi_prep_incoming_args_SYSV().
1521 (ffi_prep_incoming_args_SYSV): Update parameters. Add VFP argument
1522 case handling.
1523 (ffi_prep_closure_loc): Pass ffi_closure_VFP to trampoline
1524 construction under VFP hard-float.
1525 (rec_vfp_type_p): New function.
1526 (vfp_type_p): Same.
1527 (place_vfp_arg): Same.
1528 (layout_vfp_args): Same.
1529 * src/arm/ffitarget.h (ffi_abi): Add FFI_VFP. Define FFI_DEFAULT_ABI
1530 based on __ARM_PCS_VFP.
1531 (FFI_EXTRA_CIF_FIELDS): Define for adding VFP hard-float specific
1532 fields.
1533 (FFI_TYPE_STRUCT_VFP_FLOAT): Define internally used type code.
1534 (FFI_TYPE_STRUCT_VFP_DOUBLE): Same.
1535 * src/arm/sysv.S (ffi_call_SYSV): Change call of ffi_prep_args() to
1536 direct call. Move function pointer load upwards.
1537 (ffi_call_VFP): New function.
1538 (ffi_closure_VFP): Same.
1539
1540 * testsuite/lib/libffi-dg.exp (check-flags): New function.
1541 (dg-skip-if): New function.
1542 * testsuite/libffi.call/cls_double_va.c: Skip if target is arm*-*-*
1543 and compiler options include -mfloat-abi=hard.
1544 * testsuite/libffi.call/cls_longdouble_va.c: Same.
1545
15462010-10-01 Jakub Jelinek <jakub@redhat.com>
1547
1548 PR libffi/45677
1549 * src/x86/ffi64.c (ffi_prep_cif_machdep): Ensure cif->bytes is
1550 a multiple of 8.
1551 * testsuite/libffi.call/many2.c: New test.
1552
15532010-08-20 Mark Wielaard <mjw@redhat.com>
1554
1555 * src/closures.c (open_temp_exec_file_mnt): Check if getmntent_r
1556 returns NULL.
1557
15582010-08-09 Andreas Tobler <andreast@fgznet.ch>
1559
1560 * configure.ac: Add target powerpc64-*-freebsd*.
1561 * configure: Regenerate.
1562 * testsuite/libffi.call/cls_align_longdouble_split.c: Pass
1563 -mlong-double-128 only to linux targets.
1564 * testsuite/libffi.call/cls_align_longdouble_split2.c: Likewise.
1565 * testsuite/libffi.call/cls_longdouble.c: Likewise.
1566 * testsuite/libffi.call/huge_struct.c: Likewise.
1567
Anthony Green00d0b592010-08-05 14:56:53 -040015682010-08-05 Dan Witte <dwitte@mozilla.com>
1569
1570 * Makefile.am: Pass FFI_DEBUG define to msvcc.sh for linking to the
1571 debug CRT when --enable-debug is given.
1572 * configure.ac: Define it.
1573 * msvcc.sh: Translate -g and -DFFI_DEBUG appropriately.
1574
Anthony Greenc1d28ba2010-08-05 08:48:16 -040015752010-08-04 Dan Witte <dwitte@mozilla.com>
1576
1577 * src/x86/ffitarget.h: Add X86_ANY define for all x86/x86_64
1578 platforms.
1579 * src/x86/ffi.c: Remove redundant ifdef checks.
1580 * src/prep_cif.c: Push stack space computation into src/x86/ffi.c
1581 for X86_ANY so return value space doesn't get added twice.
1582
Anthony Greenbda487e2010-08-05 09:02:41 -040015832010-08-03 Neil Rashbrooke <neil@parkwaycc.co.uk>
1584
1585 * msvcc.sh: Don't pass -safeseh to ml64 because behavior is buggy.
1586
Anthony Greend14178b2010-07-23 09:14:00 -040015872010-07-22 Dan Witte <dwitte@mozilla.com>
1588
1589 * src/*/ffitarget.h: Make FFI_LAST_ABI one past the last valid ABI.
1590 * src/prep_cif.c: Fix ABI assertion.
1591 * src/cris/ffi.c: Ditto.
1592
Anthony Greeneaf444e2010-07-10 08:59:09 -040015932010-07-10 Evan Phoenix <evan@fallingsnow.net>
1594
1595 * src/closures.c (selinux_enabled_check): Fix strncmp usage bug.
1596
Anthony Green5feacad2010-08-05 08:30:04 -040015972010-07-07 Dan Horák <dan@danny.cz>
1598
1599 * include/ffi.h.in: Protect #define with #ifndef.
1600 * src/powerpc/ffitarget.h: Ditto.
1601 * src/s390/ffitarget.h: Ditto.
1602 * src/sparc/ffitarget.h: Ditto.
1603
Anthony Green2db72612010-11-21 10:50:56 -050016042010-07-07 Neil Roberts <neil@linux.intel.com>
1605
1606 * src/x86/sysv.S (ffi_call_SYSV): Align the stack pointer to
1607 16-bytes.
1608
16092010-07-02 Jakub Jelinek <jakub@redhat.com>
1610
1611 * Makefile.am (AM_MAKEFLAGS): Pass also mandir to submakes.
1612 * Makefile.in: Regenerated.
1613
16142010-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1615
1616 * configure.ac (libffi_cv_as_x86_pcrel): Check for illegal in as
1617 output, too.
1618 (libffi_cv_as_ascii_pseudo_op): Check for .ascii.
1619 (libffi_cv_as_string_pseudo_op): Check for .string.
1620 * configure: Regenerate.
1621 * fficonfig.h.in: Regenerate.
1622 * src/x86/sysv.S (.eh_frame): Use .ascii, .string or error.
1623
Anthony Green10ea8482010-08-05 08:24:27 -040016242010-05-11 Dan Witte <dwitte@mozilla.com>
1625
1626 * doc/libffi.tex: Document previous change.
1627
16282010-05-11 Makoto Kato <m_kato@ga2.so-net.ne.jp>
1629
1630 * src/x86/ffi.c (ffi_call): Don't copy structs passed by value.
1631
Anthony Green63097412010-05-05 20:14:56 -040016322010-05-05 Michael Kohler <michaelkohler@live.com>
1633
1634 * src/dlmalloc.c (dlfree): Fix spelling.
1635 * src/ia64/ffi.c (ffi_prep_cif_machdep): Ditto.
1636 * configure.ac: Ditto.
1637 * configure: Rebuilt.
1638
Anthony Greenf2c2a4f2010-04-13 10:19:28 -040016392010-04-13 Dan Witte <dwitte@mozilla.com>
1640
1641 * msvcc.sh: Build with -W3 instead of -Wall.
1642 * src/powerpc/ffi_darwin.c: Remove build warnings.
1643 * src/x86/ffi.c: Ditto.
1644 * src/x86/ffitarget.h: Ditto.
1645
Anthony Green2db72612010-11-21 10:50:56 -050016462010-04-12 Dan Witte <dwitte@mozilla.com>
1647 Walter Meinl <wuno@lsvw.de>
Anthony Greenc0b69e52010-03-30 08:30:22 -04001648
Anthony Green2db72612010-11-21 10:50:56 -05001649 * configure.ac: Add OS/2 support.
1650 * configure: Rebuilt.
1651 * src/closures.c: Ditto.
1652 * src/dlmalloc.c: Ditto.
1653 * src/x86/win32.S: Ditto.
Anthony Green3f5b1372010-07-12 14:39:18 -04001654
16552010-04-07 Jakub Jelinek <jakub@redhat.com>
1656
Anthony Green2db72612010-11-21 10:50:56 -05001657 * testsuite/libffi.call/err_bad_abi.c: Remove unused args variable.
Anthony Green3f5b1372010-07-12 14:39:18 -04001658
16592010-04-02 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1660
1661 * Makefile.in: Regenerate.
1662 * aclocal.m4: Regenerate.
1663 * include/Makefile.in: Regenerate.
1664 * man/Makefile.in: Regenerate.
1665 * testsuite/Makefile.in: Regenerate.
1666
Anthony Green2db72612010-11-21 10:50:56 -050016672010-03-30 Dan Witte <dwitte@mozilla.com>
1668
1669 * msvcc.sh: Disable build warnings.
1670 * README (tested): Clarify windows build procedure.
1671
Anthony Green3f5b1372010-07-12 14:39:18 -040016722010-03-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1673
1674 * configure.ac (libffi_cv_as_x86_64_unwind_section_type): New test.
1675 * configure: Regenerate.
1676 * fficonfig.h.in: Regenerate.
1677 * libffi/src/x86/unix64.S (.eh_frame)
1678 [HAVE_AS_X86_64_UNWIND_SECTION_TYPE]: Use @unwind section type.
1679
Anthony Green2db72612010-11-21 10:50:56 -050016802010-03-14 Matthias Klose <doko@ubuntu.com>
1681
1682 * src/x86/ffi64.c: Fix typo in comment.
1683 * src/x86/ffi.c: Use /* ... */ comment style.
1684
Anthony Green9dc9a292010-04-13 10:33:52 -040016852010-02-24 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1686
1687 * doc/libffi.texi (The Closure API): Fix typo.
1688 * doc/libffi.info: Remove.
1689
16902010-02-15 Matthias Klose <doko@ubuntu.com>
1691
1692 * src/arm/sysv.S (__ARM_ARCH__): Define for processor
1693 __ARM_ARCH_7EM__.
1694
Anthony Green2db72612010-11-21 10:50:56 -050016952010-01-15 Anthony Green <green@redhat.com>
1696
1697 * README: Add notes on building with Microsoft Visual C++.
1698
16992010-01-15 Daniel Witte <dwitte@mozilla.com>
1700
1701 * msvcc.sh: New file.
1702
1703 * src/x86/win32.S: Port assembly routines to MSVC and #ifdef.
1704 * src/x86/ffi.c: Tweak function declaration and remove excess
1705 parens.
1706 * include/ffi.h.in: Add __declspec(align(8)) to typedef struct
1707 ffi_closure.
1708
1709 * src/x86/ffi.c: Merge ffi_call_SYSV and ffi_call_STDCALL into new
1710 function ffi_call_win32 on X86_WIN32.
1711 * src/x86/win32.S (ffi_call_SYSV): Rename to ffi_call_win32.
1712 (ffi_call_STDCALL): Remove.
1713
1714 * src/prep_cif.c (ffi_prep_cif): Move stack space allocation code
1715 to ffi_prep_cif_machdep for x86.
1716 * src/x86/ffi.c (ffi_prep_cif_machdep): To here.
1717
17182010-01-15 Oliver Kiddle <okiddle@yahoo.co.uk>
1719
1720 * src/x86/ffitarget.h (ffi_abi): Check for __i386 and __amd64 for
Anthony Green0e584392011-02-08 07:52:40 -05001721 Sun Studio compiler compatibility.
Anthony Green2db72612010-11-21 10:50:56 -05001722
17232010-01-12 Conrad Irwin <conrad.irwin@gmail.com>
1724
1725 * doc/libffi.texi: Add closure example.
1726
Anthony Green7b7a42f2010-01-12 09:14:14 -050017272010-01-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1728
1729 PR libffi/40701
1730 * testsuite/libffi.call/ffitest.h [__alpha__ && __osf__] (PRIdLL,
1731 PRIuLL, PRId64, PRIu64, PRIuPTR): Define.
1732 * testsuite/libffi.call/cls_align_sint64.c: Add -Wno-format on
1733 alpha*-dec-osf*.
1734 * testsuite/libffi.call/cls_align_uint64.c: Likewise.
1735 * testsuite/libffi.call/cls_ulonglong.c: Likewise.
1736 * testsuite/libffi.call/return_ll1.c: Likewise.
1737 * testsuite/libffi.call/stret_medium2.c: Likewise.
1738 * testsuite/libffi.special/ffitestcxx.h (allocate_mmap): Cast
1739 MAP_FAILED to char *.
1740
17412010-01-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1742
1743 * src/mips/n32.S: Use .abicalls and .eh_frame with __GNUC__.
1744
Anthony Greenc3042af2010-01-01 08:08:02 -050017452009-12-31 Anthony Green <green@redhat.com>
1746
1747 * README: Update for libffi 3.0.9.
1748
17492009-12-27 Matthias Klose <doko@ubuntu.com>
1750
1751 * configure.ac (HAVE_LONG_DOUBLE): Define for mips when
1752 appropriate.
1753 * configure: Rebuilt.
1754
17552009-12-26 Anthony Green <green@redhat.com>
1756
1757 * testsuite/libffi.call/cls_longdouble_va.c: Mark as xfail for
1758 avr32*-*-*.
1759 * testsuite/libffi.call/cls_double_va.c: Ditto.
1760
17612009-12-26 Andreas Tobler <a.tobler@schweiz.org>
1762
1763 * testsuite/libffi.call/ffitest.h: Conditionally include stdint.h
1764 and inttypes.h.
1765 * testsuite/libffi.special/unwindtest.cc: Ditto.
1766
17672009-12-26 Andreas Tobler <a.tobler@schweiz.org>
1768
1769 * configure.ac: Add amd64-*-openbsd*.
1770 * configure: Rebuilt.
1771 * testsuite/lib/libffi-dg.exp (libffi_target_compile): Link
1772 openbsd programs with -lpthread.
1773
17742009-12-26 Anthony Green <green@redhat.com>
1775
1776 * testsuite/libffi.call/cls_double_va.c,
1777 testsuite/libffi.call/cls_longdouble.c,
1778 testsuite/libffi.call/cls_longdouble_va.c,
1779 testsuite/libffi.call/cls_pointer.c,
1780 testsuite/libffi.call/cls_pointer_stack.c: Remove xfail for
1781 mips*-*-* and arm*-*-*.
1782 * testsuite/libffi.call/cls_align_longdouble_split.c,
1783 testsuite/libffi.call/cls_align_longdouble_split2.c,
1784 testsuite/libffi.call/stret_medium2.c,
1785 testsuite/libffi.call/stret_medium.c,
1786 testsuite/libffi.call/stret_large.c,
1787 testsuite/libffi.call/stret_large2.c: Remove xfail for arm*-*-*.
1788
17892009-12-31 Kay Tietz <ktietz70@googlemail.com>
1790
1791 * testsuite/libffi.call/ffitest.h,
1792 testsuite/libffi.special/ffitestcxx.h (PRIdLL, PRuLL): Fix
1793 definitions.
1794
17952009-12-31 Carlo Bramini <carlo.bramix@libero.it>
1796
1797 * configure.ac (AM_LTLDFLAGS): Define for windows hosts.
1798 * Makefile.am (libffi_la_LDFLAGS): Add AM_LTLDFLAGS.
1799 * configure: Rebuilt.
1800 * Makefile.in: Rebuilt.
1801
18022009-12-31 Anthony Green <green@redhat.com>
1803 Blake Chaffin.
1804
1805 * testsuite/libffi.call/huge_struct.c: New test case from Blake
1806 Chaffin @ Apple.
1807
Anthony Green0cfe60e2009-12-29 10:06:04 -050018082009-12-28 David Edelsohn <edelsohn@gnu.org>
1809
1810 * src/powerpc/ffi_darwin.c (ffi_prep_args): Copy abi and nargs to
1811 local variables.
1812 (aix_adjust_aggregate_sizes): New function.
1813 (ffi_prep_cif_machdep): Call it.
1814
18152009-12-26 Andreas Tobler <a.tobler@schweiz.org>
1816
1817 * configure.ac: Define FFI_MMAP_EXEC_WRIT for the given targets.
1818 * configure: Regenerate.
1819 * fficonfig.h.in: Likewise.
1820 * src/closures.c: Remove the FFI_MMAP_EXEC_WRIT definition for
1821 Solaris/x86.
1822
18232009-12-26 Andreas Schwab <schwab@linux-m68k.org>
1824
1825 * src/powerpc/ffi.c (ffi_prep_args_SYSV): Advance intarg_count
1826 when a float arguments is passed in memory.
1827 (ffi_closure_helper_SYSV): Mark general registers as used up when
1828 a 64bit or soft-float long double argument is passed in memory.
1829
Anthony Green9458d882009-12-26 07:02:27 -050018302009-12-25 Matthias Klose <doko@ubuntu.com>
1831
1832 * man/ffi_call.3: Fix #include in examples.
1833 * doc/libffi.texi: Add dircategory.
1834
18352009-12-25 Frank Everdij <f.p.x.everdij@tudelft.nl>
1836
1837 * include/ffi.h.in: Placed '__GNUC__' ifdef around
1838 '__attribute__((aligned(8)))' in ffi_closure, fixes compile for
1839 IRIX MIPSPro c99.
1840 * include/ffi_common.h: Added '__sgi' define to non
1841 '__attribute__((__mode__()))' integer typedefs.
Anthony Green0cfe60e2009-12-29 10:06:04 -05001842 * src/mips/ffi.c (ffi_call, ffi_closure_mips_inner_O32,
Anthony Green9458d882009-12-26 07:02:27 -05001843 ffi_closure_mips_inner_N32): Added 'defined(_MIPSEB)' to BE check.
1844 (ffi_closure_mips_inner_O32, ffi_closure_mips_inner_N32): Added
1845 FFI_LONGDOUBLE support and alignment(N32 only).
1846 * src/mips/ffitarget.h: Corrected '#include <sgidefs.h>' for IRIX and
1847 fixed non '__attribute__((__mode__()))' integer typedefs.
1848 * src/mips/n32.S: Put '#ifdef linux' around '.abicalls' and '.eh_frame'
1849 since they are Linux/GNU Assembler specific.
1850
18512009-12-25 Bradley Smith <brad@brad-smith.co.uk>
1852
1853 * configure.ac, Makefile.am, src/avr32/ffi.c,
1854 src/avr32/ffitarget.h,
1855 src/avr32/sysv.S: Add AVR32 port.
1856 * configure, Makefile.in: Rebuilt.
1857
Anthony Green115ab362009-12-24 00:22:00 -050018582009-12-21 Andreas Tobler <a.tobler@schweiz.org>
1859
1860 * configure.ac: Make i?86 build on FreeBSD and OpenBSD.
1861 * configure: Regenerate.
1862
18632009-12-15 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
1864
1865 * testsuite/libffi.call/ffitest.h: Define PRIuPTR on PA HP-UX.
1866
18672009-12-13 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
1868
1869 * src/pa/ffi.c (ffi_closure_inner_pa32): Handle FFI_TYPE_LONGDOUBLE
1870 type on HP-UX.
1871
Anthony Green7c5e60b2012-03-29 08:48:22 -040018722012-02-13 Kai Tietz <ktietz@redhat.com>
1873
1874 PR libffi/52221
1875 * src/x86/ffi.c (ffi_prep_raw_closure_loc): Add thiscall
1876 support for X86_WIN32.
1877 (FFI_INIT_TRAMPOLINE_THISCALL): Fix displacement.
1878
Anthony Green115ab362009-12-24 00:22:00 -050018792009-12-11 Eric Botcazou <ebotcazou@adacore.com>
1880
1881 * src/sparc/ffi.c (ffi_closure_sparc_inner_v9): Properly align 'long
1882 double' arguments.
1883
18842009-12-11 Eric Botcazou <ebotcazou@adacore.com>
1885
1886 * testsuite/libffi.call/ffitest.h: Define PRIuPTR on Solaris < 10.
1887
18882009-12-10 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1889
1890 PR libffi/40700
1891 * src/closures.c [X86_64 && __sun__ && __svr4__]
1892 (FFI_MMAP_EXEC_WRIT): Define.
1893
18942009-12-08 David Daney <ddaney@caviumnetworks.com>
1895
1896 * testsuite/libffi.call/stret_medium.c: Remove xfail for mips*-*-*
1897 * testsuite/libffi.call/cls_align_longdouble_split2.c: Same.
1898 * testsuite/libffi.call/stret_large.c: Same.
1899 * testsuite/libffi.call/cls_align_longdouble_split.c: Same.
1900 * testsuite/libffi.call/stret_large2.c: Same.
1901 * testsuite/libffi.call/stret_medium2.c: Same.
1902
19032009-12-07 David Edelsohn <edelsohn@gnu.org>
1904
1905 * src/powerpc/aix_closure.S (libffi_closure_ASM): Fix tablejump
1906 typo.
1907
19082009-12-05 David Edelsohn <edelsohn@gnu.org>
1909
1910 * src/powerpc/aix.S: Update AIX32 code to be consistent with AIX64
1911 code.
1912 * src/powerpc/aix_closure.S: Same.
1913
19142009-12-05 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1915
1916 * Makefile.in: Regenerate.
1917 * configure: Regenerate.
1918 * include/Makefile.in: Regenerate.
1919 * man/Makefile.in: Regenerate.
1920 * testsuite/Makefile.in: Regenerate.
1921
19222009-12-04 David Edelsohn <edelsohn@gnu.org>
1923
1924 * src/powerpc/aix_closure.S: Reorganize 64-bit code to match
Anthony Green0cfe60e2009-12-29 10:06:04 -05001925 linux64_closure.S.
Anthony Green115ab362009-12-24 00:22:00 -05001926
19272009-12-04 Uros Bizjak <ubizjak@gmail.com>
1928
1929 PR libffi/41908
1930 * src/x86/ffi64.c (classify_argument): Update from
1931 gcc/config/i386/i386.c.
1932 (ffi_closure_unix64_inner): Do not use the address of two consecutive
1933 SSE registers directly.
1934 * testsuite/libffi.call/cls_dbls_struct.c (main): Remove xfail
1935 for x86_64 linux targets.
1936
19372009-12-04 David Edelsohn <edelsohn@gnu.org>
1938
1939 * src/powerpc/ffi_darwin.c (ffi_closure_helper_DARWIN): Increment
1940 pfr for long double split between fpr13 and stack.
1941
19422009-12-03 David Edelsohn <edelsohn@gnu.org>
1943
1944 * src/powerpc/ffi_darwin.c (ffi_prep_args): Increment next_arg and
1945 fparg_count twice for long double.
1946
19472009-12-03 David Edelsohn <edelsohn@gnu.org>
1948
1949 PR libffi/42243
1950 * src/powerpc/ffi_darwin.c (ffi_prep_args): Remove extra parentheses.
1951
19522009-12-03 Uros Bizjak <ubizjak@gmail.com>
1953
1954 * testsuite/libffi.call/cls_longdouble_va.c (main): Fix format string.
1955 Remove xfails for x86 linux targets.
1956
19572009-12-02 David Edelsohn <edelsohn@gnu.org>
1958
1959 * src/powerpc/ffi_darwin.c (ffi_prep_args): Fix typo in INT64
1960 case.
1961
19622009-12-01 David Edelsohn <edelsohn@gnu.org>
1963
1964 * src/powerpc/aix.S (ffi_call_AIX): Convert to more standard
1965 register usage. Call ffi_prep_args directly. Add long double
1966 return value support.
1967 * src/powerpc/ffi_darwin.c (ffi_prep_args): Double arg increment
1968 applies to FFI_TYPE_DOUBLE. Correct fpr_base increment typo.
1969 Separate FFI_TYPE_SINT32 and FFI_TYPE_UINT32 cases.
1970 (ffi_prep_cif_machdep): Only 16 byte stack alignment in 64 bit
1971 mode.
1972 (ffi_closure_helper_DARWIN): Remove nf and ng counters. Move temp
1973 into case.
1974 * src/powerpc/aix_closure.S: Maintain 16 byte stack alignment.
1975 Allocate result area between params and FPRs.
1976
19772009-11-30 David Edelsohn <edelsohn@gnu.org>
1978
1979 PR target/35484
1980 * src/powerpc/ffitarget.h (POWERPC64): Define for PPC64 Linux and
1981 AIX64.
1982 * src/powerpc/aix.S: Implement AIX64 version.
1983 * src/powerpc/aix_closure.S: Implement AIX64 version.
1984 (ffi_closure_ASM): Use extsb, lha and displament addresses.
1985 * src/powerpc/ffi_darwin.c (ffi_prep_args): Implement AIX64
1986 support.
1987 (ffi_prep_cif_machdep): Same.
1988 (ffi_call): Same.
1989 (ffi_closure_helper_DARWIN): Same.
1990
19912009-11-02 Andreas Tobler <a.tobler@schweiz.org>
1992
1993 PR libffi/41908
1994 * testsuite/libffi.call/testclosure.c: New test.
1995
Anthony Greenc6dddbd2009-10-04 08:11:33 -040019962009-09-28 Kai Tietz <kai.tietz@onevision.com>
1997
1998 * src/x86/win64.S (_ffi_call_win64 stack): Remove for gnu
1999 assembly version use of ___chkstk.
2000
20012009-09-23 Matthias Klose <doko@ubuntu.com>
2002
2003 PR libffi/40242, PR libffi/41443
2004 * src/arm/sysv.S (__ARM_ARCH__): Define for processors
2005 __ARM_ARCH_6T2__, __ARM_ARCH_6M__, __ARM_ARCH_7__,
2006 __ARM_ARCH_7A__, __ARM_ARCH_7R__, __ARM_ARCH_7M__.
2007 Change the conditionals to __SOFTFP__ || __ARM_EABI__
2008 for -mfloat-abi=softfp to work.
2009
20102009-09-17 Loren J. Rittle <ljrittle@acm.org>
2011
2012 PR testsuite/32843 (strikes again)
2013 * src/x86/ffi.c (ffi_prep_cif_machdep): Add X86_FREEBSD to
2014 enable proper extension on char and short.
2015
20162009-09-15 David Daney <ddaney@caviumnetworks.com>
2017
2018 * src/java_raw_api.c (ffi_java_raw_to_rvalue): Remove special
2019 handling for FFI_TYPE_POINTER.
2020 * src/mips/ffitarget.h (FFI_TYPE_STRUCT_D_SOFT,
2021 FFI_TYPE_STRUCT_F_SOFT, FFI_TYPE_STRUCT_DD_SOFT,
2022 FFI_TYPE_STRUCT_FF_SOFT, FFI_TYPE_STRUCT_FD_SOFT,
2023 FFI_TYPE_STRUCT_DF_SOFT, FFI_TYPE_STRUCT_SOFT): New defines.
2024 (FFI_N32_SOFT_FLOAT, FFI_N64_SOFT_FLOAT): New ffi_abi enumerations.
2025 (enum ffi_abi): Set FFI_DEFAULT_ABI for soft-float.
2026 * src/mips/n32.S (ffi_call_N32): Add handling for soft-float
2027 structure and pointer returns.
2028 (ffi_closure_N32): Add handling for pointer returns.
2029 * src/mips/ffi.c (ffi_prep_args, calc_n32_struct_flags,
2030 calc_n32_return_struct_flags): Handle soft-float.
2031 (ffi_prep_cif_machdep): Handle soft-float, fix pointer handling.
2032 (ffi_call_N32): Declare proper argument types.
2033 (ffi_call, copy_struct_N32, ffi_closure_mips_inner_N32): Handle
2034 soft-float.
2035
20362009-08-24 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2037
2038 * configure.ac (AC_PREREQ): Bump to 2.64.
2039
20402009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2041
2042 * Makefile.am (install-html, install-pdf): Remove.
2043 * Makefile.in: Regenerate.
2044
2045 * Makefile.in: Regenerate.
2046 * aclocal.m4: Regenerate.
2047 * configure: Regenerate.
2048 * fficonfig.h.in: Regenerate.
2049 * include/Makefile.in: Regenerate.
2050 * man/Makefile.in: Regenerate.
2051 * testsuite/Makefile.in: Regenerate.
2052
Anthony Green3d561062011-11-12 07:20:24 -050020532011-08-22 Jasper Lievisse Adriaanse <jasper@openbsd.org>
2054
2055 * configure.ac: Add OpenBSD/hppa and OpenBSD/powerpc support.
2056 * configure: Rebuilt.
2057
Anthony Greenc6dddbd2009-10-04 08:11:33 -040020582009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2059
2060 * configure.ac (_AC_ARG_VAR_PRECIOUS): Use m4_rename_force.
2061
20622009-07-24 Dave Korn <dave.korn.cygwin@gmail.com>
2063
2064 PR libffi/40807
2065 * src/x86/ffi.c (ffi_prep_cif_machdep): Also use sign/zero-extending
2066 return types for X86_WIN32.
2067 * src/x86/win32.S (_ffi_call_SYSV): Handle omitted return types.
2068 (_ffi_call_STDCALL, _ffi_closure_SYSV, _ffi_closure_raw_SYSV,
2069 _ffi_closure_STDCALL): Likewise.
2070
2071 * src/closures.c (is_selinux_enabled): Define to const 0 for Cygwin.
2072 (dlmmap, dlmunmap): Also use these functions on Cygwin.
2073
20742009-07-11 Richard Sandiford <rdsandiford@googlemail.com>
2075
2076 PR testsuite/40699
2077 PR testsuite/40707
2078 PR testsuite/40709
2079 * testsuite/lib/libffi-dg.exp: Revert 2009-07-02, 2009-07-01 and
2080 2009-06-30 commits.
2081
20822009-07-01 Richard Sandiford <r.sandiford@uk.ibm.com>
2083
2084 * testsuite/lib/libffi-dg.exp (libffi-init): Set ld_library_path
2085 to "" before adding paths. (This reinstates an assignment that
2086 was removed by my 2009-06-30 commit, but changes the initial
2087 value from "." to "".)
2088
20892009-07-01 H.J. Lu <hongjiu.lu@intel.com>
2090
2091 PR testsuite/40601
2092 * testsuite/lib/libffi-dg.exp (libffi-init): Properly set
2093 gccdir. Adjust ld_library_path for gcc only if gccdir isn't
2094 empty.
2095
20962009-06-30 Richard Sandiford <r.sandiford@uk.ibm.com>
2097
2098 * testsuite/lib/libffi-dg.exp (libffi-init): Don't add "."
2099 to ld_library_path. Use add_path. Add just find_libgcc_s
2100 to ld_library_path, not every libgcc multilib directory.
2101
21022009-06-16 Wim Lewis <wiml@hhhh.org>
2103
2104 * src/powerpc/ffi.c: Avoid clobbering cr3 and cr4, which are
2105 supposed to be callee-saved.
2106 * src/powerpc/sysv.S (small_struct_return_value): Fix overrun of
2107 return buffer for odd-size structs.
2108
21092009-06-16 Andreas Tobler <a.tobler@schweiz.org>
2110
2111 PR libffi/40444
2112 * testsuite/lib/libffi-dg.exp (libffi_target_compile): Add
2113 allow_stack_execute for Darwin.
2114
21152009-06-16 Andrew Haley <aph@redhat.com>
2116
2117 * configure.ac (TARGETDIR): Add missing blank lines.
2118 * configure: Regenerate.
2119
21202009-06-16 Andrew Haley <aph@redhat.com>
2121
2122 * testsuite/libffi.call/cls_align_sint64.c,
2123 testsuite/libffi.call/cls_align_uint64.c,
2124 testsuite/libffi.call/cls_longdouble_va.c,
2125 testsuite/libffi.call/cls_ulonglong.c,
2126 testsuite/libffi.call/return_ll1.c,
2127 testsuite/libffi.call/stret_medium2.c: Fix printf format
2128 specifiers.
2129 * testsuite/libffi.call/ffitest.h,
2130 testsuite/libffi.special/ffitestcxx.h (PRIdLL, PRIuLL): Define.
2131
21322009-06-15 Andrew Haley <aph@redhat.com>
2133
2134 * testsuite/libffi.call/err_bad_typedef.c: xfail everywhere.
2135 * testsuite/libffi.call/err_bad_abi.c: Likewise.
Anthony Green0cfe60e2009-12-29 10:06:04 -05002136
Anthony Greenc6dddbd2009-10-04 08:11:33 -040021372009-06-12 Andrew Haley <aph@redhat.com>
2138
2139 * Makefile.am: Remove info_TEXINFOS.
2140
21412009-06-12 Andrew Haley <aph@redhat.com>
2142
2143 * ChangeLog.libffi: testsuite/libffi.call/cls_align_sint64.c,
2144 testsuite/libffi.call/cls_align_uint64.c,
2145 testsuite/libffi.call/cls_ulonglong.c,
2146 testsuite/libffi.call/return_ll1.c,
2147 testsuite/libffi.call/stret_medium2.c: Fix printf format
2148 specifiers.
2149 testsuite/libffi.special/unwindtest.cc: include stdint.h.
2150
21512009-06-11 Timothy Wall <twall@users.sf.net>
2152
2153 * Makefile.am,
Anthony Green0cfe60e2009-12-29 10:06:04 -05002154 configure.ac,
2155 include/ffi.h.in,
2156 include/ffi_common.h,
2157 src/closures.c,
2158 src/dlmalloc.c,
2159 src/x86/ffi.c,
2160 src/x86/ffitarget.h,
2161 src/x86/win64.S (new),
Anthony Greenc6dddbd2009-10-04 08:11:33 -04002162 README: Added win64 support (mingw or MSVC)
Anthony Green0cfe60e2009-12-29 10:06:04 -05002163 * Makefile.in,
2164 include/Makefile.in,
2165 man/Makefile.in,
2166 testsuite/Makefile.in,
2167 configure,
2168 aclocal.m4: Regenerated
2169 * ltcf-c.sh: properly escape cygwin/w32 path
2170 * man/ffi_call.3: Clarify size requirements for return value.
2171 * src/x86/ffi64.c: Fix filename in comment.
2172 * src/x86/win32.S: Remove unused extern.
Anthony Greenc6dddbd2009-10-04 08:11:33 -04002173
Anthony Green0cfe60e2009-12-29 10:06:04 -05002174 * testsuite/libffi.call/closure_fn0.c,
2175 testsuite/libffi.call/closure_fn1.c,
2176 testsuite/libffi.call/closure_fn2.c,
2177 testsuite/libffi.call/closure_fn3.c,
2178 testsuite/libffi.call/closure_fn4.c,
2179 testsuite/libffi.call/closure_fn5.c,
2180 testsuite/libffi.call/closure_fn6.c,
Anthony Greenc6dddbd2009-10-04 08:11:33 -04002181 testsuite/libffi.call/closure_stdcall.c,
2182 testsuite/libffi.call/cls_12byte.c,
2183 testsuite/libffi.call/cls_16byte.c,
2184 testsuite/libffi.call/cls_18byte.c,
2185 testsuite/libffi.call/cls_19byte.c,
2186 testsuite/libffi.call/cls_1_1byte.c,
2187 testsuite/libffi.call/cls_20byte.c,
2188 testsuite/libffi.call/cls_20byte1.c,
2189 testsuite/libffi.call/cls_24byte.c,
2190 testsuite/libffi.call/cls_2byte.c,
2191 testsuite/libffi.call/cls_3_1byte.c,
2192 testsuite/libffi.call/cls_3byte1.c,
2193 testsuite/libffi.call/cls_3byte2.c,
2194 testsuite/libffi.call/cls_4_1byte.c,
2195 testsuite/libffi.call/cls_4byte.c,
2196 testsuite/libffi.call/cls_5_1_byte.c,
2197 testsuite/libffi.call/cls_5byte.c,
2198 testsuite/libffi.call/cls_64byte.c,
2199 testsuite/libffi.call/cls_6_1_byte.c,
2200 testsuite/libffi.call/cls_6byte.c,
2201 testsuite/libffi.call/cls_7_1_byte.c,
2202 testsuite/libffi.call/cls_7byte.c,
2203 testsuite/libffi.call/cls_8byte.c,
2204 testsuite/libffi.call/cls_9byte1.c,
2205 testsuite/libffi.call/cls_9byte2.c,
2206 testsuite/libffi.call/cls_align_double.c,
2207 testsuite/libffi.call/cls_align_float.c,
2208 testsuite/libffi.call/cls_align_longdouble.c,
2209 testsuite/libffi.call/cls_align_longdouble_split.c,
2210 testsuite/libffi.call/cls_align_longdouble_split2.c,
2211 testsuite/libffi.call/cls_align_pointer.c,
2212 testsuite/libffi.call/cls_align_sint16.c,
2213 testsuite/libffi.call/cls_align_sint32.c,
2214 testsuite/libffi.call/cls_align_sint64.c,
2215 testsuite/libffi.call/cls_align_uint16.c,
2216 testsuite/libffi.call/cls_align_uint32.c,
2217 testsuite/libffi.call/cls_align_uint64.c,
2218 testsuite/libffi.call/cls_dbls_struct.c,
2219 testsuite/libffi.call/cls_double.c,
2220 testsuite/libffi.call/cls_double_va.c,
2221 testsuite/libffi.call/cls_float.c,
2222 testsuite/libffi.call/cls_longdouble.c,
2223 testsuite/libffi.call/cls_longdouble_va.c,
2224 testsuite/libffi.call/cls_multi_schar.c,
2225 testsuite/libffi.call/cls_multi_sshort.c,
2226 testsuite/libffi.call/cls_multi_sshortchar.c,
2227 testsuite/libffi.call/cls_multi_uchar.c,
2228 testsuite/libffi.call/cls_multi_ushort.c,
2229 testsuite/libffi.call/cls_multi_ushortchar.c,
2230 testsuite/libffi.call/cls_pointer.c,
2231 testsuite/libffi.call/cls_pointer_stack.c,
2232 testsuite/libffi.call/cls_schar.c,
2233 testsuite/libffi.call/cls_sint.c,
2234 testsuite/libffi.call/cls_sshort.c,
2235 testsuite/libffi.call/cls_uchar.c,
2236 testsuite/libffi.call/cls_uint.c,
2237 testsuite/libffi.call/cls_ulonglong.c,
2238 testsuite/libffi.call/cls_ushort.c,
2239 testsuite/libffi.call/err_bad_abi.c,
2240 testsuite/libffi.call/err_bad_typedef.c,
2241 testsuite/libffi.call/float2.c,
2242 testsuite/libffi.call/huge_struct.c,
2243 testsuite/libffi.call/nested_struct.c,
2244 testsuite/libffi.call/nested_struct1.c,
2245 testsuite/libffi.call/nested_struct10.c,
2246 testsuite/libffi.call/nested_struct2.c,
2247 testsuite/libffi.call/nested_struct3.c,
2248 testsuite/libffi.call/nested_struct4.c,
2249 testsuite/libffi.call/nested_struct5.c,
2250 testsuite/libffi.call/nested_struct6.c,
2251 testsuite/libffi.call/nested_struct7.c,
2252 testsuite/libffi.call/nested_struct8.c,
2253 testsuite/libffi.call/nested_struct9.c,
2254 testsuite/libffi.call/problem1.c,
2255 testsuite/libffi.call/return_ldl.c,
2256 testsuite/libffi.call/return_ll1.c,
2257 testsuite/libffi.call/stret_large.c,
2258 testsuite/libffi.call/stret_large2.c,
2259 testsuite/libffi.call/stret_medium.c,
2260 testsuite/libffi.call/stret_medium2.c,
Anthony Green0cfe60e2009-12-29 10:06:04 -05002261 testsuite/libffi.special/unwindtest.cc: use ffi_closure_alloc instead
2262 of checking for MMAP. Use intptr_t instead of long casts.
Anthony Greenc6dddbd2009-10-04 08:11:33 -04002263
22642009-06-11 Kaz Kojima <kkojima@gcc.gnu.org>
2265
2266 * testsuite/libffi.call/cls_longdouble_va.c: Add xfail sh*-*-linux-*.
2267 * testsuite/libffi.call/err_bad_abi.c: Add xfail sh*-*-*.
2268 * testsuite/libffi.call/err_bad_typedef.c: Likewise.
2269
22702009-06-09 Andrew Haley <aph@redhat.com>
2271
2272 * src/x86/freebsd.S: Add missing file.
2273
22742009-06-08 Andrew Haley <aph@redhat.com>
2275
2276 Import from libffi 3.0.8:
2277
2278 * doc/libffi.texi: New file.
2279 * doc/libffi.info: Likewise.
2280 * doc/stamp-vti: Likewise.
2281 * man/Makefile.am: New file.
2282 * man/ffi_call.3: New file.
2283
2284 * Makefile.am (EXTRA_DIST): Add src/x86/darwin64.S,
2285 src/dlmalloc.c.
2286 (nodist_libffi_la_SOURCES): Add X86_FREEBSD.
2287
2288 * configure.ac: Bump version to 3.0.8.
2289 parisc*-*-linux*: Add.
2290 i386-*-freebsd* | i386-*-openbsd*: Add.
2291 powerpc-*-beos*: Add.
2292 AM_CONDITIONAL X86_FREEBSD: Add.
2293 AC_CONFIG_FILES: Add man/Makefile.
2294
2295 * include/ffi.h.in (FFI_FN): Change void (*)() to void (*)(void).
2296
22972009-06-08 Andrew Haley <aph@redhat.com>
2298
2299 * README: Import from libffi 3.0.8.
2300
23012009-06-08 Andrew Haley <aph@redhat.com>
2302
2303 * testsuite/libffi.call/err_bad_abi.c: Add xfails.
2304 * testsuite/libffi.call/cls_longdouble_va.c: Add xfails.
2305 * testsuite/libffi.call/cls_dbls_struct.c: Add xfail x86_64-*-linux-*.
2306 * testsuite/libffi.call/err_bad_typedef.c: Add xfails.
2307
2308 * testsuite/libffi.call/stret_medium2.c: Add __UNUSED__ to args.
2309 * testsuite/libffi.call/stret_medium.c: Likewise.
2310 * testsuite/libffi.call/stret_large2.c: Likewise.
2311 * testsuite/libffi.call/stret_large.c: Likewise.
2312
23132008-12-26 Timothy Wall <twall@users.sf.net>
2314
Anthony Green0cfe60e2009-12-29 10:06:04 -05002315 * testsuite/libffi.call/cls_longdouble.c,
2316 testsuite/libffi.call/cls_longdouble_va.c,
2317 testsuite/libffi.call/cls_align_longdouble.c,
2318 testsuite/libffi.call/cls_align_longdouble_split.c,
2319 testsuite/libffi.call/cls_align_longdouble_split2.c: mark expected
2320 failures on x86_64 cygwin/mingw.
Anthony Greenc6dddbd2009-10-04 08:11:33 -04002321
23222008-12-22 Timothy Wall <twall@users.sf.net>
2323
Anthony Green0cfe60e2009-12-29 10:06:04 -05002324 * testsuite/libffi.call/closure_fn0.c,
2325 testsuite/libffi.call/closure_fn1.c,
2326 testsuite/libffi.call/closure_fn2.c,
2327 testsuite/libffi.call/closure_fn3.c,
2328 testsuite/libffi.call/closure_fn4.c,
2329 testsuite/libffi.call/closure_fn5.c,
2330 testsuite/libffi.call/closure_fn6.c,
2331 testsuite/libffi.call/closure_loc_fn0.c,
2332 testsuite/libffi.call/closure_stdcall.c,
2333 testsuite/libffi.call/cls_align_pointer.c,
2334 testsuite/libffi.call/cls_pointer.c,
2335 testsuite/libffi.call/cls_pointer_stack.c: use portable cast from
2336 pointer to integer (intptr_t).
2337 * testsuite/libffi.call/cls_longdouble.c: disable for win64.
Anthony Greenc6dddbd2009-10-04 08:11:33 -04002338
23392008-07-24 Anthony Green <green@redhat.com>
2340
Anthony Green0cfe60e2009-12-29 10:06:04 -05002341 * testsuite/libffi.call/cls_dbls_struct.c,
2342 testsuite/libffi.call/cls_double_va.c,
2343 testsuite/libffi.call/cls_longdouble.c,
2344 testsuite/libffi.call/cls_longdouble_va.c,
2345 testsuite/libffi.call/cls_pointer.c,
2346 testsuite/libffi.call/cls_pointer_stack.c,
2347 testsuite/libffi.call/err_bad_abi.c: Clean up failures from
2348 compiler warnings.
Anthony Greenc6dddbd2009-10-04 08:11:33 -04002349
23502008-03-04 Anthony Green <green@redhat.com>
Anthony Green0cfe60e2009-12-29 10:06:04 -05002351 Blake Chaffin
2352 hos@tamanegi.org
Anthony Greenc6dddbd2009-10-04 08:11:33 -04002353
Anthony Green0cfe60e2009-12-29 10:06:04 -05002354 * testsuite/libffi.call/cls_align_longdouble_split2.c
2355 testsuite/libffi.call/cls_align_longdouble_split.c
2356 testsuite/libffi.call/cls_dbls_struct.c
2357 testsuite/libffi.call/cls_double_va.c
2358 testsuite/libffi.call/cls_longdouble.c
2359 testsuite/libffi.call/cls_longdouble_va.c
2360 testsuite/libffi.call/cls_pointer.c
2361 testsuite/libffi.call/cls_pointer_stack.c
2362 testsuite/libffi.call/err_bad_abi.c
2363 testsuite/libffi.call/err_bad_typedef.c
2364 testsuite/libffi.call/stret_large2.c
2365 testsuite/libffi.call/stret_large.c
2366 testsuite/libffi.call/stret_medium2.c
2367 testsuite/libffi.call/stret_medium.c: New tests from Apple.
Anthony Greenc6dddbd2009-10-04 08:11:33 -04002368
23692009-06-05 Andrew Haley <aph@redhat.com>
2370
2371 * src/x86/ffitarget.h, src/x86/ffi.c: Merge stdcall changes from
2372 libffi.
2373
23742009-06-04 Andrew Haley <aph@redhat.com>
2375
2376 * src/x86/ffitarget.h, src/x86/win32.S, src/x86/ffi.c: Back out
2377 stdcall changes.
2378
23792008-02-26 Anthony Green <green@redhat.com>
Anthony Green0cfe60e2009-12-29 10:06:04 -05002380 Thomas Heller <theller@ctypes.org>
Anthony Greenc6dddbd2009-10-04 08:11:33 -04002381
Anthony Green0cfe60e2009-12-29 10:06:04 -05002382 * src/x86/ffi.c (ffi_closure_SYSV_inner): Change C++ comment to C
2383 comment.
Anthony Greenc6dddbd2009-10-04 08:11:33 -04002384
23852008-02-03 Timothy Wall <twall@users.sf.net>
2386
Anthony Green0cfe60e2009-12-29 10:06:04 -05002387 * src/x86/ffi.c (FFI_INIT_TRAMPOLINE_STDCALL): Calculate jump return
2388 offset based on code pointer, not data pointer.
Anthony Greenc6dddbd2009-10-04 08:11:33 -04002389
23902008-01-31 Timothy Wall <twall@users.sf.net>
2391
Anthony Green0cfe60e2009-12-29 10:06:04 -05002392 * testsuite/libffi.call/closure_stdcall.c: Add test for stdcall
2393 closures.
2394 * src/x86/ffitarget.h: Increase size of trampoline for stdcall
2395 closures.
2396 * src/x86/win32.S: Add assembly for stdcall closure.
2397 * src/x86/ffi.c: Initialize stdcall closure trampoline.
Anthony Greenc6dddbd2009-10-04 08:11:33 -04002398
23992009-06-04 Andrew Haley <aph@redhat.com>
2400
2401 * include/ffi.h.in: Change void (*)() to void (*)(void).
2402 * src/x86/ffi.c: Likewise.
2403
24042009-06-04 Andrew Haley <aph@redhat.com>
2405
2406 * src/powerpc/ppc_closure.S: Insert licence header.
2407 * src/powerpc/linux64_closure.S: Likewise.
2408 * src/m68k/sysv.S: Likewise.
2409
2410 * src/sh64/ffi.c: Change void (*)() to void (*)(void).
2411 * src/powerpc/ffi.c: Likewise.
2412 * src/powerpc/ffi_darwin.c: Likewise.
2413 * src/m32r/ffi.c: Likewise.
2414 * src/sh64/ffi.c: Likewise.
2415 * src/x86/ffi64.c: Likewise.
2416 * src/alpha/ffi.c: Likewise.
2417 * src/alpha/osf.S: Likewise.
2418 * src/frv/ffi.c: Likewise.
2419 * src/s390/ffi.c: Likewise.
2420 * src/pa/ffi.c: Likewise.
2421 * src/pa/hpux32.S: Likewise.
2422 * src/ia64/unix.S: Likewise.
2423 * src/ia64/ffi.c: Likewise.
2424 * src/sparc/ffi.c: Likewise.
2425 * src/mips/ffi.c: Likewise.
2426 * src/sh/ffi.c: Likewise.
2427
24282008-02-15 David Daney <ddaney@avtrex.com>
2429
Anthony Green0cfe60e2009-12-29 10:06:04 -05002430 * src/mips/ffi.c (USE__BUILTIN___CLEAR_CACHE):
2431 Define (conditionally), and use it to include cachectl.h.
2432 (ffi_prep_closure_loc): Fix cache flushing.
2433 * src/mips/ffitarget.h (_ABIN32, _ABI64, _ABIO32): Define.
Anthony Greenc6dddbd2009-10-04 08:11:33 -04002434
24352009-06-04 Andrew Haley <aph@redhat.com>
2436
2437 include/ffi.h.in,
2438 src/arm/ffitarget.h,
2439 src/arm/ffi.c,
2440 src/arm/sysv.S,
2441 src/powerpc/ffitarget.h,
2442 src/closures.c,
2443 src/sh64/ffitarget.h,
2444 src/sh64/ffi.c,
2445 src/sh64/sysv.S,
2446 src/types.c,
2447 src/x86/ffi64.c,
2448 src/x86/ffitarget.h,
2449 src/x86/win32.S,
2450 src/x86/darwin.S,
2451 src/x86/ffi.c,
2452 src/x86/sysv.S,
2453 src/x86/unix64.S,
2454 src/alpha/ffitarget.h,
2455 src/alpha/ffi.c,
2456 src/alpha/osf.S,
2457 src/m68k/ffitarget.h,
2458 src/frv/ffitarget.h,
2459 src/frv/ffi.c,
2460 src/s390/ffitarget.h,
2461 src/s390/sysv.S,
2462 src/cris/ffitarget.h,
2463 src/pa/linux.S,
2464 src/pa/ffitarget.h,
2465 src/pa/ffi.c,
2466 src/raw_api.c,
2467 src/ia64/ffitarget.h,
2468 src/ia64/unix.S,
2469 src/ia64/ffi.c,
2470 src/ia64/ia64_flags.h,
2471 src/java_raw_api.c,
2472 src/debug.c,
2473 src/sparc/v9.S,
2474 src/sparc/ffitarget.h,
2475 src/sparc/ffi.c,
2476 src/sparc/v8.S,
2477 src/mips/ffitarget.h,
2478 src/mips/n32.S,
2479 src/mips/o32.S,
2480 src/mips/ffi.c,
2481 src/prep_cif.c,
2482 src/sh/ffitarget.h,
2483 src/sh/ffi.c,
2484 src/sh/sysv.S: Update license text.
2485
24862009-05-22 Dave Korn <dave.korn.cygwin@gmail.com>
2487
2488 * src/x86/win32.S (_ffi_closure_STDCALL): New function.
2489 (.eh_frame): Add FDE for it.
2490
24912009-05-22 Dave Korn <dave.korn.cygwin@gmail.com>
2492
2493 * configure.ac: Also check if assembler supports pc-relative
2494 relocs on X86_WIN32 targets.
2495 * configure: Regenerate.
2496 * src/x86/win32.S (ffi_prep_args): Declare extern, not global.
2497 (_ffi_call_SYSV): Add missing function type symbol .def and
2498 add EH markup labels.
2499 (_ffi_call_STDCALL): Likewise.
2500 (_ffi_closure_SYSV): Likewise.
2501 (_ffi_closure_raw_SYSV): Likewise.
2502 (.eh_frame): Add hand-crafted EH data.
2503
25042009-04-09 Jakub Jelinek <jakub@redhat.com>
2505
2506 * testsuite/lib/libffi-dg.exp: Change copyright header to refer to
2507 version 3 of the GNU General Public License and to point readers
2508 at the COPYING3 file and the FSF's license web page.
2509 * testsuite/libffi.call/call.exp: Likewise.
2510 * testsuite/libffi.special/special.exp: Likewise.
2511
25122009-03-01 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2513
2514 * configure: Regenerate.
2515
25162008-12-18 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
2517
2518 PR libffi/26048
2519 * configure.ac (HAVE_AS_X86_PCREL): New test.
2520 * configure: Regenerate.
2521 * fficonfig.h.in: Regenerate.
2522 * src/x86/sysv.S [!FFI_NO_RAW_API]: Precalculate
2523 RAW_CLOSURE_CIF_OFFSET, RAW_CLOSURE_FUN_OFFSET,
2524 RAW_CLOSURE_USER_DATA_OFFSET for the Solaris 10/x86 assembler.
2525 (.eh_frame): Only use SYMBOL-. iff HAVE_AS_X86_PCREL.
2526 * src/x86/unix64.S (.Lstore_table): Move to .text section.
2527 (.Lload_table): Likewise.
2528 (.eh_frame): Only use SYMBOL-. iff HAVE_AS_X86_PCREL.
2529
25302008-12-18 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2531
2532 * configure: Regenerate.
2533
25342008-11-21 Eric Botcazou <ebotcazou@adacore.com>
2535
2536 * src/sparc/ffi.c (ffi_prep_cif_machdep): Add support for
2537 signed/unsigned int8/16 return values.
2538 * src/sparc/v8.S (ffi_call_v8): Likewise.
2539 (ffi_closure_v8): Likewise.
2540
25412008-09-26 Peter O'Gorman <pogma@thewrittenword.com>
Anthony Green0cfe60e2009-12-29 10:06:04 -05002542 Steve Ellcey <sje@cup.hp.com>
Anthony Greenc6dddbd2009-10-04 08:11:33 -04002543
2544 * configure: Regenerate for new libtool.
2545 * Makefile.in: Ditto.
2546 * include/Makefile.in: Ditto.
2547 * aclocal.m4: Ditto.
2548
25492008-08-25 Andreas Tobler <a.tobler@schweiz.org>
2550
2551 * src/powerpc/ffitarget.h (ffi_abi): Add FFI_LINUX and
2552 FFI_LINUX_SOFT_FLOAT to the POWERPC_FREEBSD enum.
2553 Add note about flag bits used for FFI_SYSV_TYPE_SMALL_STRUCT.
2554 Adjust copyright notice.
2555 * src/powerpc/ffi.c: Add two new flags to indicate if we have one
2556 register or two register to use for FFI_SYSV structs.
2557 (ffi_prep_cif_machdep): Pass the right register flag introduced above.
2558 (ffi_closure_helper_SYSV): Fix the return type for
2559 FFI_SYSV_TYPE_SMALL_STRUCT. Comment.
2560 Adjust copyright notice.
2561
25622008-07-16 Kaz Kojima <kkojima@gcc.gnu.org>
2563
2564 * src/sh/ffi.c (ffi_prep_closure_loc): Turn INSN into an unsigned
2565 int.
2566
25672008-06-17 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2568
2569 * configure: Regenerate.
2570 * include/Makefile.in: Regenerate.
2571 * testsuite/Makefile.in: Regenerate.
2572
25732008-06-07 Joseph Myers <joseph@codesourcery.com>
2574
2575 * configure.ac (parisc*-*-linux*, powerpc-*-sysv*,
2576 powerpc-*-beos*): Remove.
2577 * configure: Regenerate.
2578
25792008-05-09 Julian Brown <julian@codesourcery.com>
2580
2581 * Makefile.am (LTLDFLAGS): New.
2582 (libffi_la_LDFLAGS): Use above.
2583 * Makefile.in: Regenerate.
2584
25852008-04-18 Paolo Bonzini <bonzini@gnu.org>
2586
2587 PR bootstrap/35457
2588 * aclocal.m4: Regenerate.
2589 * configure: Regenerate.
2590
25912008-03-26 Kaz Kojima <kkojima@gcc.gnu.org>
2592
2593 * src/sh/sysv.S: Add .note.GNU-stack on Linux.
2594 * src/sh64/sysv.S: Likewise.
2595
25962008-03-26 Daniel Jacobowitz <dan@debian.org>
2597
2598 * src/arm/sysv.S: Fix ARM comment marker.
2599
26002008-03-26 Jakub Jelinek <jakub@redhat.com>
2601
2602 * src/alpha/osf.S: Add .note.GNU-stack on Linux.
2603 * src/s390/sysv.S: Likewise.
2604 * src/powerpc/ppc_closure.S: Likewise.
2605 * src/powerpc/sysv.S: Likewise.
2606 * src/x86/unix64.S: Likewise.
2607 * src/x86/sysv.S: Likewise.
2608 * src/sparc/v8.S: Likewise.
2609 * src/sparc/v9.S: Likewise.
2610 * src/m68k/sysv.S: Likewise.
2611 * src/arm/sysv.S: Likewise.
2612
26132008-03-16 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2614
2615 * aclocal.m4: Regenerate.
2616 * configure: Likewise.
2617 * Makefile.in: Likewise.
2618 * include/Makefile.in: Likewise.
2619 * testsuite/Makefile.in: Likewise.
2620
26212008-02-12 Bjoern Koenig <bkoenig@alpha-tierchen.de>
2622 Andreas Tobler <a.tobler@schweiz.org>
2623
2624 * configure.ac: Add amd64-*-freebsd* target.
2625 * configure: Regenerate.
2626
26272008-01-30 H.J. Lu <hongjiu.lu@intel.com>
2628
2629 PR libffi/34612
2630 * src/x86/sysv.S (ffi_closure_SYSV): Pop 4 byte from stack when
2631 returning struct.
2632
2633 * testsuite/libffi.call/call.exp: Add "-O2 -fomit-frame-pointer"
2634 tests.
2635
26362008-01-24 David Edelsohn <edelsohn@gnu.org>
2637
2638 * configure: Regenerate.
2639
26402008-01-06 Andreas Tobler <a.tobler@schweiz.org>
2641
2642 * src/x86/ffi.c (ffi_prep_cif_machdep): Fix thinko.
2643
26442008-01-05 Andreas Tobler <a.tobler@schweiz.org>
2645
2646 PR testsuite/32843
2647 * src/x86/ffi.c (ffi_prep_cif_machdep): Add code for
2648 signed/unsigned int8/16 for X86_DARWIN.
2649 Updated copyright info.
2650 Handle one and two byte structs with special cif->flags.
2651 * src/x86/ffitarget.h: Add special types for one and two byte structs.
2652 Updated copyright info.
2653 * src/x86/darwin.S (ffi_call_SYSV): Rewrite to use a jump table like
2654 sysv.S
2655 Remove code to pop args from the stack after call.
2656 Special-case signed/unsigned for int8/16, one and two byte structs.
2657 (ffi_closure_raw_SYSV): Handle FFI_TYPE_UINT8,
2658 FFI_TYPE_SINT8, FFI_TYPE_UINT16, FFI_TYPE_SINT16, FFI_TYPE_UINT32,
2659 FFI_TYPE_SINT32.
2660 Updated copyright info.
2661
26622007-12-08 David Daney <ddaney@avtrex.com>
2663
Anthony Green0cfe60e2009-12-29 10:06:04 -05002664 * src/mips/n32.S (ffi_call_N32): Replace dadd with ADDU, dsub with
Anthony Greenc6dddbd2009-10-04 08:11:33 -04002665 SUBU, add with ADDU and use smaller code sequences.
2666
26672007-12-07 David Daney <ddaney@avtrex.com>
2668
2669 * src/mips/ffi.c (ffi_prep_cif_machdep): Handle long double return
2670 type.
2671
26722007-12-06 David Daney <ddaney@avtrex.com>
2673
2674 * include/ffi.h.in (FFI_SIZEOF_JAVA_RAW): Define if not already
2675 defined.
2676 (ffi_java_raw): New typedef.
2677 (ffi_java_raw_call, ffi_java_ptrarray_to_raw,
2678 ffi_java_raw_to_ptrarray): Change parameter types from ffi_raw to
2679 ffi_java_raw.
2680 (ffi_java_raw_closure) : Same.
2681 (ffi_prep_java_raw_closure, ffi_prep_java_raw_closure_loc): Change
2682 parameter types.
2683 * src/java_raw_api.c (ffi_java_raw_size): Replace FFI_SIZEOF_ARG with
2684 FFI_SIZEOF_JAVA_RAW.
2685 (ffi_java_raw_to_ptrarray): Change type of raw to ffi_java_raw.
2686 Replace FFI_SIZEOF_ARG with FFI_SIZEOF_JAVA_RAW. Use
2687 sizeof(ffi_java_raw) for alignment calculations.
2688 (ffi_java_ptrarray_to_raw): Same.
2689 (ffi_java_rvalue_to_raw): Add special handling for FFI_TYPE_POINTER
Anthony Green0cfe60e2009-12-29 10:06:04 -05002690 if FFI_SIZEOF_JAVA_RAW == 4.
Anthony Greenc6dddbd2009-10-04 08:11:33 -04002691 (ffi_java_raw_to_rvalue): Same.
2692 (ffi_java_raw_call): Change type of raw to ffi_java_raw.
2693 (ffi_java_translate_args): Same.
2694 (ffi_prep_java_raw_closure_loc, ffi_prep_java_raw_closure): Change
2695 parameter types.
2696 * src/mips/ffitarget.h (FFI_SIZEOF_JAVA_RAW): Define for N32 ABI.
2697
26982007-12-06 David Daney <ddaney@avtrex.com>
2699
Anthony Green0cfe60e2009-12-29 10:06:04 -05002700 * src/mips/n32.S (ffi_closure_N32): Use 64-bit add instruction on
Anthony Greenc6dddbd2009-10-04 08:11:33 -04002701 pointer values.
2702
27032007-12-01 Andreas Tobler <a.tobler@schweiz.org>
2704
2705 PR libffi/31937
2706 * src/powerpc/ffitarget.h: Introduce new ABI FFI_LINUX_SOFT_FLOAT.
2707 Add local FFI_TYPE_UINT128 to handle soft-float long-double-128.
2708 * src/powerpc/ffi.c: Distinguish between __NO_FPRS__ and not and
2709 set the NUM_FPR_ARG_REGISTERS according to.
2710 Add support for potential soft-float support under hard-float
2711 architecture.
2712 (ffi_prep_args_SYSV): Set NUM_FPR_ARG_REGISTERS to 0 in case of
2713 FFI_LINUX_SOFT_FLOAT, handle float, doubles and long-doubles according
2714 to the FFI_LINUX_SOFT_FLOAT ABI.
2715 (ffi_prep_cif_machdep): Likewise.
2716 (ffi_closure_helper_SYSV): Likewise.
2717 * src/powerpc/ppc_closure.S: Make sure not to store float/double
2718 on archs where __NO_FPRS__ is true.
2719 Add FFI_TYPE_UINT128 support.
2720 * src/powerpc/sysv.S: Add support for soft-float long-double-128.
2721 Adjust copyright notice.
2722
27232007-11-25 Andreas Tobler <a.tobler@schweiz.org>
2724
2725 * src/closures.c: Move defintion of MAYBE_UNUSED from here to ...
2726 * include/ffi_common.h: ... here.
2727 Update copyright.
2728
27292007-11-17 Andreas Tobler <a.tobler@schweiz.org>
2730
2731 * src/powerpc/sysv.S: Load correct cr to compare if we have long double.
2732 * src/powerpc/linux64.S: Likewise.
2733 * src/powerpc/ffi.c: Add a comment to show which part goes into cr6.
2734 * testsuite/libffi.call/return_ldl.c: New test.
2735
27362007-09-04 <aph@redhat.com>
2737
2738 * src/arm/sysv.S (UNWIND): New.
2739 (Whole file): Conditionally compile unwinder directives.
2740 * src/arm/sysv.S: Add unwinder directives.
2741
2742 * src/arm/ffi.c (ffi_prep_args): Align structs by at least 4 bytes.
2743 Only treat r0 as a struct address if we're actually returning a
2744 struct by address.
2745 Only copy the bytes that are actually within a struct.
2746 (ffi_prep_cif_machdep): A Composite Type not larger than 4 bytes
2747 is returned in r0, not passed by address.
2748 (ffi_call): Allocate a word-sized temporary for the case where
2749 a composite is returned in r0.
2750 (ffi_prep_incoming_args_SYSV): Align as necessary.
2751
27522007-08-05 Steven Newbury <s_j_newbury@yahoo.co.uk>
2753
Anthony Green0cfe60e2009-12-29 10:06:04 -05002754 * src/arm/ffi.c (FFI_INIT_TRAMPOLINE): Use __clear_cache instead of
Anthony Greenc6dddbd2009-10-04 08:11:33 -04002755 directly using the sys_cacheflush syscall.
2756
27572007-07-27 Andrew Haley <aph@redhat.com>
2758
2759 * src/arm/sysv.S (ffi_closure_SYSV): Add soft-float.
2760
27612007-09-03 Maciej W. Rozycki <macro@linux-mips.org>
2762
2763 * Makefile.am: Unify MIPS_IRIX and MIPS_LINUX into MIPS.
2764 * configure.ac: Likewise.
2765 * Makefile.in: Regenerate.
2766 * include/Makefile.in: Likewise.
2767 * testsuite/Makefile.in: Likewise.
2768 * configure: Likewise.
2769
27702007-08-24 David Daney <ddaney@avtrex.com>
2771
2772 * testsuite/libffi.call/return_sl.c: New test.
2773
27742007-08-10 David Daney <ddaney@avtrex.com>
2775
2776 * testsuite/libffi.call/cls_multi_ushort.c,
2777 testsuite/libffi.call/cls_align_uint16.c,
2778 testsuite/libffi.call/nested_struct1.c,
2779 testsuite/libffi.call/nested_struct3.c,
2780 testsuite/libffi.call/cls_7_1_byte.c,
2781 testsuite/libffi.call/nested_struct5.c,
2782 testsuite/libffi.call/cls_double.c,
2783 testsuite/libffi.call/nested_struct7.c,
2784 testsuite/libffi.call/cls_sint.c,
2785 testsuite/libffi.call/nested_struct9.c,
2786 testsuite/libffi.call/cls_20byte1.c,
2787 testsuite/libffi.call/cls_multi_sshortchar.c,
2788 testsuite/libffi.call/cls_align_sint64.c,
2789 testsuite/libffi.call/cls_3byte2.c,
2790 testsuite/libffi.call/cls_multi_schar.c,
2791 testsuite/libffi.call/cls_multi_uchar.c,
2792 testsuite/libffi.call/cls_19byte.c,
2793 testsuite/libffi.call/cls_9byte1.c,
2794 testsuite/libffi.call/cls_align_float.c,
2795 testsuite/libffi.call/closure_fn1.c,
2796 testsuite/libffi.call/problem1.c,
2797 testsuite/libffi.call/closure_fn3.c,
2798 testsuite/libffi.call/cls_sshort.c,
2799 testsuite/libffi.call/closure_fn5.c,
2800 testsuite/libffi.call/cls_align_double.c,
2801 testsuite/libffi.call/nested_struct.c,
2802 testsuite/libffi.call/cls_2byte.c,
2803 testsuite/libffi.call/nested_struct10.c,
2804 testsuite/libffi.call/cls_4byte.c,
2805 testsuite/libffi.call/cls_6byte.c,
2806 testsuite/libffi.call/cls_8byte.c,
2807 testsuite/libffi.call/cls_multi_sshort.c,
2808 testsuite/libffi.call/cls_align_sint16.c,
2809 testsuite/libffi.call/cls_align_uint32.c,
2810 testsuite/libffi.call/cls_20byte.c,
2811 testsuite/libffi.call/cls_float.c,
2812 testsuite/libffi.call/nested_struct2.c,
2813 testsuite/libffi.call/cls_5_1_byte.c,
2814 testsuite/libffi.call/nested_struct4.c,
2815 testsuite/libffi.call/cls_24byte.c,
2816 testsuite/libffi.call/nested_struct6.c,
2817 testsuite/libffi.call/cls_64byte.c,
2818 testsuite/libffi.call/nested_struct8.c,
2819 testsuite/libffi.call/cls_uint.c,
2820 testsuite/libffi.call/cls_multi_ushortchar.c,
2821 testsuite/libffi.call/cls_schar.c,
2822 testsuite/libffi.call/cls_uchar.c,
2823 testsuite/libffi.call/cls_align_uint64.c,
2824 testsuite/libffi.call/cls_ulonglong.c,
2825 testsuite/libffi.call/cls_align_longdouble.c,
2826 testsuite/libffi.call/cls_1_1byte.c,
2827 testsuite/libffi.call/cls_12byte.c,
2828 testsuite/libffi.call/cls_3_1byte.c,
2829 testsuite/libffi.call/cls_3byte1.c,
2830 testsuite/libffi.call/cls_4_1byte.c,
2831 testsuite/libffi.call/cls_6_1_byte.c,
2832 testsuite/libffi.call/cls_16byte.c,
2833 testsuite/libffi.call/cls_18byte.c,
2834 testsuite/libffi.call/closure_fn0.c,
2835 testsuite/libffi.call/cls_9byte2.c,
2836 testsuite/libffi.call/closure_fn2.c,
2837 testsuite/libffi.call/closure_fn4.c,
2838 testsuite/libffi.call/cls_ushort.c,
2839 testsuite/libffi.call/closure_fn6.c,
2840 testsuite/libffi.call/cls_5byte.c,
2841 testsuite/libffi.call/cls_align_pointer.c,
2842 testsuite/libffi.call/cls_7byte.c,
2843 testsuite/libffi.call/cls_align_sint32.c,
2844 testsuite/libffi.special/unwindtest_ffi_call.cc,
2845 testsuite/libffi.special/unwindtest.cc: Remove xfail for mips64*-*-*.
2846
28472007-08-10 David Daney <ddaney@avtrex.com>
2848
2849 PR libffi/28313
2850 * configure.ac: Don't treat mips64 as a special case.
2851 * Makefile.am (nodist_libffi_la_SOURCES): Add n32.S.
2852 * configure: Regenerate
2853 * Makefile.in: Ditto.
2854 * fficonfig.h.in: Ditto.
2855 * src/mips/ffitarget.h (REG_L, REG_S, SUBU, ADDU, SRL, LI): Indent.
2856 (LA, EH_FRAME_ALIGN, FDE_ADDR_BYTES): New preprocessor macros.
2857 (FFI_DEFAULT_ABI): Set for n64 case.
2858 (FFI_CLOSURES, FFI_TRAMPOLINE_SIZE): Define for n32 and n64 cases.
2859 * src/mips/n32.S (ffi_call_N32): Add debug macros and labels for FDE.
2860 (ffi_closure_N32): New function.
2861 (.eh_frame): New section
2862 * src/mips/o32.S: Clean up comments.
2863 (ffi_closure_O32): Pass ffi_closure parameter in $12.
2864 * src/mips/ffi.c: Use FFI_MIPS_N32 instead of
2865 _MIPS_SIM == _ABIN32 throughout.
2866 (FFI_MIPS_STOP_HERE): New, use in place of
2867 ffi_stop_here.
2868 (ffi_prep_args): Use unsigned long to hold pointer values. Rewrite
2869 to support n32/n64 ABIs.
2870 (calc_n32_struct_flags): Rewrite.
2871 (calc_n32_return_struct_flags): Remove unused variable. Reverse
2872 position of flag bits.
2873 (ffi_prep_cif_machdep): Rewrite n32 portion.
2874 (ffi_call): Enable for n64. Add special handling for small structure
2875 return values.
2876 (ffi_prep_closure_loc): Add n32 and n64 support.
2877 (ffi_closure_mips_inner_O32): Add cast to silence warning.
2878 (copy_struct_N32, ffi_closure_mips_inner_N32): New functions.
2879
28802007-08-08 David Daney <ddaney@avtrex.com>
2881
2882 * testsuite/libffi.call/ffitest.h (ffi_type_mylong): Remove definition.
2883 * testsuite/libffi.call/cls_align_uint16.c (main): Use correct type
2884 specifiers.
2885 * testsuite/libffi.call/nested_struct1.c (main): Ditto.
2886 * testsuite/libffi.call/cls_sint.c (main): Ditto.
2887 * testsuite/libffi.call/nested_struct9.c (main): Ditto.
2888 * testsuite/libffi.call/cls_20byte1.c (main): Ditto.
2889 * testsuite/libffi.call/cls_9byte1.c (main): Ditto.
2890 * testsuite/libffi.call/closure_fn1.c (main): Ditto.
2891 * testsuite/libffi.call/closure_fn3.c (main): Ditto.
2892 * testsuite/libffi.call/return_dbl2.c (main): Ditto.
2893 * testsuite/libffi.call/cls_sshort.c (main): Ditto.
2894 * testsuite/libffi.call/return_fl3.c (main): Ditto.
2895 * testsuite/libffi.call/closure_fn5.c (main): Ditto.
2896 * testsuite/libffi.call/nested_struct.c (main): Ditto.
2897 * testsuite/libffi.call/nested_struct10.c (main): Ditto.
2898 * testsuite/libffi.call/return_ll1.c (main): Ditto.
2899 * testsuite/libffi.call/cls_8byte.c (main): Ditto.
2900 * testsuite/libffi.call/cls_align_uint32.c (main): Ditto.
2901 * testsuite/libffi.call/cls_align_sint16.c (main): Ditto.
2902 * testsuite/libffi.call/cls_20byte.c (main): Ditto.
2903 * testsuite/libffi.call/nested_struct2.c (main): Ditto.
2904 * testsuite/libffi.call/cls_24byte.c (main): Ditto.
2905 * testsuite/libffi.call/nested_struct6.c (main): Ditto.
2906 * testsuite/libffi.call/cls_uint.c (main): Ditto.
2907 * testsuite/libffi.call/cls_12byte.c (main): Ditto.
2908 * testsuite/libffi.call/cls_16byte.c (main): Ditto.
2909 * testsuite/libffi.call/closure_fn0.c (main): Ditto.
2910 * testsuite/libffi.call/cls_9byte2.c (main): Ditto.
2911 * testsuite/libffi.call/closure_fn2.c (main): Ditto.
2912 * testsuite/libffi.call/return_dbl1.c (main): Ditto.
2913 * testsuite/libffi.call/closure_fn4.c (main): Ditto.
2914 * testsuite/libffi.call/closure_fn6.c (main): Ditto.
2915 * testsuite/libffi.call/cls_align_sint32.c (main): Ditto.
2916
29172007-08-07 Andrew Haley <aph@redhat.com>
2918
2919 * src/x86/sysv.S (ffi_closure_raw_SYSV): Fix typo in previous
2920 checkin.
2921
29222007-08-06 Andrew Haley <aph@redhat.com>
2923
2924 PR testsuite/32843
2925 * src/x86/sysv.S (ffi_closure_raw_SYSV): Handle FFI_TYPE_UINT8,
2926 FFI_TYPE_SINT8, FFI_TYPE_UINT16, FFI_TYPE_SINT16, FFI_TYPE_UINT32,
2927 FFI_TYPE_SINT32.
2928
29292007-08-02 David Daney <ddaney@avtrex.com>
2930
2931 * testsuite/libffi.call/return_ul.c (main): Define return type as
2932 ffi_arg. Use proper printf conversion specifier.
Anthony Green0cfe60e2009-12-29 10:06:04 -05002933
Anthony Greenc6dddbd2009-10-04 08:11:33 -040029342007-07-30 Andrew Haley <aph@redhat.com>
2935
2936 PR testsuite/32843
2937 * src/x86/ffi.c (ffi_prep_cif_machdep): in x86 case, add code for
2938 signed/unsigned int8/16.
2939 * src/x86/sysv.S (ffi_call_SYSV): Rewrite to:
2940 Use a jump table.
2941 Remove code to pop args from the stack after call.
2942 Special-case signed/unsigned int8/16.
2943 * testsuite/libffi.call/return_sc.c (main): Revert.
2944
29452007-07-26 Richard Guenther <rguenther@suse.de>
2946
2947 PR testsuite/32843
2948 * testsuite/libffi.call/return_sc.c (main): Verify call
2949 result as signed char, not ffi_arg.
2950
29512007-07-16 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
2952
2953 * configure.ac (i?86-*-solaris2.1[0-9]): Set TARGET to X86_64.
2954 * configure: Regenerate.
2955
29562007-07-11 David Daney <ddaney@avtrex.com>
2957
2958 * src/mips/ffi.c: Don't include sys/cachectl.h.
2959 (ffi_prep_closure_loc): Use __builtin___clear_cache() instead of
2960 cacheflush().
2961
29622007-05-18 Aurelien Jarno <aurelien@aurel32.net>
2963
2964 * src/arm/ffi.c (ffi_prep_closure_loc): Renamed and ajusted
2965 from (ffi_prep_closure): ... this.
2966 (FFI_INIT_TRAMPOLINE): Adjust.
2967
29682005-12-31 Phil Blundell <pb@reciva.com>
2969
Anthony Green0cfe60e2009-12-29 10:06:04 -05002970 * src/arm/ffi.c (ffi_prep_incoming_args_SYSV,
2971 ffi_closure_SYSV_inner, ffi_prep_closure): New, add closure support.
Anthony Greenc6dddbd2009-10-04 08:11:33 -04002972 * src/arm/sysv.S(ffi_closure_SYSV): Likewise.
2973 * src/arm/ffitarget.h (FFI_TRAMPOLINE_SIZE): Likewise.
2974 (FFI_CLOSURES): Enable closure support.
2975
29762007-07-03 Andrew Haley <aph@hedges.billgatliff.com>
2977
Anthony Green0cfe60e2009-12-29 10:06:04 -05002978 * testsuite/libffi.call/cls_multi_ushort.c,
2979 testsuite/libffi.call/cls_align_uint16.c,
2980 testsuite/libffi.call/nested_struct1.c,
2981 testsuite/libffi.call/nested_struct3.c,
2982 testsuite/libffi.call/cls_7_1_byte.c,
2983 testsuite/libffi.call/cls_double.c,
2984 testsuite/libffi.call/nested_struct5.c,
2985 testsuite/libffi.call/nested_struct7.c,
2986 testsuite/libffi.call/cls_sint.c,
2987 testsuite/libffi.call/nested_struct9.c,
2988 testsuite/libffi.call/cls_20byte1.c,
2989 testsuite/libffi.call/cls_multi_sshortchar.c,
2990 testsuite/libffi.call/cls_align_sint64.c,
2991 testsuite/libffi.call/cls_3byte2.c,
2992 testsuite/libffi.call/cls_multi_schar.c,
2993 testsuite/libffi.call/cls_multi_uchar.c,
2994 testsuite/libffi.call/cls_19byte.c,
2995 testsuite/libffi.call/cls_9byte1.c,
2996 testsuite/libffi.call/cls_align_float.c,
2997 testsuite/libffi.call/closure_fn1.c,
2998 testsuite/libffi.call/problem1.c,
2999 testsuite/libffi.call/closure_fn3.c,
3000 testsuite/libffi.call/cls_sshort.c,
3001 testsuite/libffi.call/closure_fn5.c,
3002 testsuite/libffi.call/cls_align_double.c,
3003 testsuite/libffi.call/cls_2byte.c,
3004 testsuite/libffi.call/nested_struct.c,
3005 testsuite/libffi.call/nested_struct10.c,
3006 testsuite/libffi.call/cls_4byte.c,
3007 testsuite/libffi.call/cls_6byte.c,
3008 testsuite/libffi.call/cls_8byte.c,
3009 testsuite/libffi.call/cls_multi_sshort.c,
3010 testsuite/libffi.call/cls_align_uint32.c,
3011 testsuite/libffi.call/cls_align_sint16.c,
3012 testsuite/libffi.call/cls_float.c,
3013 testsuite/libffi.call/cls_20byte.c,
3014 testsuite/libffi.call/cls_5_1_byte.c,
3015 testsuite/libffi.call/nested_struct2.c,
3016 testsuite/libffi.call/cls_24byte.c,
3017 testsuite/libffi.call/nested_struct4.c,
3018 testsuite/libffi.call/nested_struct6.c,
3019 testsuite/libffi.call/cls_64byte.c,
3020 testsuite/libffi.call/nested_struct8.c,
3021 testsuite/libffi.call/cls_uint.c,
3022 testsuite/libffi.call/cls_multi_ushortchar.c,
3023 testsuite/libffi.call/cls_schar.c,
3024 testsuite/libffi.call/cls_uchar.c,
3025 testsuite/libffi.call/cls_align_uint64.c,
3026 testsuite/libffi.call/cls_ulonglong.c,
3027 testsuite/libffi.call/cls_align_longdouble.c,
3028 testsuite/libffi.call/cls_1_1byte.c,
3029 testsuite/libffi.call/cls_12byte.c,
3030 testsuite/libffi.call/cls_3_1byte.c,
3031 testsuite/libffi.call/cls_3byte1.c,
3032 testsuite/libffi.call/cls_4_1byte.c,
3033 testsuite/libffi.call/cls_6_1_byte.c,
3034 testsuite/libffi.call/cls_16byte.c,
3035 testsuite/libffi.call/cls_18byte.c,
3036 testsuite/libffi.call/closure_fn0.c,
3037 testsuite/libffi.call/cls_9byte2.c,
3038 testsuite/libffi.call/closure_fn2.c,
3039 testsuite/libffi.call/closure_fn4.c,
3040 testsuite/libffi.call/cls_ushort.c,
3041 testsuite/libffi.call/closure_fn6.c,
3042 testsuite/libffi.call/cls_5byte.c,
3043 testsuite/libffi.call/cls_align_pointer.c,
3044 testsuite/libffi.call/cls_7byte.c,
3045 testsuite/libffi.call/cls_align_sint32.c,
3046 testsuite/libffi.special/unwindtest_ffi_call.cc,
3047 testsuite/libffi.special/unwindtest.cc: Enable for ARM.
Anthony Greenc6dddbd2009-10-04 08:11:33 -04003048
30492007-07-05 H.J. Lu <hongjiu.lu@intel.com>
3050
3051 * aclocal.m4: Regenerated.
3052
30532007-06-02 Paolo Bonzini <bonzini@gnu.org>
3054
3055 * configure: Regenerate.
3056
30572007-05-23 Steve Ellcey <sje@cup.hp.com>
3058
3059 * Makefile.in: Regenerate.
3060 * configure: Regenerate.
3061 * aclocal.m4: Regenerate.
3062 * include/Makefile.in: Regenerate.
3063 * testsuite/Makefile.in: Regenerate.
3064
30652007-05-10 Roman Zippel <zippel@linux-m68k.org>
3066
3067 * src/m68k/ffi.c (ffi_prep_incoming_args_SYSV,
3068 ffi_closure_SYSV_inner,ffi_prep_closure): New, add closure support.
3069 * src/m68k/sysv.S(ffi_closure_SYSV,ffi_closure_struct_SYSV): Likewise.
3070 * src/m68k/ffitarget.h (FFI_TRAMPOLINE_SIZE): Likewise.
3071 (FFI_CLOSURES): Enable closure support.
3072
30732007-05-10 Roman Zippel <zippel@linux-m68k.org>
3074
3075 * configure.ac (HAVE_AS_CFI_PSEUDO_OP): New test.
3076 * configure: Regenerate.
3077 * fficonfig.h.in: Regenerate.
3078 * src/m68k/sysv.S (CFI_STARTPROC,CFI_ENDPROC,
3079 CFI_OFFSET,CFI_DEF_CFA): New macros.
3080 (ffi_call_SYSV): Add callframe annotation.
3081
30822007-05-10 Roman Zippel <zippel@linux-m68k.org>
3083
3084 * src/m68k/ffi.c (ffi_prep_args,ffi_prep_cif_machdep): Fix
3085 numerous test suite failures.
3086 * src/m68k/sysv.S (ffi_call_SYSV): Likewise.
3087
30882007-04-11 Paolo Bonzini <bonzini@gnu.org>
3089
3090 * Makefile.am (EXTRA_DIST): Bring up to date.
3091 * Makefile.in: Regenerate.
3092 * src/frv/eabi.S: Remove RCS keyword.
3093
30942007-04-06 Richard Henderson <rth@redhat.com>
3095
3096 * configure.ac: Tidy target case.
3097 (HAVE_LONG_DOUBLE): Allow the target to override.
3098 * configure: Regenerate.
3099 * include/ffi.h.in: Don't define ffi_type_foo if
3100 LIBFFI_HIDE_BASIC_TYPES is defined.
3101 (ffi_type_longdouble): If not HAVE_LONG_DOUBLE, define
3102 to ffi_type_double.
3103 * types.c (LIBFFI_HIDE_BASIC_TYPES): Define.
3104 (FFI_TYPEDEF, ffi_type_void): Mark the data const.
3105 (ffi_type_longdouble): Special case for Alpha. Don't define
3106 if long double == double.
3107
3108 * src/alpha/ffi.c (FFI_TYPE_LONGDOUBLE): Assert unique value.
3109 (ffi_prep_cif_machdep): Handle it as the 128-bit type.
3110 (ffi_call, ffi_closure_osf_inner): Likewise.
3111 (ffi_closure_osf_inner): Likewise. Mark hidden.
3112 (ffi_call_osf, ffi_closure_osf): Mark hidden.
3113 * src/alpha/ffitarget.h (FFI_LAST_ABI): Tidy definition.
3114 * src/alpha/osf.S (ffi_call_osf, ffi_closure_osf): Mark hidden.
3115 (load_table): Handle 128-bit long double.
3116
3117 * testsuite/libffi.call/float4.c: Add -mieee for alpha.
3118
31192007-04-06 Tom Tromey <tromey@redhat.com>
3120
3121 PR libffi/31491:
3122 * README: Fixed bug in example.
3123
31242007-04-03 Jakub Jelinek <jakub@redhat.com>
3125
3126 * src/closures.c: Include sys/statfs.h.
3127 (_GNU_SOURCE): Define on Linux.
3128 (FFI_MMAP_EXEC_SELINUX): Define.
3129 (selinux_enabled): New variable.
3130 (selinux_enabled_check): New function.
3131 (is_selinux_enabled): Define.
3132 (dlmmap): Use it.
3133
31342007-03-24 Uros Bizjak <ubizjak@gmail.com>
3135
3136 * testsuite/libffi.call/return_fl2.c (return_fl): Mark as static.
3137 Use 'volatile float sum' to create sum of floats to avoid false
3138 negative due to excess precision on ix86 targets.
Anthony Green0cfe60e2009-12-29 10:06:04 -05003139 (main): Ditto.
Anthony Greenc6dddbd2009-10-04 08:11:33 -04003140
31412007-03-08 Alexandre Oliva <aoliva@redhat.com>
3142
3143 * src/powerpc/ffi.c (flush_icache): Fix left-over from previous
3144 patch.
3145 (ffi_prep_closure_loc): Remove unneeded casts. Add needed ones.
3146
31472007-03-07 Alexandre Oliva <aoliva@redhat.com>
3148
3149 * include/ffi.h.in (ffi_closure_alloc, ffi_closure_free): New.
3150 (ffi_prep_closure_loc): New.
3151 (ffi_prep_raw_closure_loc): New.
3152 (ffi_prep_java_raw_closure_loc): New.
3153 * src/closures.c: New file.
3154 * src/dlmalloc.c [FFI_MMAP_EXEC_WRIT] (struct malloc_segment):
3155 Replace sflags with exec_offset.
3156 [FFI_MMAP_EXEC_WRIT] (mmap_exec_offset, add_segment_exec_offset,
3157 sub_segment_exec_offset): New macros.
3158 (get_segment_flags, set_segment_flags, check_segment_merge): New
3159 macros.
3160 (is_mmapped_segment, is_extern_segment): Use get_segment_flags.
3161 (add_segment, sys_alloc, create_mspace, create_mspace_with_base,
3162 destroy_mspace): Use new macros.
3163 (sys_alloc): Silence warning.
3164 * Makefile.am (libffi_la_SOURCES): Add src/closures.c.
3165 * Makefile.in: Rebuilt.
3166 * src/prep_cif [FFI_CLOSURES] (ffi_prep_closure): Implement in
3167 terms of ffi_prep_closure_loc.
3168 * src/raw_api.c (ffi_prep_raw_closure_loc): Renamed and adjusted
3169 from...
3170 (ffi_prep_raw_closure): ... this. Re-implement in terms of the
3171 renamed version.
3172 * src/java_raw_api (ffi_prep_java_raw_closure_loc): Renamed and
3173 adjusted from...
3174 (ffi_prep_java_raw_closure): ... this. Re-implement in terms of
3175 the renamed version.
3176 * src/alpha/ffi.c (ffi_prep_closure_loc): Renamed from
3177 (ffi_prep_closure): ... this.
3178 * src/pa/ffi.c: Likewise.
3179 * src/cris/ffi.c: Likewise. Adjust.
3180 * src/frv/ffi.c: Likewise.
3181 * src/ia64/ffi.c: Likewise.
3182 * src/mips/ffi.c: Likewise.
3183 * src/powerpc/ffi_darwin.c: Likewise.
3184 * src/s390/ffi.c: Likewise.
3185 * src/sh/ffi.c: Likewise.
3186 * src/sh64/ffi.c: Likewise.
3187 * src/sparc/ffi.c: Likewise.
3188 * src/x86/ffi64.c: Likewise.
3189 * src/x86/ffi.c: Likewise.
3190 (FFI_INIT_TRAMPOLINE): Adjust.
3191 (ffi_prep_raw_closure_loc): Renamed and adjusted from...
3192 (ffi_prep_raw_closure): ... this.
3193 * src/powerpc/ffi.c (ffi_prep_closure_loc): Renamed from
3194 (ffi_prep_closure): ... this.
3195 (flush_icache): Adjust.
3196
31972007-03-07 Alexandre Oliva <aoliva@redhat.com>
3198
3199 * src/dlmalloc.c: New file, imported version 2.8.3 of Doug
3200 Lea's malloc.
3201
32022007-03-01 Brooks Moses <brooks.moses@codesourcery.com>
3203
3204 * Makefile.am: Add dummy install-pdf target.
3205 * Makefile.in: Regenerate
3206
32072007-02-13 Andreas Krebbel <krebbel1@de.ibm.com>
3208
3209 * src/s390/ffi.c (ffi_prep_args, ffi_prep_cif_machdep,
3210 ffi_closure_helper_SYSV): Add long double handling.
3211
32122007-02-02 Jakub Jelinek <jakub@redhat.com>
3213
3214 * src/powerpc/linux64.S (ffi_call_LINUX64): Move restore of r2
3215 immediately after bctrl instruction.
3216
32172007-01-18 Alexandre Oliva <aoliva@redhat.com>
3218
3219 * Makefile.am (all-recursive, install-recursive,
3220 mostlyclean-recursive, clean-recursive, distclean-recursive,
3221 maintainer-clean-recursive): Add missing targets.
3222 * Makefile.in: Rebuilt.
3223
32242006-12-14 Andreas Tobler <a.tobler@schweiz.org>
3225
3226 * configure.ac: Add TARGET for x86_64-*-darwin*.
3227 * Makefile.am (nodist_libffi_la_SOURCES): Add rules for 64-bit sources
3228 for X86_DARWIN.
3229 * src/x86/ffitarget.h: Set trampoline size for x86_64-*-darwin*.
3230 * src/x86/darwin64.S: New file for x86_64-*-darwin* support.
3231 * configure: Regenerate.
3232 * Makefile.in: Regenerate.
3233 * include/Makefile.in: Regenerate.
3234 * testsuite/Makefile.in: Regenerate.
3235 * testsuite/libffi.special/unwindtest_ffi_call.cc: New test case for
3236 ffi_call only.
3237
32382006-12-13 Andreas Tobler <a.tobler@schweiz.org>
3239
3240 * aclocal.m4: Regenerate with aclocal -I .. as written in the
3241 Makefile.am.
3242
32432006-10-31 Geoffrey Keating <geoffk@apple.com>
3244
3245 * src/powerpc/ffi_darwin.c (darwin_adjust_aggregate_sizes): New.
3246 (ffi_prep_cif_machdep): Call darwin_adjust_aggregate_sizes for
3247 Darwin.
3248 * testsuite/libffi.call/nested_struct4.c: Remove Darwin XFAIL.
3249 * testsuite/libffi.call/nested_struct6.c: Remove Darwin XFAIL.
3250
32512006-10-10 Paolo Bonzini <bonzini@gnu.org>
3252 Sandro Tolaini <tolaini@libero.it>
3253
Anthony Green0cfe60e2009-12-29 10:06:04 -05003254 * configure.ac [i*86-*-darwin*]: Set X86_DARWIN symbol and
Anthony Greenc6dddbd2009-10-04 08:11:33 -04003255 conditional.
3256 * configure: Regenerated.
3257 * Makefile.am (nodist_libffi_la_SOURCES) [X86_DARWIN]: New case.
3258 (EXTRA_DIST): Add src/x86/darwin.S.
3259 * Makefile.in: Regenerated.
3260 * include/Makefile.in: Regenerated.
3261 * testsuite/Makefile.in: Regenerated.
3262
3263 * src/x86/ffi.c (ffi_prep_cif_machdep) [X86_DARWIN]: Treat like
3264 X86_WIN32, and additionally align stack to 16 bytes.
3265 * src/x86/darwin.S: New, based on sysv.S.
3266 * src/prep_cif.c (ffi_prep_cif) [X86_DARWIN]: Align > 8-byte structs.
3267
32682006-09-12 David Daney <ddaney@avtrex.com>
3269
3270 PR libffi/23935
3271 * include/Makefile.am: Install both ffi.h and ffitarget.h in
3272 $(libdir)/gcc/$(target_alias)/$(gcc_version)/include.
3273 * aclocal.m4: Regenerated for automake 1.9.6.
3274 * Makefile.in: Regenerated.
3275 * include/Makefile.in: Regenerated.
3276 * testsuite/Makefile.in: Regenerated.
3277
32782006-08-17 Andreas Tobler <a.tobler@schweiz.ch>
3279
3280 * include/ffi_common.h (struct): Revert accidental commit.
3281
32822006-08-15 Andreas Tobler <a.tobler@schweiz.ch>
3283
3284 * include/ffi_common.h: Remove lint directives.
3285 * include/ffi.h.in: Likewise.
3286
32872006-07-25 Torsten Schoenfeld <kaffeetisch@gmx.de>
3288
3289 * include/ffi.h.in (ffi_type_ulong, ffi_type_slong): Define correctly
3290 for 32-bit architectures.
3291 * testsuite/libffi.call/return_ul.c: New test case.
3292
32932006-07-19 David Daney <ddaney@avtrex.com>
3294
3295 * testsuite/libffi.call/closure_fn6.c: Remove xfail for mips,
3296 xfail remains for mips64.
3297
32982006-05-23 Carlos O'Donell <carlos@codesourcery.com>
3299
3300 * Makefile.am: Add install-html target. Add install-html to .PHONY
3301 * Makefile.in: Regenerate.
3302 * aclocal.m4: Regenerate.
3303 * include/Makefile.in: Regenerate.
3304 * testsuite/Makefile.in: Regenerate.
3305
33062006-05-18 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
3307
3308 * pa/ffi.c (ffi_prep_args_pa32): Load floating point arguments from
3309 stack slot.
3310
33112006-04-22 Andreas Tobler <a.tobler@schweiz.ch>
3312
3313 * README: Remove notice about 'Crazy Comments'.
3314 * src/debug.c: Remove lint directives. Cleanup white spaces.
3315 * src/java_raw_api.c: Likewise.
3316 * src/prep_cif.c: Likewise.
3317 * src/raw_api.c: Likewise.
3318 * src/ffitest.c: Delete. No longer needed, all test cases migrated
3319 to the testsuite.
3320 * src/arm/ffi.c: Remove lint directives.
3321 * src/m32r/ffi.c: Likewise.
3322 * src/pa/ffi.c: Likewise.
3323 * src/powerpc/ffi.c: Likewise.
3324 * src/powerpc/ffi_darwin.c: Likewise.
3325 * src/sh/ffi.c: Likewise.
3326 * src/sh64/ffi.c: Likewise.
3327 * src/x86/ffi.c: Likewise.
3328 * testsuite/libffi.call/float2.c: Likewise.
3329 * testsuite/libffi.call/promotion.c: Likewise.
3330 * testsuite/libffi.call/struct1.c: Likewise.
3331
33322006-04-13 Andreas Tobler <a.tobler@schweiz.ch>
3333
3334 * src/pa/hpux32.S: Correct unwind offset calculation for
3335 ffi_closure_pa32.
3336 * src/pa/linux.S: Likewise.
3337
33382006-04-12 James E Wilson <wilson@specifix.com>
3339
3340 PR libgcj/26483
3341 * src/ia64/ffi.c (stf_spill, ldf_fill): Rewrite as macros.
3342 (hfa_type_load): Call stf_spill.
3343 (hfa_type_store): Call ldf_fill.
3344 (ffi_call): Adjust calls to above routines. Add local temps for
3345 macro result.
3346
33472006-04-10 Matthias Klose <doko@debian.org>
3348
3349 * testsuite/lib/libffi-dg.exp (libffi-init): Recognize multilib
3350 directory names containing underscores.
3351
33522006-04-07 James E Wilson <wilson@specifix.com>
3353
3354 * testsuite/libffi.call/float4.c: New testcase.
3355
33562006-04-05 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
3357 Andreas Tobler <a.tobler@schweiz.ch>
3358
3359 * Makefile.am: Add PA_HPUX port.
3360 * Makefile.in: Regenerate.
3361 * include/Makefile.in: Likewise.
3362 * testsuite/Makefile.in: Likewise.
3363 * configure.ac: Add PA_HPUX rules.
3364 * configure: Regenerate.
3365 * src/pa/ffitarget.h: Rename linux target to PA_LINUX.
3366 Add PA_HPUX and PA64_HPUX.
3367 Rename FFI_LINUX ABI to FFI_PA32 ABI.
3368 (FFI_TRAMPOLINE_SIZE): Define for 32-bit HP-UX targets.
3369 (FFI_TYPE_SMALL_STRUCT2): Define.
3370 (FFI_TYPE_SMALL_STRUCT4): Likewise.
3371 (FFI_TYPE_SMALL_STRUCT8): Likewise.
3372 (FFI_TYPE_SMALL_STRUCT3): Redefine.
3373 (FFI_TYPE_SMALL_STRUCT5): Likewise.
3374 (FFI_TYPE_SMALL_STRUCT6): Likewise.
3375 (FFI_TYPE_SMALL_STRUCT7): Likewise.
3376 * src/pa/ffi.c (ROUND_DOWN): Delete.
3377 (fldw, fstw, fldd, fstd): Use '__asm__'.
3378 (ffi_struct_type): Add support for FFI_TYPE_SMALL_STRUCT2,
3379 FFI_TYPE_SMALL_STRUCT4 and FFI_TYPE_SMALL_STRUCT8.
3380 (ffi_prep_args_LINUX): Rename to ffi_prep_args_pa32. Update comment.
3381 Simplify incrementing of stack slot variable. Change type of local
3382 'n' to unsigned int.
3383 (ffi_size_stack_LINUX): Rename to ffi_size_stack_pa32. Handle long
3384 double on PA_HPUX.
3385 (ffi_prep_cif_machdep): Likewise.
3386 (ffi_call): Likewise.
3387 (ffi_closure_inner_LINUX): Rename to ffi_closure_inner_pa32. Change
3388 return type to ffi_status. Simplify incrementing of stack slot
3389 variable. Only copy floating point argument registers when PA_LINUX
3390 is true. Reformat debug statement.
3391 Add support for FFI_TYPE_SMALL_STRUCT2, FFI_TYPE_SMALL_STRUCT4 and
3392 FFI_TYPE_SMALL_STRUCT8.
3393 (ffi_closure_LINUX): Rename to ffi_closure_pa32. Add 'extern' to
3394 declaration.
3395 (ffi_prep_closure): Make linux trampoline conditional on PA_LINUX.
3396 Add nops to cache flush. Add trampoline for PA_HPUX.
3397 * src/pa/hpux32.S: New file.
3398 * src/pa/linux.S (ffi_call_LINUX): Rename to ffi_call_pa32. Rename
3399 ffi_prep_args_LINUX to ffi_prep_args_pa32.
3400 Localize labels. Add support for 2, 4 and 8-byte small structs. Handle
3401 unaligned destinations in 3, 5, 6 and 7-byte small structs. Order
3402 argument type checks so that common argument types appear first.
3403 (ffi_closure_LINUX): Rename to ffi_closure_pa32. Rename
3404 ffi_closure_inner_LINUX to ffi_closure_inner_pa32.
3405
34062006-03-24 Alan Modra <amodra@bigpond.net.au>
3407
3408 * src/powerpc/ffitarget.h (enum ffi_abi): Add FFI_LINUX. Default
3409 for 32-bit using IBM extended double format. Fix FFI_LAST_ABI.
3410 * src/powerpc/ffi.c (ffi_prep_args_SYSV): Handle linux variant of
3411 FFI_TYPE_LONGDOUBLE.
3412 (ffi_prep_args64): Assert using IBM extended double.
3413 (ffi_prep_cif_machdep): Don't munge FFI_TYPE_LONGDOUBLE type.
3414 Handle FFI_LINUX FFI_TYPE_LONGDOUBLE return and args.
3415 (ffi_call): Handle FFI_LINUX.
3416 (ffi_closure_helper_SYSV): Non FFI_LINUX long double return needs
3417 gpr3 return pointer as for struct return. Handle FFI_LINUX
3418 FFI_TYPE_LONGDOUBLE return and args. Don't increment "nf"
3419 unnecessarily.
3420 * src/powerpc/ppc_closure.S (ffi_closure_SYSV): Load both f1 and f2
3421 for FFI_TYPE_LONGDOUBLE. Move epilogue insns into case table.
3422 Don't use r6 as pointer to results, instead use sp offset. Don't
3423 make a special call to load lr with case table address, instead
3424 use offset from previous call.
3425 * src/powerpc/sysv.S (ffi_call_SYSV): Save long double return.
3426 * src/powerpc/linux64.S (ffi_call_LINUX64): Simplify long double
3427 return.
3428
34292006-03-15 Kaz Kojima <kkojima@gcc.gnu.org>
3430
3431 * src/sh64/ffi.c (ffi_prep_cif_machdep): Handle float arguments
3432 passed with FP registers correctly.
3433 (ffi_closure_helper_SYSV): Likewise.
3434 * src/sh64/sysv.S: Likewise.
3435
34362006-03-01 Andreas Tobler <a.tobler@schweiz.ch>
3437
3438 * testsuite/libffi.special/unwindtest.cc (closure_test_fn): Mark cif,
3439 args and userdata unused.
3440 (closure_test_fn1): Mark cif and userdata unused.
3441 (main): Remove unused res.
3442
34432006-02-28 Andreas Tobler <a.tobler@schweiz.ch>
3444
3445 * testsuite/libffi.call/call.exp: Adjust FSF address. Add test runs for
3446 -O2, -O3, -Os and the warning flags -W -Wall.
3447 * testsuite/libffi.special/special.exp: Likewise.
3448 * testsuite/libffi.call/ffitest.h: Add an __UNUSED__ macro to mark
3449 unused parameter unused for gcc or else do nothing.
3450 * testsuite/libffi.special/ffitestcxx.h: Likewise.
3451 * testsuite/libffi.call/cls_12byte.c (cls_struct_12byte_gn): Mark cif
3452 and userdata unused.
3453 * testsuite/libffi.call/cls_16byte.c (cls_struct_16byte_gn): Likewise.
3454 * testsuite/libffi.call/cls_18byte.c (cls_struct_18byte_gn): Likewise.
3455 * testsuite/libffi.call/cls_19byte.c (cls_struct_19byte_gn): Likewise.
3456 * testsuite/libffi.call/cls_1_1byte.c (cls_struct_1_1byte_gn): Likewise.
3457 * testsuite/libffi.call/cls_20byte.c (cls_struct_20byte_gn): Likewise.
3458 * testsuite/libffi.call/cls_20byte1.c (cls_struct_20byte_gn): Likewise.
3459 * testsuite/libffi.call/cls_24byte.c (cls_struct_24byte_gn): Likewise.
3460 * testsuite/libffi.call/cls_2byte.c (cls_struct_2byte_gn): Likewise.
3461 * testsuite/libffi.call/cls_3_1byte.c (cls_struct_3_1byte_gn): Likewise.
3462 * testsuite/libffi.call/cls_3byte1.c (cls_struct_3byte_gn): Likewise.
3463 * testsuite/libffi.call/cls_3byte2.c (cls_struct_3byte_gn1): Likewise.
3464 * testsuite/libffi.call/cls_4_1byte.c (cls_struct_4_1byte_gn): Likewise.
3465 * testsuite/libffi.call/cls_4byte.c (cls_struct_4byte_gn): Likewise.
3466 * testsuite/libffi.call/cls_5_1_byte.c (cls_struct_5byte_gn): Likewise.
3467 * testsuite/libffi.call/cls_5byte.c (cls_struct_5byte_gn): Likewise.
3468 * testsuite/libffi.call/cls_64byte.c (cls_struct_64byte_gn): Likewise.
3469 * testsuite/libffi.call/cls_6_1_byte.c (cls_struct_6byte_gn): Likewise.
3470 * testsuite/libffi.call/cls_6byte.c (cls_struct_6byte_gn): Likewise.
3471 * testsuite/libffi.call/cls_7_1_byte.c (cls_struct_7byte_gn): Likewise.
3472 * testsuite/libffi.call/cls_7byte.c (cls_struct_7byte_gn): Likewise.
3473 * testsuite/libffi.call/cls_8byte.c (cls_struct_8byte_gn): Likewise.
3474 * testsuite/libffi.call/cls_9byte1.c (cls_struct_9byte_gn): Likewise.
3475 * testsuite/libffi.call/cls_9byte2.c (cls_struct_9byte_gn): Likewise.
3476 * testsuite/libffi.call/cls_align_double.c (cls_struct_align_gn):
3477 Likewise.
3478 * testsuite/libffi.call/cls_align_float.c (cls_struct_align_gn):
3479 Likewise.
3480 * testsuite/libffi.call/cls_align_longdouble.c (cls_struct_align_gn):
3481 Likewise.
3482 * testsuite/libffi.call/cls_align_pointer.c (cls_struct_align_fn): Cast
3483 void* to avoid compiler warning.
3484 (main): Likewise.
3485 (cls_struct_align_gn): Mark cif and userdata unused.
3486 * testsuite/libffi.call/cls_align_sint16.c (cls_struct_align_gn):
3487 Likewise.
3488 * testsuite/libffi.call/cls_align_sint32.c (cls_struct_align_gn):
3489 Likewise.
3490 * testsuite/libffi.call/cls_align_sint64.c (cls_struct_align_gn):
3491 Likewise.
3492 * testsuite/libffi.call/cls_align_uint16.c (cls_struct_align_gn):
3493 Likewise.
3494 * testsuite/libffi.call/cls_align_uint32.c (cls_struct_align_gn):
3495 Likewise.
3496 * testsuite/libffi.call/cls_double.c (cls_ret_double_fn): Likewise.
3497 * testsuite/libffi.call/cls_float.c (cls_ret_float_fn): Likewise.
3498 * testsuite/libffi.call/cls_multi_schar.c (test_func_gn): Mark cif and
3499 data unused.
3500 (main): Cast res_call to silence gcc.
3501 * testsuite/libffi.call/cls_multi_sshort.c (test_func_gn): Mark cif and
3502 data unused.
3503 (main): Cast res_call to silence gcc.
3504 * testsuite/libffi.call/cls_multi_sshortchar.c (test_func_gn): Mark cif
3505 and data unused.
3506 (main): Cast res_call to silence gcc.
3507 * testsuite/libffi.call/cls_multi_uchar.c (test_func_gn): Mark cif and
3508 data unused.
3509 (main): Cast res_call to silence gcc.
3510 * testsuite/libffi.call/cls_multi_ushort.c (test_func_gn): Mark cif and
3511 data unused.
3512 (main): Cast res_call to silence gcc.
3513 * testsuite/libffi.call/cls_multi_ushortchar.c (test_func_gn): Mark cif
3514 and data unused.
3515 (main): Cast res_call to silence gcc.
3516 * testsuite/libffi.call/cls_schar.c (cls_ret_schar_fn): Mark cif and
3517 userdata unused.
3518 (cls_ret_schar_fn): Cast printf parameter to silence gcc.
3519 * testsuite/libffi.call/cls_sint.c (cls_ret_sint_fn): Mark cif and
3520 userdata unused.
3521 (cls_ret_sint_fn): Cast printf parameter to silence gcc.
3522 * testsuite/libffi.call/cls_sshort.c (cls_ret_sshort_fn): Mark cif and
3523 userdata unused.
3524 (cls_ret_sshort_fn): Cast printf parameter to silence gcc.
3525 * testsuite/libffi.call/cls_uchar.c (cls_ret_uchar_fn): Mark cif and
3526 userdata unused.
3527 (cls_ret_uchar_fn): Cast printf parameter to silence gcc.
3528 * testsuite/libffi.call/cls_uint.c (cls_ret_uint_fn): Mark cif and
3529 userdata unused.
3530 (cls_ret_uint_fn): Cast printf parameter to silence gcc.
3531 * testsuite/libffi.call/cls_ulonglong.c (cls_ret_ulonglong_fn): Mark cif
3532 and userdata unused.
3533 * testsuite/libffi.call/cls_ushort.c (cls_ret_ushort_fn): Mark cif and
3534 userdata unused.
3535 (cls_ret_ushort_fn): Cast printf parameter to silence gcc.
3536 * testsuite/libffi.call/float.c (floating): Remove unused parameter e.
3537 * testsuite/libffi.call/float1.c (main): Remove unused variable i.
3538 Cleanup white spaces.
3539 * testsuite/libffi.call/negint.c (checking): Remove unused variable i.
3540 * testsuite/libffi.call/nested_struct.c (cls_struct_combined_gn): Mark
3541 cif and userdata unused.
3542 * testsuite/libffi.call/nested_struct1.c (cls_struct_combined_gn):
3543 Likewise.
3544 * testsuite/libffi.call/nested_struct10.c (B_gn): Likewise.
3545 * testsuite/libffi.call/nested_struct2.c (B_fn): Adjust printf
3546 formatters to silence gcc.
3547 (B_gn): Mark cif and userdata unused.
3548 * testsuite/libffi.call/nested_struct3.c (B_gn): Mark cif and userdata
3549 unused.
3550 * testsuite/libffi.call/nested_struct4.c: Mention related PR.
3551 (B_gn): Mark cif and userdata unused.
3552 * testsuite/libffi.call/nested_struct5.c (B_gn): Mark cif and userdata
3553 unused.
3554 * testsuite/libffi.call/nested_struct6.c: Mention related PR.
3555 (B_gn): Mark cif and userdata unused.
3556 * testsuite/libffi.call/nested_struct7.c (B_gn): Mark cif and userdata
3557 unused.
3558 * testsuite/libffi.call/nested_struct8.c (B_gn): Likewise.
3559 * testsuite/libffi.call/nested_struct9.c (B_gn): Likewise.
3560 * testsuite/libffi.call/problem1.c (stub): Likewise.
3561 * testsuite/libffi.call/pyobjc-tc.c (main): Cast the result to silence
3562 gcc.
3563 * testsuite/libffi.call/return_fl2.c (return_fl): Add the note mentioned
3564 in the last commit for this test case in the test case itself.
3565 * testsuite/libffi.call/closure_fn0.c (closure_test_fn0): Mark cif as
3566 unused.
3567 * testsuite/libffi.call/closure_fn1.c (closure_test_fn1): Likewise.
3568 * testsuite/libffi.call/closure_fn2.c (closure_test_fn2): Likewise.
3569 * testsuite/libffi.call/closure_fn3.c (closure_test_fn3): Likewise.
3570 * testsuite/libffi.call/closure_fn4.c (closure_test_fn0): Likewise.
3571 * testsuite/libffi.call/closure_fn5.c (closure_test_fn5): Likewise.
3572 * testsuite/libffi.call/closure_fn6.c (closure_test_fn0): Likewise.
3573
35742006-02-22 Kaz Kojima <kkojima@gcc.gnu.org>
3575
3576 * src/sh/sysv.S: Fix register numbers in the FDE for
3577 ffi_closure_SYSV.
3578
35792006-02-20 Andreas Tobler <a.tobler@schweiz.ch>
3580
3581 * testsuite/libffi.call/return_fl2.c (return_fl): Remove static
3582 declaration to avoid a false negative on ix86. See PR323.
3583
35842006-02-18 Kaz Kojima <kkojima@gcc.gnu.org>
3585
3586 * src/sh/ffi.c (ffi_closure_helper_SYSV): Remove unused variable
3587 and cast integer to void * if needed. Update the pointer to
3588 the FP register saved area correctly.
Anthony Green0cfe60e2009-12-29 10:06:04 -05003589
Anthony Greenc6dddbd2009-10-04 08:11:33 -040035902006-02-17 Andreas Tobler <a.tobler@schweiz.ch>
3591
3592 * testsuite/libffi.call/nested_struct6.c: XFAIL this test until PR25630
3593 is fixed.
3594 * testsuite/libffi.call/nested_struct4.c: Likewise.
3595
35962006-02-16 Andreas Tobler <a.tobler@schweiz.ch>
3597
3598 * testsuite/libffi.call/return_dbl.c: New test case.
3599 * testsuite/libffi.call/return_dbl1.c: Likewise.
3600 * testsuite/libffi.call/return_dbl2.c: Likewise.
3601 * testsuite/libffi.call/return_fl.c: Likewise.
3602 * testsuite/libffi.call/return_fl1.c: Likewise.
3603 * testsuite/libffi.call/return_fl2.c: Likewise.
3604 * testsuite/libffi.call/return_fl3.c: Likewise.
3605 * testsuite/libffi.call/closure_fn6.c: Likewise.
3606
3607 * testsuite/libffi.call/nested_struct2.c: Remove ffi_type_mylong
3608 definition.
3609 * testsuite/libffi.call/ffitest.h: Add ffi_type_mylong definition
3610 here to be used by other test cases too.
3611
3612 * testsuite/libffi.call/nested_struct10.c: New test case.
3613 * testsuite/libffi.call/nested_struct9.c: Likewise.
3614 * testsuite/libffi.call/nested_struct8.c: Likewise.
3615 * testsuite/libffi.call/nested_struct7.c: Likewise.
3616 * testsuite/libffi.call/nested_struct6.c: Likewise.
3617 * testsuite/libffi.call/nested_struct5.c: Likewise.
3618 * testsuite/libffi.call/nested_struct4.c: Likewise.
3619
36202006-01-21 Andreas Tobler <a.tobler@schweiz.ch>
3621
3622 * configure.ac: Enable libffi for sparc64-*-freebsd*.
3623 * configure: Rebuilt.
3624
36252006-01-18 Jakub Jelinek <jakub@redhat.com>
3626
3627 * src/powerpc/sysv.S (smst_two_register): Don't call __ashldi3,
3628 instead do the shifting inline.
3629 * src/powerpc/ppc_closure.S (ffi_closure_SYSV): Don't compute %r5
3630 shift count unconditionally. Simplify load sequences for 1, 2, 3, 4
3631 and 8 byte structs, for the remaining struct sizes don't call
3632 __lshrdi3, instead do the shifting inline.
3633
36342005-12-07 Thiemo Seufer <ths@networkno.de>
3635
3636 * src/mips/ffitarget.h: Remove obsolete sgidefs.h include. Add
3637 missing parentheses.
3638 * src/mips/o32.S (ffi_call_O32): Code formatting. Define
3639 and use A3_OFF, FP_OFF, RA_OFF. Micro-optimizations.
3640 (ffi_closure_O32): Likewise, but with newly defined A3_OFF2,
3641 A2_OFF2, A1_OFF2, A0_OFF2, RA_OFF2, FP_OFF2, S0_OFF2, GP_OFF2,
3642 V1_OFF2, V0_OFF2, FA_1_1_OFF2, FA_1_0_OFF2, FA_0_1_OFF2,
3643 FA_0_0_OFF2.
3644 * src/mips/ffi.c (ffi_prep_args): Code formatting. Fix
3645 endianness bugs.
3646 (ffi_prep_closure): Improve trampoline instruction scheduling.
3647 (ffi_closure_mips_inner_O32): Fix endianness bugs.
3648
36492005-12-03 Alan Modra <amodra@bigpond.net.au>
3650
3651 * src/powerpc/ffi.c: Formatting.
3652 (ffi_prep_args_SYSV): Avoid possible aliasing problems by using unions.
3653 (ffi_prep_args64): Likewise.
3654
36552005-09-30 Geoffrey Keating <geoffk@apple.com>
3656
3657 * testsuite/lib/libffi-dg.exp (libffi_target_compile): For
3658 darwin, use -shared-libgcc not -lgcc_s, and explain why.
3659
36602005-09-26 Tom Tromey <tromey@redhat.com>
3661
3662 * testsuite/libffi.call/float1.c (value_type): New typedef.
3663 (CANARY): New define.
3664 (main): Check for result buffer overflow.
3665 * src/powerpc/linux64.S: Handle linux64 long double returns.
3666 * src/powerpc/ffi.c (FLAG_RETURNS_128BITS): New constant.
3667 (ffi_prep_cif_machdep): Handle linux64 long double returns.
3668
36692005-08-25 Alan Modra <amodra@bigpond.net.au>
3670
3671 PR target/23404
3672 * src/powerpc/ffi.c (ffi_prep_args_SYSV): Correct placement of stack
3673 homed fp args.
3674 (ffi_status ffi_prep_cif_machdep): Correct stack sizing for same.
3675
36762005-08-11 Jakub Jelinek <jakub@redhat.com>
3677
3678 * configure.ac (HAVE_HIDDEN_VISIBILITY_ATTRIBUTE): New test.
3679 (AH_BOTTOM): Add FFI_HIDDEN definition.
3680 * configure: Rebuilt.
3681 * fficonfig.h.in: Rebuilt.
3682 * src/powerpc/ffi.c (hidden): Remove.
3683 (ffi_closure_LINUX64, ffi_prep_args64, ffi_call_LINUX64,
3684 ffi_closure_helper_LINUX64): Use FFI_HIDDEN instead of hidden.
3685 * src/powerpc/linux64_closure.S (ffi_closure_LINUX64,
3686 .ffi_closure_LINUX64): Use FFI_HIDDEN instead of .hidden.
3687 * src/x86/ffi.c (ffi_closure_SYSV, ffi_closure_raw_SYSV): Remove,
3688 add FFI_HIDDEN to its prototype.
3689 (ffi_closure_SYSV_inner): New.
3690 * src/x86/sysv.S (ffi_closure_SYSV, ffi_closure_raw_SYSV): New.
3691 * src/x86/win32.S (ffi_closure_SYSV, ffi_closure_raw_SYSV): New.
3692
36932005-08-10 Alfred M. Szmidt <ams@gnu.org>
3694
3695 PR libffi/21819:
3696 * configure: Rebuilt.
3697 * configure.ac: Handle i*86-*-gnu*.
3698
36992005-08-09 Jakub Jelinek <jakub@redhat.com>
3700
3701 * src/powerpc/ppc_closure.S (ffi_closure_SYSV): Use
3702 DW_CFA_offset_extended_sf rather than
3703 DW_CFA_GNU_negative_offset_extended.
3704 * src/powerpc/sysv.S (ffi_call_SYSV): Likewise.
3705
37062005-07-22 SUGIOKA Toshinobu <sugioka@itonet.co.jp>
3707
3708 * src/sh/sysv.S (ffi_call_SYSV): Stop argument popping correctly
3709 on sh3.
3710 (ffi_closure_SYSV): Change the stack layout for sh3 struct argument.
3711 * src/sh/ffi.c (ffi_prep_args): Fix sh3 argument copy, when it is
3712 partially on register.
3713 (ffi_closure_helper_SYSV): Likewise.
3714 (ffi_prep_cif_machdep): Don't set too many cif->flags.
3715
37162005-07-20 Kaz Kojima <kkojima@gcc.gnu.org>
3717
3718 * src/sh/ffi.c (ffi_call): Handle small structures correctly.
3719 Remove empty line.
3720 * src/sh64/ffi.c (simple_type): Remove.
3721 (return_type): Handle small structures correctly.
3722 (ffi_prep_args): Likewise.
3723 (ffi_call): Likewise.
3724 (ffi_closure_helper_SYSV): Likewise.
3725 * src/sh64/sysv.S (ffi_call_SYSV): Handle 1, 2 and 4-byte return.
3726 Emit position independent code if PIC and remove wrong datalabel
3727 prefixes from EH data.
3728
37292005-07-19 Andreas Tobler <a.tobler@schweiz.ch>
3730
3731 * Makefile.am (nodist_libffi_la_SOURCES): Add POWERPC_FREEBSD.
3732 * Makefile.in: Regenerate.
3733 * include/Makefile.in: Likewise.
3734 * testsuite/Makefile.in: Likewise.
3735 * configure.ac: Add POWERPC_FREEBSD rules.
3736 * configure: Regenerate.
3737 * src/powerpc/ffitarget.h: Add POWERPC_FREEBSD rules.
3738 (FFI_SYSV_TYPE_SMALL_STRUCT): Define.
3739 * src/powerpc/ffi.c: Add flags to handle small structure returns
3740 in ffi_call_SYSV.
3741 (ffi_prep_cif_machdep): Handle small structures for SYSV 4 ABI.
3742 Aka FFI_SYSV.
3743 (ffi_closure_helper_SYSV): Likewise.
3744 * src/powerpc/ppc_closure.S: Add return types for small structures.
3745 * src/powerpc/sysv.S: Add bits to handle small structures for
3746 final SYSV 4 ABI.
3747
37482005-07-10 Andreas Tobler <a.tobler@schweiz.ch>
3749
3750 * testsuite/libffi.call/cls_5_1_byte.c: New test file.
3751 * testsuite/libffi.call/cls_6_1_byte.c: Likewise.
3752 * testsuite/libffi.call/cls_7_1_byte.c: Likewise.
3753
37542005-07-05 Randolph Chung <tausq@debian.org>
3755
3756 * src/pa/ffi.c (ffi_struct_type): Rename FFI_TYPE_SMALL_STRUCT1
3757 as FFI_TYPE_SMALL_STRUCT3. Break out handling for 5-7 byte
3758 structures. Kill compilation warnings.
3759 (ffi_closure_inner_LINUX): Print return values as hex in debug
3760 message. Rename FFI_TYPE_SMALL_STRUCT1 as FFI_TYPE_SMALL_STRUCT3.
3761 Properly handle 5-7 byte structure returns.
3762 * src/pa/ffitarget.h (FFI_TYPE_SMALL_STRUCT1)
3763 (FFI_TYPE_SMALL_STRUCT2): Remove.
3764 (FFI_TYPE_SMALL_STRUCT3, FFI_TYPE_SMALL_STRUCT5)
3765 (FFI_TYPE_SMALL_STRUCT6, FFI_TYPE_SMALL_STRUCT7): Define.
3766 * src/pa/linux.S: Mark source file as using PA1.1 assembly.
3767 (checksmst1, checksmst2): Remove.
3768 (checksmst3): Optimize handling of 3-byte struct returns.
3769 (checksmst567): Properly handle 5-7 byte struct returns.
3770
37712005-06-15 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
3772
3773 PR libgcj/21943
3774 * src/mips/n32.S: Enforce PIC code.
3775 * src/mips/o32.S: Likewise.
3776
37772005-06-15 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
3778
3779 * configure.ac: Treat i*86-*-solaris2.10 and up as X86_64.
3780 * configure: Regenerate.
Anthony Green0cfe60e2009-12-29 10:06:04 -05003781
Anthony Greenc6dddbd2009-10-04 08:11:33 -040037822005-06-01 Alan Modra <amodra@bigpond.net.au>
3783
3784 * src/powerpc/ppc_closure.S (ffi_closure_SYSV): Don't use JUMPTARGET
3785 to call ffi_closure_helper_SYSV. Append @local instead.
3786 * src/powerpc/sysv.S (ffi_call_SYSV): Likewise for ffi_prep_args_SYSV.
3787
37882005-05-17 Kelley Cook <kcook@gcc.gnu.org>
3789
3790 * configure.ac: Use AC_C_BIGENDIAN instead of AC_C_BIGENDIAN_CROSS.
3791 Use AC_CHECK_SIZEOF instead of AC_COMPILE_CHECK_SIZEOF.
3792 * Makefile.am (ACLOCAL_AMFLAGS): Remove -I ../config.
3793 * aclocal.m4, configure, fficonfig.h.in, Makefile.in,
3794 include/Makefile.in, testsuite/Makefile.in: Regenerate.
Anthony Green0cfe60e2009-12-29 10:06:04 -05003795
Anthony Greenc6dddbd2009-10-04 08:11:33 -040037962005-05-09 Mike Stump <mrs@apple.com>
3797
3798 * configure: Regenerate.
3799
38002005-05-08 Richard Henderson <rth@redhat.com>
3801
3802 PR libffi/21285
3803 * src/alpha/osf.S: Update unwind into to match code.
3804
38052005-05-04 Andreas Degert <ad@papyrus-gmbh.de>
3806 Richard Henderson <rth@redhat.com>
3807
3808 * src/x86/ffi64.c (ffi_prep_cif_machdep): Save sse-used flag in
3809 bit 11 of flags.
3810 (ffi_call): Mask return type field. Pass ssecount to ffi_call_unix64.
3811 (ffi_prep_closure): Set carry bit if sse-used flag set.
3812 * src/x86/unix64.S (ffi_call_unix64): Add ssecount argument.
3813 Only load sse registers if ssecount non-zero.
3814 (ffi_closure_unix64): Only save sse registers if carry set on entry.
3815
38162005-04-29 Ralf Corsepius <ralf.corsepius@rtems.org>
3817
3818 * configure.ac: Add i*86-*-rtems*, sparc*-*-rtems*,
3819 powerpc-*rtems*, arm*-*-rtems*, sh-*-rtems*.
3820 * configure: Regenerate.
3821
38222005-04-20 Hans-Peter Nilsson <hp@axis.com>
3823
3824 * testsuite/lib/libffi-dg.exp (libffi-dg-test-1): In regsub use,
3825 have Tcl8.3-compatible intermediate variable.
3826
Anthony Green0cfe60e2009-12-29 10:06:04 -050038272005-04-18 Simon Posnjak <simon.posnjak@siol.net>
Anthony Greenc6dddbd2009-10-04 08:11:33 -04003828 Hans-Peter Nilsson <hp@axis.com>
3829
3830 * Makefile.am: Add CRIS support.
3831 * configure.ac: Likewise.
3832 * Makefile.in, configure, testsuite/Makefile.in,
3833 include/Makefile.in: Regenerate.
3834 * src/cris: New directory.
3835 * src/cris/ffi.c, src/cris/sysv.S, src/cris/ffitarget.h: New files.
3836 * src/prep_cif.c (ffi_prep_cif): Wrap in #ifndef __CRIS__.
3837
3838 * testsuite/lib/libffi-dg.exp (libffi-dg-test-1): Replace \n with
3839 \r?\n in output tests.
3840
38412005-04-12 Mike Stump <mrs@apple.com>
3842
3843 * configure: Regenerate.
3844
38452005-03-30 Hans Boehm <Hans.Boehm@hp.com>
3846
3847 * src/ia64/ffitarget.h (ffi_arg): Use long long instead of DI.
Anthony Green0cfe60e2009-12-29 10:06:04 -05003848
Anthony Greenc6dddbd2009-10-04 08:11:33 -040038492005-03-30 Steve Ellcey <sje@cup.hp.com>
3850
3851 * src/ia64/ffitarget.h (ffi_arg) ADD DI attribute.
3852 (ffi_sarg) Ditto.
3853 * src/ia64/unix.S (ffi_closure_unix): Extend gp
3854 to 64 bits in ILP32 mode.
3855 Load 64 bits even for short data.
3856
38572005-03-23 Mike Stump <mrs@apple.com>
3858
3859 * src/powerpc/darwin.S: Update for -m64 multilib.
3860 * src/powerpc/darwin_closure.S: Likewise.
3861
38622005-03-21 Zack Weinberg <zack@codesourcery.com>
3863
3864 * configure.ac: Do not invoke TL_AC_GCC_VERSION.
3865 Do not set tool_include_dir.
3866 * aclocal.m4, configure, Makefile.in, testsuite/Makefile.in:
3867 Regenerate.
3868 * include/Makefile.am: Set gcc_version and toollibffidir.
3869 * include/Makefile.in: Regenerate.
3870
38712005-02-22 Andrew Haley <aph@redhat.com>
3872
3873 * src/powerpc/ffi.c (ffi_prep_cif_machdep): Bump alignment to
3874 odd-numbered register pairs for 64-bit integer types.
3875
38762005-02-23 Andreas Tobler <a.tobler@schweiz.ch>
3877
3878 PR libffi/20104
3879 * testsuite/libffi.call/return_ll1.c: New test case.
3880
38812005-02-11 Janis Johnson <janis187@us.ibm.com>
3882
3883 * testsuite/libffi.call/cls_align_longdouble.c: Remove dg-options.
3884 * testsuite/libffi.call/float.c: Ditto.
3885 * testsuite/libffi.call/float2.c: Ditto.
3886 * testsuite/libffi.call/float3.c: Ditto.
3887
38882005-02-08 Andreas Tobler <a.tobler@schweiz.ch>
3889
3890 * src/frv/ffitarget.h: Remove PPC stuff which does not belong to frv.
3891
38922005-01-12 Eric Botcazou <ebotcazou@libertysurf.fr>
3893
3894 * testsuite/libffi.special/special.exp (cxx_options): Add
3895 -shared-libgcc.
3896
38972004-12-31 Richard Henderson <rth@redhat.com>
3898
3899 * src/types.c (FFI_AGGREGATE_TYPEDEF): Remove.
3900 (FFI_TYPEDEF): Rename from FFI_INTEGRAL_TYPEDEF. Replace size and
3901 offset parameters with a type parameter; deduce size and structure
3902 alignment. Update all users.
3903
39042004-12-31 Richard Henderson <rth@redhat.com>
3905
3906 * src/types.c (FFI_TYPE_POINTER): Define with sizeof.
3907 (FFI_TYPE_LONGDOUBLE): Fix for ia64.
3908 * src/ia64/ffitarget.h (struct ffi_ia64_trampoline_struct): Move
3909 into ffi_prep_closure.
3910 * src/ia64/ia64_flags.h, src/ia64/ffi.c, src/ia64/unix.S: Rewrite
3911 from scratch.
3912
39132004-12-27 Richard Henderson <rth@redhat.com>
3914
3915 * src/x86/unix64.S: Fix typo in unwind info.
3916
39172004-12-25 Richard Henderson <rth@redhat.com>
3918
3919 * src/x86/ffi64.c (struct register_args): Rename from stackLayout.
3920 (enum x86_64_reg_class): Add X86_64_COMPLEX_X87_CLASS.
3921 (merge_classes): Check for it.
3922 (SSE_CLASS_P): New.
3923 (classify_argument): Pass byte_offset by value; perform all updates
3924 inside struct case.
3925 (examine_argument): Add classes argument; handle
3926 X86_64_COMPLEX_X87_CLASS.
3927 (ffi_prep_args): Merge into ...
3928 (ffi_call): ... here. Share stack frame with ffi_call_unix64.
3929 (ffi_prep_cif_machdep): Setup cif->flags for proper structure return.
3930 (ffi_fill_return_value): Remove.
3931 (ffi_prep_closure): Remove dead assert.
3932 (ffi_closure_unix64_inner): Rename from ffi_closure_UNIX64_inner.
3933 Rewrite to use struct register_args instead of va_list. Create
3934 flags for handling structure returns.
3935 * src/x86/unix64.S: Remove dead strings.
3936 (ffi_call_unix64): Rename from ffi_call_UNIX64. Rewrite to share
3937 stack frame with ffi_call. Handle structure returns properly.
3938 (float2sse, floatfloat2sse, double2sse): Remove.
3939 (sse2float, sse2double, sse2floatfloat): Remove.
3940 (ffi_closure_unix64): Rename from ffi_closure_UNIX64. Rewrite
3941 to handle structure returns properly.
3942
39432004-12-08 David Edelsohn <edelsohn@gnu.org>
3944
3945 * Makefile.am (AM_MAKEFLAGS): Remove duplicate LIBCFLAGS and
3946 PICFLAG.
3947 * Makefile.in: Regenerated.
3948
39492004-12-02 Richard Sandiford <rsandifo@redhat.com>
3950
3951 * configure.ac: Use TL_AC_GCC_VERSION to set gcc_version.
3952 * configure, aclocal.m4, Makefile.in: Regenerate.
3953 * include/Makefile.in, testsuite/Makefile.in: Regenerate.
3954
39552004-11-29 Kelley Cook <kcook@gcc.gnu.org>
3956
3957 * configure: Regenerate for libtool change.
3958
39592004-11-25 Kelley Cook <kcook@gcc.gnu.org>
3960
3961 * configure: Regenerate for libtool reversion.
3962
39632004-11-24 Kelley Cook <kcook@gcc.gnu.org>
3964
3965 * configure: Regenerate for libtool change.
3966
39672004-11-23 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
3968
3969 * testsuite/lib/libffi-dg.exp: Use new procs in target-libpath.exp.
3970
39712004-11-23 Richard Sandiford <rsandifo@redhat.com>
3972
3973 * src/mips/o32.S (ffi_call_O32, ffi_closure_O32): Use jalr instead
3974 of jal. Use an absolute encoding for the frame information.
3975
39762004-11-23 Kelley Cook <kcook@gcc.gnu.org>
3977
3978 * Makefile.am: Remove no-dependencies. Add ACLOCAL_AMFLAGS.
3979 * acinclude.m4: Delete logic for sincludes.
3980 * aclocal.m4, Makefile.in, configure: Regenerate.
3981 * include/Makefile: Likewise.
3982 * testsuite/Makefile: Likewise.
3983
39842004-11-22 Eric Botcazou <ebotcazou@libertysurf.fr>
3985
3986 * src/sparc/ffi.c (ffi_prep_closure): Align doubles and 64-bit integers
3987 on a 8-byte boundary.
3988 * src/sparc/v8.S (ffi_closure_v8): Reserve frame space for arguments.
3989
39902004-10-27 Richard Earnshaw <rearnsha@arm.com>
3991
3992 * src/arm/ffi.c (ffi_prep_cif_machdep): Handle functions that return
3993 long long values. Round stack allocation to a multiple of 8 bytes
3994 for ATPCS compatibility.
3995 * src/arm/sysv.S (ffi_call_SYSV): Rework to avoid use of APCS register
3996 names. Handle returning long long types. Add Thumb and interworking
3997 support. Improve soft-float code.
3998
39992004-10-27 Richard Earnshaw <rearnsha@arm.com>
4000
4001 * testsuite/lib/libffi-db.exp (load_gcc_lib): New function.
4002 (libffi_exit): New function.
4003 (libffi_init): Build the testglue wrapper if needed.
4004
40052004-10-25 Eric Botcazou <ebotcazou@libertysurf.fr>
4006
4007 PR other/18138
4008 * testsuite/lib/libffi-dg.exp: Accept more than one multilib libgcc.
4009
40102004-10-25 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
4011
4012 * src/m32r/libffitarget.h (FFI_CLOSURES): Set to 0.
4013
40142004-10-20 Kaz Kojima <kkojima@gcc.gnu.org>
4015
4016 * src/sh/sysv.S (ffi_call_SYSV): Don't align for double data.
4017 * testsuite/libffi.call/float3.c: New test case.
4018
40192004-10-18 Kaz Kojima <kkojima@gcc.gnu.org>
4020
4021 * src/sh/ffi.c (ffi_prep_closure): Set T bit in trampoline for
4022 the function returning a structure pointed with R2.
4023 * src/sh/sysv.S (ffi_closure_SYSV): Use R2 as the pointer to
4024 the structure return value if T bit set. Emit position
4025 independent code and EH data if PIC.
4026
40272004-10-13 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
4028
4029 * Makefile.am: Add m32r support.
4030 * configure.ac: Likewise.
4031 * Makefile.in: Regenerate.
4032 * confiugre: Regenerate.
4033 * src/types.c: Add m32r port to FFI_INTERNAL_TYPEDEF
4034 (uint64, sint64, double, longdouble)
4035 * src/m32r: New directory.
4036 * src/m32r/ffi.c: New file.
4037 * src/m32r/sysv.S: Likewise.
4038 * src/m32r/ffitarget.h: Likewise.
4039
40402004-10-02 Kaz Kojima <kkojima@gcc.gnu.org>
4041
4042 * testsuite/libffi.call/negint.c: New test case.
4043
40442004-09-14 H.J. Lu <hongjiu.lu@intel.com>
4045
4046 PR libgcj/17465
4047 * testsuite/lib/libffi-dg.exp: Don't use global ld_library_path.
4048 Set up LD_LIBRARY_PATH, SHLIB_PATH, LD_LIBRARYN32_PATH,
4049 LD_LIBRARY64_PATH, LD_LIBRARY_PATH_32, LD_LIBRARY_PATH_64 and
4050 DYLD_LIBRARY_PATH.
4051
40522004-09-05 Andreas Tobler <a.tobler@schweiz.ch>
4053
4054 * testsuite/libffi.call/many_win32.c: Remove whitespaces.
4055 * testsuite/libffi.call/promotion.c: Likewise.
4056 * testsuite/libffi.call/return_ll.c: Remove unused var. Cleanup
4057 whitespaces.
4058 * testsuite/libffi.call/return_sc.c: Likewise.
4059 * testsuite/libffi.call/return_uc.c: Likewise.
4060
40612004-09-05 Andreas Tobler <a.tobler@schweiz.ch>
4062
4063 * src/powerpc/darwin.S: Fix comments and identation.
4064 * src/powerpc/darwin_closure.S: Likewise.
4065
40662004-09-02 Andreas Tobler <a.tobler@schweiz.ch>
4067
4068 * src/powerpc/ffi_darwin.c: Add flag for longdouble return values.
4069 (ffi_prep_args): Handle longdouble arguments.
4070 (ffi_prep_cif_machdep): Set flags for longdouble. Calculate space for
4071 longdouble.
4072 (ffi_closure_helper_DARWIN): Add closure handling for longdouble.
4073 * src/powerpc/darwin.S (_ffi_call_DARWIN): Add handling of longdouble
4074 values.
4075 * src/powerpc/darwin_closure.S (_ffi_closure_ASM): Likewise.
4076 * src/types.c: Defined longdouble size and alignment for darwin.
4077
40782004-09-02 Andreas Tobler <a.tobler@schweiz.ch>
4079
4080 * src/powerpc/aix.S: Remove whitespaces.
4081 * src/powerpc/aix_closure.S: Likewise.
4082 * src/powerpc/asm.h: Likewise.
4083 * src/powerpc/ffi.c: Likewise.
4084 * src/powerpc/ffitarget.h: Likewise.
4085 * src/powerpc/linux64.S: Likewise.
4086 * src/powerpc/linux64_closure.S: Likewise.
4087 * src/powerpc/ppc_closure.S: Likewise.
4088 * src/powerpc/sysv.S: Likewise.
4089
40902004-08-30 Anthony Green <green@redhat.com>
4091
4092 * Makefile.am: Add frv support.
4093 * Makefile.in, testsuite/Makefile.in: Rebuilt.
4094 * configure.ac: Read configure.host.
4095 * configure.in: Read configure.host.
4096 * configure.host: New file. frv-elf needs libgloss.
4097 * include/ffi.h.in: Force ffi_closure to have a nice big (8)
4098 alignment. This is needed to frv and shouldn't harm the others.
4099 * include/ffi_common.h (ALIGN_DOWN): New macro.
4100 * src/frv/ffi.c, src/frv/ffitarget.h, src/frv/eabi.S: New files.
4101
41022004-08-24 David Daney <daney@avtrex.com>
4103
4104 * testsuite/libffi.call/closure_fn0.c: Xfail mips64* instead of mips*.
4105 * testsuite/libffi.call/closure_fn1.c: Likewise.
4106 * testsuite/libffi.call/closure_fn2.c Likewise.
4107 * testsuite/libffi.call/closure_fn3.c: Likewise.
4108 * testsuite/libffi.call/closure_fn4.c: Likewise.
4109 * testsuite/libffi.call/closure_fn5.c: Likewise.
4110 * testsuite/libffi.call/cls_18byte.c: Likewise.
4111 * testsuite/libffi.call/cls_19byte.c: Likewise.
4112 * testsuite/libffi.call/cls_1_1byte.c: Likewise.
4113 * testsuite/libffi.call/cls_20byte.c: Likewise.
4114 * testsuite/libffi.call/cls_20byte1.c: Likewise.
4115 * testsuite/libffi.call/cls_24byte.c: Likewise.
4116 * testsuite/libffi.call/cls_2byte.c: Likewise.
4117 * testsuite/libffi.call/cls_3_1byte.c: Likewise.
4118 * testsuite/libffi.call/cls_3byte1.c: Likewise.
4119 * testsuite/libffi.call/cls_3byte2.c: Likewise.
4120 * testsuite/libffi.call/cls_4_1byte.c: Likewise.
4121 * testsuite/libffi.call/cls_4byte.c: Likewise.
4122 * testsuite/libffi.call/cls_64byte.c: Likewise.
4123 * testsuite/libffi.call/cls_6byte.c: Likewise.
4124 * testsuite/libffi.call/cls_7byte.c: Likewise.
4125 * testsuite/libffi.call/cls_8byte.c: Likewise.
4126 * testsuite/libffi.call/cls_9byte1.c: Likewise.
4127 * testsuite/libffi.call/cls_9byte2.c: Likewise.
4128 * testsuite/libffi.call/cls_align_double.c: Likewise.
4129 * testsuite/libffi.call/cls_align_float.c: Likewise.
4130 * testsuite/libffi.call/cls_align_longdouble.c: Likewise.
4131 * testsuite/libffi.call/cls_align_pointer.c: Likewise.
4132 * testsuite/libffi.call/cls_align_sint16.c: Likewise.
4133 * testsuite/libffi.call/cls_align_sint32.c: Likewise.
4134 * testsuite/libffi.call/cls_align_sint64.c: Likewise.
4135 * testsuite/libffi.call/cls_align_uint16.c: Likewise.
4136 * testsuite/libffi.call/cls_align_uint32.c: Likewise.
4137 * testsuite/libffi.call/cls_align_uint64.c: Likewise.
4138 * testsuite/libffi.call/cls_double.c: Likewise.
4139 * testsuite/libffi.call/cls_float.c: Likewise.
4140 * testsuite/libffi.call/cls_multi_schar.c: Likewise.
4141 * testsuite/libffi.call/cls_multi_sshort.c: Likewise.
4142 * testsuite/libffi.call/cls_multi_sshortchar.c: Likewise.
4143 * testsuite/libffi.call/cls_multi_uchar.c: Likewise.
4144 * testsuite/libffi.call/cls_multi_ushort.c: Likewise.
4145 * testsuite/libffi.call/cls_multi_ushortchar.c: Likewise.
4146 * testsuite/libffi.call/cls_schar.c: Likewise.
4147 * testsuite/libffi.call/cls_sint.c: Likewise.
4148 * testsuite/libffi.call/cls_sshort.c: Likewise.
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/nested_struct.c: Likewise.
4154 * testsuite/libffi.call/nested_struct1.c: Likewise.
4155 * testsuite/libffi.call/nested_struct2.c: Likewise.
4156 * testsuite/libffi.call/nested_struct3.c: Likewise.
4157 * testsuite/libffi.call/problem1.c: Likewise.
4158 * testsuite/libffi.special/unwindtest.cc: Likewise.
4159 * testsuite/libffi.call/cls_12byte.c: Likewise and set return value
4160 to zero.
4161 * testsuite/libffi.call/cls_16byte.c: Likewise.
4162 * testsuite/libffi.call/cls_5byte.c: Likewise.
4163
41642004-08-23 David Daney <daney@avtrex.com>
4165
4166 PR libgcj/13141
4167 * src/mips/ffitarget.h (FFI_O32_SOFT_FLOAT): New ABI.
4168 * src/mips/ffi.c (ffi_prep_args): Fix alignment calculation.
4169 (ffi_prep_cif_machdep): Handle FFI_O32_SOFT_FLOAT floating point
4170 parameters and return types.
4171 (ffi_call): Handle FFI_O32_SOFT_FLOAT ABI.
4172 (ffi_prep_closure): Ditto.
4173 (ffi_closure_mips_inner_O32): Handle FFI_O32_SOFT_FLOAT ABI, fix
4174 alignment calculations.
4175 * src/mips/o32.S (ffi_closure_O32): Don't use floating point
4176 instructions if FFI_O32_SOFT_FLOAT, make stack frame ABI compliant.
4177
41782004-08-14 Casey Marshall <csm@gnu.org>
4179
4180 * src/mips/ffi.c (ffi_pref_cif_machdep): set `cif->flags' to
4181 contain `FFI_TYPE_UINT64' as return type for any 64-bit
4182 integer (O32 ABI only).
4183 (ffi_prep_closure): new function.
4184 (ffi_closure_mips_inner_O32): new function.
4185 * src/mips/ffitarget.h: Define `FFI_CLOSURES' and
4186 `FFI_TRAMPOLINE_SIZE' appropriately if the ABI is o32.
4187 * src/mips/o32.S (ffi_call_O32): add labels for .eh_frame. Return
4188 64 bit integers correctly.
4189 (ffi_closure_O32): new function.
4190 Added DWARF-2 unwind info for both functions.
4191
41922004-08-10 Andrew Haley <aph@redhat.com>
4193
4194 * src/x86/ffi64.c (ffi_prep_args ): 8-align all stack arguments.
4195
41962004-08-01 Robert Millan <robertmh@gnu.org>
4197
4198 * configure.ac: Detect knetbsd-gnu and kfreebsd-gnu.
4199 * configure: Regenerate.
4200
42012004-07-30 Maciej W. Rozycki <macro@linux-mips.org>
4202
4203 * acinclude.m4 (AC_FUNC_MMAP_BLACKLIST): Check for <sys/mman.h>
4204 and mmap() explicitly instead of relying on preset autoconf cache
4205 variables.
4206 * aclocal.m4: Regenerate.
4207 * configure: Regenerate.
4208
42092004-07-11 Ulrich Weigand <uweigand@de.ibm.com>
4210
4211 * src/s390/ffi.c (ffi_prep_args): Fix C aliasing violation.
4212 (ffi_check_float_struct): Remove unused prototype.
4213
42142004-06-30 Geoffrey Keating <geoffk@apple.com>
4215
4216 * src/powerpc/ffi_darwin.c (flush_icache): ';' is a comment
4217 character on Darwin, use '\n\t' instead.
4218
42192004-06-26 Matthias Klose <doko@debian.org>
4220
4221 * libtool-version: Fix typo in revision/age.
4222
42232004-06-17 Matthias Klose <doko@debian.org>
4224
4225 * libtool-version: New.
4226 * Makefile.am (libffi_la_LDFLAGS): Use -version-info for soname.
4227 * Makefile.in: Regenerate.
4228
42292004-06-15 Paolo Bonzini <bonzini@gnu.org>
4230
4231 * Makefile.am: Remove useless multilib rules.
4232 * Makefile.in: Regenerate.
4233 * aclocal.m4: Regenerate with automake 1.8.5.
4234 * configure.ac: Remove useless multilib configury.
4235 * configure: Regenerate.
4236
42372004-06-15 Paolo Bonzini <bonzini@gnu.org>
4238
4239 * .cvsignore: New file.
4240
42412004-06-10 Jakub Jelinek <jakub@redhat.com>
4242
4243 * src/ia64/unix.S (ffi_call_unix): Insert group barrier break
4244 fp_done.
4245 (ffi_closure_UNIX): Fix f14/f15 adjustment if FLOAT_SZ is ever
4246 changed from 8.
4247
42482004-06-06 Sean McNeil <sean@mcneil.com>
4249
4250 * configure.ac: Add x86_64-*-freebsd* support.
4251 * configure: Regenerate.
4252
42532004-04-26 Joe Buck <jbuck@welsh-buck.org>
4254
4255 Bug 15093
4256 * configure.ac: Test for existence of mmap and sys/mman.h before
4257 checking blacklist. Fix suggested by Jim Wilson.
4258 * configure: Regenerate.
4259
42602004-04-26 Matt Austern <austern@apple.com>
4261
4262 * src/powerpc/darwin.S: Go through a non-lazy pointer for initial
4263 FDE location.
4264 * src/powerpc/darwin_closure.S: Likewise.
4265
42662004-04-24 Andreas Tobler <a.tobler@schweiz.ch>
4267
4268 * testsuite/libffi.call/cls_multi_schar.c (main): Fix initialization
4269 error. Reported by Thomas Heller <theller@python.net>.
4270 * testsuite/libffi.call/cls_multi_sshort.c (main): Likewise.
4271 * testsuite/libffi.call/cls_multi_ushort.c (main): Likewise.
4272
42732004-03-20 Matthias Klose <doko@debian.org>
4274
4275 * src/pa/linux.S: Fix typo.
4276
42772004-03-19 Matthias Klose <doko@debian.org>
4278
4279 * Makefile.am: Update.
4280 * Makefile.in: Regenerate.
4281 * src/pa/ffi.h.in: Remove.
4282 * src/pa/ffitarget.h: New file.
4283
42842004-02-10 Randolph Chung <tausq@debian.org>
4285
4286 * Makefile.am: Add PA support.
4287 * Makefile.in: Regenerate.
4288 * include/Makefile.in: Regenerate.
4289 * configure.ac: Add PA target.
4290 * configure: Regenerate.
4291 * src/pa/ffi.c: New file.
4292 * src/pa/ffi.h.in: Add PA support.
4293 * src/pa/linux.S: New file.
4294 * prep_cif.c: Add PA support.
4295
42962004-03-16 Hosaka Yuji <hos@tamanegi.org>
4297
4298 * src/types.c: Fix alignment size of X86_WIN32 case int64 and
4299 double.
4300 * src/x86/ffi.c (ffi_prep_args): Replace ecif->cif->rtype->type
4301 with ecif->cif->flags.
4302 (ffi_call, ffi_prep_incoming_args_SYSV): Replace cif->rtype->type
4303 with cif->flags.
4304 (ffi_prep_cif_machdep): Add X86_WIN32 struct case.
4305 (ffi_closure_SYSV): Add 1 or 2-bytes struct case for X86_WIN32.
4306 * src/x86/win32.S (retstruct1b, retstruct2b, sc_retstruct1b,
4307 sc_retstruct2b): Add for 1 or 2-bytes struct case.
4308
43092004-03-15 Kelley Cook <kcook@gcc.gnu.org>
4310
4311 * configure.in: Rename file to ...
4312 * configure.ac: ... this.
4313 * fficonfig.h.in: Regenerate.
4314 * Makefile.in: Regenerate.
4315 * include/Makefile.in: Regenerate.
4316 * testsuite/Makefile.in: Regenerate.
4317
43182004-03-12 Matt Austern <austern@apple.com>
4319
4320 * src/powerpc/darwin.S: Fix EH information so it corresponds to
4321 changes in EH format resulting from addition of linkonce support.
4322 * src/powerpc/darwin_closure.S: Likewise.
4323
43242004-03-11 Andreas Tobler <a.tobler@schweiz.ch>
4325 Paolo Bonzini <bonzini@gnu.org>
4326
4327 * Makefile.am (AUTOMAKE_OPTIONS): Set them.
4328 Remove VPATH. Remove rules for object files. Remove multilib support.
4329 (AM_CCASFLAGS): Add.
4330 * configure.in (AC_CONFIG_HEADERS): Relace AM_CONFIG_HEADER.
4331 (AC_PREREQ): Bump version to 2.59.
4332 (AC_INIT): Fill with version info and bug address.
4333 (ORIGINAL_LD_FOR_MULTILIBS): Remove.
4334 (AM_ENABLE_MULTILIB): Use this instead of AC_ARG_ENABLE.
4335 De-precious CC so that the right flags are passed down to multilibs.
4336 (AC_MSG_ERROR): Replace obsolete macro AC_ERROR.
4337 (AC_CONFIG_FILES): Replace obsolete macro AC_LINK_FILES.
4338 (AC_OUTPUT): Reorganize the output with AC_CONFIG_COMMANDS.
4339 * configure: Rebuilt.
4340 * aclocal.m4: Likewise.
4341 * Makefile.in, include/Makefile.in, testsuite/Makefile.in: Likewise.
4342 * fficonfig.h.in: Likewise.
4343
43442004-03-11 Andreas Schwab <schwab@suse.de>
4345
4346 * src/ia64/ffi.c (ffi_prep_incoming_args_UNIX): Get floating point
4347 arguments from fp registers only for the first 8 parameter slots.
4348 Don't convert a float parameter when passed in memory.
4349
43502004-03-09 Hans-Peter Nilsson <hp@axis.com>
4351
4352 * configure: Regenerate for config/accross.m4 correction.
4353
43542004-02-25 Matt Kraai <kraai@alumni.cmu.edu>
4355
4356 * src/powerpc/ffi.c (ffi_prep_args_SYSV): Change
4357 ecif->cif->bytes to bytes.
4358 (ffi_prep_cif_machdep): Add braces around nested if statement.
4359
43602004-02-09 Alan Modra <amodra@bigpond.net.au>
4361
4362 * src/types.c (pointer): POWERPC64 has 8 byte pointers.
4363
4364 * src/powerpc/ffi.c (ffi_prep_args64): Correct long double handling.
4365 (ffi_closure_helper_LINUX64): Fix typo.
4366 * testsuite/libffi.call/cls_align_longdouble.c: Pass -mlong-double-128
4367 for powerpc64-*-*.
4368 * testsuite/libffi.call/float.c: Likewise.
4369 * testsuite/libffi.call/float2.c: Likewise.
4370
43712004-02-08 Alan Modra <amodra@bigpond.net.au>
4372
4373 * src/powerpc/ffi.c (ffi_prep_cif_machdep <FFI_LINUX64>): Correct
4374 long double function return and long double arg handling.
4375 (ffi_closure_helper_LINUX64): Formatting. Delete unused "ng" var.
4376 Use "end_pfr" instead of "nf". Correct long double handling.
4377 Localise "temp".
4378 * src/powerpc/linux64.S (ffi_call_LINUX64): Save f2 long double
4379 return value.
4380 * src/powerpc/linux64_closure.S (ffi_closure_LINUX64): Allocate
4381 space for long double return value. Adjust stack frame and offsets.
4382 Load f2 long double return.
4383
43842004-02-07 Alan Modra <amodra@bigpond.net.au>
4385
4386 * src/types.c: Use 16 byte long double for POWERPC64.
4387
43882004-01-25 Eric Botcazou <ebotcazou@libertysurf.fr>
4389
4390 * src/sparc/ffi.c (ffi_prep_args_v9): Shift the parameter array
4391 when the structure return address is passed in %o0.
4392 (ffi_V9_return_struct): Rename into ffi_v9_layout_struct.
4393 (ffi_v9_layout_struct): Align the field following a nested structure
4394 on a word boundary. Use memmove instead of memcpy.
4395 (ffi_call): Update call to ffi_V9_return_struct.
4396 (ffi_prep_closure): Define 'ctx' only for V8.
4397 (ffi_closure_sparc_inner): Clone into ffi_closure_sparc_inner_v8
4398 and ffi_closure_sparc_inner_v9.
4399 (ffi_closure_sparc_inner_v8): Return long doubles by reference.
4400 Always skip the structure return address. For structures and long
4401 doubles, copy the argument directly.
4402 (ffi_closure_sparc_inner_v9): Skip the structure return address only
4403 if required. Shift the maximum floating-point slot accordingly. For
4404 big structures, copy the argument directly; otherwise, left-justify the
4405 argument and call ffi_v9_layout_struct to lay out the structure on
4406 the stack.
4407 * src/sparc/v8.S: Undef STACKFRAME before defining it.
4408 (ffi_closure_v8): Pass the structure return address. Update call to
4409 ffi_closure_sparc_inner_v8. Short-circuit FFI_TYPE_INT handling.
4410 Skip the 'unimp' insn when returning long doubles and structures.
4411 * src/sparc/v9.S: Undef STACKFRAME before defining it.
4412 (ffi_closure_v9): Increase the frame size by 2 words. Short-circuit
4413 FFI_TYPE_INT handling. Load structures both in integers and
4414 floating-point registers on return.
4415 * README: Update status of the SPARC port.
4416
44172004-01-24 Andreas Tobler <a.tobler@schweiz.ch>
4418
4419 * testsuite/libffi.call/pyobjc-tc.c (main): Treat result value
4420 as of type ffi_arg.
4421 * testsuite/libffi.call/struct3.c (main): Fix CHECK.
4422
44232004-01-22 Ulrich Weigand <uweigand@de.ibm.com>
4424
4425 * testsuite/libffi.call/cls_uint.c (cls_ret_uint_fn): Treat result
4426 value as of type ffi_arg, not unsigned int.
4427
44282004-01-21 Michael Ritzert <ritzert@t-online.de>
4429
4430 * ffi64.c (ffi_prep_args): Cast the RHS of an assignment instead
4431 of the LHS.
4432
44332004-01-12 Andreas Tobler <a.tobler@schweiz.ch>
4434
4435 * testsuite/lib/libffi-dg.exp: Set LD_LIBRARY_PATH_32 for
4436 Solaris.
4437
44382004-01-08 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
4439
4440 * testsuite/libffi.call/ffitest.h (allocate_mmap): Cast MAP_FAILED
4441 to void *.
4442
44432003-12-10 Richard Henderson <rth@redhat.com>
4444
4445 * testsuite/libffi.call/cls_align_pointer.c: Cast pointers to
4446 size_t instead of int.
4447
44482003-12-04 Hosaka Yuji <hos@tamanegi.org>
4449
4450 * testsuite/libffi.call/many_win32.c: Include <float.h>.
4451 * testsuite/libffi.call/many_win32.c (main): Replace variable
4452 int i with unsigned long ul.
4453
4454 * testsuite/libffi.call/cls_align_uint64.c: New test case.
4455 * testsuite/libffi.call/cls_align_sint64.c: Likewise.
4456 * testsuite/libffi.call/cls_align_uint32.c: Likewise.
4457 * testsuite/libffi.call/cls_align_sint32.c: Likewise.
4458 * testsuite/libffi.call/cls_align_uint16.c: Likewise.
4459 * testsuite/libffi.call/cls_align_sint16.c: Likewise.
4460 * testsuite/libffi.call/cls_align_float.c: Likewise.
4461 * testsuite/libffi.call/cls_align_double.c: Likewise.
4462 * testsuite/libffi.call/cls_align_longdouble.c: Likewise.
4463 * testsuite/libffi.call/cls_align_pointer.c: Likewise.
4464
44652003-12-02 Hosaka Yuji <hos@tamanegi.org>
4466
4467 PR other/13221
4468 * src/x86/ffi.c (ffi_prep_args, ffi_prep_incoming_args_SYSV):
4469 Align arguments to 32 bits.
4470
44712003-12-01 Andreas Tobler <a.tobler@schweiz.ch>
4472
4473 PR other/13221
4474 * testsuite/libffi.call/cls_multi_sshort.c: New test case.
4475 * testsuite/libffi.call/cls_multi_sshortchar.c: Likewise.
4476 * testsuite/libffi.call/cls_multi_uchar.c: Likewise.
4477 * testsuite/libffi.call/cls_multi_schar.c: Likewise.
4478 * testsuite/libffi.call/cls_multi_ushortchar.c: Likewise.
4479 * testsuite/libffi.call/cls_multi_ushort.c: Likewise.
4480
4481 * testsuite/libffi.special/unwindtest.cc: Cosmetics.
4482
44832003-11-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4484
4485 * testsuite/libffi.call/ffitest.h: Include <fcntl.h>.
4486 * testsuite/libffi.special/ffitestcxx.h: Likewise.
4487
44882003-11-22 Andreas Tobler <a.tobler@schweiz.ch>
4489
4490 * Makefile.in: Rebuilt.
4491 * configure: Likewise.
4492 * testsuite/libffi.special/unwindtest.cc: Convert the mmap to
4493 the right type.
4494
44952003-11-21 Andreas Jaeger <aj@suse.de>
4496 Andreas Tobler <a.tobler@schweiz.ch>
4497
4498 * acinclude.m4: Add AC_FUNC_MMAP_BLACKLIST.
4499 * configure.in: Call AC_FUNC_MMAP_BLACKLIST.
4500 * Makefile.in: Rebuilt.
4501 * aclocal.m4: Likewise.
4502 * configure: Likewise.
4503 * fficonfig.h.in: Likewise.
4504 * testsuite/lib/libffi-dg.exp: Add include dir.
4505 * testsuite/libffi.call/ffitest.h: Add MMAP definitions.
4506 * testsuite/libffi.special/ffitestcxx.h: Likewise.
4507 * testsuite/libffi.call/closure_fn0.c: Use MMAP functionality
4508 for ffi_closure if available.
4509 * testsuite/libffi.call/closure_fn1.c: Likewise.
4510 * testsuite/libffi.call/closure_fn2.c: Likewise.
4511 * testsuite/libffi.call/closure_fn3.c: Likewise.
4512 * testsuite/libffi.call/closure_fn4.c: Likewise.
4513 * testsuite/libffi.call/closure_fn5.c: Likewise.
4514 * testsuite/libffi.call/cls_12byte.c: Likewise.
4515 * testsuite/libffi.call/cls_16byte.c: Likewise.
4516 * testsuite/libffi.call/cls_18byte.c: Likewise.
4517 * testsuite/libffi.call/cls_19byte.c: Likewise.
4518 * testsuite/libffi.call/cls_1_1byte.c: Likewise.
4519 * testsuite/libffi.call/cls_20byte.c: Likewise.
4520 * testsuite/libffi.call/cls_20byte1.c: Likewise.
4521 * testsuite/libffi.call/cls_24byte.c: Likewise.
4522 * testsuite/libffi.call/cls_2byte.c: Likewise.
4523 * testsuite/libffi.call/cls_3_1byte.c: Likewise.
4524 * testsuite/libffi.call/cls_3byte1.c: Likewise.
4525 * testsuite/libffi.call/cls_3byte2.c: Likewise.
4526 * testsuite/libffi.call/cls_4_1byte.c: Likewise.
4527 * testsuite/libffi.call/cls_4byte.c: Likewise.
4528 * testsuite/libffi.call/cls_5byte.c: Likewise.
4529 * testsuite/libffi.call/cls_64byte.c: Likewise.
4530 * testsuite/libffi.call/cls_6byte.c: Likewise.
4531 * testsuite/libffi.call/cls_7byte.c: Likewise.
4532 * testsuite/libffi.call/cls_8byte.c: Likewise.
4533 * testsuite/libffi.call/cls_9byte1.c: Likewise.
4534 * testsuite/libffi.call/cls_9byte2.c: Likewise.
4535 * testsuite/libffi.call/cls_double.c: Likewise.
4536 * testsuite/libffi.call/cls_float.c: Likewise.
4537 * testsuite/libffi.call/cls_schar.c: Likewise.
4538 * testsuite/libffi.call/cls_sint.c: Likewise.
4539 * testsuite/libffi.call/cls_sshort.c: Likewise.
4540 * testsuite/libffi.call/cls_uchar.c: Likewise.
4541 * testsuite/libffi.call/cls_uint.c: Likewise.
4542 * testsuite/libffi.call/cls_ulonglong.c: Likewise.
4543 * testsuite/libffi.call/cls_ushort.c: Likewise.
4544 * testsuite/libffi.call/nested_struct.c: Likewise.
4545 * testsuite/libffi.call/nested_struct1.c: Likewise.
4546 * testsuite/libffi.call/nested_struct2.c: Likewise.
4547 * testsuite/libffi.call/nested_struct3.c: Likewise.
4548 * testsuite/libffi.call/problem1.c: Likewise.
4549 * testsuite/libffi.special/unwindtest.cc: Likewise.
4550
45512003-11-20 Andreas Tobler <a.tobler@schweiz.ch>
4552
4553 * testsuite/lib/libffi-dg.exp: Make the -lgcc_s conditional.
4554
45552003-11-19 Andreas Tobler <a.tobler@schweiz.ch>
4556
4557 * testsuite/lib/libffi-dg.exp: Add DYLD_LIBRARY_PATH for darwin.
4558 Add -lgcc_s to additional flags.
4559
45602003-11-12 Andreas Tobler <a.tobler@schweiz.ch>
4561
4562 * configure.in, include/Makefile.am: PR libgcj/11147, install
4563 the ffitarget.h header file in a gcc versioned and target
4564 dependent place.
4565 * configure: Regenerated.
4566 * Makefile.in, include/Makefile.in: Likewise.
4567 * testsuite/Makefile.in: Likewise.
4568
45692003-11-09 Andreas Tobler <a.tobler@schweiz.ch>
4570
4571 * testsuite/libffi.call/closure_fn0.c: Print result and check
4572 with dg-output to make debugging easier.
4573 * testsuite/libffi.call/closure_fn1.c: Likewise.
4574 * testsuite/libffi.call/closure_fn2.c: Likewise.
4575 * testsuite/libffi.call/closure_fn3.c: Likewise.
4576 * testsuite/libffi.call/closure_fn4.c: Likewise.
4577 * testsuite/libffi.call/closure_fn5.c: Likewise.
4578 * testsuite/libffi.call/cls_12byte.c: Likewise.
4579 * testsuite/libffi.call/cls_16byte.c: Likewise.
4580 * testsuite/libffi.call/cls_18byte.c: Likewise.
4581 * testsuite/libffi.call/cls_19byte.c: Likewise.
4582 * testsuite/libffi.call/cls_1_1byte.c: Likewise.
4583 * testsuite/libffi.call/cls_20byte.c: Likewise.
4584 * testsuite/libffi.call/cls_20byte1.c: Likewise.
4585 * testsuite/libffi.call/cls_24byte.c: Likewise.
4586 * testsuite/libffi.call/cls_2byte.c: Likewise.
4587 * testsuite/libffi.call/cls_3_1byte.c: Likewise.
4588 * testsuite/libffi.call/cls_3byte1.c: Likewise.
4589 * testsuite/libffi.call/cls_3byte2.c: Likewise.
4590 * testsuite/libffi.call/cls_4_1byte.c: Likewise.
4591 * testsuite/libffi.call/cls_4byte.c: Likewise.
4592 * testsuite/libffi.call/cls_5byte.c: Likewise.
4593 * testsuite/libffi.call/cls_64byte.c: Likewise.
4594 * testsuite/libffi.call/cls_6byte.c: Likewise.
4595 * testsuite/libffi.call/cls_7byte.c: Likewise.
4596 * testsuite/libffi.call/cls_8byte.c: Likewise.
4597 * testsuite/libffi.call/cls_9byte1.c: Likewise.
4598 * testsuite/libffi.call/cls_9byte2.c: Likewise.
4599 * testsuite/libffi.call/cls_double.c: Likewise.
4600 * testsuite/libffi.call/cls_float.c: Likewise.
4601 * testsuite/libffi.call/cls_schar.c: Likewise.
4602 * testsuite/libffi.call/cls_sint.c: Likewise.
4603 * testsuite/libffi.call/cls_sshort.c: Likewise.
4604 * testsuite/libffi.call/cls_uchar.c: Likewise.
4605 * testsuite/libffi.call/cls_uint.c: Likewise.
4606 * testsuite/libffi.call/cls_ulonglong.c: Likewise.
4607 * testsuite/libffi.call/cls_ushort.c: Likewise.
4608 * testsuite/libffi.call/problem1.c: Likewise.
4609
4610 * testsuite/libffi.special/unwindtest.cc: Make ffi_closure
4611 static.
4612
46132003-11-08 Andreas Tobler <a.tobler@schweiz.ch>
4614
4615 * testsuite/libffi.call/cls_9byte2.c: New test case.
4616 * testsuite/libffi.call/cls_9byte1.c: Likewise.
4617 * testsuite/libffi.call/cls_64byte.c: Likewise.
4618 * testsuite/libffi.call/cls_20byte1.c: Likewise.
4619 * testsuite/libffi.call/cls_19byte.c: Likewise.
4620 * testsuite/libffi.call/cls_18byte.c: Likewise.
4621 * testsuite/libffi.call/closure_fn4.c: Likewise.
4622 * testsuite/libffi.call/closure_fn5.c: Likewise.
4623 * testsuite/libffi.call/cls_schar.c: Likewise.
4624 * testsuite/libffi.call/cls_sint.c: Likewise.
4625 * testsuite/libffi.call/cls_sshort.c: Likewise.
4626 * testsuite/libffi.call/nested_struct2.c: Likewise.
4627 * testsuite/libffi.call/nested_struct3.c: Likewise.
4628
46292003-11-08 Andreas Tobler <a.tobler@schweiz.ch>
4630
4631 * testsuite/libffi.call/cls_double.c: Do a check on the result.
4632 * testsuite/libffi.call/cls_uchar.c: Likewise.
4633 * testsuite/libffi.call/cls_uint.c: Likewise.
4634 * testsuite/libffi.call/cls_ulonglong.c: Likewise.
4635 * testsuite/libffi.call/cls_ushort.c: Likewise.
4636 * testsuite/libffi.call/return_sc.c: Cleanup whitespaces.
4637
46382003-11-06 Andreas Tobler <a.tobler@schweiz.ch>
4639
4640 * src/prep_cif.c (ffi_prep_cif): Move the validity check after
4641 the initialization.
4642
46432003-10-23 Andreas Tobler <a.tobler@schweiz.ch>
4644
4645 * src/java_raw_api.c (ffi_java_ptrarray_to_raw): Replace
4646 FFI_ASSERT(FALSE) with FFI_ASSERT(0).
4647
46482003-10-22 David Daney <ddaney@avtrex.com>
4649
4650 * src/mips/ffitarget.h: Replace undefined UINT32 and friends with
4651 __attribute__((__mode__(__SI__))) and friends.
4652
46532003-10-22 Andreas Schwab <schwab@suse.de>
4654
4655 * src/ia64/ffi.c: Replace FALSE/TRUE with false/true.
4656
46572003-10-21 Andreas Tobler <a.tobler@schweiz.ch>
4658
4659 * configure.in: AC_LINK_FILES(ffitarget.h).
4660 * configure: Regenerate.
4661 * Makefile.in: Likewise.
4662 * include/Makefile.in: Likewise.
4663 * testsuite/Makefile.in: Likewise.
4664 * fficonfig.h.in: Likewise.
4665
46662003-10-21 Paolo Bonzini <bonzini@gnu.org>
4667 Richard Henderson <rth@redhat.com>
4668
4669 Avoid that ffi.h includes fficonfig.h.
4670
4671 * Makefile.am (EXTRA_DIST): Include ffitarget.h files
4672 (TARGET_SRC_MIPS_GCC): Renamed to TARGET_SRC_MIPS_IRIX.
4673 (TARGET_SRC_MIPS_SGI): Removed.
4674 (MIPS_GCC): Renamed to TARGET_SRC_MIPS_IRIX.
4675 (MIPS_SGI): Removed.
4676 (CLEANFILES): Removed.
4677 (mostlyclean-am, clean-am, mostlyclean-sub, clean-sub): New
4678 targets.
4679 * acconfig.h: Removed.
4680 * configure.in: Compute sizeofs only for double and long double.
4681 Use them to define and subst HAVE_LONG_DOUBLE. Include comments
4682 into AC_DEFINE instead of using acconfig.h. Create
4683 include/ffitarget.h instead of include/fficonfig.h. Rename
4684 MIPS_GCC to MIPS_IRIX, drop MIPS_SGI since we are in gcc's tree.
4685 AC_DEFINE EH_FRAME_FLAGS.
4686 * include/Makefile.am (DISTCLEANFILES): New automake macro.
4687 (hack_DATA): Add ffitarget.h.
4688 * include/ffi.h.in: Remove all system specific definitions.
4689 Declare raw API even if it is not installed, why bother?
4690 Use limits.h instead of SIZEOF_* to define ffi_type_*. Do
4691 not define EH_FRAME_FLAGS, it is in fficonfig.h now. Include
4692 ffitarget.h instead of fficonfig.h. Remove ALIGN macro.
4693 (UINT_ARG, INT_ARG): Removed, use ffi_arg and ffi_sarg instead.
4694 * include/ffi_common.h (bool): Do not define.
4695 (ffi_assert): Accept failed assertion.
4696 (ffi_type_test): Return void and accept file/line.
4697 (FFI_ASSERT): Pass stringized failed assertion.
4698 (FFI_ASSERT_AT): New macro.
4699 (FFI_ASSERT_VALID_TYPE): New macro.
4700 (UINT8, SINT8, UINT16, SINT16, UINT32, SINT32,
4701 UINT64, SINT64): Define here with gcc's __attribute__ macro
4702 instead of in ffi.h
4703 (FLOAT32, ALIGN): Define here instead of in ffi.h
4704 * include/ffi-mips.h: Removed. Its content moved to
4705 src/mips/ffitarget.h after separating assembly and C sections.
4706 * src/alpha/ffi.c, src/alpha/ffi.c, src/java_raw_api.c
4707 src/prep_cif.c, src/raw_api.c, src/ia64/ffi.c,
4708 src/mips/ffi.c, src/mips/n32.S, src/mips/o32.S,
4709 src/mips/ffitarget.h, src/sparc/ffi.c, src/x86/ffi64.c:
4710 SIZEOF_ARG -> FFI_SIZEOF_ARG.
4711 * src/ia64/ffi.c: Include stdbool.h (provided by GCC 2.95+).
4712 * src/debug.c (ffi_assert): Accept stringized failed assertion.
4713 (ffi_type_test): Rewritten.
4714 * src/prep-cif.c (initialize_aggregate, ffi_prep_cif): Call
4715 FFI_ASSERT_VALID_TYPE.
4716 * src/alpha/ffitarget.h, src/arm/ffitarget.h,
4717 src/ia64/ffitarget.h, src/m68k/ffitarget.h,
4718 src/mips/ffitarget.h, src/powerpc/ffitarget.h,
4719 src/s390/ffitarget.h, src/sh/ffitarget.h,
4720 src/sh64/ffitarget.h, src/sparc/ffitarget.h,
4721 src/x86/ffitarget.h: New files.
4722 * src/alpha/osf.S, src/arm/sysv.S, src/ia64/unix.S,
4723 src/m68k/sysv.S, src/mips/n32.S, src/mips/o32.S,
4724 src/powerpc/aix.S, src/powerpc/darwin.S,
4725 src/powerpc/ffi_darwin.c, src/powerpc/linux64.S,
4726 src/powerpc/linux64_closure.S, src/powerpc/ppc_closure.S,
4727 src/powerpc/sysv.S, src/s390/sysv.S, src/sh/sysv.S,
4728 src/sh64/sysv.S, src/sparc/v8.S, src/sparc/v9.S,
4729 src/x86/sysv.S, src/x86/unix64.S, src/x86/win32.S:
4730 include fficonfig.h
4731
47322003-10-20 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
4733
4734 * src/mips/ffi.c: Use _ABIN32, _ABIO32 instead of external
4735 _MIPS_SIM_NABI32, _MIPS_SIM_ABI32.
4736
47372003-10-19 Andreas Tobler <a.tobler@schweiz.ch>
4738
4739 * src/powerpc/ffi_darwin.c (ffi_prep_args): Declare bytes again.
4740 Used when FFI_DEBUG = 1.
4741
47422003-10-14 Alan Modra <amodra@bigpond.net.au>
4743
4744 * src/types.c (double, longdouble): Default POWERPC64 to 8 byte size
4745 and align.
4746
47472003-10-06 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
4748
4749 * include/ffi_mips.h: Define FFI_MIPS_N32 for N32/N64 ABIs,
4750 FFI_MIPS_O32 for O32 ABI.
4751
47522003-10-01 Andreas Tobler <a.tobler@schweiz.ch>
4753
4754 * testsuite/lib/libffi-dg.exp: Set LD_LIBRARY_PATH_64 for
4755 SPARC64. Cleanup whitespaces.
4756
47572003-09-19 Andreas Tobler <a.tobler@schweiz.ch>
4758
4759 * testsuite/libffi.call/closure_fn0.c: Xfail mips, arm,
4760 strongarm, xscale. Cleanup whitespaces.
4761 * testsuite/libffi.call/closure_fn1.c: Likewise.
4762 * testsuite/libffi.call/closure_fn2.c: Likewise.
4763 * testsuite/libffi.call/closure_fn3.c: Likewise.
4764 * testsuite/libffi.call/cls_12byte.c: Likewise.
4765 * testsuite/libffi.call/cls_16byte.c: Likewise.
4766 * testsuite/libffi.call/cls_1_1byte.c: Likewise.
4767 * testsuite/libffi.call/cls_20byte.c: Likewise.
4768 * testsuite/libffi.call/cls_24byte.c: Likewise.
4769 * testsuite/libffi.call/cls_2byte.c: Likewise.
4770 * testsuite/libffi.call/cls_3_1byte.c: Likewise.
4771 * testsuite/libffi.call/cls_3byte1.c: Likewise.
4772 * testsuite/libffi.call/cls_3byte2.c: Likewise.
4773 * testsuite/libffi.call/cls_4_1byte.c: Likewise.
4774 * testsuite/libffi.call/cls_4byte.c: Likewise.
4775 * testsuite/libffi.call/cls_5byte.c: Likewise.
4776 * testsuite/libffi.call/cls_6byte.c: Likewise.
4777 * testsuite/libffi.call/cls_7byte.c: Likewise.
4778 * testsuite/libffi.call/cls_8byte.c: Likewise.
4779 * testsuite/libffi.call/cls_double.c: Likewise.
4780 * testsuite/libffi.call/cls_float.c: Likewise.
4781 * testsuite/libffi.call/cls_uchar.c: Likewise.
4782 * testsuite/libffi.call/cls_uint.c: Likewise.
4783 * testsuite/libffi.call/cls_ulonglong.c: Likewise.
4784 * testsuite/libffi.call/cls_ushort.c: Likewise.
4785 * testsuite/libffi.call/nested_struct.c: Likewise.
4786 * testsuite/libffi.call/nested_struct1.c: Likewise.
4787 * testsuite/libffi.call/problem1.c: Likewise.
4788 * testsuite/libffi.special/unwindtest.cc: Likewise.
4789 * testsuite/libffi.call/pyobjc-tc.c: Cleanup whitespaces.
4790
47912003-09-18 David Edelsohn <edelsohn@gnu.org>
4792
4793 * src/powerpc/aix.S: Cleanup whitespaces.
4794 * src/powerpc/aix_closure.S: Likewise.
4795
47962003-09-18 Andreas Tobler <a.tobler@schweiz.ch>
4797
4798 * src/powerpc/darwin.S: Cleanup whitespaces, comment formatting.
4799 * src/powerpc/darwin_closure.S: Likewise.
4800 * src/powerpc/ffi_darwin.c: Likewise.
4801
48022003-09-18 Andreas Tobler <a.tobler@schweiz.ch>
4803 David Edelsohn <edelsohn@gnu.org>
4804
4805 * src/types.c (double): Add AIX and Darwin to the right TYPEDEF.
4806 * src/powerpc/aix_closure.S: Remove the pointer to the outgoing
4807 parameter stack.
4808 * src/powerpc/darwin_closure.S: Likewise.
4809 * src/powerpc/ffi_darwin.c (ffi_prep_args): Handle structures
4810 according to the Darwin/AIX ABI.
4811 (ffi_prep_cif_machdep): Likewise.
4812 (ffi_closure_helper_DARWIN): Likewise.
4813 Remove the outgoing parameter stack logic. Simplify the evaluation
4814 of the different CASE types.
4815 (ffi_prep_clousure): Avoid the casts on lvalues. Change the branch
4816 statement in the trampoline code.
4817
48182003-09-18 Kaz Kojima <kkojima@gcc.gnu.org>
4819
4820 * src/sh/ffi.c (ffi_prep_args): Take account into the alignement
4821 for the register size.
4822 (ffi_closure_helper_SYSV): Handle the structure return value
4823 address correctly.
4824 (ffi_closure_helper_SYSV): Return the appropriate type when
4825 the registers are used for the structure return value.
4826 * src/sh/sysv.S (ffi_closure_SYSV): Fix the stack layout for
4827 the 64-bit return value. Update copyright years.
4828
48292003-09-17 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
4830
4831 * testsuite/lib/libffi-dg.exp (libffi_target_compile): Search in
4832 srcdir for ffi_mips.h.
4833
48342003-09-12 Alan Modra <amodra@bigpond.net.au>
4835
4836 * src/prep_cif.c (initialize_aggregate): Include tail padding in
4837 structure size.
4838 * src/powerpc/linux64_closure.S (ffi_closure_LINUX64): Correct
4839 placement of float result.
4840 * testsuite/libffi.special/unwindtest.cc (closure_test_fn1): Correct
4841 cast of "resp" for big-endian 64 bit machines.
4842
48432003-09-11 Alan Modra <amodra@bigpond.net.au>
4844
4845 * src/types.c (double, longdouble): Merge identical SH and ARM
4846 typedefs, and add POWERPC64.
4847 * src/powerpc/ffi.c (ffi_prep_args64): Correct next_arg calc for
4848 struct split over gpr and rest.
4849 (ffi_prep_cif_machdep): Correct intarg_count for structures.
4850 * src/powerpc/linux64.S (ffi_call_LINUX64): Fix gpr offsets.
4851
48522003-09-09 Andreas Tobler <a.tobler@schweiz.ch>
4853
4854 * src/powerpc/ffi.c (ffi_closure_helper_SYSV) Handle struct
4855 passing correctly.
4856
48572003-09-09 Alan Modra <amodra@bigpond.net.au>
4858
4859 * configure: Regenerate.
4860
48612003-09-04 Andreas Tobler <a.tobler@schweiz.ch>
4862
4863 * Makefile.am: Remove build rules for ffitest.
4864 * Makefile.in: Rebuilt.
4865
48662003-09-04 Andreas Tobler <a.tobler@schweiz.ch>
4867
4868 * src/java_raw_api.c: Include <stdlib.h> to fix compiler warning
4869 about implicit declaration of abort().
4870
48712003-09-04 Andreas Tobler <a.tobler@schweiz.ch>
4872
4873 * Makefile.am: Add dejagnu test framework. Fixes PR other/11411.
4874 * Makefile.in: Rebuilt.
4875 * configure.in: Add dejagnu test framework.
4876 * configure: Rebuilt.
4877
4878 * testsuite/Makefile.am: New file.
4879 * testsuite/Makefile.in: Built
4880 * testsuite/lib/libffi-dg.exp: New file.
4881 * testsuite/config/default.exp: Likewise.
4882 * testsuite/libffi.call/call.exp: Likewise.
4883 * testsuite/libffi.call/ffitest.h: Likewise.
4884 * testsuite/libffi.call/closure_fn0.c: Likewise.
4885 * testsuite/libffi.call/closure_fn1.c: Likewise.
4886 * testsuite/libffi.call/closure_fn2.c: Likewise.
4887 * testsuite/libffi.call/closure_fn3.c: Likewise.
4888 * testsuite/libffi.call/cls_1_1byte.c: Likewise.
4889 * testsuite/libffi.call/cls_3_1byte.c: Likewise.
4890 * testsuite/libffi.call/cls_4_1byte.c: Likewise.
4891 * testsuite/libffi.call/cls_2byte.c: Likewise.
4892 * testsuite/libffi.call/cls_3byte1.c: Likewise.
4893 * testsuite/libffi.call/cls_3byte2.c: Likewise.
4894 * testsuite/libffi.call/cls_4byte.c: Likewise.
4895 * testsuite/libffi.call/cls_5byte.c: Likewise.
4896 * testsuite/libffi.call/cls_6byte.c: Likewise.
4897 * testsuite/libffi.call/cls_7byte.c: Likewise.
4898 * testsuite/libffi.call/cls_8byte.c: Likewise.
4899 * testsuite/libffi.call/cls_12byte.c: Likewise.
4900 * testsuite/libffi.call/cls_16byte.c: Likewise.
4901 * testsuite/libffi.call/cls_20byte.c: Likewise.
4902 * testsuite/libffi.call/cls_24byte.c: Likewise.
4903 * testsuite/libffi.call/cls_double.c: Likewise.
4904 * testsuite/libffi.call/cls_float.c: Likewise.
4905 * testsuite/libffi.call/cls_uchar.c: Likewise.
4906 * testsuite/libffi.call/cls_uint.c: Likewise.
4907 * testsuite/libffi.call/cls_ulonglong.c: Likewise.
4908 * testsuite/libffi.call/cls_ushort.c: Likewise.
4909 * testsuite/libffi.call/float.c: Likewise.
4910 * testsuite/libffi.call/float1.c: Likewise.
4911 * testsuite/libffi.call/float2.c: Likewise.
4912 * testsuite/libffi.call/many.c: Likewise.
4913 * testsuite/libffi.call/many_win32.c: Likewise.
4914 * testsuite/libffi.call/nested_struct.c: Likewise.
4915 * testsuite/libffi.call/nested_struct1.c: Likewise.
4916 * testsuite/libffi.call/pyobjc-tc.c: Likewise.
4917 * testsuite/libffi.call/problem1.c: Likewise.
4918 * testsuite/libffi.call/promotion.c: Likewise.
4919 * testsuite/libffi.call/return_ll.c: Likewise.
4920 * testsuite/libffi.call/return_sc.c: Likewise.
4921 * testsuite/libffi.call/return_uc.c: Likewise.
4922 * testsuite/libffi.call/strlen.c: Likewise.
4923 * testsuite/libffi.call/strlen_win32.c: Likewise.
4924 * testsuite/libffi.call/struct1.c: Likewise.
4925 * testsuite/libffi.call/struct2.c: Likewise.
4926 * testsuite/libffi.call/struct3.c: Likewise.
4927 * testsuite/libffi.call/struct4.c: Likewise.
4928 * testsuite/libffi.call/struct5.c: Likewise.
4929 * testsuite/libffi.call/struct6.c: Likewise.
4930 * testsuite/libffi.call/struct7.c: Likewise.
4931 * testsuite/libffi.call/struct8.c: Likewise.
4932 * testsuite/libffi.call/struct9.c: Likewise.
4933 * testsuite/libffi.special/special.exp: New file.
4934 * testsuite/libffi.special/ffitestcxx.h: Likewise.
4935 * testsuite/libffi.special/unwindtest.cc: Likewise.
4936
4937
49382003-08-13 Kaz Kojima <kkojima@gcc.gnu.org>
4939
4940 * src/sh/ffi.c (OFS_INT16): Set 0 for little endian case. Update
4941 copyright years.
4942
49432003-08-02 Alan Modra <amodra@bigpond.net.au>
4944
4945 * src/powerpc/ffi.c (ffi_prep_args64): Modify for changed gcc
4946 structure passing.
4947 (ffi_closure_helper_LINUX64): Likewise.
4948 * src/powerpc/linux64.S: Remove code writing to parm save area.
4949 * src/powerpc/linux64_closure.S (ffi_closure_LINUX64): Use return
4950 address in lr from ffi_closure_helper_LINUX64 call to calculate
4951 table address. Optimize function tail.
4952
49532003-07-28 Andreas Tobler <a.tobler@schweiz.ch>
4954
4955 * src/sparc/ffi.c: Handle all floating point registers.
4956 * src/sparc/v9.S: Likewise. Fixes second part of PR target/11410.
4957
49582003-07-11 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
4959
4960 * README: Note that libffi is not part of GCC. Update the project
4961 URL and status.
4962
49632003-06-19 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
4964
4965 * src/powerpc/ppc_closure.S: Include ffi.h.
4966
49672003-06-13 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
4968
4969 * src/x86/sysv.S: Avoid gas-only .uleb128/.sleb128 directives.
4970 Use C style comments.
4971
49722003-06-13 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4973
4974 * Makefile.am: Add SHmedia support. Fix a typo of SH support.
4975 * Makefile.in: Regenerate.
4976 * configure.in (sh64-*-linux*, sh5*-*-linux*): Add target.
4977 * configure: Regenerate.
4978 * include/ffi.h.in: Add SHmedia support.
4979 * src/sh64/ffi.c: New file.
4980 * src/sh64/sysv.S: New file.
4981
49822003-05-16 Jakub Jelinek <jakub@redhat.com>
4983
4984 * configure.in (HAVE_RO_EH_FRAME): Check whether .eh_frame section
4985 should be read-only.
4986 * configure: Rebuilt.
4987 * fficonfig.h.in: Rebuilt.
4988 * include/ffi.h.in (EH_FRAME_FLAGS): Define.
4989 * src/alpha/osf.S: Use EH_FRAME_FLAGS.
4990 * src/powerpc/linux64.S: Likewise.
4991 * src/powerpc/linux64_closure.S: Likewise. Include ffi.h.
4992 * src/powerpc/sysv.S: Use EH_FRAME_FLAGS. Use pcrel encoding
4993 if -fpic/-fPIC/-mrelocatable.
4994 * src/powerpc/powerpc_closure.S: Likewise.
4995 * src/sparc/v8.S: If HAVE_RO_EH_FRAME is defined, don't include
4996 #write in .eh_frame flags.
4997 * src/sparc/v9.S: Likewise.
4998 * src/x86/unix64.S: Use EH_FRAME_FLAGS.
4999 * src/x86/sysv.S: Likewise. Use pcrel encoding if -fpic/-fPIC.
5000 * src/s390/sysv.S: Use EH_FRAME_FLAGS. Include ffi.h.
5001
50022003-05-07 Jeff Sturm <jsturm@one-point.com>
5003
5004 Fixes PR bootstrap/10656
5005 * configure.in (HAVE_AS_REGISTER_PSEUDO_OP): Test assembler
5006 support for .register pseudo-op.
5007 * src/sparc/v8.S: Use it.
5008 * fficonfig.h.in: Rebuilt.
5009 * configure: Rebuilt.
5010
50112003-04-18 Jakub Jelinek <jakub@redhat.com>
5012
5013 * include/ffi.h.in (POWERPC64): Define if 64-bit.
5014 (enum ffi_abi): Add FFI_LINUX64 on POWERPC.
5015 Make it the default on POWERPC64.
5016 (FFI_TRAMPOLINE_SIZE): Define to 24 on POWERPC64.
5017 * configure.in: Change powerpc-*-linux* into powerpc*-*-linux*.
5018 * configure: Rebuilt.
5019 * src/powerpc/ffi.c (hidden): Define.
5020 (ffi_prep_args_SYSV): Renamed from
5021 ffi_prep_args. Cast pointers to unsigned long to shut up warnings.
5022 (NUM_GPR_ARG_REGISTERS64, NUM_FPR_ARG_REGISTERS64,
5023 ASM_NEEDS_REGISTERS64): New.
5024 (ffi_prep_args64): New function.
5025 (ffi_prep_cif_machdep): Handle FFI_LINUX64 ABI.
5026 (ffi_call): Likewise.
5027 (ffi_prep_closure): Likewise.
5028 (flush_icache): Surround by #ifndef POWERPC64.
5029 (ffi_dblfl): New union type.
5030 (ffi_closure_helper_SYSV): Use it to avoid aliasing problems.
5031 (ffi_closure_helper_LINUX64): New function.
5032 * src/powerpc/ppc_closure.S: Surround whole file by #ifndef
5033 __powerpc64__.
5034 * src/powerpc/sysv.S: Likewise.
5035 (ffi_call_SYSV): Rename ffi_prep_args to ffi_prep_args_SYSV.
5036 * src/powerpc/linux64.S: New file.
5037 * src/powerpc/linux64_closure.S: New file.
5038 * Makefile.am (EXTRA_DIST): Add src/powerpc/linux64.S and
5039 src/powerpc/linux64_closure.S.
5040 (TARGET_SRC_POWERPC): Likewise.
5041
5042 * src/ffitest.c (closure_test_fn, closure_test_fn1, closure_test_fn2,
5043 closure_test_fn3): Fix result printing on big-endian 64-bit
5044 machines.
5045 (main): Print tst2_arg instead of uninitialized tst2_result.
5046
5047 * src/ffitest.c (main): Hide what closure pointer really points to
5048 from the compiler.
5049
50502003-04-16 Richard Earnshaw <rearnsha@arm.com>
5051
5052 * configure.in (arm-*-netbsdelf*): Add configuration.
5053 (configure): Regenerated.
5054
50552003-04-04 Loren J. Rittle <ljrittle@acm.org>
5056
5057 * include/Makefile.in: Regenerate.
5058
50592003-03-21 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
5060
5061 * libffi/include/ffi.h.in: Define X86 instead of X86_64 in 32
5062 bit mode.
5063 * libffi/src/x86/ffi.c (ffi_closure_SYSV, ffi_closure_raw_SYSV):
5064 Receive closure pointer through parameter, read args using
5065 __builtin_dwarf_cfa.
5066 (FFI_INIT_TRAMPOLINE): Send closure reference through eax.
5067
50682003-03-12 Andreas Schwab <schwab@suse.de>
5069
5070 * configure.in: Avoid trailing /. in toolexeclibdir.
5071 * configure: Rebuilt.
5072
50732003-03-03 Andreas Tobler <a.tobler@schweiz.ch>
5074
5075 * src/powerpc/darwin_closure.S: Recode to fit dynamic libraries.
5076
50772003-02-06 Andreas Tobler <a.tobler@schweiz.ch>
5078
5079 * libffi/src/powerpc/darwin_closure.S:
5080 Fix alignement bug, allocate 8 bytes for the result.
5081 * libffi/src/powerpc/aix_closure.S:
5082 Likewise.
5083 * libffi/src/powerpc/ffi_darwin.c:
5084 Update stackframe description for aix/darwin_closure.S.
5085
50862003-02-06 Jakub Jelinek <jakub@redhat.com>
5087
5088 * src/s390/ffi.c (ffi_closure_helper_SYSV): Add hidden visibility
5089 attribute.
5090
50912003-01-31 Christian Cornelssen <ccorn@cs.tu-berlin.de>,
5092 Andreas Schwab <schwab@suse.de>
5093
5094 * configure.in: Adjust command to source config-ml.in to account
5095 for changes to the libffi_basedir definition.
5096 (libffi_basedir): Remove ${srcdir} from value and include trailing
5097 slash if nonempty.
5098
5099 * configure: Regenerate.
5100
51012003-01-29 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
5102
5103 * src/powerpc/ppc_closure.S: Recode to fit shared libs.
5104
51052003-01-28 Andrew Haley <aph@redhat.com>
5106
5107 * include/ffi.h.in: Enable FFI_CLOSURES for x86_64.
5108 * src/x86/ffi64.c (ffi_prep_closure): New.
5109 (ffi_closure_UNIX64_inner): New.
5110 * src/x86/unix64.S (ffi_closure_UNIX64): New.
5111
51122003-01-27 Alexandre Oliva <aoliva@redhat.com>
5113
5114 * configure.in (toolexecdir, toolexeclibdir): Set and AC_SUBST.
5115 Remove USE_LIBDIR conditional.
5116 * Makefile.am (toolexecdir, toolexeclibdir): Don't override.
5117 * Makefile.in, configure: Rebuilt.
5118
51192003-01027 David Edelsohn <edelsohn@gnu.org>
5120
5121 * Makefile.am (TARGET_SRC_POWERPC_AIX): Fix typo.
5122 * Makefile.in: Regenerate.
5123
51242003-01-22 Andrew Haley <aph@redhat.com>
5125
5126 * src/powerpc/darwin.S (_ffi_call_AIX): Add Augmentation size to
5127 unwind info.
5128
51292003-01-21 Andreas Tobler <a.tobler@schweiz.ch>
5130
5131 * src/powerpc/darwin.S: Add unwind info.
5132 * src/powerpc/darwin_closure.S: Likewise.
5133
51342003-01-14 Andrew Haley <aph@redhat.com>
5135
5136 * src/x86/ffi64.c (ffi_prep_args): Check for void retval.
5137 (ffi_prep_cif_machdep): Likewise.
5138 * src/x86/unix64.S: Add unwind info.
5139
51402003-01-14 Andreas Jaeger <aj@suse.de>
5141
5142 * src/ffitest.c (main): Only use ffi_closures if those are
5143 supported.
5144
51452003-01-13 Andreas Tobler <a.tobler@schweiz.ch>
5146
5147 * libffi/src/ffitest.c
5148 add closure testcases
5149
51502003-01-13 Kevin B. Hendricks <khendricks@ivey.uwo.ca>
5151
5152 * libffi/src/powerpc/ffi.c
5153 fix alignment bug for float (4 byte aligned iso 8 byte)
5154
51552003-01-09 Geoffrey Keating <geoffk@apple.com>
5156
5157 * src/powerpc/ffi_darwin.c: Remove RCS version string.
5158 * src/powerpc/darwin.S: Remove RCS version string.
5159
51602003-01-03 Jeff Sturm <jsturm@one-point.com>
5161
5162 * include/ffi.h.in: Add closure defines for SPARC, SPARC64.
5163 * src/ffitest.c (main): Use static storage for closure.
5164 * src/sparc/ffi.c (ffi_prep_closure, ffi_closure_sparc_inner): New.
5165 * src/sparc/v8.S (ffi_closure_v8): New.
5166 * src/sparc/v9.S (ffi_closure_v9): New.
5167
51682002-11-10 Ranjit Mathew <rmathew@hotmail.com>
5169
5170 * include/ffi.h.in: Added FFI_STDCALL ffi_type
5171 enumeration for X86_WIN32.
5172 * src/x86/win32.S: Added ffi_call_STDCALL function
5173 definition.
5174 * src/x86/ffi.c (ffi_call/ffi_raw_call): Added
5175 switch cases for recognising FFI_STDCALL and
5176 calling ffi_call_STDCALL if target is X86_WIN32.
5177 * src/ffitest.c (my_stdcall_strlen/stdcall_many):
5178 stdcall versions of the "my_strlen" and "many"
5179 test functions (for X86_WIN32).
5180 Added test cases to test stdcall invocation using
5181 these functions.
5182
51832002-12-02 Kaz Kojima <kkojima@gcc.gnu.org>
5184
5185 * src/sh/sysv.S: Add DWARF2 unwind info.
5186
51872002-11-27 Ulrich Weigand <uweigand@de.ibm.com>
5188
5189 * src/s390/sysv.S (.eh_frame section): Make section read-only.
5190
51912002-11-26 Jim Wilson <wilson@redhat.com>
5192
5193 * src/types.c (FFI_TYPE_POINTER): Has size 8 on IA64.
5194
51952002-11-23 H.J. Lu <hjl@gnu.org>
5196
5197 * acinclude.m4: Add dummy AM_PROG_LIBTOOL.
5198 Include ../config/accross.m4.
5199 * aclocal.m4; Rebuild.
5200 * configure: Likewise.
5201
52022002-11-15 Ulrich Weigand <uweigand@de.ibm.com>
5203
5204 * src/s390/sysv.S (.eh_frame section): Adapt to pcrel FDE encoding.
5205
52062002-11-11 DJ Delorie <dj@redhat.com>
5207
5208 * configure.in: Look for common files in the right place.
5209
52102002-10-08 Ulrich Weigand <uweigand@de.ibm.com>
5211
5212 * src/java_raw_api.c (ffi_java_raw_to_ptrarray): Interpret
5213 raw data as _Jv_word values, not ffi_raw.
5214 (ffi_java_ptrarray_to_raw): Likewise.
5215 (ffi_java_rvalue_to_raw): New function.
5216 (ffi_java_raw_call): Call it.
5217 (ffi_java_raw_to_rvalue): New function.
5218 (ffi_java_translate_args): Call it.
5219 * src/ffitest.c (closure_test_fn): Interpret return value
5220 as ffi_arg, not int.
5221 * src/s390/ffi.c (ffi_prep_cif_machdep): Add missing
5222 FFI_TYPE_POINTER case.
5223 (ffi_closure_helper_SYSV): Likewise. Also, assume return
5224 values extended to word size.
5225
52262002-10-02 Andreas Jaeger <aj@suse.de>
5227
5228 * src/x86/ffi64.c (ffi_prep_cif_machdep): Remove debug output.
5229
52302002-10-01 Bo Thorsen <bo@smetana.suse.de>
5231
5232 * include/ffi.h.in: Fix i386 win32 compilation.
5233
52342002-09-30 Ulrich Weigand <uweigand@de.ibm.com>
5235
5236 * configure.in: Add s390x-*-linux-* target.
5237 * configure: Regenerate.
5238 * include/ffi.h.in: Define S390X for s390x targets.
5239 (FFI_CLOSURES): Define for s390/s390x.
5240 (FFI_TRAMPOLINE_SIZE): Likewise.
5241 (FFI_NATIVE_RAW_API): Likewise.
5242 * src/prep_cif.c (ffi_prep_cif): Do not compute stack space for s390.
5243 * src/types.c (FFI_TYPE_POINTER): Use 8-byte pointers on s390x.
5244 * src/s390/ffi.c: Major rework of existing code. Add support for
5245 s390x targets. Add closure support.
5246 * src/s390/sysv.S: Likewise.
5247
52482002-09-29 Richard Earnshaw <rearnsha@arm.com>
5249
5250 * src/arm/sysv.S: Fix typo.
5251
52522002-09-28 Richard Earnshaw <rearnsha@arm.com>
5253
5254 * src/arm/sysv.S: If we don't have machine/asm.h and the pre-processor
5255 has defined __USER_LABEL_PREFIX__, then use it in CNAME.
5256 (ffi_call_SYSV): Handle soft-float.
5257
52582002-09-27 Bo Thorsen <bo@suse.de>
5259
5260 * include/ffi.h.in: Fix multilib x86-64 support.
5261
52622002-09-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5263
5264 * Makefile.am (all-multi): Fix multilib parallel build.
5265
52662002-07-19 Kaz Kojima <kkojima@gcc.gnu.org>
5267
5268 * configure.in (sh[34]*-*-linux*): Add brackets.
5269 * configure: Regenerate.
5270
52712002-07-18 Kaz Kojima <kkojima@gcc.gnu.org>
5272
5273 * Makefile.am: Add SH support.
5274 * Makefile.in: Regenerate.
5275 * configure.in (sh-*-linux*, sh[34]*-*-linux*): Add target.
5276 * configure: Regenerate.
5277 * include/ffi.h.in: Add SH support.
5278 * src/sh/ffi.c: New file.
5279 * src/sh/sysv.S: New file.
5280 * src/types.c: Add SH support.
5281
52822002-07-16 Bo Thorsen <bo@suse.de>
5283
5284 * src/x86/ffi64.c: New file that adds x86-64 support.
5285 * src/x86/unix64.S: New file that handles argument setup for
5286 x86-64.
5287 * src/x86/sysv.S: Don't use this on x86-64.
5288 * src/x86/ffi.c: Don't use this on x86-64.
5289 Remove unused vars.
5290 * src/prep_cif.c (ffi_prep_cif): Don't do stack size calculation
5291 for x86-64.
5292 * src/ffitest.c (struct6): New test that tests a special case in
5293 the x86-64 ABI.
5294 (struct7): Likewise.
5295 (struct8): Likewise.
5296 (struct9): Likewise.
5297 (closure_test_fn): Silence warning about this when it's not used.
5298 (main): Add the new tests.
5299 (main): Fix a couple of wrong casts and silence some compiler warnings.
5300 * include/ffi.h.in: Add x86-64 ABI definition.
5301 * fficonfig.h.in: Regenerate.
5302 * Makefile.am: Add x86-64 support.
5303 * configure.in: Likewise.
5304 * Makefile.in: Regenerate.
5305 * configure: Likewise.
5306
53072002-06-24 Bo Thorsen <bo@suse.de>
5308
5309 * src/types.c: Merge settings for similar architectures.
5310 Add x86-64 sizes and alignments.
5311
53122002-06-23 Bo Thorsen <bo@suse.de>
5313
5314 * src/arm/ffi.c (ffi_prep_args): Remove unused vars.
5315 * src/sparc/ffi.c (ffi_prep_args_v8): Likewise.
5316 * src/mips/ffi.c (ffi_prep_args): Likewise.
5317 * src/m68k/ffi.c (ffi_prep_args): Likewise.
5318
53192002-07-18 H.J. Lu (hjl@gnu.org)
5320
5321 * Makefile.am (TARGET_SRC_MIPS_LINUX): New.
5322 (libffi_la_SOURCES): Support MIPS_LINUX.
5323 (libffi_convenience_la_SOURCES): Likewise.
5324 * Makefile.in: Regenerated.
5325
5326 * configure.in (mips64*-*): Skip.
5327 (mips*-*-linux*): New.
5328 * configure: Regenerated.
5329
5330 * src/mips/ffi.c: Include <sgidefs.h>.
5331
53322002-06-06 Ulrich Weigand <uweigand@de.ibm.com>
5333
5334 * src/s390/sysv.S: Save/restore %r6. Add DWARF-2 unwind info.
5335
53362002-05-27 Roger Sayle <roger@eyesopen.com>
5337
5338 * src/x86/ffi.c (ffi_prep_args): Remove reference to avn.
5339
53402002-05-27 Bo Thorsen <bo@suse.de>
5341
5342 * src/x86/ffi.c (ffi_prep_args): Remove unused variable and
5343 fix formatting.
5344
53452002-05-13 Andreas Tobler <a.tobler@schweiz.ch>
5346
5347 * src/powerpc/ffi_darwin.c (ffi_prep_closure): Declare fd at
5348 beginning of function (for older apple cc).
5349
53502002-05-08 Alexandre Oliva <aoliva@redhat.com>
5351
5352 * configure.in (ORIGINAL_LD_FOR_MULTILIBS): Preserve LD at
5353 script entry, and set LD to it when configuring multilibs.
5354 * configure: Rebuilt.
5355
53562002-05-05 Jason Thorpe <thorpej@wasabisystems.com>
5357
5358 * configure.in (sparc64-*-netbsd*): Add target.
5359 (sparc-*-netbsdelf*): Likewise.
5360 * configure: Regenerate.
5361
53622002-04-28 David S. Miller <davem@redhat.com>
5363
5364 * configure.in, configure: Fix SPARC test in previous change.
5365
53662002-04-29 Gerhard Tonn <GerhardTonn@swol.de>
5367
5368 * Makefile.am: Add Linux for S/390 support.
5369 * Makefile.in: Regenerate.
5370 * configure.in: Add Linux for S/390 support.
5371 * configure: Regenerate.
5372 * include/ffi.h.in: Add Linux for S/390 support.
5373 * src/s390/ffi.c: New file from libffi CVS tree.
5374 * src/s390/sysv.S: New file from libffi CVS tree.
5375
53762002-04-28 Jakub Jelinek <jakub@redhat.com>
5377
5378 * configure.in (HAVE_AS_SPARC_UA_PCREL): Check for working
5379 %r_disp32().
5380 * src/sparc/v8.S: Use it.
5381 * src/sparc/v9.S: Likewise.
5382 * fficonfig.h.in: Rebuilt.
5383 * configure: Rebuilt.
5384
53852002-04-08 Hans Boehm <Hans_Boehm@hp.com>
5386
5387 * src/java_raw_api.c (ffi_java_raw_size): Handle FFI_TYPE_DOUBLE
5388 correctly.
5389 * src/ia64/unix.S: Add unwind information. Fix comments.
5390 Save sp in a way that's compatible with unwind info.
5391 (ffi_call_unix): Correctly restore sp in all cases.
5392 * src/ia64/ffi.c: Add, fix comments.
5393
53942002-04-08 Jakub Jelinek <jakub@redhat.com>
5395
5396 * src/sparc/v8.S: Make .eh_frame dependent on target word size.
5397
53982002-04-06 Jason Thorpe <thorpej@wasabisystems.com>
5399
5400 * configure.in (alpha*-*-netbsd*): Add target.
5401 * configure: Regenerate.
5402
54032002-04-04 Jeff Sturm <jsturm@one-point.com>
5404
5405 * src/sparc/v8.S: Add unwind info.
5406 * src/sparc/v9.S: Likewise.
5407
54082002-03-30 Krister Walfridsson <cato@df.lth.se>
5409
5410 * configure.in: Enable i*86-*-netbsdelf*.
5411 * configure: Rebuilt.
5412
54132002-03-29 David Billinghurst <David.Billinghurst@riotinto.com>
5414
5415 PR other/2620
5416 * src/mips/n32.s: Delete
5417 * src/mips/o32.s: Delete
5418
54192002-03-21 Loren J. Rittle <ljrittle@acm.org>
5420
5421 * configure.in: Enable alpha*-*-freebsd*.
5422 * configure: Rebuilt.
5423
54242002-03-17 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
5425
5426 * Makefile.am: libfficonvenience -> libffi_convenience.
5427 * Makefile.in: Rebuilt.
5428
5429 * Makefile.am: Define ffitest_OBJECTS.
5430 * Makefile.in: Rebuilt.
5431
54322002-03-07 Andreas Tobler <toa@pop.agri.ch>
5433 David Edelsohn <edelsohn@gnu.org>
5434
5435 * Makefile.am (EXTRA_DIST): Add Darwin and AIX closure files.
5436 (TARGET_SRC_POWERPC_AIX): Add aix_closure.S.
5437 (TARGET_SRC_POWERPC_DARWIN): Add darwin_closure.S.
5438 * Makefile.in: Regenerate.
5439 * include/ffi.h.in: Add AIX and Darwin closure definitions.
5440 * src/powerpc/ffi_darwin.c (ffi_prep_closure): New function.
5441 (flush_icache, flush_range): New functions.
5442 (ffi_closure_helper_DARWIN): New function.
5443 * src/powerpc/aix_closure.S: New file.
5444 * src/powerpc/darwin_closure.S: New file.
5445
54462002-02-24 Jeff Sturm <jsturm@one-point.com>
5447
5448 * include/ffi.h.in: Add typedef for ffi_arg.
5449 * src/ffitest.c (main): Declare rint with ffi_arg.
5450
54512002-02-21 Andreas Tobler <toa@pop.agri.ch>
5452
5453 * src/powerpc/ffi_darwin.c (ffi_prep_args): Skip appropriate
5454 number of GPRs for floating-point arguments.
5455
54562002-01-31 Anthony Green <green@redhat.com>
5457
5458 * configure: Rebuilt.
5459 * configure.in: Replace CHECK_SIZEOF and endian tests with
5460 cross-compiler friendly macros.
5461 * aclocal.m4 (AC_COMPILE_CHECK_SIZEOF, AC_C_BIGENDIAN_CROSS): New
5462 macros.
5463
54642002-01-18 David Edelsohn <edelsohn@gnu.org>
5465
5466 * src/powerpc/darwin.S (_ffi_call_AIX): New.
5467 * src/powerpc/aix.S (ffi_call_DARWIN): New.
5468
54692002-01-17 David Edelsohn <edelsohn@gnu.org>
5470
5471 * Makefile.am (EXTRA_DIST): Add Darwin and AIX files.
5472 (TARGET_SRC_POWERPC_AIX): New.
5473 (POWERPC_AIX): New stanza.
5474 * Makefile.in: Regenerate.
5475 * configure.in: Add AIX case.
5476 * configure: Regenerate.
5477 * include/ffi.h.in (ffi_abi): Add FFI_AIX.
5478 * src/powerpc/ffi_darwin.c (ffi_status): Use "long" to scale frame
5479 size. Fix "long double" support.
5480 (ffi_call): Add FFI_AIX case.
5481 * src/powerpc/aix.S: New.
5482
54832001-10-09 John Hornkvist <john@toastedmarshmallow.com>
5484
5485 Implement Darwin PowerPC ABI.
5486 * configure.in: Handle powerpc-*-darwin*.
5487 * Makefile.am: Set source files for POWERPC_DARWIN.
5488 * configure: Rebuilt.
5489 * Makefile.in: Rebuilt.
5490 * include/ffi.h.in: Define FFI_DARWIN and FFI_DEFAULT_ABI for
5491 POWERPC_DARWIN.
5492 * src/powerpc/darwin.S: New file.
5493 * src/powerpc/ffi_darwin.c: New file.
5494
54952001-10-07 Joseph S. Myers <jsm28@cam.ac.uk>
5496
5497 * src/x86/ffi.c: Fix spelling error of "separate" as "seperate".
5498
54992001-07-16 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
5500
5501 * src/x86/sysv.S: Avoid gas-only .balign directive.
5502 Use C style comments.
5503
55042001-07-16 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
5505
5506 * src/alpha/ffi.c (ffi_prep_closure): Avoid gas-only mnemonic.
5507 Fixes PR bootstrap/3563.
5508
55092001-06-26 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
5510
5511 * src/alpha/osf.S (ffi_closure_osf): Use .rdata for ECOFF.
5512
55132001-06-25 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
5514
5515 * configure.in: Recognize sparc*-sun-* host.
5516 * configure: Regenerate.
5517
55182001-06-06 Andrew Haley <aph@redhat.com>
5519
5520 * src/alpha/osf.S (__FRAME_BEGIN__): Conditionalize for ELF.
5521
55222001-06-03 Andrew Haley <aph@redhat.com>
5523
5524 * src/alpha/osf.S: Add unwind info.
5525 * src/powerpc/sysv.S: Add unwind info.
5526 * src/powerpc/ppc_closure.S: Likewise.
5527
55282000-05-31 Jeff Sturm <jsturm@one-point.com>
5529
5530 * configure.in: Fix AC_ARG_ENABLE usage.
5531 * configure: Rebuilt.
5532
55332001-05-06 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
5534
5535 * configure.in: Remove warning about beta code.
5536 * configure: Rebuilt.
5537
55382001-04-25 Hans Boehm <Hans_Boehm@hp.com>
5539
5540 * src/ia64/unix.S: Restore stack pointer when returning from
5541 ffi_closure_UNIX.
5542 * src/ia64/ffi.c: Fix typo in comment.
5543
55442001-04-18 Jim Wilson <wilson@redhat.com>
5545
5546 * src/ia64/unix.S: Delete unnecessary increment and decrement of loc2
5547 to eliminate RAW DV.
5548
55492001-04-12 Bryce McKinlay <bryce@albatross.co.nz>
5550
5551 * Makefile.am: Make a libtool convenience library.
5552 * Makefile.in: Rebuilt.
5553
55542001-03-29 Bryce McKinlay <bryce@albatross.co.nz>
5555
5556 * configure.in: Use different syntax for subdirectory creation.
5557 * configure: Rebuilt.
5558
55592001-03-27 Jon Beniston <jon@beniston.com>
5560
5561 * configure.in: Added X86_WIN32 target (Win32, CygWin, MingW).
5562 * configure: Rebuilt.
5563 * Makefile.am: Added X86_WIN32 target support.
5564 * Makefile.in: Rebuilt.
5565
5566 * include/ffi.h.in: Added X86_WIN32 target support.
5567
5568 * src/ffitest.c: Doesn't run structure tests for X86_WIN32 targets.
5569 * src/types.c: Added X86_WIN32 target support.
5570
5571 * src/x86/win32.S: New file. Based on sysv.S, but with EH
5572 stuff removed and made to work with CygWin's gas.
5573
55742001-03-26 Bryce McKinlay <bryce@albatross.co.nz>
5575
5576 * configure.in: Make target subdirectory in build dir.
5577 * Makefile.am: Override suffix based rules to specify correct output
5578 subdirectory.
5579 * Makefile.in: Rebuilt.
5580 * configure: Rebuilt.
5581
55822001-03-23 Kevin B Hendricks <khendricks@ivey.uwo.ca>
5583
5584 * src/powerpc/ppc_closure.S: New file.
5585 * src/powerpc/ffi.c (ffi_prep_args): Fixed ABI compatibility bug
5586 involving long long and register pairs.
5587 (ffi_prep_closure): New function.
5588 (flush_icache): Likewise.
5589 (ffi_closure_helper_SYSV): Likewise.
5590 * include/ffi.h.in (FFI_CLOSURES): Define on PPC.
5591 (FFI_TRAMPOLINE_SIZE): Likewise.
5592 (FFI_NATIVE_RAW_API): Likewise.
5593 * Makefile.in: Rebuilt.
5594 * Makefile.am (EXTRA_DIST): Added src/powerpc/ppc_closure.S.
5595 (TARGET_SRC_POWERPC): Likewise.
5596
55972001-03-19 Tom Tromey <tromey@redhat.com>
5598
5599 * Makefile.in: Rebuilt.
5600 * Makefile.am (ffitest_LDFLAGS): New macro.
5601
56022001-03-02 Nick Clifton <nickc@redhat.com>
5603
5604 * include/ffi.h.in: Remove RCS ident string.
5605 * include/ffi_mips.h: Remove RCS ident string.
5606 * src/debug.c: Remove RCS ident string.
5607 * src/ffitest.c: Remove RCS ident string.
5608 * src/prep_cif.c: Remove RCS ident string.
5609 * src/types.c: Remove RCS ident string.
5610 * src/alpha/ffi.c: Remove RCS ident string.
5611 * src/alpha/osf.S: Remove RCS ident string.
5612 * src/arm/ffi.c: Remove RCS ident string.
5613 * src/arm/sysv.S: Remove RCS ident string.
5614 * src/mips/ffi.c: Remove RCS ident string.
5615 * src/mips/n32.S: Remove RCS ident string.
5616 * src/mips/o32.S: Remove RCS ident string.
5617 * src/sparc/ffi.c: Remove RCS ident string.
5618 * src/sparc/v8.S: Remove RCS ident string.
5619 * src/sparc/v9.S: Remove RCS ident string.
5620 * src/x86/ffi.c: Remove RCS ident string.
5621 * src/x86/sysv.S: Remove RCS ident string.
5622
56232001-02-08 Joseph S. Myers <jsm28@cam.ac.uk>
5624
5625 * include/ffi.h.in: Change sourceware.cygnus.com references to
5626 gcc.gnu.org.
5627
56282000-12-09 Richard Henderson <rth@redhat.com>
5629
5630 * src/alpha/ffi.c (ffi_call): Simplify struct return test.
5631 (ffi_closure_osf_inner): Index rather than increment avalue
5632 and arg_types. Give ffi_closure_osf the raw return value type.
5633 * src/alpha/osf.S (ffi_closure_osf): Handle return value type
5634 promotion.
5635
56362000-12-07 Richard Henderson <rth@redhat.com>
5637
5638 * src/raw_api.c (ffi_translate_args): Fix typo.
5639 (ffi_prep_closure): Likewise.
5640
5641 * include/ffi.h.in [ALPHA]: Define FFI_CLOSURES and
5642 FFI_TRAMPOLINE_SIZE.
5643 * src/alpha/ffi.c (ffi_prep_cif_machdep): Adjust minimal
5644 cif->bytes for new ffi_call_osf implementation.
5645 (ffi_prep_args): Absorb into ...
5646 (ffi_call): ... here. Do all stack allocation here and
5647 avoid a callback function.
5648 (ffi_prep_closure, ffi_closure_osf_inner): New.
5649 * src/alpha/osf.S (ffi_call_osf): Reimplement with no callback.
5650 (ffi_closure_osf): New.
5651
56522000-09-10 Alexandre Oliva <aoliva@redhat.com>
5653
5654 * config.guess, config.sub, install-sh: Removed.
5655 * ltconfig, ltmain.sh, missing, mkinstalldirs: Likewise.
5656 * Makefile.in: Rebuilt.
5657
5658 * acinclude.m4: Include libtool macros from the top level.
5659 * aclocal.m4, configure: Rebuilt.
5660
56612000-08-22 Alexandre Oliva <aoliva@redhat.com>
5662
5663 * configure.in [i*86-*-freebsd*] (TARGET, TARGETDIR): Set.
5664 * configure: Rebuilt.
5665
56662000-05-11 Scott Bambrough <scottb@netwinder.org>
5667
5668 * libffi/src/arm/sysv.S (ffi_call_SYSV): Doubles are not saved to
5669 memory correctly. Use conditional instructions, not branches where
5670 possible.
5671
56722000-05-04 Tom Tromey <tromey@cygnus.com>
5673
5674 * configure: Rebuilt.
5675 * configure.in: Match `arm*-*-linux-*'.
5676 From Chris Dornan <cdornan@arm.com>.
5677
56782000-04-28 Jakub Jelinek <jakub@redhat.com>
5679
5680 * Makefile.am (SUBDIRS): Define.
5681 (AM_MAKEFLAGS): Likewise.
5682 (Multilib support.): Add section.
5683 * Makefile.in: Rebuilt.
5684 * ltconfig (extra_compiler_flags, extra_compiler_flags_value):
5685 New variables. Set for gcc using -print-multi-lib. Export them
5686 to libtool.
5687 (sparc64-*-linux-gnu*): Use libsuff 64 for search paths.
5688 * ltmain.sh (B|b|V): Don't throw away gcc's -B, -b and -V options
5689 for -shared links.
5690 (extra_compiler_flags_value, extra_compiler_flags): Check these
5691 for extra compiler options which need to be passed down in
5692 compiler_flags.
5693
56942000-04-16 Anthony Green <green@redhat.com>
5695
5696 * configure: Rebuilt.
5697 * configure.in: Change i*86-pc-linux* to i*86-*-linux*.
5698
56992000-04-14 Jakub Jelinek <jakub@redhat.com>
5700
5701 * include/ffi.h.in (SPARC64): Define for 64bit SPARC builds.
5702 Set SPARC FFI_DEFAULT_ABI based on SPARC64 define.
5703 * src/sparc/ffi.c (ffi_prep_args_v8): Renamed from ffi_prep_args.
5704 Replace all void * sizeofs with sizeof(int).
5705 Only compare type with FFI_TYPE_LONGDOUBLE if LONGDOUBLE is
5706 different than DOUBLE.
5707 Remove FFI_TYPE_SINT32 and FFI_TYPE_UINT32 cases (handled elsewhere).
5708 (ffi_prep_args_v9): New function.
5709 (ffi_prep_cif_machdep): Handle V9 ABI and long long on V8.
5710 (ffi_V9_return_struct): New function.
5711 (ffi_call): Handle FFI_V9 ABI from 64bit code and FFI_V8 ABI from
5712 32bit code (not yet cross-arch calls).
5713 * src/sparc/v8.S: Add struct return delay nop.
5714 Handle long long.
5715 * src/sparc/v9.S: New file.
5716 * src/prep_cif.c (ffi_prep_cif): Return structure pointer
5717 is used on sparc64 only for structures larger than 32 bytes.
5718 Pass by reference for structures is done for structure arguments
5719 larger than 16 bytes.
5720 * src/ffitest.c (main): Use 64bit rint on sparc64.
5721 Run long long tests on sparc.
5722 * src/types.c (FFI_TYPE_POINTER): Pointer is 64bit on alpha and
5723 sparc64.
5724 (FFI_TYPE_LONGDOUBLE): long double is 128 bit aligned to 128 bits
5725 on sparc64.
5726 * configure.in (sparc-*-linux*): New supported target.
5727 (sparc64-*-linux*): Likewise.
5728 * configure: Rebuilt.
5729 * Makefile.am: Add v9.S to SPARC files.
5730 * Makefile.in: Likewise.
5731 (LINK): Surround $(CCLD) into double quotes, so that multilib
5732 compiles work correctly.
5733
57342000-04-04 Alexandre Petit-Bianco <apbianco@cygnus.com>
5735
5736 * configure: Rebuilt.
5737 * configure.in: (i*86-*-solaris*): New libffi target. Patch
5738 proposed by Bryce McKinlay.
5739
57402000-03-20 Tom Tromey <tromey@cygnus.com>
5741
5742 * Makefile.in: Hand edit for java_raw_api.lo.
5743
57442000-03-08 Bryce McKinlay <bryce@albatross.co.nz>
5745
5746 * config.guess, config.sub: Update from the gcc tree.
5747 Fix for PR libgcj/168.
5748
57492000-03-03 Tom Tromey <tromey@cygnus.com>
5750
5751 * Makefile.in: Fixed ia64 by hand.
5752
5753 * configure: Rebuilt.
5754 * configure.in (--enable-multilib): New option.
5755 (libffi_basedir): New subst.
5756 (AC_OUTPUT): Added multilib code.
5757
57582000-03-02 Tom Tromey <tromey@cygnus.com>
5759
5760 * Makefile.in: Rebuilt.
5761 * Makefile.am (TARGET_SRC_IA64): Use `ia64', not `alpha', as
5762 directory name.
5763
57642000-02-25 Hans Boehm <boehm@acm.org>
5765
5766 * src/ia64/ffi.c, src/ia64/ia64_flags.h, src/ia64/unix.S: New
5767 files.
5768 * src/raw_api.c (ffi_translate_args): Fixed typo in argument
5769 list.
5770 (ffi_prep_raw_closure): Use ffi_translate_args, not
5771 ffi_closure_translate.
5772 * src/java_raw_api.c: New file.
5773 * src/ffitest.c (closure_test_fn): New function.
5774 (main): Define `rint' as long long on IA64. Added new test when
5775 FFI_CLOSURES is defined.
5776 * include/ffi.h.in (ALIGN): Use size_t, not unsigned.
5777 (ffi_abi): Recognize IA64.
5778 (ffi_raw): Added `flt' field.
5779 Added "Java raw API" code.
5780 * configure.in: Recognize ia64.
5781 * Makefile.am (TARGET_SRC_IA64): New macro.
5782 (libffi_la_common_SOURCES): Added java_raw_api.c.
5783 (libffi_la_SOURCES): Define in IA64 case.
5784
57852000-01-04 Tom Tromey <tromey@cygnus.com>
5786
5787 * Makefile.in: Rebuilt with newer automake.
5788
57891999-12-31 Tom Tromey <tromey@cygnus.com>
5790
5791 * Makefile.am (INCLUDES): Added -I$(top_srcdir)/src.
5792
57931999-09-01 Tom Tromey <tromey@cygnus.com>
5794
5795 * include/ffi.h.in: Removed PACKAGE and VERSION defines and
5796 undefs.
5797 * fficonfig.h.in: Rebuilt.
5798 * configure: Rebuilt.
5799 * configure.in: Pass 3rd argument to AM_INIT_AUTOMAKE.
5800 Use AM_PROG_LIBTOOL (automake 1.4 compatibility).
5801 * acconfig.h: Don't #undef PACKAGE or VERSION.
5802
58031999-08-09 Anthony Green <green@cygnus.com>
5804
5805 * include/ffi.h.in: Try to work around messy header problem
5806 with PACKAGE and VERSION.
5807
5808 * configure: Rebuilt.
5809 * configure.in: Change version to 2.00-beta.
5810
5811 * fficonfig.h.in: Rebuilt.
5812 * acconfig.h (FFI_NO_STRUCTS, FFI_NO_RAW_API): Define.
5813
5814 * src/x86/ffi.c (ffi_raw_call): Rename.
5815
58161999-08-02 Kresten Krab Thorup <krab@dominiq.is.s.u-tokyo.ac.jp>
5817
5818 * src/x86/ffi.c (ffi_closure_SYSV): New function.
5819 (ffi_prep_incoming_args_SYSV): Ditto.
5820 (ffi_prep_closure): Ditto.
5821 (ffi_closure_raw_SYSV): Ditto.
5822 (ffi_prep_raw_closure): More ditto.
5823 (ffi_call_raw): Final ditto.
5824
5825 * include/ffi.h.in: Add definitions for closure and raw API.
5826
5827 * src/x86/ffi.c (ffi_prep_cif_machdep): Added case for
5828 FFI_TYPE_UINT64.
5829
5830 * Makefile.am (libffi_la_common_SOURCES): Added raw_api.c
5831
5832 * src/raw_api.c: New file.
5833
5834 * include/ffi.h.in (ffi_raw): New type.
5835 (UINT_ARG, SINT_ARG): New defines.
5836 (ffi_closure, ffi_raw_closure): New types.
5837 (ffi_prep_closure, ffi_prep_raw_closure): New declarations.
5838
5839 * configure.in: Add check for endianness and sizeof void*.
5840
5841 * src/x86/sysv.S (ffi_call_SYSV): Call fixup routine via argument,
5842 instead of directly.
5843
5844 * configure: Rebuilt.
5845
5846Thu Jul 8 14:28:42 1999 Anthony Green <green@cygnus.com>
5847
5848 * configure.in: Add x86 and powerpc BeOS configurations.
5849 From Makoto Kato <m_kato@ga2.so-net.ne.jp>.
5850
58511999-05-09 Anthony Green <green@cygnus.com>
5852
5853 * configure.in: Add warning about this being beta code.
5854 Remove src/Makefile.am from the picture.
5855 * configure: Rebuilt.
5856
5857 * Makefile.am: Move logic from src/Makefile.am. Add changes
5858 to support libffi as a target library.
5859 * Makefile.in: Rebuilt.
5860
5861 * aclocal.m4, config.guess, config.sub, ltconfig, ltmain.sh:
5862 Upgraded to new autoconf, automake, libtool.
5863
5864 * README: Tweaks.
5865
5866 * LICENSE: Update copyright date.
5867
5868 * src/Makefile.am, src/Makefile.in: Removed.
5869
58701998-11-29 Anthony Green <green@cygnus.com>
5871
5872 * include/ChangeLog: Removed.
5873 * src/ChangeLog: Removed.
5874 * src/mips/ChangeLog: Removed.
5875 * src/sparc/ChangeLog: Remboved.
5876 * src/x86/ChangeLog: Removed.
5877
5878 * ChangeLog.v1: Created.