OSDN Git Service

2007-12-06 David Daney <ddaney@avtrex.com>
[pf3gnuchains/gcc-fork.git] / libffi / ChangeLog
1 2007-12-06  David Daney  <ddaney@avtrex.com>
2
3         * src/mips/n32.S (ffi_closure_N32): Use 64-bit add instruction on 
4         pointer values.
5
6 2007-12-01  Andreas Tobler  <a.tobler@schweiz.org>
7
8         PR libffi/31937
9         * src/powerpc/ffitarget.h: Introduce new ABI FFI_LINUX_SOFT_FLOAT.
10         Add local FFI_TYPE_UINT128 to handle soft-float long-double-128.
11         * src/powerpc/ffi.c: Distinguish between __NO_FPRS__ and not and
12         set the NUM_FPR_ARG_REGISTERS according to.
13         Add support for potential soft-float support under hard-float
14         architecture.
15         (ffi_prep_args_SYSV): Set NUM_FPR_ARG_REGISTERS to 0 in case of
16         FFI_LINUX_SOFT_FLOAT, handle float, doubles and long-doubles according
17         to the FFI_LINUX_SOFT_FLOAT ABI.
18         (ffi_prep_cif_machdep): Likewise.
19         (ffi_closure_helper_SYSV): Likewise.
20         * src/powerpc/ppc_closure.S: Make sure not to store float/double
21         on archs where __NO_FPRS__ is true.
22         Add FFI_TYPE_UINT128 support.
23         * src/powerpc/sysv.S: Add support for soft-float long-double-128.
24         Adjust copyright notice.
25
26 2007-11-25  Andreas Tobler  <a.tobler@schweiz.org>
27
28         * src/closures.c: Move defintion of MAYBE_UNUSED from here to ...
29         * include/ffi_common.h: ... here.
30         Update copyright.
31
32 2007-11-17  Andreas Tobler  <a.tobler@schweiz.org>
33
34         * src/powerpc/sysv.S: Load correct cr to compare if we have long double.
35         * src/powerpc/linux64.S: Likewise.
36         * src/powerpc/ffi.c: Add a comment to show which part goes into cr6.
37         * testsuite/libffi.call/return_ldl.c: New test.
38
39 2007-09-04    <aph@redhat.com>
40
41         * src/arm/sysv.S (UNWIND): New.
42         (Whole file): Conditionally compile unwinder directives.
43         * src/arm/sysv.S: Add unwinder directives.
44
45         * src/arm/ffi.c (ffi_prep_args): Align structs by at least 4 bytes.
46         Only treat r0 as a struct address if we're actually returning a
47         struct by address.
48         Only copy the bytes that are actually within a struct.
49         (ffi_prep_cif_machdep): A Composite Type not larger than 4 bytes
50         is returned in r0, not passed by address.
51         (ffi_call): Allocate a word-sized temporary for the case where
52         a composite is returned in r0.
53         (ffi_prep_incoming_args_SYSV): Align as necessary.
54
55 2007-08-05  Steven Newbury  <s_j_newbury@yahoo.co.uk>
56
57         * src/arm/ffi.c (FFI_INIT_TRAMPOLINE): Use __clear_cache instead of 
58         directly using the sys_cacheflush syscall.
59
60 2007-07-27  Andrew Haley  <aph@redhat.com>
61
62         * src/arm/sysv.S (ffi_closure_SYSV): Add soft-float.
63
64 2007-09-03  Maciej W. Rozycki  <macro@linux-mips.org>
65
66         * Makefile.am: Unify MIPS_IRIX and MIPS_LINUX into MIPS.
67         * configure.ac: Likewise.
68         * Makefile.in: Regenerate.
69         * include/Makefile.in: Likewise.
70         * testsuite/Makefile.in: Likewise.
71         * configure: Likewise.
72
73 2007-08-24  David Daney  <ddaney@avtrex.com>
74
75         * testsuite/libffi.call/return_sl.c: New test.
76
77 2007-08-10  David Daney  <ddaney@avtrex.com>
78
79         * testsuite/libffi.call/cls_multi_ushort.c,
80         testsuite/libffi.call/cls_align_uint16.c,
81         testsuite/libffi.call/nested_struct1.c,
82         testsuite/libffi.call/nested_struct3.c,
83         testsuite/libffi.call/cls_7_1_byte.c,
84         testsuite/libffi.call/nested_struct5.c,
85         testsuite/libffi.call/cls_double.c,
86         testsuite/libffi.call/nested_struct7.c,
87         testsuite/libffi.call/cls_sint.c,
88         testsuite/libffi.call/nested_struct9.c,
89         testsuite/libffi.call/cls_20byte1.c,
90         testsuite/libffi.call/cls_multi_sshortchar.c,
91         testsuite/libffi.call/cls_align_sint64.c,
92         testsuite/libffi.call/cls_3byte2.c,
93         testsuite/libffi.call/cls_multi_schar.c,
94         testsuite/libffi.call/cls_multi_uchar.c,
95         testsuite/libffi.call/cls_19byte.c,
96         testsuite/libffi.call/cls_9byte1.c,
97         testsuite/libffi.call/cls_align_float.c,
98         testsuite/libffi.call/closure_fn1.c,
99         testsuite/libffi.call/problem1.c,
100         testsuite/libffi.call/closure_fn3.c,
101         testsuite/libffi.call/cls_sshort.c,
102         testsuite/libffi.call/closure_fn5.c,
103         testsuite/libffi.call/cls_align_double.c,
104         testsuite/libffi.call/nested_struct.c,
105         testsuite/libffi.call/cls_2byte.c,
106         testsuite/libffi.call/nested_struct10.c,
107         testsuite/libffi.call/cls_4byte.c,
108         testsuite/libffi.call/cls_6byte.c,
109         testsuite/libffi.call/cls_8byte.c,
110         testsuite/libffi.call/cls_multi_sshort.c,
111         testsuite/libffi.call/cls_align_sint16.c,
112         testsuite/libffi.call/cls_align_uint32.c,
113         testsuite/libffi.call/cls_20byte.c,
114         testsuite/libffi.call/cls_float.c,
115         testsuite/libffi.call/nested_struct2.c,
116         testsuite/libffi.call/cls_5_1_byte.c,
117         testsuite/libffi.call/nested_struct4.c,
118         testsuite/libffi.call/cls_24byte.c,
119         testsuite/libffi.call/nested_struct6.c,
120         testsuite/libffi.call/cls_64byte.c,
121         testsuite/libffi.call/nested_struct8.c,
122         testsuite/libffi.call/cls_uint.c,
123         testsuite/libffi.call/cls_multi_ushortchar.c,
124         testsuite/libffi.call/cls_schar.c,
125         testsuite/libffi.call/cls_uchar.c,
126         testsuite/libffi.call/cls_align_uint64.c,
127         testsuite/libffi.call/cls_ulonglong.c,
128         testsuite/libffi.call/cls_align_longdouble.c,
129         testsuite/libffi.call/cls_1_1byte.c,
130         testsuite/libffi.call/cls_12byte.c,
131         testsuite/libffi.call/cls_3_1byte.c,
132         testsuite/libffi.call/cls_3byte1.c,
133         testsuite/libffi.call/cls_4_1byte.c,
134         testsuite/libffi.call/cls_6_1_byte.c,
135         testsuite/libffi.call/cls_16byte.c,
136         testsuite/libffi.call/cls_18byte.c,
137         testsuite/libffi.call/closure_fn0.c,
138         testsuite/libffi.call/cls_9byte2.c,
139         testsuite/libffi.call/closure_fn2.c,
140         testsuite/libffi.call/closure_fn4.c,
141         testsuite/libffi.call/cls_ushort.c,
142         testsuite/libffi.call/closure_fn6.c,
143         testsuite/libffi.call/cls_5byte.c,
144         testsuite/libffi.call/cls_align_pointer.c,
145         testsuite/libffi.call/cls_7byte.c,
146         testsuite/libffi.call/cls_align_sint32.c,
147         testsuite/libffi.special/unwindtest_ffi_call.cc,
148         testsuite/libffi.special/unwindtest.cc: Remove xfail for mips64*-*-*.
149
150 2007-08-10  David Daney  <ddaney@avtrex.com>
151
152         PR libffi/28313
153         * configure.ac: Don't treat mips64 as a special case.
154         * Makefile.am (nodist_libffi_la_SOURCES): Add n32.S.
155         * configure: Regenerate
156         * Makefile.in: Ditto.
157         * fficonfig.h.in: Ditto.
158         * src/mips/ffitarget.h (REG_L, REG_S, SUBU, ADDU, SRL, LI): Indent.
159         (LA, EH_FRAME_ALIGN, FDE_ADDR_BYTES): New preprocessor macros.
160         (FFI_DEFAULT_ABI): Set for n64 case.
161         (FFI_CLOSURES, FFI_TRAMPOLINE_SIZE): Define for n32 and n64 cases.
162         * src/mips/n32.S (ffi_call_N32): Add debug macros and labels for FDE.
163         (ffi_closure_N32): New function.
164         (.eh_frame): New section
165         * src/mips/o32.S: Clean up comments.
166         (ffi_closure_O32): Pass ffi_closure parameter in $12.
167         * src/mips/ffi.c: Use FFI_MIPS_N32 instead of
168         _MIPS_SIM == _ABIN32 throughout.
169         (FFI_MIPS_STOP_HERE): New, use in place of
170         ffi_stop_here.
171         (ffi_prep_args): Use unsigned long to hold pointer values.  Rewrite
172         to support n32/n64 ABIs.
173         (calc_n32_struct_flags): Rewrite.
174         (calc_n32_return_struct_flags): Remove unused variable.  Reverse
175         position of flag bits.
176         (ffi_prep_cif_machdep): Rewrite n32 portion.
177         (ffi_call): Enable for n64.  Add special handling for small structure
178         return values.
179         (ffi_prep_closure_loc): Add n32 and n64 support.
180         (ffi_closure_mips_inner_O32): Add cast to silence warning.
181         (copy_struct_N32, ffi_closure_mips_inner_N32): New functions.
182
183 2007-08-08  David Daney  <ddaney@avtrex.com>
184
185         * testsuite/libffi.call/ffitest.h (ffi_type_mylong): Remove definition.
186         * testsuite/libffi.call/cls_align_uint16.c (main): Use correct type
187         specifiers.
188         * testsuite/libffi.call/nested_struct1.c (main): Ditto.
189         * testsuite/libffi.call/cls_sint.c (main): Ditto.
190         * testsuite/libffi.call/nested_struct9.c (main): Ditto.
191         * testsuite/libffi.call/cls_20byte1.c (main): Ditto.
192         * testsuite/libffi.call/cls_9byte1.c (main): Ditto.
193         * testsuite/libffi.call/closure_fn1.c (main): Ditto.
194         * testsuite/libffi.call/closure_fn3.c (main): Ditto.
195         * testsuite/libffi.call/return_dbl2.c (main): Ditto.
196         * testsuite/libffi.call/cls_sshort.c (main): Ditto.
197         * testsuite/libffi.call/return_fl3.c (main): Ditto.
198         * testsuite/libffi.call/closure_fn5.c (main): Ditto.
199         * testsuite/libffi.call/nested_struct.c (main): Ditto.
200         * testsuite/libffi.call/nested_struct10.c (main): Ditto.
201         * testsuite/libffi.call/return_ll1.c (main): Ditto.
202         * testsuite/libffi.call/cls_8byte.c (main): Ditto.
203         * testsuite/libffi.call/cls_align_uint32.c (main): Ditto.
204         * testsuite/libffi.call/cls_align_sint16.c (main): Ditto.
205         * testsuite/libffi.call/cls_20byte.c (main): Ditto.
206         * testsuite/libffi.call/nested_struct2.c (main): Ditto.
207         * testsuite/libffi.call/cls_24byte.c (main): Ditto.
208         * testsuite/libffi.call/nested_struct6.c (main): Ditto.
209         * testsuite/libffi.call/cls_uint.c (main): Ditto.
210         * testsuite/libffi.call/cls_12byte.c (main): Ditto.
211         * testsuite/libffi.call/cls_16byte.c (main): Ditto.
212         * testsuite/libffi.call/closure_fn0.c (main): Ditto.
213         * testsuite/libffi.call/cls_9byte2.c (main): Ditto.
214         * testsuite/libffi.call/closure_fn2.c (main): Ditto.
215         * testsuite/libffi.call/return_dbl1.c (main): Ditto.
216         * testsuite/libffi.call/closure_fn4.c (main): Ditto.
217         * testsuite/libffi.call/closure_fn6.c (main): Ditto.
218         * testsuite/libffi.call/cls_align_sint32.c (main): Ditto.
219
220 2007-08-07  Andrew Haley  <aph@redhat.com>
221
222         * src/x86/sysv.S (ffi_closure_raw_SYSV): Fix typo in previous
223         checkin.
224
225 2007-08-06  Andrew Haley  <aph@redhat.com>
226
227         PR testsuite/32843
228         * src/x86/sysv.S (ffi_closure_raw_SYSV): Handle FFI_TYPE_UINT8,
229         FFI_TYPE_SINT8, FFI_TYPE_UINT16, FFI_TYPE_SINT16, FFI_TYPE_UINT32,
230         FFI_TYPE_SINT32.
231
232 2007-08-02  David Daney  <ddaney@avtrex.com>
233
234         * testsuite/libffi.call/return_ul.c (main): Define return type as
235         ffi_arg.  Use proper printf conversion specifier.
236         
237 2007-07-30  Andrew Haley  <aph@redhat.com>
238
239         PR testsuite/32843
240         * src/x86/ffi.c (ffi_prep_cif_machdep): in x86 case, add code for
241         signed/unsigned int8/16.
242         * src/x86/sysv.S (ffi_call_SYSV): Rewrite to:
243         Use a jump table.
244         Remove code to pop args from the stack after call.
245         Special-case signed/unsigned int8/16.
246         * testsuite/libffi.call/return_sc.c (main): Revert.
247
248 2007-07-26  Richard Guenther  <rguenther@suse.de>
249
250         PR testsuite/32843
251         * testsuite/libffi.call/return_sc.c (main): Verify call
252         result as signed char, not ffi_arg.
253
254 2007-07-16  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
255
256         * configure.ac (i?86-*-solaris2.1[0-9]): Set TARGET to X86_64.
257         * configure: Regenerate.
258
259 2007-07-11  David Daney  <ddaney@avtrex.com>
260
261         * src/mips/ffi.c: Don't include sys/cachectl.h.
262         (ffi_prep_closure_loc): Use __builtin___clear_cache() instead of
263         cacheflush().
264
265 2007-05-18  Aurelien Jarno  <aurelien@aurel32.net>
266
267         * src/arm/ffi.c (ffi_prep_closure_loc): Renamed and ajusted
268         from (ffi_prep_closure): ... this.
269         (FFI_INIT_TRAMPOLINE): Adjust.
270
271 2005-12-31  Phil Blundell  <pb@reciva.com>
272
273         * src/arm/ffi.c (ffi_prep_incoming_args_SYSV, 
274         ffi_closure_SYSV_inner, ffi_prep_closure): New, add closure support.
275         * src/arm/sysv.S(ffi_closure_SYSV): Likewise.
276         * src/arm/ffitarget.h (FFI_TRAMPOLINE_SIZE): Likewise.
277         (FFI_CLOSURES): Enable closure support.
278
279 2007-07-03  Andrew Haley  <aph@hedges.billgatliff.com>
280
281         * testsuite/libffi.call/cls_multi_ushort.c,
282         testsuite/libffi.call/cls_align_uint16.c,
283         testsuite/libffi.call/nested_struct1.c,
284         testsuite/libffi.call/nested_struct3.c,
285         testsuite/libffi.call/cls_7_1_byte.c,
286         testsuite/libffi.call/cls_double.c,
287         testsuite/libffi.call/nested_struct5.c,
288         testsuite/libffi.call/nested_struct7.c,
289         testsuite/libffi.call/cls_sint.c,
290         testsuite/libffi.call/nested_struct9.c,
291         testsuite/libffi.call/cls_20byte1.c,
292         testsuite/libffi.call/cls_multi_sshortchar.c,
293         testsuite/libffi.call/cls_align_sint64.c,
294         testsuite/libffi.call/cls_3byte2.c,
295         testsuite/libffi.call/cls_multi_schar.c,
296         testsuite/libffi.call/cls_multi_uchar.c,
297         testsuite/libffi.call/cls_19byte.c,
298         testsuite/libffi.call/cls_9byte1.c,
299         testsuite/libffi.call/cls_align_float.c,
300         testsuite/libffi.call/closure_fn1.c,
301         testsuite/libffi.call/problem1.c,
302         testsuite/libffi.call/closure_fn3.c,
303         testsuite/libffi.call/cls_sshort.c,
304         testsuite/libffi.call/closure_fn5.c,
305         testsuite/libffi.call/cls_align_double.c,
306         testsuite/libffi.call/cls_2byte.c,
307         testsuite/libffi.call/nested_struct.c,
308         testsuite/libffi.call/nested_struct10.c,
309         testsuite/libffi.call/cls_4byte.c,
310         testsuite/libffi.call/cls_6byte.c,
311         testsuite/libffi.call/cls_8byte.c,
312         testsuite/libffi.call/cls_multi_sshort.c,
313         testsuite/libffi.call/cls_align_uint32.c,
314         testsuite/libffi.call/cls_align_sint16.c,
315         testsuite/libffi.call/cls_float.c,
316         testsuite/libffi.call/cls_20byte.c,
317         testsuite/libffi.call/cls_5_1_byte.c,
318         testsuite/libffi.call/nested_struct2.c,
319         testsuite/libffi.call/cls_24byte.c,
320         testsuite/libffi.call/nested_struct4.c,
321         testsuite/libffi.call/nested_struct6.c,
322         testsuite/libffi.call/cls_64byte.c,
323         testsuite/libffi.call/nested_struct8.c,
324         testsuite/libffi.call/cls_uint.c,
325         testsuite/libffi.call/cls_multi_ushortchar.c,
326         testsuite/libffi.call/cls_schar.c,
327         testsuite/libffi.call/cls_uchar.c,
328         testsuite/libffi.call/cls_align_uint64.c,
329         testsuite/libffi.call/cls_ulonglong.c,
330         testsuite/libffi.call/cls_align_longdouble.c,
331         testsuite/libffi.call/cls_1_1byte.c,
332         testsuite/libffi.call/cls_12byte.c,
333         testsuite/libffi.call/cls_3_1byte.c,
334         testsuite/libffi.call/cls_3byte1.c,
335         testsuite/libffi.call/cls_4_1byte.c,
336         testsuite/libffi.call/cls_6_1_byte.c,
337         testsuite/libffi.call/cls_16byte.c,
338         testsuite/libffi.call/cls_18byte.c,
339         testsuite/libffi.call/closure_fn0.c,
340         testsuite/libffi.call/cls_9byte2.c,
341         testsuite/libffi.call/closure_fn2.c,
342         testsuite/libffi.call/closure_fn4.c,
343         testsuite/libffi.call/cls_ushort.c,
344         testsuite/libffi.call/closure_fn6.c,
345         testsuite/libffi.call/cls_5byte.c,
346         testsuite/libffi.call/cls_align_pointer.c,
347         testsuite/libffi.call/cls_7byte.c,
348         testsuite/libffi.call/cls_align_sint32.c,
349         testsuite/libffi.special/unwindtest_ffi_call.cc,
350         testsuite/libffi.special/unwindtest.cc: Enable for ARM.
351
352 2007-07-05  H.J. Lu  <hongjiu.lu@intel.com>
353
354         * aclocal.m4: Regenerated.
355
356 2007-06-02  Paolo Bonzini  <bonzini@gnu.org>
357
358         * configure: Regenerate.
359
360 2007-05-23  Steve Ellcey  <sje@cup.hp.com>
361
362         * Makefile.in: Regenerate.
363         * configure: Regenerate.
364         * aclocal.m4: Regenerate.
365         * include/Makefile.in: Regenerate.
366         * testsuite/Makefile.in: Regenerate.
367
368 2007-05-10  Roman Zippel <zippel@linux-m68k.org>
369
370         * src/m68k/ffi.c (ffi_prep_incoming_args_SYSV,
371         ffi_closure_SYSV_inner,ffi_prep_closure): New, add closure support.
372         * src/m68k/sysv.S(ffi_closure_SYSV,ffi_closure_struct_SYSV): Likewise.
373         * src/m68k/ffitarget.h (FFI_TRAMPOLINE_SIZE): Likewise.
374         (FFI_CLOSURES): Enable closure support.
375
376 2007-05-10  Roman Zippel <zippel@linux-m68k.org>
377
378         * configure.ac (HAVE_AS_CFI_PSEUDO_OP): New test.
379         * configure: Regenerate.
380         * fficonfig.h.in: Regenerate.
381         * src/m68k/sysv.S (CFI_STARTPROC,CFI_ENDPROC,
382         CFI_OFFSET,CFI_DEF_CFA): New macros.
383         (ffi_call_SYSV): Add callframe annotation.
384
385 2007-05-10  Roman Zippel <zippel@linux-m68k.org>
386
387         * src/m68k/ffi.c (ffi_prep_args,ffi_prep_cif_machdep): Fix
388         numerous test suite failures.
389         * src/m68k/sysv.S (ffi_call_SYSV): Likewise.
390
391 2007-04-11  Paolo Bonzini  <bonzini@gnu.org>
392
393         * Makefile.am (EXTRA_DIST): Bring up to date.
394         * Makefile.in: Regenerate.
395         * src/frv/eabi.S: Remove RCS keyword.
396
397 2007-04-06  Richard Henderson  <rth@redhat.com>
398
399         * configure.ac: Tidy target case.
400         (HAVE_LONG_DOUBLE): Allow the target to override.
401         * configure: Regenerate.
402         * include/ffi.h.in: Don't define ffi_type_foo if
403         LIBFFI_HIDE_BASIC_TYPES is defined.
404         (ffi_type_longdouble): If not HAVE_LONG_DOUBLE, define
405         to ffi_type_double.
406         * types.c (LIBFFI_HIDE_BASIC_TYPES): Define.
407         (FFI_TYPEDEF, ffi_type_void): Mark the data const.
408         (ffi_type_longdouble): Special case for Alpha.  Don't define
409         if long double == double.
410
411         * src/alpha/ffi.c (FFI_TYPE_LONGDOUBLE): Assert unique value.
412         (ffi_prep_cif_machdep): Handle it as the 128-bit type.
413         (ffi_call, ffi_closure_osf_inner): Likewise.
414         (ffi_closure_osf_inner): Likewise.  Mark hidden.
415         (ffi_call_osf, ffi_closure_osf): Mark hidden.
416         * src/alpha/ffitarget.h (FFI_LAST_ABI): Tidy definition.
417         * src/alpha/osf.S (ffi_call_osf, ffi_closure_osf): Mark hidden.
418         (load_table): Handle 128-bit long double.
419
420         * testsuite/libffi.call/float4.c: Add -mieee for alpha.
421
422 2007-04-06  Tom Tromey  <tromey@redhat.com>
423
424         PR libffi/31491:
425         * README: Fixed bug in example.
426
427 2007-04-03  Jakub Jelinek  <jakub@redhat.com>
428
429         * src/closures.c: Include sys/statfs.h.
430         (_GNU_SOURCE): Define on Linux.
431         (FFI_MMAP_EXEC_SELINUX): Define.
432         (selinux_enabled): New variable.
433         (selinux_enabled_check): New function.
434         (is_selinux_enabled): Define.
435         (dlmmap): Use it.
436
437 2007-03-24  Uros Bizjak  <ubizjak@gmail.com>
438
439         * testsuite/libffi.call/return_fl2.c (return_fl): Mark as static.
440         Use 'volatile float sum' to create sum of floats to avoid false
441         negative due to excess precision on ix86 targets.
442         (main): Ditto. 
443
444 2007-03-08  Alexandre Oliva  <aoliva@redhat.com>
445
446         * src/powerpc/ffi.c (flush_icache): Fix left-over from previous
447         patch.
448         (ffi_prep_closure_loc): Remove unneeded casts.  Add needed ones.
449
450 2007-03-07  Alexandre Oliva  <aoliva@redhat.com>
451
452         * include/ffi.h.in (ffi_closure_alloc, ffi_closure_free): New.
453         (ffi_prep_closure_loc): New.
454         (ffi_prep_raw_closure_loc): New.
455         (ffi_prep_java_raw_closure_loc): New.
456         * src/closures.c: New file.
457         * src/dlmalloc.c [FFI_MMAP_EXEC_WRIT] (struct malloc_segment):
458         Replace sflags with exec_offset.
459         [FFI_MMAP_EXEC_WRIT] (mmap_exec_offset, add_segment_exec_offset,
460         sub_segment_exec_offset): New macros.
461         (get_segment_flags, set_segment_flags, check_segment_merge): New
462         macros.
463         (is_mmapped_segment, is_extern_segment): Use get_segment_flags.
464         (add_segment, sys_alloc, create_mspace, create_mspace_with_base,
465         destroy_mspace): Use new macros.
466         (sys_alloc): Silence warning.
467         * Makefile.am (libffi_la_SOURCES): Add src/closures.c.
468         * Makefile.in: Rebuilt.
469         * src/prep_cif [FFI_CLOSURES] (ffi_prep_closure): Implement in
470         terms of ffi_prep_closure_loc.
471         * src/raw_api.c (ffi_prep_raw_closure_loc): Renamed and adjusted
472         from...
473         (ffi_prep_raw_closure): ... this.  Re-implement in terms of the
474         renamed version.
475         * src/java_raw_api (ffi_prep_java_raw_closure_loc): Renamed and
476         adjusted from...
477         (ffi_prep_java_raw_closure): ... this.  Re-implement in terms of
478         the renamed version.
479         * src/alpha/ffi.c (ffi_prep_closure_loc): Renamed from
480         (ffi_prep_closure): ... this.
481         * src/pa/ffi.c: Likewise.
482         * src/cris/ffi.c: Likewise.  Adjust.
483         * src/frv/ffi.c: Likewise.
484         * src/ia64/ffi.c: Likewise.
485         * src/mips/ffi.c: Likewise.
486         * src/powerpc/ffi_darwin.c: Likewise.
487         * src/s390/ffi.c: Likewise.
488         * src/sh/ffi.c: Likewise.
489         * src/sh64/ffi.c: Likewise.
490         * src/sparc/ffi.c: Likewise.
491         * src/x86/ffi64.c: Likewise.
492         * src/x86/ffi.c: Likewise.
493         (FFI_INIT_TRAMPOLINE): Adjust.
494         (ffi_prep_raw_closure_loc): Renamed and adjusted from...
495         (ffi_prep_raw_closure): ... this.
496         * src/powerpc/ffi.c (ffi_prep_closure_loc): Renamed from
497         (ffi_prep_closure): ... this.
498         (flush_icache): Adjust.
499
500 2007-03-07  Alexandre Oliva  <aoliva@redhat.com>
501
502         * src/dlmalloc.c: New file, imported version 2.8.3 of Doug
503         Lea's malloc.
504
505 2007-03-01  Brooks Moses  <brooks.moses@codesourcery.com>
506
507         * Makefile.am: Add dummy install-pdf target.
508         * Makefile.in: Regenerate
509
510 2007-02-13  Andreas Krebbel  <krebbel1@de.ibm.com>
511
512         * src/s390/ffi.c (ffi_prep_args, ffi_prep_cif_machdep,
513         ffi_closure_helper_SYSV): Add long double handling.
514
515 2007-02-02  Jakub Jelinek  <jakub@redhat.com>
516
517         * src/powerpc/linux64.S (ffi_call_LINUX64): Move restore of r2
518         immediately after bctrl instruction.
519
520 2007-01-18  Alexandre Oliva  <aoliva@redhat.com>
521
522         * Makefile.am (all-recursive, install-recursive,
523         mostlyclean-recursive, clean-recursive, distclean-recursive,
524         maintainer-clean-recursive): Add missing targets.
525         * Makefile.in: Rebuilt.
526
527 2006-12-14  Andreas Tobler  <a.tobler@schweiz.org>
528
529         * configure.ac: Add TARGET for x86_64-*-darwin*.
530         * Makefile.am (nodist_libffi_la_SOURCES): Add rules for 64-bit sources
531         for X86_DARWIN.
532         * src/x86/ffitarget.h: Set trampoline size for x86_64-*-darwin*.
533         * src/x86/darwin64.S: New file for x86_64-*-darwin* support.
534         * configure: Regenerate.
535         * Makefile.in: Regenerate.
536         * include/Makefile.in: Regenerate.
537         * testsuite/Makefile.in: Regenerate.
538         * testsuite/libffi.special/unwindtest_ffi_call.cc: New test case for
539         ffi_call only.
540
541 2006-12-13  Andreas Tobler <a.tobler@schweiz.org>
542
543         * aclocal.m4: Regenerate with aclocal -I .. as written in the
544         Makefile.am.
545
546 2006-10-31  Geoffrey Keating  <geoffk@apple.com>
547
548         * src/powerpc/ffi_darwin.c (darwin_adjust_aggregate_sizes): New.
549         (ffi_prep_cif_machdep): Call darwin_adjust_aggregate_sizes for
550         Darwin.
551         * testsuite/libffi.call/nested_struct4.c: Remove Darwin XFAIL.
552         * testsuite/libffi.call/nested_struct6.c: Remove Darwin XFAIL.
553
554 2006-10-10  Paolo Bonzini  <bonzini@gnu.org>
555             Sandro Tolaini  <tolaini@libero.it>
556
557         * configure.ac [i*86-*-darwin*]: Set X86_DARWIN symbol and 
558         conditional.
559         * configure: Regenerated.
560         * Makefile.am (nodist_libffi_la_SOURCES) [X86_DARWIN]: New case.
561         (EXTRA_DIST): Add src/x86/darwin.S.
562         * Makefile.in: Regenerated.
563         * include/Makefile.in: Regenerated.
564         * testsuite/Makefile.in: Regenerated.
565
566         * src/x86/ffi.c (ffi_prep_cif_machdep) [X86_DARWIN]: Treat like
567         X86_WIN32, and additionally align stack to 16 bytes.
568         * src/x86/darwin.S: New, based on sysv.S.
569         * src/prep_cif.c (ffi_prep_cif) [X86_DARWIN]: Align > 8-byte structs.
570
571 2006-09-12  David Daney  <ddaney@avtrex.com>
572
573         PR libffi/23935
574         * include/Makefile.am: Install both ffi.h and ffitarget.h in
575         $(libdir)/gcc/$(target_alias)/$(gcc_version)/include.
576         * aclocal.m4: Regenerated for automake 1.9.6.
577         * Makefile.in: Regenerated.
578         * include/Makefile.in: Regenerated.
579         * testsuite/Makefile.in: Regenerated.
580
581 2006-08-17  Andreas Tobler  <a.tobler@schweiz.ch>
582
583         * include/ffi_common.h (struct): Revert accidental commit.
584
585 2006-08-15  Andreas Tobler  <a.tobler@schweiz.ch>
586
587         * include/ffi_common.h: Remove lint directives.
588         * include/ffi.h.in: Likewise.
589
590 2006-07-25  Torsten Schoenfeld  <kaffeetisch@gmx.de>
591
592         * include/ffi.h.in (ffi_type_ulong, ffi_type_slong): Define correctly
593         for 32-bit architectures.
594         * testsuite/libffi.call/return_ul.c: New test case.
595
596 2006-07-19  David Daney  <ddaney@avtrex.com>
597
598         * testsuite/libffi.call/closure_fn6.c: Remove xfail for mips,
599         xfail remains for mips64.
600
601 2006-05-23  Carlos O'Donell  <carlos@codesourcery.com>
602
603         * Makefile.am: Add install-html target. Add install-html to .PHONY
604         * Makefile.in: Regenerate.
605         * aclocal.m4: Regenerate.
606         * include/Makefile.in: Regenerate.
607         * testsuite/Makefile.in: Regenerate.
608
609 2006-05-18  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
610
611         * pa/ffi.c (ffi_prep_args_pa32): Load floating point arguments from
612         stack slot.
613
614 2006-04-22  Andreas Tobler  <a.tobler@schweiz.ch>
615
616         * README: Remove notice about 'Crazy Comments'.
617         * src/debug.c: Remove lint directives. Cleanup white spaces.
618         * src/java_raw_api.c: Likewise.
619         * src/prep_cif.c: Likewise.
620         * src/raw_api.c: Likewise.
621         * src/ffitest.c: Delete. No longer needed, all test cases migrated
622         to the testsuite.
623         * src/arm/ffi.c: Remove lint directives.
624         * src/m32r/ffi.c: Likewise.
625         * src/pa/ffi.c: Likewise.
626         * src/powerpc/ffi.c: Likewise.
627         * src/powerpc/ffi_darwin.c: Likewise.
628         * src/sh/ffi.c: Likewise.
629         * src/sh64/ffi.c: Likewise.
630         * src/x86/ffi.c: Likewise.
631         * testsuite/libffi.call/float2.c: Likewise.
632         * testsuite/libffi.call/promotion.c: Likewise.
633         * testsuite/libffi.call/struct1.c: Likewise.
634
635 2006-04-13  Andreas Tobler  <a.tobler@schweiz.ch>
636
637         * src/pa/hpux32.S: Correct unwind offset calculation for
638         ffi_closure_pa32.
639         * src/pa/linux.S: Likewise.
640
641 2006-04-12  James E Wilson  <wilson@specifix.com>
642
643         PR libgcj/26483
644         * src/ia64/ffi.c (stf_spill, ldf_fill): Rewrite as macros.
645         (hfa_type_load): Call stf_spill.
646         (hfa_type_store): Call ldf_fill.
647         (ffi_call): Adjust calls to above routines.  Add local temps for
648         macro result.
649
650 2006-04-10  Matthias Klose  <doko@debian.org>
651
652         * testsuite/lib/libffi-dg.exp (libffi-init): Recognize multilib
653         directory names containing underscores.
654
655 2006-04-07  James E Wilson  <wilson@specifix.com>
656
657         * testsuite/libffi.call/float4.c: New testcase.
658
659 2006-04-05  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
660             Andreas Tobler  <a.tobler@schweiz.ch>
661
662         * Makefile.am: Add PA_HPUX port.
663         * Makefile.in: Regenerate.
664         * include/Makefile.in: Likewise.
665         * testsuite/Makefile.in: Likewise.
666         * configure.ac: Add PA_HPUX rules.
667         * configure: Regenerate.
668         * src/pa/ffitarget.h: Rename linux target to PA_LINUX.
669         Add PA_HPUX and PA64_HPUX.
670         Rename FFI_LINUX ABI to FFI_PA32 ABI.
671         (FFI_TRAMPOLINE_SIZE): Define for 32-bit HP-UX targets.
672         (FFI_TYPE_SMALL_STRUCT2): Define.
673         (FFI_TYPE_SMALL_STRUCT4): Likewise.
674         (FFI_TYPE_SMALL_STRUCT8): Likewise.
675         (FFI_TYPE_SMALL_STRUCT3): Redefine.
676         (FFI_TYPE_SMALL_STRUCT5): Likewise.
677         (FFI_TYPE_SMALL_STRUCT6): Likewise.
678         (FFI_TYPE_SMALL_STRUCT7): Likewise.
679         * src/pa/ffi.c (ROUND_DOWN): Delete.
680         (fldw, fstw, fldd, fstd): Use '__asm__'.
681         (ffi_struct_type): Add support for FFI_TYPE_SMALL_STRUCT2,
682         FFI_TYPE_SMALL_STRUCT4 and FFI_TYPE_SMALL_STRUCT8.
683         (ffi_prep_args_LINUX): Rename to ffi_prep_args_pa32. Update comment.
684         Simplify incrementing of stack slot variable. Change type of local
685         'n' to unsigned int.
686         (ffi_size_stack_LINUX): Rename to ffi_size_stack_pa32. Handle long
687         double on PA_HPUX.
688         (ffi_prep_cif_machdep): Likewise.
689         (ffi_call): Likewise.
690         (ffi_closure_inner_LINUX): Rename to ffi_closure_inner_pa32. Change
691         return type to ffi_status. Simplify incrementing of stack slot
692         variable. Only copy floating point argument registers when PA_LINUX
693         is true. Reformat debug statement.
694         Add support for FFI_TYPE_SMALL_STRUCT2, FFI_TYPE_SMALL_STRUCT4 and
695         FFI_TYPE_SMALL_STRUCT8.
696         (ffi_closure_LINUX): Rename to ffi_closure_pa32. Add 'extern' to
697         declaration.
698         (ffi_prep_closure): Make linux trampoline conditional on PA_LINUX.
699         Add nops to cache flush.  Add trampoline for PA_HPUX.
700         * src/pa/hpux32.S: New file.
701         * src/pa/linux.S (ffi_call_LINUX): Rename to ffi_call_pa32. Rename
702         ffi_prep_args_LINUX to ffi_prep_args_pa32.
703         Localize labels. Add support for 2, 4 and 8-byte small structs. Handle
704         unaligned destinations in 3, 5, 6 and 7-byte small structs. Order
705         argument type checks so that common argument types appear first.
706         (ffi_closure_LINUX): Rename to ffi_closure_pa32. Rename
707         ffi_closure_inner_LINUX to ffi_closure_inner_pa32.
708
709 2006-03-24  Alan Modra  <amodra@bigpond.net.au>
710
711         * src/powerpc/ffitarget.h (enum ffi_abi): Add FFI_LINUX.  Default
712         for 32-bit using IBM extended double format.  Fix FFI_LAST_ABI.
713         * src/powerpc/ffi.c (ffi_prep_args_SYSV): Handle linux variant of
714         FFI_TYPE_LONGDOUBLE.
715         (ffi_prep_args64): Assert using IBM extended double.
716         (ffi_prep_cif_machdep): Don't munge FFI_TYPE_LONGDOUBLE type.
717         Handle FFI_LINUX FFI_TYPE_LONGDOUBLE return and args.
718         (ffi_call): Handle FFI_LINUX.
719         (ffi_closure_helper_SYSV): Non FFI_LINUX long double return needs
720         gpr3 return pointer as for struct return.  Handle FFI_LINUX
721         FFI_TYPE_LONGDOUBLE return and args.  Don't increment "nf"
722         unnecessarily.
723         * src/powerpc/ppc_closure.S (ffi_closure_SYSV): Load both f1 and f2
724         for FFI_TYPE_LONGDOUBLE.  Move epilogue insns into case table.
725         Don't use r6 as pointer to results, instead use sp offset.  Don't
726         make a special call to load lr with case table address, instead
727         use offset from previous call.
728         * src/powerpc/sysv.S (ffi_call_SYSV): Save long double return.
729         * src/powerpc/linux64.S (ffi_call_LINUX64): Simplify long double
730         return.
731
732 2006-03-15  Kaz Kojima  <kkojima@gcc.gnu.org>
733
734         * src/sh64/ffi.c (ffi_prep_cif_machdep): Handle float arguments
735         passed with FP registers correctly.
736         (ffi_closure_helper_SYSV): Likewise.
737         * src/sh64/sysv.S: Likewise.
738
739 2006-03-01  Andreas Tobler  <a.tobler@schweiz.ch>
740
741         * testsuite/libffi.special/unwindtest.cc (closure_test_fn): Mark cif,
742         args and userdata unused.
743         (closure_test_fn1): Mark cif and userdata unused.
744         (main): Remove unused res.
745
746 2006-02-28  Andreas Tobler  <a.tobler@schweiz.ch>
747
748         * testsuite/libffi.call/call.exp: Adjust FSF address. Add test runs for
749         -O2, -O3, -Os and the warning flags -W -Wall.
750         * testsuite/libffi.special/special.exp: Likewise.
751         * testsuite/libffi.call/ffitest.h: Add an __UNUSED__ macro to mark
752         unused parameter unused for gcc or else do nothing.
753         * testsuite/libffi.special/ffitestcxx.h: Likewise.
754         * testsuite/libffi.call/cls_12byte.c (cls_struct_12byte_gn): Mark cif
755         and userdata unused.
756         * testsuite/libffi.call/cls_16byte.c (cls_struct_16byte_gn): Likewise.
757         * testsuite/libffi.call/cls_18byte.c (cls_struct_18byte_gn): Likewise.
758         * testsuite/libffi.call/cls_19byte.c (cls_struct_19byte_gn): Likewise.
759         * testsuite/libffi.call/cls_1_1byte.c (cls_struct_1_1byte_gn): Likewise.
760         * testsuite/libffi.call/cls_20byte.c (cls_struct_20byte_gn): Likewise.
761         * testsuite/libffi.call/cls_20byte1.c (cls_struct_20byte_gn): Likewise.
762         * testsuite/libffi.call/cls_24byte.c (cls_struct_24byte_gn): Likewise.
763         * testsuite/libffi.call/cls_2byte.c (cls_struct_2byte_gn): Likewise.
764         * testsuite/libffi.call/cls_3_1byte.c (cls_struct_3_1byte_gn): Likewise.
765         * testsuite/libffi.call/cls_3byte1.c (cls_struct_3byte_gn): Likewise.
766         * testsuite/libffi.call/cls_3byte2.c (cls_struct_3byte_gn1): Likewise.
767         * testsuite/libffi.call/cls_4_1byte.c (cls_struct_4_1byte_gn): Likewise.
768         * testsuite/libffi.call/cls_4byte.c (cls_struct_4byte_gn): Likewise.
769         * testsuite/libffi.call/cls_5_1_byte.c (cls_struct_5byte_gn): Likewise.
770         * testsuite/libffi.call/cls_5byte.c (cls_struct_5byte_gn): Likewise.
771         * testsuite/libffi.call/cls_64byte.c (cls_struct_64byte_gn): Likewise.
772         * testsuite/libffi.call/cls_6_1_byte.c (cls_struct_6byte_gn): Likewise.
773         * testsuite/libffi.call/cls_6byte.c (cls_struct_6byte_gn): Likewise.
774         * testsuite/libffi.call/cls_7_1_byte.c (cls_struct_7byte_gn): Likewise.
775         * testsuite/libffi.call/cls_7byte.c (cls_struct_7byte_gn): Likewise.
776         * testsuite/libffi.call/cls_8byte.c (cls_struct_8byte_gn): Likewise.
777         * testsuite/libffi.call/cls_9byte1.c (cls_struct_9byte_gn): Likewise.
778         * testsuite/libffi.call/cls_9byte2.c (cls_struct_9byte_gn): Likewise.
779         * testsuite/libffi.call/cls_align_double.c (cls_struct_align_gn):
780         Likewise.
781         * testsuite/libffi.call/cls_align_float.c (cls_struct_align_gn):
782         Likewise.
783         * testsuite/libffi.call/cls_align_longdouble.c (cls_struct_align_gn):
784         Likewise.
785         * testsuite/libffi.call/cls_align_pointer.c (cls_struct_align_fn): Cast
786         void* to avoid compiler warning.
787         (main): Likewise.
788         (cls_struct_align_gn): Mark cif and userdata unused.
789         * testsuite/libffi.call/cls_align_sint16.c (cls_struct_align_gn):
790         Likewise.
791         * testsuite/libffi.call/cls_align_sint32.c (cls_struct_align_gn):
792         Likewise.
793         * testsuite/libffi.call/cls_align_sint64.c (cls_struct_align_gn):
794         Likewise.
795         * testsuite/libffi.call/cls_align_uint16.c (cls_struct_align_gn):
796         Likewise.
797         * testsuite/libffi.call/cls_align_uint32.c (cls_struct_align_gn):
798         Likewise.
799         * testsuite/libffi.call/cls_double.c (cls_ret_double_fn): Likewise.
800         * testsuite/libffi.call/cls_float.c (cls_ret_float_fn): Likewise.
801         * testsuite/libffi.call/cls_multi_schar.c (test_func_gn): Mark cif and
802         data unused.
803         (main): Cast res_call to silence gcc.
804         * testsuite/libffi.call/cls_multi_sshort.c (test_func_gn): Mark cif and
805         data unused.
806         (main): Cast res_call to silence gcc.
807         * testsuite/libffi.call/cls_multi_sshortchar.c (test_func_gn): Mark cif
808         and data unused.
809         (main): Cast res_call to silence gcc.
810         * testsuite/libffi.call/cls_multi_uchar.c (test_func_gn): Mark cif and
811         data unused.
812         (main): Cast res_call to silence gcc.
813         * testsuite/libffi.call/cls_multi_ushort.c (test_func_gn): Mark cif and
814         data unused.
815         (main): Cast res_call to silence gcc.
816         * testsuite/libffi.call/cls_multi_ushortchar.c (test_func_gn): Mark cif
817         and data unused.
818         (main): Cast res_call to silence gcc.
819         * testsuite/libffi.call/cls_schar.c (cls_ret_schar_fn): Mark cif and
820         userdata unused.
821         (cls_ret_schar_fn): Cast printf parameter to silence gcc.
822         * testsuite/libffi.call/cls_sint.c (cls_ret_sint_fn): Mark cif and
823         userdata unused.
824         (cls_ret_sint_fn): Cast printf parameter to silence gcc.
825         * testsuite/libffi.call/cls_sshort.c (cls_ret_sshort_fn): Mark cif and
826         userdata unused.
827         (cls_ret_sshort_fn): Cast printf parameter to silence gcc.
828         * testsuite/libffi.call/cls_uchar.c (cls_ret_uchar_fn):  Mark cif and
829         userdata unused.
830         (cls_ret_uchar_fn): Cast printf parameter to silence gcc.
831         * testsuite/libffi.call/cls_uint.c (cls_ret_uint_fn): Mark cif and
832         userdata unused.
833         (cls_ret_uint_fn): Cast printf parameter to silence gcc.
834         * testsuite/libffi.call/cls_ulonglong.c (cls_ret_ulonglong_fn): Mark cif
835         and userdata unused.
836         * testsuite/libffi.call/cls_ushort.c (cls_ret_ushort_fn): Mark cif and
837         userdata unused.
838         (cls_ret_ushort_fn): Cast printf parameter to silence gcc.
839         * testsuite/libffi.call/float.c (floating): Remove unused parameter e.
840         * testsuite/libffi.call/float1.c (main): Remove unused variable i.
841         Cleanup white spaces.
842         * testsuite/libffi.call/negint.c (checking): Remove unused variable i.
843         * testsuite/libffi.call/nested_struct.c (cls_struct_combined_gn): Mark
844         cif and userdata unused.
845         * testsuite/libffi.call/nested_struct1.c (cls_struct_combined_gn):
846         Likewise.
847         * testsuite/libffi.call/nested_struct10.c (B_gn): Likewise.
848         * testsuite/libffi.call/nested_struct2.c (B_fn): Adjust printf
849         formatters to silence gcc.
850         (B_gn): Mark cif and userdata unused.
851         * testsuite/libffi.call/nested_struct3.c (B_gn): Mark cif and userdata
852         unused.
853         * testsuite/libffi.call/nested_struct4.c: Mention related PR.
854         (B_gn): Mark cif and userdata unused.
855         * testsuite/libffi.call/nested_struct5.c (B_gn): Mark cif and userdata
856         unused.
857         * testsuite/libffi.call/nested_struct6.c: Mention related PR.
858         (B_gn): Mark cif and userdata unused.
859         * testsuite/libffi.call/nested_struct7.c (B_gn): Mark cif and userdata
860         unused.
861         * testsuite/libffi.call/nested_struct8.c (B_gn): Likewise.
862         * testsuite/libffi.call/nested_struct9.c (B_gn): Likewise.
863         * testsuite/libffi.call/problem1.c (stub): Likewise.
864         * testsuite/libffi.call/pyobjc-tc.c (main): Cast the result to silence
865         gcc.
866         * testsuite/libffi.call/return_fl2.c (return_fl): Add the note mentioned
867         in the last commit for this test case in the test case itself.
868         * testsuite/libffi.call/closure_fn0.c (closure_test_fn0): Mark cif as
869         unused.
870         * testsuite/libffi.call/closure_fn1.c (closure_test_fn1): Likewise.
871         * testsuite/libffi.call/closure_fn2.c (closure_test_fn2): Likewise.
872         * testsuite/libffi.call/closure_fn3.c (closure_test_fn3): Likewise.
873         * testsuite/libffi.call/closure_fn4.c (closure_test_fn0): Likewise.
874         * testsuite/libffi.call/closure_fn5.c (closure_test_fn5): Likewise.
875         * testsuite/libffi.call/closure_fn6.c (closure_test_fn0): Likewise.
876
877 2006-02-22  Kaz Kojima  <kkojima@gcc.gnu.org>
878
879         * src/sh/sysv.S: Fix register numbers in the FDE for
880         ffi_closure_SYSV.
881
882 2006-02-20  Andreas Tobler  <a.tobler@schweiz.ch>
883
884         * testsuite/libffi.call/return_fl2.c (return_fl): Remove static
885         declaration to avoid a false negative on ix86. See PR323.
886
887 2006-02-18  Kaz Kojima  <kkojima@gcc.gnu.org>
888
889         * src/sh/ffi.c (ffi_closure_helper_SYSV): Remove unused variable
890         and cast integer to void * if needed.  Update the pointer to
891         the FP register saved area correctly.
892         
893 2006-02-17  Andreas Tobler  <a.tobler@schweiz.ch>
894
895         * testsuite/libffi.call/nested_struct6.c: XFAIL this test until PR25630
896         is fixed.
897         * testsuite/libffi.call/nested_struct4.c: Likewise.
898
899 2006-02-16  Andreas Tobler  <a.tobler@schweiz.ch>
900
901         * testsuite/libffi.call/return_dbl.c: New test case.
902         * testsuite/libffi.call/return_dbl1.c: Likewise.
903         * testsuite/libffi.call/return_dbl2.c: Likewise.
904         * testsuite/libffi.call/return_fl.c: Likewise.
905         * testsuite/libffi.call/return_fl1.c: Likewise.
906         * testsuite/libffi.call/return_fl2.c: Likewise.
907         * testsuite/libffi.call/return_fl3.c: Likewise.
908         * testsuite/libffi.call/closure_fn6.c: Likewise.
909
910         * testsuite/libffi.call/nested_struct2.c: Remove ffi_type_mylong
911         definition.
912         * testsuite/libffi.call/ffitest.h: Add ffi_type_mylong definition
913         here to be used by other test cases too.
914
915         * testsuite/libffi.call/nested_struct10.c: New test case.
916         * testsuite/libffi.call/nested_struct9.c: Likewise.
917         * testsuite/libffi.call/nested_struct8.c: Likewise.
918         * testsuite/libffi.call/nested_struct7.c: Likewise.
919         * testsuite/libffi.call/nested_struct6.c: Likewise.
920         * testsuite/libffi.call/nested_struct5.c: Likewise.
921         * testsuite/libffi.call/nested_struct4.c: Likewise.
922
923 2006-01-21  Andreas Tobler  <a.tobler@schweiz.ch>
924
925         * configure.ac: Enable libffi for sparc64-*-freebsd*.
926         * configure: Rebuilt.
927
928 2006-01-18  Jakub Jelinek  <jakub@redhat.com>
929
930         * src/powerpc/sysv.S (smst_two_register): Don't call __ashldi3,
931         instead do the shifting inline.
932         * src/powerpc/ppc_closure.S (ffi_closure_SYSV): Don't compute %r5
933         shift count unconditionally.  Simplify load sequences for 1, 2, 3, 4
934         and 8 byte structs, for the remaining struct sizes don't call
935         __lshrdi3, instead do the shifting inline.
936
937 2005-12-07  Thiemo Seufer  <ths@networkno.de>
938
939         * src/mips/ffitarget.h: Remove obsolete sgidefs.h include. Add
940         missing parentheses.
941         * src/mips/o32.S (ffi_call_O32): Code formatting. Define
942         and use A3_OFF, FP_OFF, RA_OFF. Micro-optimizations.
943         (ffi_closure_O32): Likewise, but with newly defined A3_OFF2,
944         A2_OFF2, A1_OFF2, A0_OFF2, RA_OFF2, FP_OFF2, S0_OFF2, GP_OFF2,
945         V1_OFF2, V0_OFF2, FA_1_1_OFF2, FA_1_0_OFF2, FA_0_1_OFF2,
946         FA_0_0_OFF2.
947         * src/mips/ffi.c (ffi_prep_args): Code formatting. Fix
948         endianness bugs.
949         (ffi_prep_closure): Improve trampoline instruction scheduling.
950         (ffi_closure_mips_inner_O32): Fix endianness bugs.
951
952 2005-12-03  Alan Modra  <amodra@bigpond.net.au>
953
954         * src/powerpc/ffi.c: Formatting.
955         (ffi_prep_args_SYSV): Avoid possible aliasing problems by using unions.
956         (ffi_prep_args64): Likewise.
957
958 2005-09-30  Geoffrey Keating  <geoffk@apple.com>
959
960         * testsuite/lib/libffi-dg.exp (libffi_target_compile): For
961         darwin, use -shared-libgcc not -lgcc_s, and explain why.
962
963 2005-09-26  Tom Tromey  <tromey@redhat.com>
964
965         * testsuite/libffi.call/float1.c (value_type): New typedef.
966         (CANARY): New define.
967         (main): Check for result buffer overflow.
968         * src/powerpc/linux64.S: Handle linux64 long double returns.
969         * src/powerpc/ffi.c (FLAG_RETURNS_128BITS): New constant.
970         (ffi_prep_cif_machdep): Handle linux64 long double returns.
971
972 2005-08-25  Alan Modra  <amodra@bigpond.net.au>
973
974         PR target/23404
975         * src/powerpc/ffi.c (ffi_prep_args_SYSV): Correct placement of stack
976         homed fp args.
977         (ffi_status ffi_prep_cif_machdep): Correct stack sizing for same.
978
979 2005-08-11  Jakub Jelinek  <jakub@redhat.com>
980
981         * configure.ac (HAVE_HIDDEN_VISIBILITY_ATTRIBUTE): New test.
982         (AH_BOTTOM): Add FFI_HIDDEN definition.
983         * configure: Rebuilt.
984         * fficonfig.h.in: Rebuilt.
985         * src/powerpc/ffi.c (hidden): Remove.
986         (ffi_closure_LINUX64, ffi_prep_args64, ffi_call_LINUX64,
987         ffi_closure_helper_LINUX64): Use FFI_HIDDEN instead of hidden.
988         * src/powerpc/linux64_closure.S (ffi_closure_LINUX64,
989         .ffi_closure_LINUX64): Use FFI_HIDDEN instead of .hidden.
990         * src/x86/ffi.c (ffi_closure_SYSV, ffi_closure_raw_SYSV): Remove,
991         add FFI_HIDDEN to its prototype.
992         (ffi_closure_SYSV_inner): New.
993         * src/x86/sysv.S (ffi_closure_SYSV, ffi_closure_raw_SYSV): New.
994         * src/x86/win32.S (ffi_closure_SYSV, ffi_closure_raw_SYSV): New.
995
996 2005-08-10  Alfred M. Szmidt  <ams@gnu.org>
997
998         PR libffi/21819:
999         * configure: Rebuilt.
1000         * configure.ac: Handle i*86-*-gnu*.
1001
1002 2005-08-09  Jakub Jelinek  <jakub@redhat.com>
1003
1004         * src/powerpc/ppc_closure.S (ffi_closure_SYSV): Use
1005         DW_CFA_offset_extended_sf rather than
1006         DW_CFA_GNU_negative_offset_extended.
1007         * src/powerpc/sysv.S (ffi_call_SYSV): Likewise.
1008
1009 2005-07-22  SUGIOKA Toshinobu  <sugioka@itonet.co.jp>
1010
1011         * src/sh/sysv.S (ffi_call_SYSV): Stop argument popping correctly
1012         on sh3.
1013         (ffi_closure_SYSV): Change the stack layout for sh3 struct argument.
1014         * src/sh/ffi.c (ffi_prep_args): Fix sh3 argument copy, when it is
1015         partially on register.
1016         (ffi_closure_helper_SYSV): Likewise.
1017         (ffi_prep_cif_machdep): Don't set too many cif->flags.
1018
1019 2005-07-20  Kaz Kojima  <kkojima@gcc.gnu.org>
1020
1021         * src/sh/ffi.c (ffi_call): Handle small structures correctly.
1022         Remove empty line.
1023         * src/sh64/ffi.c (simple_type): Remove.
1024         (return_type): Handle small structures correctly.
1025         (ffi_prep_args): Likewise.
1026         (ffi_call): Likewise.
1027         (ffi_closure_helper_SYSV): Likewise.
1028         * src/sh64/sysv.S (ffi_call_SYSV): Handle 1, 2 and 4-byte return.
1029         Emit position independent code if PIC and remove wrong datalabel
1030         prefixes from EH data.
1031
1032 2005-07-19  Andreas Tobler  <a.tobler@schweiz.ch>
1033
1034         * Makefile.am (nodist_libffi_la_SOURCES): Add POWERPC_FREEBSD.
1035         * Makefile.in: Regenerate.
1036         * include/Makefile.in: Likewise.
1037         * testsuite/Makefile.in: Likewise.
1038         * configure.ac: Add POWERPC_FREEBSD rules.
1039         * configure: Regenerate.
1040         * src/powerpc/ffitarget.h: Add POWERPC_FREEBSD rules.
1041         (FFI_SYSV_TYPE_SMALL_STRUCT): Define.
1042         * src/powerpc/ffi.c: Add flags to handle small structure returns
1043         in ffi_call_SYSV.
1044         (ffi_prep_cif_machdep): Handle small structures for SYSV 4 ABI.
1045         Aka FFI_SYSV.
1046         (ffi_closure_helper_SYSV): Likewise.
1047         * src/powerpc/ppc_closure.S: Add return types for small structures.
1048         * src/powerpc/sysv.S: Add bits to handle small structures for
1049         final SYSV 4 ABI.
1050
1051 2005-07-10  Andreas Tobler  <a.tobler@schweiz.ch>
1052
1053         * testsuite/libffi.call/cls_5_1_byte.c: New test file.
1054         * testsuite/libffi.call/cls_6_1_byte.c: Likewise.
1055         * testsuite/libffi.call/cls_7_1_byte.c: Likewise.
1056
1057 2005-07-05  Randolph Chung  <tausq@debian.org>
1058
1059         * src/pa/ffi.c (ffi_struct_type): Rename FFI_TYPE_SMALL_STRUCT1
1060         as FFI_TYPE_SMALL_STRUCT3.  Break out handling for 5-7 byte
1061         structures.  Kill compilation warnings.
1062         (ffi_closure_inner_LINUX): Print return values as hex in debug
1063         message.  Rename FFI_TYPE_SMALL_STRUCT1 as FFI_TYPE_SMALL_STRUCT3.
1064         Properly handle 5-7 byte structure returns.
1065         * src/pa/ffitarget.h (FFI_TYPE_SMALL_STRUCT1)
1066         (FFI_TYPE_SMALL_STRUCT2): Remove.
1067         (FFI_TYPE_SMALL_STRUCT3, FFI_TYPE_SMALL_STRUCT5)
1068         (FFI_TYPE_SMALL_STRUCT6, FFI_TYPE_SMALL_STRUCT7): Define.
1069         * src/pa/linux.S: Mark source file as using PA1.1 assembly.
1070         (checksmst1, checksmst2): Remove.
1071         (checksmst3): Optimize handling of 3-byte struct returns.
1072         (checksmst567): Properly handle 5-7 byte struct returns.
1073
1074 2005-06-15  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
1075
1076         PR libgcj/21943
1077         * src/mips/n32.S: Enforce PIC code.
1078         * src/mips/o32.S: Likewise.
1079
1080 2005-06-15  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
1081
1082         * configure.ac: Treat i*86-*-solaris2.10 and up as X86_64.
1083         * configure: Regenerate.
1084         
1085 2005-06-01  Alan Modra  <amodra@bigpond.net.au>
1086
1087         * src/powerpc/ppc_closure.S (ffi_closure_SYSV): Don't use JUMPTARGET
1088         to call ffi_closure_helper_SYSV.  Append @local instead.
1089         * src/powerpc/sysv.S (ffi_call_SYSV): Likewise for ffi_prep_args_SYSV.
1090
1091 2005-05-17  Kelley Cook  <kcook@gcc.gnu.org>
1092
1093         * configure.ac: Use AC_C_BIGENDIAN instead of AC_C_BIGENDIAN_CROSS.
1094         Use AC_CHECK_SIZEOF instead of AC_COMPILE_CHECK_SIZEOF.
1095         * Makefile.am (ACLOCAL_AMFLAGS): Remove -I ../config.
1096         * aclocal.m4, configure, fficonfig.h.in, Makefile.in,
1097         include/Makefile.in, testsuite/Makefile.in: Regenerate.
1098         
1099 2005-05-09  Mike Stump  <mrs@apple.com>
1100
1101         * configure: Regenerate.
1102
1103 2005-05-08  Richard Henderson  <rth@redhat.com>
1104
1105         PR libffi/21285
1106         * src/alpha/osf.S: Update unwind into to match code.
1107
1108 2005-05-04  Andreas Degert <ad@papyrus-gmbh.de>
1109             Richard Henderson  <rth@redhat.com>
1110
1111         * src/x86/ffi64.c (ffi_prep_cif_machdep): Save sse-used flag in
1112         bit 11 of flags.
1113         (ffi_call): Mask return type field.  Pass ssecount to ffi_call_unix64.
1114         (ffi_prep_closure): Set carry bit if sse-used flag set.
1115         * src/x86/unix64.S (ffi_call_unix64): Add ssecount argument.
1116         Only load sse registers if ssecount non-zero.
1117         (ffi_closure_unix64): Only save sse registers if carry set on entry.
1118
1119 2005-04-29  Ralf Corsepius  <ralf.corsepius@rtems.org>
1120
1121         * configure.ac: Add i*86-*-rtems*, sparc*-*-rtems*,
1122         powerpc-*rtems*, arm*-*-rtems*, sh-*-rtems*.
1123         * configure: Regenerate.
1124
1125 2005-04-20  Hans-Peter Nilsson  <hp@axis.com>
1126
1127         * testsuite/lib/libffi-dg.exp (libffi-dg-test-1): In regsub use,
1128         have Tcl8.3-compatible intermediate variable.
1129
1130 2005-04-18  Simon Posnjak <simon.posnjak@siol.net> 
1131             Hans-Peter Nilsson  <hp@axis.com>
1132
1133         * Makefile.am: Add CRIS support.
1134         * configure.ac: Likewise.
1135         * Makefile.in, configure, testsuite/Makefile.in,
1136         include/Makefile.in: Regenerate.
1137         * src/cris: New directory.
1138         * src/cris/ffi.c, src/cris/sysv.S, src/cris/ffitarget.h: New files.
1139         * src/prep_cif.c (ffi_prep_cif): Wrap in #ifndef __CRIS__.
1140
1141         * testsuite/lib/libffi-dg.exp (libffi-dg-test-1): Replace \n with
1142         \r?\n in output tests.
1143
1144 2005-04-12  Mike Stump  <mrs@apple.com>
1145
1146         * configure: Regenerate.
1147
1148 2005-03-30  Hans Boehm  <Hans.Boehm@hp.com>
1149
1150         * src/ia64/ffitarget.h (ffi_arg): Use long long instead of DI.
1151         
1152 2005-03-30  Steve Ellcey  <sje@cup.hp.com>
1153
1154         * src/ia64/ffitarget.h (ffi_arg) ADD DI attribute.
1155         (ffi_sarg) Ditto.
1156         * src/ia64/unix.S (ffi_closure_unix): Extend gp
1157         to 64 bits in ILP32 mode.
1158         Load 64 bits even for short data.
1159
1160 2005-03-23  Mike Stump  <mrs@apple.com>
1161
1162         * src/powerpc/darwin.S: Update for -m64 multilib.
1163         * src/powerpc/darwin_closure.S: Likewise.
1164
1165 2005-03-21  Zack Weinberg  <zack@codesourcery.com>
1166
1167         * configure.ac: Do not invoke TL_AC_GCC_VERSION.
1168         Do not set tool_include_dir.
1169         * aclocal.m4, configure, Makefile.in, testsuite/Makefile.in:
1170         Regenerate.
1171         * include/Makefile.am: Set gcc_version and toollibffidir.
1172         * include/Makefile.in: Regenerate.
1173
1174 2005-02-22  Andrew Haley  <aph@redhat.com>
1175
1176         * src/powerpc/ffi.c (ffi_prep_cif_machdep): Bump alignment to
1177         odd-numbered register pairs for 64-bit integer types.
1178
1179 2005-02-23  Andreas Tobler  <a.tobler@schweiz.ch>
1180
1181         PR libffi/20104
1182         * testsuite/libffi.call/return_ll1.c: New test case.
1183
1184 2005-02-11  Janis Johnson  <janis187@us.ibm.com>
1185
1186         * testsuite/libffi.call/cls_align_longdouble.c: Remove dg-options.
1187         * testsuite/libffi.call/float.c: Ditto.
1188         * testsuite/libffi.call/float2.c: Ditto.
1189         * testsuite/libffi.call/float3.c: Ditto.
1190
1191 2005-02-08  Andreas Tobler  <a.tobler@schweiz.ch>
1192
1193         * src/frv/ffitarget.h: Remove PPC stuff which does not belong to frv.
1194
1195 2005-01-12  Eric Botcazou  <ebotcazou@libertysurf.fr>
1196
1197         * testsuite/libffi.special/special.exp (cxx_options): Add
1198         -shared-libgcc.
1199
1200 2004-12-31  Richard Henderson  <rth@redhat.com>
1201
1202         * src/types.c (FFI_AGGREGATE_TYPEDEF): Remove.
1203         (FFI_TYPEDEF): Rename from FFI_INTEGRAL_TYPEDEF.  Replace size and
1204         offset parameters with a type parameter; deduce size and structure
1205         alignment.  Update all users.
1206
1207 2004-12-31  Richard Henderson  <rth@redhat.com>
1208
1209         * src/types.c (FFI_TYPE_POINTER): Define with sizeof.
1210         (FFI_TYPE_LONGDOUBLE): Fix for ia64.
1211         * src/ia64/ffitarget.h (struct ffi_ia64_trampoline_struct): Move
1212         into ffi_prep_closure.
1213         * src/ia64/ia64_flags.h, src/ia64/ffi.c, src/ia64/unix.S: Rewrite
1214         from scratch.
1215
1216 2004-12-27  Richard Henderson  <rth@redhat.com>
1217
1218         * src/x86/unix64.S: Fix typo in unwind info.
1219
1220 2004-12-25  Richard Henderson  <rth@redhat.com>
1221
1222         * src/x86/ffi64.c (struct register_args): Rename from stackLayout.
1223         (enum x86_64_reg_class): Add X86_64_COMPLEX_X87_CLASS.
1224         (merge_classes): Check for it.
1225         (SSE_CLASS_P): New.
1226         (classify_argument): Pass byte_offset by value; perform all updates
1227         inside struct case.
1228         (examine_argument): Add classes argument; handle
1229         X86_64_COMPLEX_X87_CLASS.
1230         (ffi_prep_args): Merge into ...
1231         (ffi_call): ... here.  Share stack frame with ffi_call_unix64.
1232         (ffi_prep_cif_machdep): Setup cif->flags for proper structure return.
1233         (ffi_fill_return_value): Remove.
1234         (ffi_prep_closure): Remove dead assert.
1235         (ffi_closure_unix64_inner): Rename from ffi_closure_UNIX64_inner.
1236         Rewrite to use struct register_args instead of va_list.  Create
1237         flags for handling structure returns.
1238         * src/x86/unix64.S: Remove dead strings.
1239         (ffi_call_unix64): Rename from ffi_call_UNIX64.  Rewrite to share
1240         stack frame with ffi_call.  Handle structure returns properly.
1241         (float2sse, floatfloat2sse, double2sse): Remove.
1242         (sse2float, sse2double, sse2floatfloat): Remove.
1243         (ffi_closure_unix64): Rename from ffi_closure_UNIX64.  Rewrite
1244         to handle structure returns properly.
1245
1246 2004-12-08  David Edelsohn  <edelsohn@gnu.org>
1247
1248         * Makefile.am (AM_MAKEFLAGS): Remove duplicate LIBCFLAGS and
1249         PICFLAG.
1250         * Makefile.in: Regenerated.
1251
1252 2004-12-02  Richard Sandiford  <rsandifo@redhat.com>
1253
1254         * configure.ac: Use TL_AC_GCC_VERSION to set gcc_version.
1255         * configure, aclocal.m4, Makefile.in: Regenerate.
1256         * include/Makefile.in, testsuite/Makefile.in: Regenerate.
1257
1258 2004-11-29  Kelley Cook  <kcook@gcc.gnu.org>
1259
1260         * configure: Regenerate for libtool change.
1261
1262 2004-11-25  Kelley Cook  <kcook@gcc.gnu.org>
1263
1264         * configure: Regenerate for libtool reversion.
1265
1266 2004-11-24  Kelley Cook  <kcook@gcc.gnu.org>
1267
1268         * configure: Regenerate for libtool change.
1269
1270 2004-11-23  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
1271
1272         * testsuite/lib/libffi-dg.exp: Use new procs in target-libpath.exp.
1273
1274 2004-11-23  Richard Sandiford  <rsandifo@redhat.com>
1275
1276         * src/mips/o32.S (ffi_call_O32, ffi_closure_O32): Use jalr instead
1277         of jal.  Use an absolute encoding for the frame information.
1278
1279 2004-11-23  Kelley Cook  <kcook@gcc.gnu.org>
1280
1281         * Makefile.am: Remove no-dependencies.  Add ACLOCAL_AMFLAGS.
1282         * acinclude.m4: Delete logic for sincludes.
1283         * aclocal.m4, Makefile.in, configure: Regenerate.
1284         * include/Makefile: Likewise.
1285         * testsuite/Makefile: Likewise.
1286
1287 2004-11-22  Eric Botcazou  <ebotcazou@libertysurf.fr>
1288
1289         * src/sparc/ffi.c (ffi_prep_closure): Align doubles and 64-bit integers
1290         on a 8-byte boundary.
1291         * src/sparc/v8.S (ffi_closure_v8): Reserve frame space for arguments.
1292
1293 2004-10-27  Richard Earnshaw  <rearnsha@arm.com>
1294
1295         * src/arm/ffi.c (ffi_prep_cif_machdep): Handle functions that return
1296         long long values.  Round stack allocation to a multiple of 8 bytes
1297         for ATPCS compatibility.
1298         * src/arm/sysv.S (ffi_call_SYSV): Rework to avoid use of APCS register
1299         names.  Handle returning long long types.  Add Thumb and interworking
1300         support.  Improve soft-float code.
1301
1302 2004-10-27  Richard Earnshaw  <rearnsha@arm.com>
1303
1304         * testsuite/lib/libffi-db.exp (load_gcc_lib): New function.
1305         (libffi_exit): New function.
1306         (libffi_init): Build the testglue wrapper if needed.
1307
1308 2004-10-25  Eric Botcazou  <ebotcazou@libertysurf.fr>
1309
1310         PR other/18138
1311         * testsuite/lib/libffi-dg.exp: Accept more than one multilib libgcc.
1312
1313 2004-10-25  Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
1314
1315         * src/m32r/libffitarget.h (FFI_CLOSURES): Set to 0.
1316
1317 2004-10-20  Kaz Kojima  <kkojima@gcc.gnu.org>
1318
1319         * src/sh/sysv.S (ffi_call_SYSV): Don't align for double data.
1320         * testsuite/libffi.call/float3.c: New test case.
1321
1322 2004-10-18  Kaz Kojima  <kkojima@gcc.gnu.org>
1323
1324         * src/sh/ffi.c (ffi_prep_closure): Set T bit in trampoline for
1325         the function returning a structure pointed with R2.
1326         * src/sh/sysv.S (ffi_closure_SYSV): Use R2 as the pointer to
1327         the structure return value if T bit set.  Emit position
1328         independent code and EH data if PIC.
1329
1330 2004-10-13  Kazuhiro Inaoka  <inaoka.kazuhiro@renesas.com>
1331
1332         * Makefile.am: Add m32r support.
1333         * configure.ac: Likewise.
1334         * Makefile.in: Regenerate.
1335         * confiugre: Regenerate.
1336         * src/types.c: Add m32r port to FFI_INTERNAL_TYPEDEF
1337         (uint64, sint64, double, longdouble)
1338         * src/m32r: New directory.
1339         * src/m32r/ffi.c: New file.
1340         * src/m32r/sysv.S: Likewise.
1341         * src/m32r/ffitarget.h: Likewise.
1342
1343 2004-10-02  Kaz Kojima  <kkojima@gcc.gnu.org>
1344
1345         * testsuite/libffi.call/negint.c: New test case.
1346
1347 2004-09-14  H.J. Lu  <hongjiu.lu@intel.com>
1348
1349         PR libgcj/17465
1350         * testsuite/lib/libffi-dg.exp: Don't use global ld_library_path.
1351         Set up LD_LIBRARY_PATH, SHLIB_PATH, LD_LIBRARYN32_PATH,
1352         LD_LIBRARY64_PATH, LD_LIBRARY_PATH_32, LD_LIBRARY_PATH_64 and
1353         DYLD_LIBRARY_PATH.
1354
1355 2004-09-05  Andreas Tobler  <a.tobler@schweiz.ch>
1356
1357         * testsuite/libffi.call/many_win32.c: Remove whitespaces.
1358         * testsuite/libffi.call/promotion.c: Likewise.
1359         * testsuite/libffi.call/return_ll.c: Remove unused var. Cleanup
1360         whitespaces.
1361         * testsuite/libffi.call/return_sc.c: Likewise.
1362         * testsuite/libffi.call/return_uc.c: Likewise.
1363
1364 2004-09-05  Andreas Tobler  <a.tobler@schweiz.ch>
1365
1366         * src/powerpc/darwin.S: Fix comments and identation.
1367         * src/powerpc/darwin_closure.S: Likewise.
1368
1369 2004-09-02  Andreas Tobler  <a.tobler@schweiz.ch>
1370
1371         * src/powerpc/ffi_darwin.c: Add flag for longdouble return values.
1372         (ffi_prep_args): Handle longdouble arguments.
1373         (ffi_prep_cif_machdep): Set flags for longdouble. Calculate space for
1374         longdouble.
1375         (ffi_closure_helper_DARWIN): Add closure handling for longdouble.
1376         * src/powerpc/darwin.S (_ffi_call_DARWIN): Add handling of longdouble
1377         values.
1378         * src/powerpc/darwin_closure.S (_ffi_closure_ASM): Likewise.
1379         * src/types.c: Defined longdouble size and alignment for darwin.
1380
1381 2004-09-02  Andreas Tobler  <a.tobler@schweiz.ch>
1382
1383         * src/powerpc/aix.S: Remove whitespaces.
1384         * src/powerpc/aix_closure.S: Likewise.
1385         * src/powerpc/asm.h: Likewise.
1386         * src/powerpc/ffi.c: Likewise.
1387         * src/powerpc/ffitarget.h: Likewise.
1388         * src/powerpc/linux64.S: Likewise.
1389         * src/powerpc/linux64_closure.S: Likewise.
1390         * src/powerpc/ppc_closure.S: Likewise.
1391         * src/powerpc/sysv.S: Likewise.
1392
1393 2004-08-30  Anthony Green  <green@redhat.com>
1394
1395         * Makefile.am: Add frv support.
1396         * Makefile.in, testsuite/Makefile.in: Rebuilt.
1397         * configure.ac: Read configure.host.
1398         * configure.in: Read configure.host.
1399         * configure.host: New file.  frv-elf needs libgloss.
1400         * include/ffi.h.in: Force ffi_closure to have a nice big (8)
1401         alignment.  This is needed to frv and shouldn't harm the others.
1402         * include/ffi_common.h (ALIGN_DOWN): New macro.
1403         * src/frv/ffi.c, src/frv/ffitarget.h, src/frv/eabi.S: New files.
1404
1405 2004-08-24  David Daney  <daney@avtrex.com>
1406
1407         * testsuite/libffi.call/closure_fn0.c: Xfail mips64* instead of mips*.
1408         * testsuite/libffi.call/closure_fn1.c: Likewise.
1409         * testsuite/libffi.call/closure_fn2.c  Likewise.
1410         * testsuite/libffi.call/closure_fn3.c: Likewise.
1411         * testsuite/libffi.call/closure_fn4.c: Likewise.
1412         * testsuite/libffi.call/closure_fn5.c: Likewise.
1413         * testsuite/libffi.call/cls_18byte.c: Likewise.
1414         * testsuite/libffi.call/cls_19byte.c: Likewise.
1415         * testsuite/libffi.call/cls_1_1byte.c: Likewise.
1416         * testsuite/libffi.call/cls_20byte.c: Likewise.
1417         * testsuite/libffi.call/cls_20byte1.c: Likewise.
1418         * testsuite/libffi.call/cls_24byte.c: Likewise.
1419         * testsuite/libffi.call/cls_2byte.c: Likewise.
1420         * testsuite/libffi.call/cls_3_1byte.c: Likewise.
1421         * testsuite/libffi.call/cls_3byte1.c: Likewise.
1422         * testsuite/libffi.call/cls_3byte2.c: Likewise.
1423         * testsuite/libffi.call/cls_4_1byte.c: Likewise.
1424         * testsuite/libffi.call/cls_4byte.c: Likewise.
1425         * testsuite/libffi.call/cls_64byte.c: Likewise.
1426         * testsuite/libffi.call/cls_6byte.c: Likewise.
1427         * testsuite/libffi.call/cls_7byte.c: Likewise.
1428         * testsuite/libffi.call/cls_8byte.c: Likewise.
1429         * testsuite/libffi.call/cls_9byte1.c: Likewise.
1430         * testsuite/libffi.call/cls_9byte2.c: Likewise.
1431         * testsuite/libffi.call/cls_align_double.c: Likewise.
1432         * testsuite/libffi.call/cls_align_float.c: Likewise.
1433         * testsuite/libffi.call/cls_align_longdouble.c: Likewise.
1434         * testsuite/libffi.call/cls_align_pointer.c: Likewise.
1435         * testsuite/libffi.call/cls_align_sint16.c: Likewise.
1436         * testsuite/libffi.call/cls_align_sint32.c: Likewise.
1437         * testsuite/libffi.call/cls_align_sint64.c: Likewise.
1438         * testsuite/libffi.call/cls_align_uint16.c: Likewise.
1439         * testsuite/libffi.call/cls_align_uint32.c: Likewise.
1440         * testsuite/libffi.call/cls_align_uint64.c: Likewise.
1441         * testsuite/libffi.call/cls_double.c: Likewise.
1442         * testsuite/libffi.call/cls_float.c: Likewise.
1443         * testsuite/libffi.call/cls_multi_schar.c: Likewise.
1444         * testsuite/libffi.call/cls_multi_sshort.c: Likewise.
1445         * testsuite/libffi.call/cls_multi_sshortchar.c: Likewise.
1446         * testsuite/libffi.call/cls_multi_uchar.c: Likewise.
1447         * testsuite/libffi.call/cls_multi_ushort.c: Likewise.
1448         * testsuite/libffi.call/cls_multi_ushortchar.c: Likewise.
1449         * testsuite/libffi.call/cls_schar.c: Likewise.
1450         * testsuite/libffi.call/cls_sint.c: Likewise.
1451         * testsuite/libffi.call/cls_sshort.c: Likewise.
1452         * testsuite/libffi.call/cls_uchar.c: Likewise.
1453         * testsuite/libffi.call/cls_uint.c: Likewise.
1454         * testsuite/libffi.call/cls_ulonglong.c: Likewise.
1455         * testsuite/libffi.call/cls_ushort.c: Likewise.
1456         * testsuite/libffi.call/nested_struct.c: Likewise.
1457         * testsuite/libffi.call/nested_struct1.c: Likewise.
1458         * testsuite/libffi.call/nested_struct2.c: Likewise.
1459         * testsuite/libffi.call/nested_struct3.c: Likewise.
1460         * testsuite/libffi.call/problem1.c: Likewise.
1461         * testsuite/libffi.special/unwindtest.cc: Likewise.
1462         * testsuite/libffi.call/cls_12byte.c: Likewise and set return value
1463         to zero.
1464         * testsuite/libffi.call/cls_16byte.c: Likewise.
1465         * testsuite/libffi.call/cls_5byte.c: Likewise.
1466
1467 2004-08-23  David Daney <daney@avtrex.com>
1468
1469         PR libgcj/13141
1470         * src/mips/ffitarget.h (FFI_O32_SOFT_FLOAT): New ABI.
1471         * src/mips/ffi.c (ffi_prep_args): Fix alignment calculation.
1472         (ffi_prep_cif_machdep): Handle FFI_O32_SOFT_FLOAT floating point
1473         parameters and return types.
1474         (ffi_call): Handle FFI_O32_SOFT_FLOAT ABI.
1475         (ffi_prep_closure): Ditto.
1476         (ffi_closure_mips_inner_O32): Handle FFI_O32_SOFT_FLOAT ABI, fix
1477         alignment calculations.
1478         * src/mips/o32.S (ffi_closure_O32): Don't use floating point
1479         instructions if FFI_O32_SOFT_FLOAT, make stack frame ABI compliant.
1480
1481 2004-08-14  Casey Marshall <csm@gnu.org>
1482
1483         * src/mips/ffi.c (ffi_pref_cif_machdep): set `cif->flags' to
1484         contain `FFI_TYPE_UINT64' as return type for any 64-bit
1485         integer (O32 ABI only).
1486         (ffi_prep_closure): new function.
1487         (ffi_closure_mips_inner_O32): new function.
1488         * src/mips/ffitarget.h: Define `FFI_CLOSURES' and
1489         `FFI_TRAMPOLINE_SIZE' appropriately if the ABI is o32.
1490         * src/mips/o32.S (ffi_call_O32): add labels for .eh_frame. Return
1491         64 bit integers correctly.
1492         (ffi_closure_O32): new function.
1493         Added DWARF-2 unwind info for both functions.
1494
1495 2004-08-10  Andrew Haley  <aph@redhat.com>
1496
1497         * src/x86/ffi64.c (ffi_prep_args ): 8-align all stack arguments.
1498
1499 2004-08-01  Robert Millan  <robertmh@gnu.org>
1500
1501         * configure.ac: Detect knetbsd-gnu and kfreebsd-gnu.
1502         * configure: Regenerate.
1503
1504 2004-07-30  Maciej W. Rozycki  <macro@linux-mips.org>
1505
1506         * acinclude.m4 (AC_FUNC_MMAP_BLACKLIST): Check for <sys/mman.h>
1507         and mmap() explicitly instead of relying on preset autoconf cache
1508         variables.
1509         * aclocal.m4: Regenerate.
1510         * configure: Regenerate.
1511
1512 2004-07-11  Ulrich Weigand  <uweigand@de.ibm.com>
1513
1514         * src/s390/ffi.c (ffi_prep_args): Fix C aliasing violation.
1515         (ffi_check_float_struct): Remove unused prototype.
1516
1517 2004-06-30  Geoffrey Keating  <geoffk@apple.com>
1518
1519         * src/powerpc/ffi_darwin.c (flush_icache): ';' is a comment
1520         character on Darwin, use '\n\t' instead.
1521
1522 2004-06-26  Matthias Klose  <doko@debian.org>
1523
1524         * libtool-version: Fix typo in revision/age.
1525
1526 2004-06-17  Matthias Klose  <doko@debian.org>
1527
1528         * libtool-version: New.
1529         * Makefile.am (libffi_la_LDFLAGS): Use -version-info for soname.
1530         * Makefile.in: Regenerate.
1531
1532 2004-06-15  Paolo Bonzini  <bonzini@gnu.org>
1533
1534         * Makefile.am: Remove useless multilib rules.
1535         * Makefile.in: Regenerate.
1536         * aclocal.m4: Regenerate with automake 1.8.5.
1537         * configure.ac: Remove useless multilib configury.
1538         * configure: Regenerate.
1539
1540 2004-06-15  Paolo Bonzini  <bonzini@gnu.org>
1541
1542         * .cvsignore: New file.
1543
1544 2004-06-10  Jakub Jelinek  <jakub@redhat.com>
1545
1546         * src/ia64/unix.S (ffi_call_unix): Insert group barrier break
1547         fp_done.
1548         (ffi_closure_UNIX): Fix f14/f15 adjustment if FLOAT_SZ is ever
1549         changed from 8.
1550
1551 2004-06-06  Sean McNeil  <sean@mcneil.com>
1552
1553         * configure.ac: Add x86_64-*-freebsd* support.
1554         * configure: Regenerate.
1555
1556 2004-04-26  Joe Buck <jbuck@welsh-buck.org>
1557
1558         Bug 15093
1559         * configure.ac: Test for existence of mmap and sys/mman.h before
1560         checking blacklist.  Fix suggested by Jim Wilson.
1561         * configure: Regenerate.
1562
1563 2004-04-26  Matt Austern  <austern@apple.com>
1564
1565         * src/powerpc/darwin.S: Go through a non-lazy pointer for initial
1566         FDE location.
1567         * src/powerpc/darwin_closure.S: Likewise.
1568
1569 2004-04-24  Andreas Tobler  <a.tobler@schweiz.ch>
1570
1571         * testsuite/libffi.call/cls_multi_schar.c (main): Fix initialization
1572         error. Reported by Thomas Heller <theller@python.net>.
1573         * testsuite/libffi.call/cls_multi_sshort.c (main): Likewise.
1574         * testsuite/libffi.call/cls_multi_ushort.c (main): Likewise.
1575
1576 2004-03-20  Matthias Klose  <doko@debian.org>
1577
1578         * src/pa/linux.S: Fix typo.
1579
1580 2004-03-19  Matthias Klose  <doko@debian.org>
1581
1582         * Makefile.am: Update.
1583         * Makefile.in: Regenerate.
1584         * src/pa/ffi.h.in: Remove.
1585         * src/pa/ffitarget.h: New file.
1586
1587 2004-02-10  Randolph Chung  <tausq@debian.org>
1588
1589         * Makefile.am: Add PA support.
1590         * Makefile.in: Regenerate.
1591         * include/Makefile.in: Regenerate.
1592         * configure.ac: Add PA target.
1593         * configure: Regenerate.
1594         * src/pa/ffi.c: New file.
1595         * src/pa/ffi.h.in: Add PA support.
1596         * src/pa/linux.S: New file.
1597         * prep_cif.c: Add PA support.
1598
1599 2004-03-16  Hosaka Yuji  <hos@tamanegi.org>
1600
1601         * src/types.c: Fix alignment size of X86_WIN32 case int64 and
1602         double.
1603         * src/x86/ffi.c (ffi_prep_args): Replace ecif->cif->rtype->type
1604         with ecif->cif->flags.
1605         (ffi_call, ffi_prep_incoming_args_SYSV): Replace cif->rtype->type
1606         with cif->flags.
1607         (ffi_prep_cif_machdep): Add X86_WIN32 struct case.
1608         (ffi_closure_SYSV): Add 1 or 2-bytes struct case for X86_WIN32.
1609         * src/x86/win32.S (retstruct1b, retstruct2b, sc_retstruct1b,
1610         sc_retstruct2b): Add for 1 or 2-bytes struct case.
1611
1612 2004-03-15 Kelley Cook <kcook@gcc.gnu.org>
1613
1614         * configure.in: Rename file to ...
1615         * configure.ac: ... this.
1616         * fficonfig.h.in: Regenerate.
1617         * Makefile.in: Regenerate.
1618         * include/Makefile.in: Regenerate.
1619         * testsuite/Makefile.in: Regenerate.
1620
1621 2004-03-12  Matt Austern  <austern@apple.com>
1622
1623         * src/powerpc/darwin.S: Fix EH information so it corresponds to
1624         changes in EH format resulting from addition of linkonce support.
1625         * src/powerpc/darwin_closure.S: Likewise.
1626
1627 2004-03-11  Andreas Tobler  <a.tobler@schweiz.ch>
1628             Paolo Bonzini  <bonzini@gnu.org>
1629
1630         * Makefile.am (AUTOMAKE_OPTIONS): Set them.
1631         Remove VPATH. Remove rules for object files. Remove multilib support.
1632         (AM_CCASFLAGS): Add.
1633         * configure.in (AC_CONFIG_HEADERS): Relace AM_CONFIG_HEADER.
1634         (AC_PREREQ): Bump version to 2.59.
1635         (AC_INIT): Fill with version info and bug address.
1636         (ORIGINAL_LD_FOR_MULTILIBS): Remove.
1637         (AM_ENABLE_MULTILIB): Use this instead of AC_ARG_ENABLE.
1638         De-precious CC so that the right flags are passed down to multilibs.
1639         (AC_MSG_ERROR): Replace obsolete macro AC_ERROR.
1640         (AC_CONFIG_FILES): Replace obsolete macro AC_LINK_FILES.
1641         (AC_OUTPUT): Reorganize the output with AC_CONFIG_COMMANDS.
1642         * configure: Rebuilt.
1643         * aclocal.m4: Likewise.
1644         * Makefile.in, include/Makefile.in, testsuite/Makefile.in: Likewise.
1645         * fficonfig.h.in: Likewise.
1646
1647 2004-03-11  Andreas Schwab  <schwab@suse.de>
1648
1649         * src/ia64/ffi.c (ffi_prep_incoming_args_UNIX): Get floating point
1650         arguments from fp registers only for the first 8 parameter slots.
1651         Don't convert a float parameter when passed in memory.
1652
1653 2004-03-09  Hans-Peter Nilsson  <hp@axis.com>
1654
1655         * configure: Regenerate for config/accross.m4 correction.
1656
1657 2004-02-25  Matt Kraai  <kraai@alumni.cmu.edu>
1658
1659         * src/powerpc/ffi.c (ffi_prep_args_SYSV): Change
1660         ecif->cif->bytes to bytes.
1661         (ffi_prep_cif_machdep): Add braces around nested if statement.
1662
1663 2004-02-09  Alan Modra  <amodra@bigpond.net.au>
1664
1665         * src/types.c (pointer): POWERPC64 has 8 byte pointers.
1666
1667         * src/powerpc/ffi.c (ffi_prep_args64): Correct long double handling.
1668         (ffi_closure_helper_LINUX64): Fix typo.
1669         * testsuite/libffi.call/cls_align_longdouble.c: Pass -mlong-double-128
1670         for powerpc64-*-*.
1671         * testsuite/libffi.call/float.c: Likewise.
1672         * testsuite/libffi.call/float2.c: Likewise.
1673
1674 2004-02-08  Alan Modra  <amodra@bigpond.net.au>
1675
1676         * src/powerpc/ffi.c (ffi_prep_cif_machdep <FFI_LINUX64>): Correct
1677         long double function return and long double arg handling.
1678         (ffi_closure_helper_LINUX64): Formatting.  Delete unused "ng" var.
1679         Use "end_pfr" instead of "nf".  Correct long double handling.
1680         Localise "temp".
1681         * src/powerpc/linux64.S (ffi_call_LINUX64): Save f2 long double
1682         return value.
1683         * src/powerpc/linux64_closure.S (ffi_closure_LINUX64): Allocate
1684         space for long double return value.  Adjust stack frame and offsets.
1685         Load f2 long double return.
1686
1687 2004-02-07  Alan Modra  <amodra@bigpond.net.au>
1688
1689         * src/types.c: Use 16 byte long double for POWERPC64.
1690
1691 2004-01-25  Eric Botcazou  <ebotcazou@libertysurf.fr>
1692
1693         * src/sparc/ffi.c (ffi_prep_args_v9): Shift the parameter array
1694         when the structure return address is passed in %o0.
1695         (ffi_V9_return_struct): Rename into ffi_v9_layout_struct.
1696         (ffi_v9_layout_struct): Align the field following a nested structure
1697         on a word boundary.  Use memmove instead of memcpy.
1698         (ffi_call): Update call to ffi_V9_return_struct.
1699         (ffi_prep_closure): Define 'ctx' only for V8.
1700         (ffi_closure_sparc_inner): Clone into ffi_closure_sparc_inner_v8
1701         and ffi_closure_sparc_inner_v9.
1702         (ffi_closure_sparc_inner_v8): Return long doubles by reference.
1703         Always skip the structure return address.  For structures and long
1704         doubles, copy the argument directly.
1705         (ffi_closure_sparc_inner_v9): Skip the structure return address only
1706         if required.  Shift the maximum floating-point slot accordingly.  For
1707         big structures, copy the argument directly; otherwise, left-justify the
1708         argument and call ffi_v9_layout_struct to lay out the structure on
1709         the stack.
1710         * src/sparc/v8.S: Undef STACKFRAME before defining it.
1711         (ffi_closure_v8): Pass the structure return address.  Update call to
1712         ffi_closure_sparc_inner_v8.  Short-circuit FFI_TYPE_INT handling.
1713         Skip the 'unimp' insn when returning long doubles and structures.
1714         * src/sparc/v9.S: Undef STACKFRAME before defining it.
1715         (ffi_closure_v9): Increase the frame size by 2 words.  Short-circuit
1716         FFI_TYPE_INT handling.  Load structures both in integers and
1717         floating-point registers on return.
1718         * README: Update status of the SPARC port.
1719
1720 2004-01-24  Andreas Tobler  <a.tobler@schweiz.ch>
1721
1722         * testsuite/libffi.call/pyobjc-tc.c (main): Treat result value
1723         as of type ffi_arg.
1724         * testsuite/libffi.call/struct3.c (main): Fix CHECK.
1725
1726 2004-01-22  Ulrich Weigand  <uweigand@de.ibm.com>
1727
1728         * testsuite/libffi.call/cls_uint.c (cls_ret_uint_fn): Treat result
1729         value as of type ffi_arg, not unsigned int.
1730
1731 2004-01-21  Michael Ritzert  <ritzert@t-online.de>
1732
1733         * ffi64.c (ffi_prep_args): Cast the RHS of an assignment instead
1734         of the LHS.
1735
1736 2004-01-12  Andreas Tobler  <a.tobler@schweiz.ch>
1737
1738         * testsuite/lib/libffi-dg.exp: Set LD_LIBRARY_PATH_32 for
1739         Solaris.
1740
1741 2004-01-08  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
1742
1743         * testsuite/libffi.call/ffitest.h (allocate_mmap): Cast MAP_FAILED
1744         to void *.
1745
1746 2003-12-10  Richard Henderson  <rth@redhat.com>
1747
1748         * testsuite/libffi.call/cls_align_pointer.c: Cast pointers to
1749         size_t instead of int.
1750
1751 2003-12-04  Hosaka Yuji  <hos@tamanegi.org>
1752
1753         * testsuite/libffi.call/many_win32.c: Include <float.h>.
1754         * testsuite/libffi.call/many_win32.c (main): Replace variable
1755         int i with unsigned long ul.
1756
1757         * testsuite/libffi.call/cls_align_uint64.c: New test case.
1758         * testsuite/libffi.call/cls_align_sint64.c: Likewise.
1759         * testsuite/libffi.call/cls_align_uint32.c: Likewise.
1760         * testsuite/libffi.call/cls_align_sint32.c: Likewise.
1761         * testsuite/libffi.call/cls_align_uint16.c: Likewise.
1762         * testsuite/libffi.call/cls_align_sint16.c: Likewise.
1763         * testsuite/libffi.call/cls_align_float.c: Likewise.
1764         * testsuite/libffi.call/cls_align_double.c: Likewise.
1765         * testsuite/libffi.call/cls_align_longdouble.c: Likewise.
1766         * testsuite/libffi.call/cls_align_pointer.c: Likewise.
1767
1768 2003-12-02  Hosaka Yuji  <hos@tamanegi.org>
1769
1770         PR other/13221
1771         * src/x86/ffi.c (ffi_prep_args, ffi_prep_incoming_args_SYSV):
1772         Align arguments to 32 bits.
1773
1774 2003-12-01  Andreas Tobler  <a.tobler@schweiz.ch>
1775
1776         PR other/13221
1777         * testsuite/libffi.call/cls_multi_sshort.c: New test case.
1778         * testsuite/libffi.call/cls_multi_sshortchar.c: Likewise.
1779         * testsuite/libffi.call/cls_multi_uchar.c: Likewise.
1780         * testsuite/libffi.call/cls_multi_schar.c: Likewise.
1781         * testsuite/libffi.call/cls_multi_ushortchar.c: Likewise.
1782         * testsuite/libffi.call/cls_multi_ushort.c: Likewise.
1783
1784         * testsuite/libffi.special/unwindtest.cc: Cosmetics.
1785
1786 2003-11-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1787
1788         * testsuite/libffi.call/ffitest.h: Include <fcntl.h>.
1789         * testsuite/libffi.special/ffitestcxx.h: Likewise.
1790
1791 2003-11-22  Andreas Tobler  <a.tobler@schweiz.ch>
1792
1793         * Makefile.in: Rebuilt.
1794         * configure: Likewise.
1795         * testsuite/libffi.special/unwindtest.cc: Convert the mmap to
1796         the right type.
1797
1798 2003-11-21  Andreas Jaeger  <aj@suse.de>
1799             Andreas Tobler  <a.tobler@schweiz.ch>
1800
1801         * acinclude.m4: Add AC_FUNC_MMAP_BLACKLIST.
1802         * configure.in: Call AC_FUNC_MMAP_BLACKLIST.
1803         * Makefile.in: Rebuilt.
1804         * aclocal.m4: Likewise.
1805         * configure: Likewise.
1806         * fficonfig.h.in: Likewise.
1807         * testsuite/lib/libffi-dg.exp: Add include dir.
1808         * testsuite/libffi.call/ffitest.h: Add MMAP definitions.
1809         * testsuite/libffi.special/ffitestcxx.h: Likewise.
1810         * testsuite/libffi.call/closure_fn0.c: Use MMAP functionality
1811         for ffi_closure if available.
1812         * testsuite/libffi.call/closure_fn1.c: Likewise.
1813         * testsuite/libffi.call/closure_fn2.c: Likewise.
1814         * testsuite/libffi.call/closure_fn3.c: Likewise.
1815         * testsuite/libffi.call/closure_fn4.c: Likewise.
1816         * testsuite/libffi.call/closure_fn5.c: Likewise.
1817         * testsuite/libffi.call/cls_12byte.c: Likewise.
1818         * testsuite/libffi.call/cls_16byte.c: Likewise.
1819         * testsuite/libffi.call/cls_18byte.c: Likewise.
1820         * testsuite/libffi.call/cls_19byte.c: Likewise.
1821         * testsuite/libffi.call/cls_1_1byte.c: Likewise.
1822         * testsuite/libffi.call/cls_20byte.c: Likewise.
1823         * testsuite/libffi.call/cls_20byte1.c: Likewise.
1824         * testsuite/libffi.call/cls_24byte.c: Likewise.
1825         * testsuite/libffi.call/cls_2byte.c: Likewise.
1826         * testsuite/libffi.call/cls_3_1byte.c: Likewise.
1827         * testsuite/libffi.call/cls_3byte1.c: Likewise.
1828         * testsuite/libffi.call/cls_3byte2.c: Likewise.
1829         * testsuite/libffi.call/cls_4_1byte.c: Likewise.
1830         * testsuite/libffi.call/cls_4byte.c: Likewise.
1831         * testsuite/libffi.call/cls_5byte.c: Likewise.
1832         * testsuite/libffi.call/cls_64byte.c: Likewise.
1833         * testsuite/libffi.call/cls_6byte.c: Likewise.
1834         * testsuite/libffi.call/cls_7byte.c: Likewise.
1835         * testsuite/libffi.call/cls_8byte.c: Likewise.
1836         * testsuite/libffi.call/cls_9byte1.c: Likewise.
1837         * testsuite/libffi.call/cls_9byte2.c: Likewise.
1838         * testsuite/libffi.call/cls_double.c: Likewise.
1839         * testsuite/libffi.call/cls_float.c: Likewise.
1840         * testsuite/libffi.call/cls_schar.c: Likewise.
1841         * testsuite/libffi.call/cls_sint.c: Likewise.
1842         * testsuite/libffi.call/cls_sshort.c: Likewise.
1843         * testsuite/libffi.call/cls_uchar.c: Likewise.
1844         * testsuite/libffi.call/cls_uint.c: Likewise.
1845         * testsuite/libffi.call/cls_ulonglong.c: Likewise.
1846         * testsuite/libffi.call/cls_ushort.c: Likewise.
1847         * testsuite/libffi.call/nested_struct.c: Likewise.
1848         * testsuite/libffi.call/nested_struct1.c: Likewise.
1849         * testsuite/libffi.call/nested_struct2.c: Likewise.
1850         * testsuite/libffi.call/nested_struct3.c: Likewise.
1851         * testsuite/libffi.call/problem1.c: Likewise.
1852         * testsuite/libffi.special/unwindtest.cc: Likewise.
1853
1854 2003-11-20  Andreas Tobler  <a.tobler@schweiz.ch>
1855
1856         * testsuite/lib/libffi-dg.exp: Make the -lgcc_s conditional.
1857
1858 2003-11-19  Andreas Tobler  <a.tobler@schweiz.ch>
1859
1860         * testsuite/lib/libffi-dg.exp: Add DYLD_LIBRARY_PATH for darwin.
1861         Add -lgcc_s to additional flags.
1862
1863 2003-11-12  Andreas Tobler  <a.tobler@schweiz.ch>
1864
1865         * configure.in, include/Makefile.am: PR libgcj/11147, install
1866         the ffitarget.h header file in a gcc versioned and target
1867         dependent place.
1868         * configure: Regenerated.
1869         * Makefile.in, include/Makefile.in: Likewise.
1870         * testsuite/Makefile.in: Likewise.
1871
1872 2003-11-09  Andreas Tobler  <a.tobler@schweiz.ch>
1873
1874         * testsuite/libffi.call/closure_fn0.c: Print result and check
1875         with dg-output to make debugging easier.
1876         * testsuite/libffi.call/closure_fn1.c: Likewise.
1877         * testsuite/libffi.call/closure_fn2.c: Likewise.
1878         * testsuite/libffi.call/closure_fn3.c: Likewise.
1879         * testsuite/libffi.call/closure_fn4.c: Likewise.
1880         * testsuite/libffi.call/closure_fn5.c: Likewise.
1881         * testsuite/libffi.call/cls_12byte.c: Likewise.
1882         * testsuite/libffi.call/cls_16byte.c: Likewise.
1883         * testsuite/libffi.call/cls_18byte.c: Likewise.
1884         * testsuite/libffi.call/cls_19byte.c: Likewise.
1885         * testsuite/libffi.call/cls_1_1byte.c: Likewise.
1886         * testsuite/libffi.call/cls_20byte.c: Likewise.
1887         * testsuite/libffi.call/cls_20byte1.c: Likewise.
1888         * testsuite/libffi.call/cls_24byte.c: Likewise.
1889         * testsuite/libffi.call/cls_2byte.c: Likewise.
1890         * testsuite/libffi.call/cls_3_1byte.c: Likewise.
1891         * testsuite/libffi.call/cls_3byte1.c: Likewise.
1892         * testsuite/libffi.call/cls_3byte2.c: Likewise.
1893         * testsuite/libffi.call/cls_4_1byte.c: Likewise.
1894         * testsuite/libffi.call/cls_4byte.c: Likewise.
1895         * testsuite/libffi.call/cls_5byte.c: Likewise.
1896         * testsuite/libffi.call/cls_64byte.c: Likewise.
1897         * testsuite/libffi.call/cls_6byte.c: Likewise.
1898         * testsuite/libffi.call/cls_7byte.c: Likewise.
1899         * testsuite/libffi.call/cls_8byte.c: Likewise.
1900         * testsuite/libffi.call/cls_9byte1.c: Likewise.
1901         * testsuite/libffi.call/cls_9byte2.c: Likewise.
1902         * testsuite/libffi.call/cls_double.c: Likewise.
1903         * testsuite/libffi.call/cls_float.c: Likewise.
1904         * testsuite/libffi.call/cls_schar.c: Likewise.
1905         * testsuite/libffi.call/cls_sint.c: Likewise.
1906         * testsuite/libffi.call/cls_sshort.c: Likewise.
1907         * testsuite/libffi.call/cls_uchar.c: Likewise.
1908         * testsuite/libffi.call/cls_uint.c: Likewise.
1909         * testsuite/libffi.call/cls_ulonglong.c: Likewise.
1910         * testsuite/libffi.call/cls_ushort.c: Likewise.
1911         * testsuite/libffi.call/problem1.c: Likewise.
1912
1913         * testsuite/libffi.special/unwindtest.cc: Make ffi_closure
1914         static.
1915
1916 2003-11-08  Andreas Tobler  <a.tobler@schweiz.ch>
1917
1918         * testsuite/libffi.call/cls_9byte2.c: New test case.
1919         * testsuite/libffi.call/cls_9byte1.c: Likewise.
1920         * testsuite/libffi.call/cls_64byte.c: Likewise.
1921         * testsuite/libffi.call/cls_20byte1.c: Likewise.
1922         * testsuite/libffi.call/cls_19byte.c: Likewise.
1923         * testsuite/libffi.call/cls_18byte.c: Likewise.
1924         * testsuite/libffi.call/closure_fn4.c: Likewise.
1925         * testsuite/libffi.call/closure_fn5.c: Likewise.
1926         * testsuite/libffi.call/cls_schar.c: Likewise.
1927         * testsuite/libffi.call/cls_sint.c: Likewise.
1928         * testsuite/libffi.call/cls_sshort.c: Likewise.
1929         * testsuite/libffi.call/nested_struct2.c: Likewise.
1930         * testsuite/libffi.call/nested_struct3.c: Likewise.
1931
1932 2003-11-08  Andreas Tobler  <a.tobler@schweiz.ch>
1933
1934         * testsuite/libffi.call/cls_double.c: Do a check on the result.
1935         * testsuite/libffi.call/cls_uchar.c: Likewise.
1936         * testsuite/libffi.call/cls_uint.c: Likewise.
1937         * testsuite/libffi.call/cls_ulonglong.c: Likewise.
1938         * testsuite/libffi.call/cls_ushort.c: Likewise.
1939         * testsuite/libffi.call/return_sc.c: Cleanup whitespaces.
1940
1941 2003-11-06  Andreas Tobler  <a.tobler@schweiz.ch>
1942
1943         * src/prep_cif.c (ffi_prep_cif): Move the validity check after
1944         the initialization.
1945
1946 2003-10-23  Andreas Tobler  <a.tobler@schweiz.ch>
1947
1948         * src/java_raw_api.c (ffi_java_ptrarray_to_raw): Replace
1949         FFI_ASSERT(FALSE) with FFI_ASSERT(0).
1950
1951 2003-10-22  David Daney  <ddaney@avtrex.com>
1952
1953         * src/mips/ffitarget.h: Replace undefined UINT32 and friends with
1954         __attribute__((__mode__(__SI__))) and friends.
1955
1956 2003-10-22  Andreas Schwab  <schwab@suse.de>
1957
1958         * src/ia64/ffi.c: Replace FALSE/TRUE with false/true.
1959
1960 2003-10-21  Andreas Tobler  <a.tobler@schweiz.ch>
1961
1962         * configure.in: AC_LINK_FILES(ffitarget.h).
1963         * configure: Regenerate.
1964         * Makefile.in: Likewise.
1965         * include/Makefile.in: Likewise.
1966         * testsuite/Makefile.in: Likewise.
1967         * fficonfig.h.in: Likewise.
1968
1969 2003-10-21  Paolo Bonzini  <bonzini@gnu.org>
1970             Richard Henderson  <rth@redhat.com>
1971
1972         Avoid that ffi.h includes fficonfig.h.
1973
1974         * Makefile.am (EXTRA_DIST): Include ffitarget.h files
1975         (TARGET_SRC_MIPS_GCC): Renamed to TARGET_SRC_MIPS_IRIX.
1976         (TARGET_SRC_MIPS_SGI): Removed.
1977         (MIPS_GCC): Renamed to TARGET_SRC_MIPS_IRIX.
1978         (MIPS_SGI): Removed.
1979         (CLEANFILES): Removed.
1980         (mostlyclean-am, clean-am, mostlyclean-sub, clean-sub): New
1981         targets.
1982         * acconfig.h: Removed.
1983         * configure.in: Compute sizeofs only for double and long double.
1984         Use them to define and subst HAVE_LONG_DOUBLE.  Include comments
1985         into AC_DEFINE instead of using acconfig.h.  Create
1986         include/ffitarget.h instead of include/fficonfig.h.  Rename
1987         MIPS_GCC to MIPS_IRIX, drop MIPS_SGI since we are in gcc's tree.
1988         AC_DEFINE EH_FRAME_FLAGS.
1989         * include/Makefile.am (DISTCLEANFILES): New automake macro.
1990         (hack_DATA): Add ffitarget.h.
1991         * include/ffi.h.in: Remove all system specific definitions.
1992         Declare raw API even if it is not installed, why bother?
1993         Use limits.h instead of SIZEOF_* to define ffi_type_*.  Do
1994         not define EH_FRAME_FLAGS, it is in fficonfig.h now.  Include
1995         ffitarget.h instead of fficonfig.h.  Remove ALIGN macro.
1996         (UINT_ARG, INT_ARG): Removed, use ffi_arg and ffi_sarg instead.
1997         * include/ffi_common.h (bool): Do not define.
1998         (ffi_assert): Accept failed assertion.
1999         (ffi_type_test): Return void and accept file/line.
2000         (FFI_ASSERT): Pass stringized failed assertion.
2001         (FFI_ASSERT_AT): New macro.
2002         (FFI_ASSERT_VALID_TYPE): New macro.
2003         (UINT8, SINT8, UINT16, SINT16, UINT32, SINT32,
2004         UINT64, SINT64): Define here with gcc's __attribute__ macro
2005         instead of in ffi.h
2006         (FLOAT32, ALIGN): Define here instead of in ffi.h
2007         * include/ffi-mips.h: Removed.  Its content moved to
2008         src/mips/ffitarget.h after separating assembly and C sections.
2009         * src/alpha/ffi.c, src/alpha/ffi.c, src/java_raw_api.c
2010         src/prep_cif.c, src/raw_api.c, src/ia64/ffi.c,
2011         src/mips/ffi.c, src/mips/n32.S, src/mips/o32.S,
2012         src/mips/ffitarget.h, src/sparc/ffi.c, src/x86/ffi64.c:
2013         SIZEOF_ARG -> FFI_SIZEOF_ARG.
2014         * src/ia64/ffi.c: Include stdbool.h (provided by GCC 2.95+).
2015         * src/debug.c (ffi_assert): Accept stringized failed assertion.
2016         (ffi_type_test): Rewritten.
2017         * src/prep-cif.c (initialize_aggregate, ffi_prep_cif): Call
2018         FFI_ASSERT_VALID_TYPE.
2019         * src/alpha/ffitarget.h, src/arm/ffitarget.h,
2020         src/ia64/ffitarget.h, src/m68k/ffitarget.h,
2021         src/mips/ffitarget.h, src/powerpc/ffitarget.h,
2022         src/s390/ffitarget.h, src/sh/ffitarget.h,
2023         src/sh64/ffitarget.h, src/sparc/ffitarget.h,
2024         src/x86/ffitarget.h: New files.
2025         * src/alpha/osf.S, src/arm/sysv.S, src/ia64/unix.S,
2026         src/m68k/sysv.S, src/mips/n32.S, src/mips/o32.S,
2027         src/powerpc/aix.S, src/powerpc/darwin.S,
2028         src/powerpc/ffi_darwin.c, src/powerpc/linux64.S,
2029         src/powerpc/linux64_closure.S, src/powerpc/ppc_closure.S,
2030         src/powerpc/sysv.S, src/s390/sysv.S, src/sh/sysv.S,
2031         src/sh64/sysv.S, src/sparc/v8.S, src/sparc/v9.S,
2032         src/x86/sysv.S, src/x86/unix64.S, src/x86/win32.S:
2033         include fficonfig.h
2034
2035 2003-10-20  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
2036
2037         * src/mips/ffi.c: Use _ABIN32, _ABIO32 instead of external
2038         _MIPS_SIM_NABI32, _MIPS_SIM_ABI32.
2039
2040 2003-10-19  Andreas Tobler  <a.tobler@schweiz.ch>
2041
2042         * src/powerpc/ffi_darwin.c (ffi_prep_args): Declare bytes again.
2043         Used when FFI_DEBUG = 1.
2044
2045 2003-10-14  Alan Modra  <amodra@bigpond.net.au>
2046
2047         * src/types.c (double, longdouble): Default POWERPC64 to 8 byte size
2048         and align.
2049
2050 2003-10-06  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
2051
2052         * include/ffi_mips.h: Define FFI_MIPS_N32 for N32/N64 ABIs,
2053         FFI_MIPS_O32 for O32 ABI.
2054
2055 2003-10-01  Andreas Tobler  <a.tobler@schweiz.ch>
2056
2057         * testsuite/lib/libffi-dg.exp: Set LD_LIBRARY_PATH_64 for
2058         SPARC64. Cleanup whitespaces.
2059
2060 2003-09-19  Andreas Tobler  <a.tobler@schweiz.ch>
2061
2062         * testsuite/libffi.call/closure_fn0.c: Xfail mips, arm,
2063         strongarm, xscale. Cleanup whitespaces.
2064         * testsuite/libffi.call/closure_fn1.c: Likewise.
2065         * testsuite/libffi.call/closure_fn2.c: Likewise.
2066         * testsuite/libffi.call/closure_fn3.c: Likewise.
2067         * testsuite/libffi.call/cls_12byte.c: Likewise.
2068         * testsuite/libffi.call/cls_16byte.c: Likewise.
2069         * testsuite/libffi.call/cls_1_1byte.c: Likewise.
2070         * testsuite/libffi.call/cls_20byte.c: Likewise.
2071         * testsuite/libffi.call/cls_24byte.c: Likewise.
2072         * testsuite/libffi.call/cls_2byte.c: Likewise.
2073         * testsuite/libffi.call/cls_3_1byte.c: Likewise.
2074         * testsuite/libffi.call/cls_3byte1.c: Likewise.
2075         * testsuite/libffi.call/cls_3byte2.c: Likewise.
2076         * testsuite/libffi.call/cls_4_1byte.c: Likewise.
2077         * testsuite/libffi.call/cls_4byte.c: Likewise.
2078         * testsuite/libffi.call/cls_5byte.c: Likewise.
2079         * testsuite/libffi.call/cls_6byte.c: Likewise.
2080         * testsuite/libffi.call/cls_7byte.c: Likewise.
2081         * testsuite/libffi.call/cls_8byte.c: Likewise.
2082         * testsuite/libffi.call/cls_double.c: Likewise.
2083         * testsuite/libffi.call/cls_float.c: Likewise.
2084         * testsuite/libffi.call/cls_uchar.c: Likewise.
2085         * testsuite/libffi.call/cls_uint.c: Likewise.
2086         * testsuite/libffi.call/cls_ulonglong.c: Likewise.
2087         * testsuite/libffi.call/cls_ushort.c: Likewise.
2088         * testsuite/libffi.call/nested_struct.c: Likewise.
2089         * testsuite/libffi.call/nested_struct1.c: Likewise.
2090         * testsuite/libffi.call/problem1.c: Likewise.
2091         * testsuite/libffi.special/unwindtest.cc: Likewise.
2092         * testsuite/libffi.call/pyobjc-tc.c: Cleanup whitespaces.
2093
2094 2003-09-18  David Edelsohn  <edelsohn@gnu.org>
2095
2096         * src/powerpc/aix.S: Cleanup whitespaces.
2097         * src/powerpc/aix_closure.S: Likewise.
2098
2099 2003-09-18  Andreas Tobler  <a.tobler@schweiz.ch>
2100
2101         * src/powerpc/darwin.S: Cleanup whitespaces, comment formatting.
2102         * src/powerpc/darwin_closure.S: Likewise.
2103         * src/powerpc/ffi_darwin.c: Likewise.
2104
2105 2003-09-18  Andreas Tobler  <a.tobler@schweiz.ch>
2106             David Edelsohn  <edelsohn@gnu.org>
2107
2108         * src/types.c (double): Add AIX and Darwin to the right TYPEDEF.
2109         * src/powerpc/aix_closure.S: Remove the pointer to the outgoing
2110         parameter stack.
2111         * src/powerpc/darwin_closure.S: Likewise.
2112         * src/powerpc/ffi_darwin.c (ffi_prep_args): Handle structures
2113         according to the Darwin/AIX ABI.
2114         (ffi_prep_cif_machdep): Likewise.
2115         (ffi_closure_helper_DARWIN): Likewise.
2116         Remove the outgoing parameter stack logic. Simplify the evaluation
2117         of the different CASE types.
2118         (ffi_prep_clousure): Avoid the casts on lvalues. Change the branch
2119         statement in the trampoline code.
2120
2121 2003-09-18  Kaz Kojima  <kkojima@gcc.gnu.org>
2122
2123         * src/sh/ffi.c (ffi_prep_args): Take account into the alignement
2124         for the register size.
2125         (ffi_closure_helper_SYSV): Handle the structure return value
2126         address correctly.
2127         (ffi_closure_helper_SYSV): Return the appropriate type when
2128         the registers are used for the structure return value.
2129         * src/sh/sysv.S (ffi_closure_SYSV): Fix the stack layout for
2130         the 64-bit return value.  Update copyright years.
2131
2132 2003-09-17  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
2133
2134         * testsuite/lib/libffi-dg.exp (libffi_target_compile): Search in
2135         srcdir for ffi_mips.h.
2136
2137 2003-09-12  Alan Modra  <amodra@bigpond.net.au>
2138
2139         * src/prep_cif.c (initialize_aggregate): Include tail padding in
2140         structure size.
2141         * src/powerpc/linux64_closure.S (ffi_closure_LINUX64): Correct
2142         placement of float result.
2143         * testsuite/libffi.special/unwindtest.cc (closure_test_fn1): Correct
2144         cast of "resp" for big-endian 64 bit machines.
2145
2146 2003-09-11  Alan Modra  <amodra@bigpond.net.au>
2147
2148         * src/types.c (double, longdouble): Merge identical SH and ARM
2149         typedefs, and add POWERPC64.
2150         * src/powerpc/ffi.c (ffi_prep_args64): Correct next_arg calc for
2151         struct split over gpr and rest.
2152         (ffi_prep_cif_machdep): Correct intarg_count for structures.
2153         * src/powerpc/linux64.S (ffi_call_LINUX64): Fix gpr offsets.
2154
2155 2003-09-09  Andreas Tobler  <a.tobler@schweiz.ch>
2156
2157         * src/powerpc/ffi.c (ffi_closure_helper_SYSV) Handle struct
2158         passing correctly.
2159
2160 2003-09-09  Alan Modra  <amodra@bigpond.net.au>
2161
2162         * configure: Regenerate.
2163
2164 2003-09-04  Andreas Tobler  <a.tobler@schweiz.ch>
2165
2166         * Makefile.am: Remove build rules for ffitest.
2167         * Makefile.in: Rebuilt.
2168
2169 2003-09-04  Andreas Tobler  <a.tobler@schweiz.ch>
2170
2171         * src/java_raw_api.c: Include <stdlib.h> to fix compiler warning
2172         about implicit declaration of abort().
2173
2174 2003-09-04  Andreas Tobler  <a.tobler@schweiz.ch>
2175
2176         * Makefile.am: Add dejagnu test framework. Fixes PR other/11411.
2177         * Makefile.in: Rebuilt.
2178         * configure.in: Add dejagnu test framework.
2179         * configure: Rebuilt.
2180
2181         * testsuite/Makefile.am: New file.
2182         * testsuite/Makefile.in: Built
2183         * testsuite/lib/libffi-dg.exp: New file.
2184         * testsuite/config/default.exp: Likewise.
2185         * testsuite/libffi.call/call.exp: Likewise.
2186         * testsuite/libffi.call/ffitest.h: Likewise.
2187         * testsuite/libffi.call/closure_fn0.c: Likewise.
2188         * testsuite/libffi.call/closure_fn1.c: Likewise.
2189         * testsuite/libffi.call/closure_fn2.c: Likewise.
2190         * testsuite/libffi.call/closure_fn3.c: Likewise.
2191         * testsuite/libffi.call/cls_1_1byte.c: Likewise.
2192         * testsuite/libffi.call/cls_3_1byte.c: Likewise.
2193         * testsuite/libffi.call/cls_4_1byte.c: Likewise.
2194         * testsuite/libffi.call/cls_2byte.c: Likewise.
2195         * testsuite/libffi.call/cls_3byte1.c: Likewise.
2196         * testsuite/libffi.call/cls_3byte2.c: Likewise.
2197         * testsuite/libffi.call/cls_4byte.c: Likewise.
2198         * testsuite/libffi.call/cls_5byte.c: Likewise.
2199         * testsuite/libffi.call/cls_6byte.c: Likewise.
2200         * testsuite/libffi.call/cls_7byte.c: Likewise.
2201         * testsuite/libffi.call/cls_8byte.c: Likewise.
2202         * testsuite/libffi.call/cls_12byte.c: Likewise.
2203         * testsuite/libffi.call/cls_16byte.c: Likewise.
2204         * testsuite/libffi.call/cls_20byte.c: Likewise.
2205         * testsuite/libffi.call/cls_24byte.c: Likewise.
2206         * testsuite/libffi.call/cls_double.c: Likewise.
2207         * testsuite/libffi.call/cls_float.c: Likewise.
2208         * testsuite/libffi.call/cls_uchar.c: Likewise.
2209         * testsuite/libffi.call/cls_uint.c: Likewise.
2210         * testsuite/libffi.call/cls_ulonglong.c: Likewise.
2211         * testsuite/libffi.call/cls_ushort.c: Likewise.
2212         * testsuite/libffi.call/float.c: Likewise.
2213         * testsuite/libffi.call/float1.c: Likewise.
2214         * testsuite/libffi.call/float2.c: Likewise.
2215         * testsuite/libffi.call/many.c: Likewise.
2216         * testsuite/libffi.call/many_win32.c: Likewise.
2217         * testsuite/libffi.call/nested_struct.c: Likewise.
2218         * testsuite/libffi.call/nested_struct1.c: Likewise.
2219         * testsuite/libffi.call/pyobjc-tc.c: Likewise.
2220         * testsuite/libffi.call/problem1.c: Likewise.
2221         * testsuite/libffi.call/promotion.c: Likewise.
2222         * testsuite/libffi.call/return_ll.c: Likewise.
2223         * testsuite/libffi.call/return_sc.c: Likewise.
2224         * testsuite/libffi.call/return_uc.c: Likewise.
2225         * testsuite/libffi.call/strlen.c: Likewise.
2226         * testsuite/libffi.call/strlen_win32.c: Likewise.
2227         * testsuite/libffi.call/struct1.c: Likewise.
2228         * testsuite/libffi.call/struct2.c: Likewise.
2229         * testsuite/libffi.call/struct3.c: Likewise.
2230         * testsuite/libffi.call/struct4.c: Likewise.
2231         * testsuite/libffi.call/struct5.c: Likewise.
2232         * testsuite/libffi.call/struct6.c: Likewise.
2233         * testsuite/libffi.call/struct7.c: Likewise.
2234         * testsuite/libffi.call/struct8.c: Likewise.
2235         * testsuite/libffi.call/struct9.c: Likewise.
2236         * testsuite/libffi.special/special.exp: New file.
2237         * testsuite/libffi.special/ffitestcxx.h: Likewise.
2238         * testsuite/libffi.special/unwindtest.cc: Likewise.
2239
2240
2241 2003-08-13  Kaz Kojima  <kkojima@gcc.gnu.org>
2242
2243         * src/sh/ffi.c (OFS_INT16): Set 0 for little endian case.  Update
2244         copyright years.
2245
2246 2003-08-02  Alan Modra  <amodra@bigpond.net.au>
2247
2248         * src/powerpc/ffi.c (ffi_prep_args64): Modify for changed gcc
2249         structure passing.
2250         (ffi_closure_helper_LINUX64): Likewise.
2251         * src/powerpc/linux64.S: Remove code writing to parm save area.
2252         * src/powerpc/linux64_closure.S (ffi_closure_LINUX64): Use return
2253         address in lr from ffi_closure_helper_LINUX64 call to calculate
2254         table address.  Optimize function tail.
2255
2256 2003-07-28  Andreas Tobler  <a.tobler@schweiz.ch>
2257
2258         * src/sparc/ffi.c: Handle all floating point registers.
2259         * src/sparc/v9.S: Likewise. Fixes second part of PR target/11410.
2260
2261 2003-07-11  Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
2262
2263         * README: Note that libffi is not part of GCC.  Update the project
2264         URL and status.
2265
2266 2003-06-19  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
2267
2268         * src/powerpc/ppc_closure.S: Include ffi.h.
2269
2270 2003-06-13  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
2271
2272         * src/x86/sysv.S: Avoid gas-only .uleb128/.sleb128 directives.
2273         Use C style comments.
2274
2275 2003-06-13  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2276
2277         * Makefile.am: Add SHmedia support.  Fix a typo of SH support.
2278         * Makefile.in: Regenerate.
2279         * configure.in (sh64-*-linux*, sh5*-*-linux*): Add target.
2280         * configure: Regenerate.
2281         * include/ffi.h.in: Add SHmedia support.
2282         * src/sh64/ffi.c: New file.
2283         * src/sh64/sysv.S: New file.
2284
2285 2003-05-16  Jakub Jelinek  <jakub@redhat.com>
2286
2287         * configure.in (HAVE_RO_EH_FRAME): Check whether .eh_frame section
2288         should be read-only.
2289         * configure: Rebuilt.
2290         * fficonfig.h.in: Rebuilt.
2291         * include/ffi.h.in (EH_FRAME_FLAGS): Define.
2292         * src/alpha/osf.S: Use EH_FRAME_FLAGS.
2293         * src/powerpc/linux64.S: Likewise.
2294         * src/powerpc/linux64_closure.S: Likewise.  Include ffi.h.
2295         * src/powerpc/sysv.S: Use EH_FRAME_FLAGS.  Use pcrel encoding
2296         if -fpic/-fPIC/-mrelocatable.
2297         * src/powerpc/powerpc_closure.S: Likewise.
2298         * src/sparc/v8.S: If HAVE_RO_EH_FRAME is defined, don't include
2299         #write in .eh_frame flags.
2300         * src/sparc/v9.S: Likewise.
2301         * src/x86/unix64.S: Use EH_FRAME_FLAGS.
2302         * src/x86/sysv.S: Likewise.  Use pcrel encoding if -fpic/-fPIC.
2303         * src/s390/sysv.S: Use EH_FRAME_FLAGS.  Include ffi.h.
2304
2305 2003-05-07  Jeff Sturm  <jsturm@one-point.com>
2306
2307         Fixes PR bootstrap/10656
2308         * configure.in (HAVE_AS_REGISTER_PSEUDO_OP): Test assembler
2309         support for .register pseudo-op.
2310         * src/sparc/v8.S: Use it.
2311         * fficonfig.h.in: Rebuilt.
2312         * configure: Rebuilt.
2313
2314 2003-04-18  Jakub Jelinek  <jakub@redhat.com>
2315
2316         * include/ffi.h.in (POWERPC64): Define if 64-bit.
2317         (enum ffi_abi): Add FFI_LINUX64 on POWERPC.
2318         Make it the default on POWERPC64.
2319         (FFI_TRAMPOLINE_SIZE): Define to 24 on POWERPC64.
2320         * configure.in: Change powerpc-*-linux* into powerpc*-*-linux*.
2321         * configure: Rebuilt.
2322         * src/powerpc/ffi.c (hidden): Define.
2323         (ffi_prep_args_SYSV): Renamed from
2324         ffi_prep_args.  Cast pointers to unsigned long to shut up warnings.
2325         (NUM_GPR_ARG_REGISTERS64, NUM_FPR_ARG_REGISTERS64,
2326         ASM_NEEDS_REGISTERS64): New.
2327         (ffi_prep_args64): New function.
2328         (ffi_prep_cif_machdep): Handle FFI_LINUX64 ABI.
2329         (ffi_call): Likewise.
2330         (ffi_prep_closure): Likewise.
2331         (flush_icache): Surround by #ifndef POWERPC64.
2332         (ffi_dblfl): New union type.
2333         (ffi_closure_helper_SYSV): Use it to avoid aliasing problems.
2334         (ffi_closure_helper_LINUX64): New function.
2335         * src/powerpc/ppc_closure.S: Surround whole file by #ifndef
2336         __powerpc64__.
2337         * src/powerpc/sysv.S: Likewise.
2338         (ffi_call_SYSV): Rename ffi_prep_args to ffi_prep_args_SYSV.
2339         * src/powerpc/linux64.S: New file.
2340         * src/powerpc/linux64_closure.S: New file.
2341         * Makefile.am (EXTRA_DIST): Add src/powerpc/linux64.S and
2342         src/powerpc/linux64_closure.S.
2343         (TARGET_SRC_POWERPC): Likewise.
2344
2345         * src/ffitest.c (closure_test_fn, closure_test_fn1, closure_test_fn2,
2346         closure_test_fn3): Fix result printing on big-endian 64-bit
2347         machines.
2348         (main): Print tst2_arg instead of uninitialized tst2_result.
2349
2350         * src/ffitest.c (main): Hide what closure pointer really points to
2351         from the compiler.
2352
2353 2003-04-16  Richard Earnshaw  <rearnsha@arm.com>
2354
2355         * configure.in (arm-*-netbsdelf*): Add configuration.
2356         (configure): Regenerated.
2357
2358 2003-04-04  Loren J. Rittle  <ljrittle@acm.org>
2359
2360         * include/Makefile.in: Regenerate.
2361
2362 2003-03-21  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>
2363
2364         * libffi/include/ffi.h.in: Define X86 instead of X86_64 in 32
2365         bit mode.
2366         * libffi/src/x86/ffi.c (ffi_closure_SYSV, ffi_closure_raw_SYSV):
2367         Receive closure pointer through parameter, read args using
2368         __builtin_dwarf_cfa.
2369         (FFI_INIT_TRAMPOLINE): Send closure reference through eax.
2370
2371 2003-03-12  Andreas Schwab  <schwab@suse.de>
2372
2373         * configure.in: Avoid trailing /. in toolexeclibdir.
2374         * configure: Rebuilt.
2375
2376 2003-03-03  Andreas Tobler <a.tobler@schweiz.ch>
2377
2378         * src/powerpc/darwin_closure.S: Recode to fit dynamic libraries.
2379
2380 2003-02-06  Andreas Tobler <a.tobler@schweiz.ch>
2381
2382         * libffi/src/powerpc/darwin_closure.S:
2383         Fix alignement bug, allocate 8 bytes for the result.
2384         * libffi/src/powerpc/aix_closure.S:
2385         Likewise.
2386         * libffi/src/powerpc/ffi_darwin.c:
2387         Update stackframe description for aix/darwin_closure.S.
2388
2389 2003-02-06  Jakub Jelinek  <jakub@redhat.com>
2390
2391         * src/s390/ffi.c (ffi_closure_helper_SYSV): Add hidden visibility
2392         attribute.
2393
2394 2003-01-31  Christian Cornelssen  <ccorn@cs.tu-berlin.de>,
2395             Andreas Schwab  <schwab@suse.de>
2396
2397         * configure.in: Adjust command to source config-ml.in to account
2398         for changes to the libffi_basedir definition.
2399         (libffi_basedir): Remove ${srcdir} from value and include trailing
2400         slash if nonempty.
2401
2402         * configure: Regenerate.
2403
2404 2003-01-29  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
2405
2406         * src/powerpc/ppc_closure.S: Recode to fit shared libs.
2407
2408 2003-01-28  Andrew Haley  <aph@redhat.com>
2409
2410         * include/ffi.h.in: Enable FFI_CLOSURES for x86_64.
2411         * src/x86/ffi64.c (ffi_prep_closure): New.
2412         (ffi_closure_UNIX64_inner): New.
2413         * src/x86/unix64.S (ffi_closure_UNIX64): New.
2414
2415 2003-01-27  Alexandre Oliva  <aoliva@redhat.com>
2416
2417         * configure.in (toolexecdir, toolexeclibdir): Set and AC_SUBST.
2418         Remove USE_LIBDIR conditional.
2419         * Makefile.am (toolexecdir, toolexeclibdir): Don't override.
2420         * Makefile.in, configure: Rebuilt.
2421
2422 2003-01027  David Edelsohn  <edelsohn@gnu.org>
2423
2424         * Makefile.am (TARGET_SRC_POWERPC_AIX): Fix typo.
2425         * Makefile.in: Regenerate.
2426
2427 2003-01-22  Andrew Haley  <aph@redhat.com>
2428
2429         * src/powerpc/darwin.S (_ffi_call_AIX): Add Augmentation size to
2430         unwind info.
2431
2432 2003-01-21  Andreas Tobler  <a.tobler@schweiz.ch>
2433
2434         * src/powerpc/darwin.S: Add unwind info.
2435         * src/powerpc/darwin_closure.S: Likewise.
2436
2437 2003-01-14  Andrew Haley  <aph@redhat.com>
2438
2439         * src/x86/ffi64.c (ffi_prep_args): Check for void retval.
2440         (ffi_prep_cif_machdep): Likewise.
2441         * src/x86/unix64.S: Add unwind info.
2442
2443 2003-01-14  Andreas Jaeger  <aj@suse.de>
2444
2445         * src/ffitest.c (main): Only use ffi_closures if those are
2446         supported.
2447
2448 2003-01-13 Andreas Tobler <a.tobler@schweiz.ch>
2449
2450         * libffi/src/ffitest.c
2451          add closure testcases
2452
2453 2003-01-13 Kevin B. Hendricks <khendricks@ivey.uwo.ca>
2454
2455         * libffi/src/powerpc/ffi.c
2456          fix alignment bug for float (4 byte aligned iso 8 byte)
2457
2458 2003-01-09  Geoffrey Keating  <geoffk@apple.com>
2459
2460         * src/powerpc/ffi_darwin.c: Remove RCS version string.
2461         * src/powerpc/darwin.S: Remove RCS version string.
2462
2463 2003-01-03  Jeff Sturm  <jsturm@one-point.com>
2464
2465         * include/ffi.h.in: Add closure defines for SPARC, SPARC64.
2466         * src/ffitest.c (main): Use static storage for closure.
2467         * src/sparc/ffi.c (ffi_prep_closure, ffi_closure_sparc_inner): New.
2468         * src/sparc/v8.S (ffi_closure_v8): New.
2469         * src/sparc/v9.S (ffi_closure_v9): New.
2470
2471 2002-11-10  Ranjit Mathew <rmathew@hotmail.com>
2472
2473         * include/ffi.h.in: Added FFI_STDCALL ffi_type
2474           enumeration for X86_WIN32.
2475         * src/x86/win32.S: Added ffi_call_STDCALL function
2476           definition.
2477         * src/x86/ffi.c (ffi_call/ffi_raw_call): Added
2478           switch cases for recognising FFI_STDCALL and
2479           calling ffi_call_STDCALL if target is X86_WIN32.
2480         * src/ffitest.c (my_stdcall_strlen/stdcall_many):
2481           stdcall versions of the "my_strlen" and "many"
2482           test functions (for X86_WIN32).
2483           Added test cases to test stdcall invocation using
2484           these functions.
2485
2486 2002-12-02  Kaz Kojima  <kkojima@gcc.gnu.org>
2487
2488         * src/sh/sysv.S: Add DWARF2 unwind info.
2489
2490 2002-11-27  Ulrich Weigand  <uweigand@de.ibm.com>
2491
2492         * src/s390/sysv.S (.eh_frame section): Make section read-only.
2493
2494 2002-11-26  Jim Wilson  <wilson@redhat.com>
2495
2496         * src/types.c (FFI_TYPE_POINTER): Has size 8 on IA64.
2497
2498 2002-11-23  H.J. Lu <hjl@gnu.org>
2499
2500         * acinclude.m4: Add dummy AM_PROG_LIBTOOL.
2501         Include ../config/accross.m4.
2502         * aclocal.m4; Rebuild.
2503         * configure: Likewise.
2504
2505 2002-11-15  Ulrich Weigand  <uweigand@de.ibm.com>
2506
2507         * src/s390/sysv.S (.eh_frame section): Adapt to pcrel FDE encoding.
2508
2509 2002-11-11  DJ Delorie  <dj@redhat.com>
2510
2511         * configure.in: Look for common files in the right place.
2512
2513 2002-10-08  Ulrich Weigand  <uweigand@de.ibm.com>
2514
2515         * src/java_raw_api.c (ffi_java_raw_to_ptrarray): Interpret
2516         raw data as _Jv_word values, not ffi_raw.
2517         (ffi_java_ptrarray_to_raw): Likewise.
2518         (ffi_java_rvalue_to_raw): New function.
2519         (ffi_java_raw_call): Call it.
2520         (ffi_java_raw_to_rvalue): New function.
2521         (ffi_java_translate_args): Call it.
2522         * src/ffitest.c (closure_test_fn): Interpret return value
2523         as ffi_arg, not int.
2524         * src/s390/ffi.c (ffi_prep_cif_machdep): Add missing
2525         FFI_TYPE_POINTER case.
2526         (ffi_closure_helper_SYSV): Likewise.  Also, assume return
2527         values extended to word size.
2528
2529 2002-10-02  Andreas Jaeger  <aj@suse.de>
2530
2531         * src/x86/ffi64.c (ffi_prep_cif_machdep): Remove debug output.
2532
2533 2002-10-01  Bo Thorsen  <bo@smetana.suse.de>
2534
2535         * include/ffi.h.in: Fix i386 win32 compilation.
2536
2537 2002-09-30  Ulrich Weigand  <uweigand@de.ibm.com>
2538
2539         * configure.in: Add s390x-*-linux-* target.
2540         * configure: Regenerate.
2541         * include/ffi.h.in: Define S390X for s390x targets.
2542         (FFI_CLOSURES): Define for s390/s390x.
2543         (FFI_TRAMPOLINE_SIZE): Likewise.
2544         (FFI_NATIVE_RAW_API): Likewise.
2545         * src/prep_cif.c (ffi_prep_cif): Do not compute stack space for s390.
2546         * src/types.c (FFI_TYPE_POINTER): Use 8-byte pointers on s390x.
2547         * src/s390/ffi.c: Major rework of existing code.  Add support for
2548         s390x targets.  Add closure support.
2549         * src/s390/sysv.S: Likewise.
2550
2551 2002-09-29  Richard Earnshaw  <rearnsha@arm.com>
2552
2553         * src/arm/sysv.S: Fix typo.
2554
2555 2002-09-28  Richard Earnshaw  <rearnsha@arm.com>
2556
2557         * src/arm/sysv.S: If we don't have machine/asm.h and the pre-processor
2558         has defined __USER_LABEL_PREFIX__, then use it in CNAME.
2559         (ffi_call_SYSV): Handle soft-float.
2560
2561 2002-09-27  Bo Thorsen  <bo@suse.de>
2562
2563         * include/ffi.h.in: Fix multilib x86-64 support.
2564
2565 2002-09-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2566
2567         * Makefile.am (all-multi): Fix multilib parallel build.
2568
2569 2002-07-19  Kaz Kojima  <kkojima@gcc.gnu.org>
2570
2571         * configure.in (sh[34]*-*-linux*): Add brackets.
2572         * configure: Regenerate.
2573
2574 2002-07-18  Kaz Kojima  <kkojima@gcc.gnu.org>
2575
2576         * Makefile.am: Add SH support.
2577         * Makefile.in: Regenerate.
2578         * configure.in (sh-*-linux*, sh[34]*-*-linux*): Add target.
2579         * configure: Regenerate.
2580         * include/ffi.h.in: Add SH support.
2581         * src/sh/ffi.c: New file.
2582         * src/sh/sysv.S: New file.
2583         * src/types.c: Add SH support.
2584
2585 2002-07-16  Bo Thorsen  <bo@suse.de>
2586
2587         * src/x86/ffi64.c: New file that adds x86-64 support.
2588         * src/x86/unix64.S: New file that handles argument setup for
2589         x86-64.
2590         * src/x86/sysv.S: Don't use this on x86-64.
2591         * src/x86/ffi.c: Don't use this on x86-64.
2592         Remove unused vars.
2593         * src/prep_cif.c (ffi_prep_cif): Don't do stack size calculation
2594         for x86-64.
2595         * src/ffitest.c (struct6): New test that tests a special case in
2596         the x86-64 ABI.
2597         (struct7): Likewise.
2598         (struct8): Likewise.
2599         (struct9): Likewise.
2600         (closure_test_fn): Silence warning about this when it's not used.
2601         (main): Add the new tests.
2602         (main): Fix a couple of wrong casts and silence some compiler warnings.
2603         * include/ffi.h.in: Add x86-64 ABI definition.
2604         * fficonfig.h.in: Regenerate.
2605         * Makefile.am: Add x86-64 support.
2606         * configure.in: Likewise.
2607         * Makefile.in: Regenerate.
2608         * configure: Likewise.
2609
2610 2002-06-24  Bo Thorsen  <bo@suse.de>
2611
2612         * src/types.c: Merge settings for similar architectures.
2613         Add x86-64 sizes and alignments.
2614
2615 2002-06-23  Bo Thorsen  <bo@suse.de>
2616
2617         * src/arm/ffi.c (ffi_prep_args): Remove unused vars.
2618         * src/sparc/ffi.c (ffi_prep_args_v8): Likewise.
2619         * src/mips/ffi.c (ffi_prep_args): Likewise.
2620         * src/m68k/ffi.c (ffi_prep_args): Likewise.
2621
2622 2002-07-18  H.J. Lu  (hjl@gnu.org)
2623
2624         * Makefile.am (TARGET_SRC_MIPS_LINUX): New.
2625         (libffi_la_SOURCES): Support MIPS_LINUX.
2626         (libffi_convenience_la_SOURCES): Likewise.
2627         * Makefile.in: Regenerated.
2628
2629         * configure.in (mips64*-*): Skip.
2630         (mips*-*-linux*): New.
2631         * configure: Regenerated.
2632
2633         * src/mips/ffi.c: Include <sgidefs.h>.
2634
2635 2002-06-06  Ulrich Weigand  <uweigand@de.ibm.com>
2636
2637         * src/s390/sysv.S: Save/restore %r6.  Add DWARF-2 unwind info.
2638
2639 2002-05-27  Roger Sayle  <roger@eyesopen.com>
2640
2641         * src/x86/ffi.c (ffi_prep_args): Remove reference to avn.
2642
2643 2002-05-27  Bo Thorsen  <bo@suse.de>
2644
2645         * src/x86/ffi.c (ffi_prep_args): Remove unused variable and
2646         fix formatting.
2647
2648 2002-05-13  Andreas Tobler  <a.tobler@schweiz.ch>
2649
2650         * src/powerpc/ffi_darwin.c (ffi_prep_closure): Declare fd at
2651         beginning of function (for older apple cc).
2652
2653 2002-05-08  Alexandre Oliva  <aoliva@redhat.com>
2654
2655         * configure.in (ORIGINAL_LD_FOR_MULTILIBS): Preserve LD at
2656         script entry, and set LD to it when configuring multilibs.
2657         * configure: Rebuilt.
2658
2659 2002-05-05  Jason Thorpe  <thorpej@wasabisystems.com>
2660
2661         * configure.in (sparc64-*-netbsd*): Add target.
2662         (sparc-*-netbsdelf*): Likewise.
2663         * configure: Regenerate.
2664
2665 2002-04-28  David S. Miller  <davem@redhat.com>
2666
2667         * configure.in, configure: Fix SPARC test in previous change.
2668
2669 2002-04-29  Gerhard Tonn  <GerhardTonn@swol.de>
2670
2671         * Makefile.am: Add Linux for S/390 support.
2672         * Makefile.in: Regenerate.
2673         * configure.in: Add Linux for S/390 support.
2674         * configure: Regenerate.
2675         * include/ffi.h.in: Add Linux for S/390 support.
2676         * src/s390/ffi.c: New file from libffi CVS tree.
2677         * src/s390/sysv.S: New file from libffi CVS tree.
2678
2679 2002-04-28  Jakub Jelinek  <jakub@redhat.com>
2680
2681         * configure.in (HAVE_AS_SPARC_UA_PCREL): Check for working
2682         %r_disp32().
2683         * src/sparc/v8.S: Use it.
2684         * src/sparc/v9.S: Likewise.
2685         * fficonfig.h.in: Rebuilt.
2686         * configure: Rebuilt.
2687
2688 2002-04-08  Hans Boehm  <Hans_Boehm@hp.com>
2689
2690         * src/java_raw_api.c (ffi_java_raw_size): Handle FFI_TYPE_DOUBLE
2691         correctly.
2692         * src/ia64/unix.S: Add unwind information. Fix comments.
2693         Save sp in a way that's compatible with unwind info.
2694         (ffi_call_unix): Correctly restore sp in all cases.
2695         * src/ia64/ffi.c: Add, fix comments.
2696
2697 2002-04-08  Jakub Jelinek  <jakub@redhat.com>
2698
2699         * src/sparc/v8.S: Make .eh_frame dependent on target word size.
2700
2701 2002-04-06  Jason Thorpe  <thorpej@wasabisystems.com>
2702
2703         * configure.in (alpha*-*-netbsd*): Add target.
2704         * configure: Regenerate.
2705
2706 2002-04-04  Jeff Sturm  <jsturm@one-point.com>
2707
2708         * src/sparc/v8.S: Add unwind info.
2709         * src/sparc/v9.S: Likewise.
2710
2711 2002-03-30  Krister Walfridsson  <cato@df.lth.se>
2712
2713         * configure.in: Enable i*86-*-netbsdelf*.
2714         * configure: Rebuilt.
2715
2716 2002-03-29  David Billinghurst <David.Billinghurst@riotinto.com>
2717
2718         PR other/2620
2719         * src/mips/n32.s: Delete
2720         * src/mips/o32.s: Delete
2721
2722 2002-03-21  Loren J. Rittle  <ljrittle@acm.org>
2723
2724         * configure.in: Enable alpha*-*-freebsd*.
2725         * configure: Rebuilt.
2726
2727 2002-03-17  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
2728
2729         * Makefile.am: libfficonvenience -> libffi_convenience.
2730         * Makefile.in: Rebuilt.
2731
2732         * Makefile.am: Define ffitest_OBJECTS.
2733         * Makefile.in: Rebuilt.
2734
2735 2002-03-07  Andreas Tobler  <toa@pop.agri.ch>
2736             David Edelsohn  <edelsohn@gnu.org>
2737
2738         * Makefile.am (EXTRA_DIST): Add Darwin and AIX closure files.
2739         (TARGET_SRC_POWERPC_AIX): Add aix_closure.S.
2740         (TARGET_SRC_POWERPC_DARWIN): Add darwin_closure.S.
2741         * Makefile.in: Regenerate.
2742         * include/ffi.h.in: Add AIX and Darwin closure definitions.
2743         * src/powerpc/ffi_darwin.c (ffi_prep_closure): New function.
2744         (flush_icache, flush_range): New functions.
2745         (ffi_closure_helper_DARWIN): New function.
2746         * src/powerpc/aix_closure.S: New file.
2747         * src/powerpc/darwin_closure.S: New file.
2748
2749 2002-02-24  Jeff Sturm  <jsturm@one-point.com>
2750
2751         * include/ffi.h.in: Add typedef for ffi_arg.
2752         * src/ffitest.c (main): Declare rint with ffi_arg.
2753
2754 2002-02-21  Andreas Tobler  <toa@pop.agri.ch>
2755
2756         * src/powerpc/ffi_darwin.c (ffi_prep_args): Skip appropriate
2757         number of GPRs for floating-point arguments.
2758
2759 2002-01-31  Anthony Green  <green@redhat.com>
2760
2761         * configure: Rebuilt.
2762         * configure.in: Replace CHECK_SIZEOF and endian tests with
2763         cross-compiler friendly macros.
2764         * aclocal.m4 (AC_COMPILE_CHECK_SIZEOF, AC_C_BIGENDIAN_CROSS): New
2765         macros.
2766
2767 2002-01-18  David Edelsohn  <edelsohn@gnu.org>
2768
2769         * src/powerpc/darwin.S (_ffi_call_AIX): New.
2770         * src/powerpc/aix.S (ffi_call_DARWIN): New.
2771
2772 2002-01-17  David Edelsohn  <edelsohn@gnu.org>
2773
2774         * Makefile.am (EXTRA_DIST): Add Darwin and AIX files.
2775         (TARGET_SRC_POWERPC_AIX): New.
2776         (POWERPC_AIX): New stanza.
2777         * Makefile.in: Regenerate.
2778         * configure.in: Add AIX case.
2779         * configure: Regenerate.
2780         * include/ffi.h.in (ffi_abi): Add FFI_AIX.
2781         * src/powerpc/ffi_darwin.c (ffi_status): Use "long" to scale frame
2782         size.  Fix "long double" support.
2783         (ffi_call): Add FFI_AIX case.
2784         * src/powerpc/aix.S: New.
2785
2786 2001-10-09  John Hornkvist  <john@toastedmarshmallow.com>
2787
2788         Implement Darwin PowerPC ABI.
2789         * configure.in: Handle powerpc-*-darwin*.
2790         * Makefile.am: Set source files for POWERPC_DARWIN.
2791         * configure: Rebuilt.
2792         * Makefile.in: Rebuilt.
2793         * include/ffi.h.in: Define FFI_DARWIN and FFI_DEFAULT_ABI for
2794         POWERPC_DARWIN.
2795         * src/powerpc/darwin.S: New file.
2796         * src/powerpc/ffi_darwin.c: New file.
2797
2798 2001-10-07  Joseph S. Myers  <jsm28@cam.ac.uk>
2799
2800         * src/x86/ffi.c: Fix spelling error of "separate" as "seperate".
2801
2802 2001-07-16  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
2803
2804         * src/x86/sysv.S: Avoid gas-only .balign directive.
2805         Use C style comments.
2806
2807 2001-07-16  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
2808
2809         * src/alpha/ffi.c (ffi_prep_closure): Avoid gas-only mnemonic.
2810         Fixes PR bootstrap/3563.
2811
2812 2001-06-26  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
2813
2814         * src/alpha/osf.S (ffi_closure_osf): Use .rdata for ECOFF.
2815
2816 2001-06-25  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
2817
2818         * configure.in: Recognize sparc*-sun-* host.
2819         * configure: Regenerate.
2820
2821 2001-06-06  Andrew Haley  <aph@redhat.com>
2822
2823         * src/alpha/osf.S (__FRAME_BEGIN__): Conditionalize for ELF.
2824
2825 2001-06-03  Andrew Haley  <aph@redhat.com>
2826
2827         * src/alpha/osf.S: Add unwind info.
2828         * src/powerpc/sysv.S: Add unwind info.
2829         * src/powerpc/ppc_closure.S: Likewise.
2830
2831 2000-05-31  Jeff Sturm  <jsturm@one-point.com>
2832
2833         * configure.in: Fix AC_ARG_ENABLE usage.
2834         * configure: Rebuilt.
2835
2836 2001-05-06  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
2837
2838         * configure.in: Remove warning about beta code.
2839         * configure: Rebuilt.
2840
2841 2001-04-25  Hans Boehm <Hans_Boehm@hp.com>
2842
2843         * src/ia64/unix.S: Restore stack pointer when returning from
2844         ffi_closure_UNIX.
2845         * src/ia64/ffi.c: Fix typo in comment.
2846
2847 2001-04-18  Jim Wilson  <wilson@redhat.com>
2848
2849         * src/ia64/unix.S: Delete unnecessary increment and decrement of loc2
2850         to eliminate RAW DV.
2851
2852 2001-04-12  Bryce McKinlay  <bryce@albatross.co.nz>
2853
2854         * Makefile.am: Make a libtool convenience library.
2855         * Makefile.in: Rebuilt.
2856
2857 2001-03-29  Bryce McKinlay  <bryce@albatross.co.nz>
2858
2859         * configure.in: Use different syntax for subdirectory creation.
2860         * configure: Rebuilt.
2861
2862 2001-03-27  Jon Beniston  <jon@beniston.com>
2863
2864         * configure.in: Added X86_WIN32 target (Win32, CygWin, MingW).
2865         * configure: Rebuilt.
2866         * Makefile.am: Added X86_WIN32 target support.
2867         * Makefile.in: Rebuilt.
2868
2869         * include/ffi.h.in: Added X86_WIN32 target support.
2870
2871         * src/ffitest.c: Doesn't run structure tests for X86_WIN32 targets.
2872         * src/types.c: Added X86_WIN32 target support.
2873
2874         * src/x86/win32.S: New file. Based on sysv.S, but with EH
2875         stuff removed and made to work with CygWin's gas.
2876
2877 2001-03-26  Bryce McKinlay  <bryce@albatross.co.nz>
2878
2879         * configure.in: Make target subdirectory in build dir.
2880         * Makefile.am: Override suffix based rules to specify correct output
2881         subdirectory.
2882         * Makefile.in: Rebuilt.
2883         * configure: Rebuilt.
2884
2885 2001-03-23  Kevin B Hendricks  <khendricks@ivey.uwo.ca>
2886
2887         * src/powerpc/ppc_closure.S: New file.
2888         * src/powerpc/ffi.c (ffi_prep_args): Fixed ABI compatibility bug
2889         involving long long and register pairs.
2890         (ffi_prep_closure): New function.
2891         (flush_icache): Likewise.
2892         (ffi_closure_helper_SYSV): Likewise.
2893         * include/ffi.h.in (FFI_CLOSURES): Define on PPC.
2894         (FFI_TRAMPOLINE_SIZE): Likewise.
2895         (FFI_NATIVE_RAW_API): Likewise.
2896         * Makefile.in: Rebuilt.
2897         * Makefile.am (EXTRA_DIST): Added src/powerpc/ppc_closure.S.
2898         (TARGET_SRC_POWERPC): Likewise.
2899
2900 2001-03-19  Tom Tromey  <tromey@redhat.com>
2901
2902         * Makefile.in: Rebuilt.
2903         * Makefile.am (ffitest_LDFLAGS): New macro.
2904
2905 2001-03-02  Nick Clifton  <nickc@redhat.com>
2906
2907         * include/ffi.h.in: Remove RCS ident string.
2908         * include/ffi_mips.h: Remove RCS ident string.
2909         * src/debug.c: Remove RCS ident string.
2910         * src/ffitest.c: Remove RCS ident string.
2911         * src/prep_cif.c: Remove RCS ident string.
2912         * src/types.c: Remove RCS ident string.
2913         * src/alpha/ffi.c: Remove RCS ident string.
2914         * src/alpha/osf.S: Remove RCS ident string.
2915         * src/arm/ffi.c: Remove RCS ident string.
2916         * src/arm/sysv.S: Remove RCS ident string.
2917         * src/mips/ffi.c: Remove RCS ident string.
2918         * src/mips/n32.S: Remove RCS ident string.
2919         * src/mips/o32.S: Remove RCS ident string.
2920         * src/sparc/ffi.c: Remove RCS ident string.
2921         * src/sparc/v8.S: Remove RCS ident string.
2922         * src/sparc/v9.S: Remove RCS ident string.
2923         * src/x86/ffi.c: Remove RCS ident string.
2924         * src/x86/sysv.S: Remove RCS ident string.
2925
2926 2001-02-08  Joseph S. Myers  <jsm28@cam.ac.uk>
2927
2928         * include/ffi.h.in: Change sourceware.cygnus.com references to
2929         gcc.gnu.org.
2930
2931 2000-12-09  Richard Henderson  <rth@redhat.com>
2932
2933         * src/alpha/ffi.c (ffi_call): Simplify struct return test.
2934         (ffi_closure_osf_inner): Index rather than increment avalue
2935         and arg_types.  Give ffi_closure_osf the raw return value type.
2936         * src/alpha/osf.S (ffi_closure_osf): Handle return value type
2937         promotion.
2938
2939 2000-12-07  Richard Henderson  <rth@redhat.com>
2940
2941         * src/raw_api.c (ffi_translate_args): Fix typo.
2942         (ffi_prep_closure): Likewise.
2943
2944         * include/ffi.h.in [ALPHA]: Define FFI_CLOSURES and
2945         FFI_TRAMPOLINE_SIZE.
2946         * src/alpha/ffi.c (ffi_prep_cif_machdep): Adjust minimal
2947         cif->bytes for new ffi_call_osf implementation.
2948         (ffi_prep_args): Absorb into ...
2949         (ffi_call): ... here.  Do all stack allocation here and
2950         avoid a callback function.
2951         (ffi_prep_closure, ffi_closure_osf_inner): New.
2952         * src/alpha/osf.S (ffi_call_osf): Reimplement with no callback.
2953         (ffi_closure_osf): New.
2954
2955 2000-09-10  Alexandre Oliva  <aoliva@redhat.com>
2956
2957         * config.guess, config.sub, install-sh: Removed.
2958         * ltconfig, ltmain.sh, missing, mkinstalldirs: Likewise.
2959         * Makefile.in: Rebuilt.
2960
2961         * acinclude.m4: Include libtool macros from the top level.
2962         * aclocal.m4, configure: Rebuilt.
2963
2964 2000-08-22  Alexandre Oliva  <aoliva@redhat.com>
2965
2966         * configure.in [i*86-*-freebsd*] (TARGET, TARGETDIR): Set.
2967         * configure: Rebuilt.
2968
2969 2000-05-11  Scott Bambrough  <scottb@netwinder.org>
2970
2971         * libffi/src/arm/sysv.S (ffi_call_SYSV): Doubles are not saved to
2972         memory correctly.  Use conditional instructions, not branches where
2973         possible.
2974
2975 2000-05-04  Tom Tromey  <tromey@cygnus.com>
2976
2977         * configure: Rebuilt.
2978         * configure.in: Match `arm*-*-linux-*'.
2979         From Chris Dornan <cdornan@arm.com>.
2980
2981 2000-04-28  Jakub Jelinek  <jakub@redhat.com>
2982
2983         * Makefile.am (SUBDIRS): Define.
2984         (AM_MAKEFLAGS): Likewise.
2985         (Multilib support.): Add section.
2986         * Makefile.in: Rebuilt.
2987         * ltconfig (extra_compiler_flags, extra_compiler_flags_value):
2988         New variables. Set for gcc using -print-multi-lib. Export them
2989         to libtool.
2990         (sparc64-*-linux-gnu*): Use libsuff 64 for search paths.
2991         * ltmain.sh (B|b|V): Don't throw away gcc's -B, -b and -V options
2992         for -shared links.
2993         (extra_compiler_flags_value, extra_compiler_flags): Check these
2994         for extra compiler options which need to be passed down in
2995         compiler_flags.
2996
2997 2000-04-16  Anthony Green  <green@redhat.com>
2998
2999         * configure: Rebuilt.
3000         * configure.in: Change i*86-pc-linux* to i*86-*-linux*.
3001
3002 2000-04-14  Jakub Jelinek  <jakub@redhat.com>
3003
3004         * include/ffi.h.in (SPARC64): Define for 64bit SPARC builds.
3005         Set SPARC FFI_DEFAULT_ABI based on SPARC64 define.
3006         * src/sparc/ffi.c (ffi_prep_args_v8): Renamed from ffi_prep_args.
3007         Replace all void * sizeofs with sizeof(int).
3008         Only compare type with FFI_TYPE_LONGDOUBLE if LONGDOUBLE is
3009         different than DOUBLE.
3010         Remove FFI_TYPE_SINT32 and FFI_TYPE_UINT32 cases (handled elsewhere).
3011         (ffi_prep_args_v9): New function.
3012         (ffi_prep_cif_machdep): Handle V9 ABI and long long on V8.
3013         (ffi_V9_return_struct): New function.
3014         (ffi_call): Handle FFI_V9 ABI from 64bit code and FFI_V8 ABI from
3015         32bit code (not yet cross-arch calls).
3016         * src/sparc/v8.S: Add struct return delay nop.
3017         Handle long long.
3018         * src/sparc/v9.S: New file.
3019         * src/prep_cif.c (ffi_prep_cif): Return structure pointer
3020         is used on sparc64 only for structures larger than 32 bytes.
3021         Pass by reference for structures is done for structure arguments
3022         larger than 16 bytes.
3023         * src/ffitest.c (main): Use 64bit rint on sparc64.
3024         Run long long tests on sparc.
3025         * src/types.c (FFI_TYPE_POINTER): Pointer is 64bit on alpha and
3026         sparc64.
3027         (FFI_TYPE_LONGDOUBLE): long double is 128 bit aligned to 128 bits
3028         on sparc64.
3029         * configure.in (sparc-*-linux*): New supported target.
3030         (sparc64-*-linux*): Likewise.
3031         * configure: Rebuilt.
3032         * Makefile.am: Add v9.S to SPARC files.
3033         * Makefile.in: Likewise.
3034         (LINK): Surround $(CCLD) into double quotes, so that multilib
3035         compiles work correctly.
3036
3037 2000-04-04  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3038
3039         * configure: Rebuilt.
3040         * configure.in: (i*86-*-solaris*): New libffi target. Patch
3041         proposed by Bryce McKinlay.
3042
3043 2000-03-20  Tom Tromey  <tromey@cygnus.com>
3044
3045         * Makefile.in: Hand edit for java_raw_api.lo.
3046
3047 2000-03-08  Bryce McKinlay  <bryce@albatross.co.nz>
3048
3049         * config.guess, config.sub: Update from the gcc tree.
3050         Fix for PR libgcj/168.
3051
3052 2000-03-03  Tom Tromey  <tromey@cygnus.com>
3053
3054         * Makefile.in: Fixed ia64 by hand.
3055
3056         * configure: Rebuilt.
3057         * configure.in (--enable-multilib): New option.
3058         (libffi_basedir): New subst.
3059         (AC_OUTPUT): Added multilib code.
3060
3061 2000-03-02  Tom Tromey  <tromey@cygnus.com>
3062
3063         * Makefile.in: Rebuilt.
3064         * Makefile.am (TARGET_SRC_IA64): Use `ia64', not `alpha', as
3065         directory name.
3066
3067 2000-02-25  Hans Boehm <boehm@acm.org>
3068
3069         * src/ia64/ffi.c, src/ia64/ia64_flags.h, src/ia64/unix.S: New
3070         files.
3071         * src/raw_api.c (ffi_translate_args): Fixed typo in argument
3072         list.
3073         (ffi_prep_raw_closure): Use ffi_translate_args, not
3074         ffi_closure_translate.
3075         * src/java_raw_api.c: New file.
3076         * src/ffitest.c (closure_test_fn): New function.
3077         (main): Define `rint' as long long on IA64.  Added new test when
3078         FFI_CLOSURES is defined.
3079         * include/ffi.h.in (ALIGN): Use size_t, not unsigned.
3080         (ffi_abi): Recognize IA64.
3081         (ffi_raw): Added `flt' field.
3082         Added "Java raw API" code.
3083         * configure.in: Recognize ia64.
3084         * Makefile.am (TARGET_SRC_IA64): New macro.
3085         (libffi_la_common_SOURCES): Added java_raw_api.c.
3086         (libffi_la_SOURCES): Define in IA64 case.
3087
3088 2000-01-04  Tom Tromey  <tromey@cygnus.com>
3089
3090         * Makefile.in: Rebuilt with newer automake.
3091
3092 1999-12-31  Tom Tromey  <tromey@cygnus.com>
3093
3094         * Makefile.am (INCLUDES): Added -I$(top_srcdir)/src.
3095
3096 1999-09-01  Tom Tromey  <tromey@cygnus.com>
3097
3098         * include/ffi.h.in: Removed PACKAGE and VERSION defines and
3099         undefs.
3100         * fficonfig.h.in: Rebuilt.
3101         * configure: Rebuilt.
3102         * configure.in: Pass 3rd argument to AM_INIT_AUTOMAKE.
3103         Use AM_PROG_LIBTOOL (automake 1.4 compatibility).
3104         * acconfig.h: Don't #undef PACKAGE or VERSION.
3105
3106 1999-08-09  Anthony Green  <green@cygnus.com>
3107
3108         * include/ffi.h.in: Try to work around messy header problem
3109         with PACKAGE and VERSION.
3110
3111         * configure: Rebuilt.
3112         * configure.in: Change version to 2.00-beta.
3113
3114         * fficonfig.h.in: Rebuilt.
3115         * acconfig.h (FFI_NO_STRUCTS, FFI_NO_RAW_API): Define.
3116
3117         * src/x86/ffi.c (ffi_raw_call): Rename.
3118
3119 1999-08-02  Kresten Krab Thorup  <krab@dominiq.is.s.u-tokyo.ac.jp>
3120
3121         * src/x86/ffi.c (ffi_closure_SYSV): New function.
3122         (ffi_prep_incoming_args_SYSV): Ditto.
3123         (ffi_prep_closure): Ditto.
3124         (ffi_closure_raw_SYSV): Ditto.
3125         (ffi_prep_raw_closure): More ditto.
3126         (ffi_call_raw): Final ditto.
3127
3128         * include/ffi.h.in: Add definitions for closure and raw API.
3129
3130         * src/x86/ffi.c (ffi_prep_cif_machdep): Added case for
3131         FFI_TYPE_UINT64.
3132
3133         * Makefile.am (libffi_la_common_SOURCES): Added raw_api.c
3134
3135         * src/raw_api.c: New file.
3136
3137         * include/ffi.h.in (ffi_raw): New type.
3138         (UINT_ARG, SINT_ARG): New defines.
3139         (ffi_closure, ffi_raw_closure): New types.
3140         (ffi_prep_closure, ffi_prep_raw_closure): New declarations.
3141
3142         * configure.in: Add check for endianness and sizeof void*.
3143
3144         * src/x86/sysv.S (ffi_call_SYSV): Call fixup routine via argument,
3145         instead of directly.
3146
3147         * configure: Rebuilt.
3148
3149 Thu Jul  8 14:28:42 1999  Anthony Green  <green@cygnus.com>
3150
3151         * configure.in: Add x86 and powerpc BeOS configurations.
3152         From Makoto Kato <m_kato@ga2.so-net.ne.jp>.
3153
3154 1999-05-09  Anthony Green  <green@cygnus.com>
3155
3156         * configure.in: Add warning about this being beta code.
3157         Remove src/Makefile.am from the picture.
3158         * configure: Rebuilt.
3159
3160         * Makefile.am: Move logic from src/Makefile.am.  Add changes
3161         to support libffi as a target library.
3162         * Makefile.in: Rebuilt.
3163
3164         * aclocal.m4, config.guess, config.sub, ltconfig, ltmain.sh:
3165         Upgraded to new autoconf, automake, libtool.
3166
3167         * README: Tweaks.
3168
3169         * LICENSE: Update copyright date.
3170
3171         * src/Makefile.am, src/Makefile.in: Removed.
3172
3173 1998-11-29  Anthony Green  <green@cygnus.com>
3174
3175         * include/ChangeLog: Removed.
3176         * src/ChangeLog: Removed.
3177         * src/mips/ChangeLog: Removed.
3178         * src/sparc/ChangeLog: Remboved.
3179         * src/x86/ChangeLog: Removed.
3180
3181         * ChangeLog.v1: Created.