ctypes-commit Mailing List for ctypes (Page 48)
Brought to you by:
theller
You can subscribe to this list here.
2004 |
Jan
|
Feb
|
Mar
|
Apr
(8) |
May
(90) |
Jun
(143) |
Jul
(106) |
Aug
(94) |
Sep
(84) |
Oct
(163) |
Nov
(60) |
Dec
(58) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
(128) |
Feb
(79) |
Mar
(227) |
Apr
(192) |
May
(179) |
Jun
(41) |
Jul
(53) |
Aug
(103) |
Sep
(28) |
Oct
(38) |
Nov
(81) |
Dec
(17) |
2006 |
Jan
(184) |
Feb
(111) |
Mar
(188) |
Apr
(67) |
May
(58) |
Jun
(123) |
Jul
(73) |
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
From: Andreas D. <ad...@us...> - 2005-05-17 02:52:01
|
Update of /cvsroot/ctypes/ctypes/docs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7117/docs Modified Files: reference.stx Log Message: explanation for use of different loader functions added. Index: reference.stx =================================================================== RCS file: /cvsroot/ctypes/ctypes/docs/reference.stx,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** reference.stx 13 May 2005 13:45:03 -0000 1.7 --- reference.stx 16 May 2005 22:27:35 -0000 1.8 *************** *** 33,37 **** 'LoadLibrary(libname)' -- Loads the library given by ! libname. On most systems libname ist the filename of the shared library; when it's not a path name it will be searched in a system dependent list of locations (on many systems --- 33,37 ---- 'LoadLibrary(libname)' -- Loads the library given by ! libname. On most systems libname is the filename of the shared library; when it's not a path name it will be searched in a system dependent list of locations (on many systems *************** *** 66,69 **** --- 66,78 ---- object (use LoadLibrary). + Shared libraries are accessed when compiling/linking a program, + and when the program is run. The purpose of the find method is to + locate a library similar to what the compiler does (on platforms + with several versions of a shared library the most recent should + be loaded), while LoadLibrary acts like when a program is run, and + uses the runtime loader directly. LoadLibraryVersion works like + LoadLibrary but tries to be platform independent (for cases where + this makes sense). Loading via attribute access is a shorthand + notation especially usefull for interactive use. Common operations on ctypes instances |
From: Andreas D. <ad...@us...> - 2005-05-17 01:23:09
|
Update of /cvsroot/ctypes/ctypes/unittests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7987/unittests Modified Files: test_setfunc.py test_pointers.py test_complete_cover.py Log Message: output to stdout removed. Index: test_pointers.py =================================================================== RCS file: /cvsroot/ctypes/ctypes/unittests/test_pointers.py,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** test_pointers.py 18 Apr 2005 11:14:15 -0000 1.18 --- test_pointers.py 16 May 2005 22:30:40 -0000 1.19 *************** *** 17,21 **** pass ! print POINTER(c_ulong)(c_ulong(22)) # Pointer can't set contents: has no _type_ self.failUnlessRaises(TypeError, A, c_ulong(33)) --- 17,21 ---- pass ! POINTER(c_ulong)(c_ulong(22)) # Pointer can't set contents: has no _type_ self.failUnlessRaises(TypeError, A, c_ulong(33)) Index: test_complete_cover.py =================================================================== RCS file: /cvsroot/ctypes/ctypes/unittests/test_complete_cover.py,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** test_complete_cover.py 8 Apr 2005 07:39:25 -0000 1.8 --- test_complete_cover.py 16 May 2005 22:30:40 -0000 1.9 *************** *** 107,111 **** # from_param ! print c_int.from_param(c_int(42)) ## print c_int.from_param(c_longlong(42L)) ## c = c_char("x") --- 107,112 ---- # from_param ! self.failUnlessEqual(repr(c_int.from_param(c_int(42))), ! "<cparam 'i4' (42)>") ## print c_int.from_param(c_longlong(42L)) ## c = c_char("x") Index: test_setfunc.py =================================================================== RCS file: /cvsroot/ctypes/ctypes/unittests/test_setfunc.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** test_setfunc.py 22 Apr 2005 16:00:11 -0000 1.3 --- test_setfunc.py 16 May 2005 22:30:39 -0000 1.4 *************** *** 68,72 **** c_char_p.from_param(byref(c_char("x"))) #fails print c_char_p.from_param(c_wchar_p(u"abc")) ! print c_char_p.from_param(cast(42, c_char_p)) if __name__ == "__main__": --- 68,72 ---- c_char_p.from_param(byref(c_char("x"))) #fails print c_char_p.from_param(c_wchar_p(u"abc")) ! c_char_p.from_param(cast(42, c_char_p)) if __name__ == "__main__": |
From: Andreas D. <ad...@us...> - 2005-05-17 00:49:19
|
Update of /cvsroot/ctypes/ctypes/unittests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7882/unittests Modified Files: test_callbacks.py Log Message: comment on OS X crash and tearDown() method containing hack removed. Index: test_callbacks.py =================================================================== RCS file: /cvsroot/ctypes/ctypes/unittests/test_callbacks.py,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** test_callbacks.py 7 Apr 2005 09:21:35 -0000 1.23 --- test_callbacks.py 16 May 2005 22:30:13 -0000 1.24 *************** *** 3,17 **** import _ctypes_test - # This behaves strange on OS X. Commenting out the tearDown makes the tests crash - # with illegal instruction, however that occurs only when more than one test is run. - # A single test does work. - class Callbacks(unittest.TestCase): functype = CFUNCTYPE - def tearDown(self): - import gc - gc.collect() - def callback(self, *args): self.got_args = args --- 3,9 ---- |
From: Andreas D. <ad...@us...> - 2005-05-16 23:58:07
|
Update of /cvsroot/ctypes/ctypes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6041 Modified Files: MANIFEST.other.in Log Message: ctypes/macholib included (its not declared as a module in setup.py because its not needed for windows distribution). Index: MANIFEST.other.in =================================================================== RCS file: /cvsroot/ctypes/ctypes/MANIFEST.other.in,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** MANIFEST.other.in 23 Jul 2004 13:19:03 -0000 1.2 --- MANIFEST.other.in 16 May 2005 22:23:28 -0000 1.3 *************** *** 4,7 **** --- 4,8 ---- include source/darwin/*.c source/darwin/*.h include ctypes/.CTYPES_DEVEL + include ctypes/macholib/*.py ctypes/macholib/README.ctypes recursive-include source/gcc * |
From: Andreas D. <ad...@us...> - 2005-05-16 23:30:40
|
Update of /cvsroot/ctypes/ctypes/source/gcc/libffi/src/frv In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20568/source/gcc/libffi/src/frv Added Files: Tag: branch_1_0 ffitarget.h ffi.c eabi.S Log Message: merged with HEAD --- NEW FILE: eabi.S --- /* ----------------------------------------------------------------------- eabi.S - Copyright (c) 2004 Anthony Green FR-V Assembly glue. $Id: eabi.S,v 1.1.2.2 2005/05/16 23:29:13 adegert Exp $ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the ``Software''), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ----------------------------------------------------------------------- */ #define LIBFFI_ASM #include <fficonfig.h> #include <ffi.h> .globl ffi_prep_args_EABI .text .p2align 4 .globl ffi_call_EABI .type ffi_call_EABI, @function # gr8 : ffi_prep_args # gr9 : &ecif # gr10: cif->bytes # gr11: fig->flags # gr12: ecif.rvalue # gr13: fn ffi_call_EABI: addi sp, #-80, sp sti fp, @(sp, #24) addi sp, #24, fp movsg lr, gr5 /* Make room for the new arguments. */ /* subi sp, fp, gr10 */ /* Store return address and incoming args on stack. */ sti gr5, @(fp, #8) sti gr8, @(fp, #-4) sti gr9, @(fp, #-8) sti gr10, @(fp, #-12) sti gr11, @(fp, #-16) sti gr12, @(fp, #-20) sti gr13, @(fp, #-24) sub sp, gr10, sp /* Call ffi_prep_args. */ ldi @(fp, #-4), gr4 addi sp, #0, gr8 ldi @(fp, #-8), gr9 #ifdef __FRV_FDPIC__ ldd @(gr4, gr0), gr14 calll @(gr14, gr0) #else calll @(gr4, gr0) #endif /* ffi_prep_args returns the new stack pointer. */ mov gr8, gr4 ldi @(sp, #0), gr8 ldi @(sp, #4), gr9 ldi @(sp, #8), gr10 ldi @(sp, #12), gr11 ldi @(sp, #16), gr12 ldi @(sp, #20), gr13 /* Always copy the return value pointer into the hidden parameter register. This is only strictly necessary when we're returning an aggregate type, but it doesn't hurt to do this all the time, and it saves a branch. */ ldi @(fp, #-20), gr3 /* Use the ffi_prep_args return value for the new sp. */ mov gr4, sp /* Call the target function. */ ldi @(fp, -24), gr4 #ifdef __FRV_FDPIC__ ldd @(gr4, gr0), gr14 calll @(gr14, gr0) #else calll @(gr4, gr0) #endif /* Store the result. */ ldi @(fp, #-16), gr10 /* fig->flags */ ldi @(fp, #-20), gr4 /* ecif.rvalue */ /* Is the return value stored in two registers? */ cmpi gr10, #8, icc0 bne icc0, 0, .L2 /* Yes, save them. */ sti gr8, @(gr4, #0) sti gr9, @(gr4, #4) bra .L3 .L2: /* Is the return value a structure? */ cmpi gr10, #-1, icc0 beq icc0, 0, .L3 /* No, save a 4 byte return value. */ sti gr8, @(gr4, #0) .L3: /* Restore the stack, and return. */ ldi @(fp, 8), gr5 ld @(fp, gr0), fp addi sp,#80,sp jmpl @(gr5,gr0) .size ffi_call_EABI, .-ffi_call_EABI --- NEW FILE: ffi.c --- /* ----------------------------------------------------------------------- ffi.c - Copyright (c) 2004 Anthony Green FR-V Foreign Function Interface Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the ``Software''), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL CYGNUS SOLUTIONS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ----------------------------------------------------------------------- */ #include <ffi.h> #include <ffi_common.h> #include <stdlib.h> /* ffi_prep_args is called by the assembly routine once stack space has been allocated for the function's arguments */ void *ffi_prep_args(char *stack, extended_cif *ecif) { register unsigned int i; register void **p_argv; register char *argp; register ffi_type **p_arg; register int count = 0; p_argv = ecif->avalue; argp = stack; for (i = ecif->cif->nargs, p_arg = ecif->cif->arg_types; (i != 0); i--, p_arg++) { size_t z; z = (*p_arg)->size; if ((*p_arg)->type == FFI_TYPE_STRUCT) { z = sizeof(void*); *(void **) argp = *p_argv; } /* if ((*p_arg)->type == FFI_TYPE_FLOAT) { if (count > 24) { // This is going on the stack. Turn it into a double. *(double *) argp = (double) *(float*)(* p_argv); z = sizeof(double); } else *(void **) argp = *(void **)(* p_argv); } */ else if (z < sizeof(int)) { z = sizeof(int); switch ((*p_arg)->type) { case FFI_TYPE_SINT8: *(signed int *) argp = (signed int)*(SINT8 *)(* p_argv); break; case FFI_TYPE_UINT8: *(unsigned int *) argp = (unsigned int)*(UINT8 *)(* p_argv); break; case FFI_TYPE_SINT16: *(signed int *) argp = (signed int)*(SINT16 *)(* p_argv); break; case FFI_TYPE_UINT16: *(unsigned int *) argp = (unsigned int)*(UINT16 *)(* p_argv); break; default: FFI_ASSERT(0); } } else if (z == sizeof(int)) { *(unsigned int *) argp = (unsigned int)*(UINT32 *)(* p_argv); } else { memcpy(argp, *p_argv, z); } p_argv++; argp += z; count += z; } return (stack + ((count > 24) ? 24 : ALIGN_DOWN(count, 8))); } /* Perform machine dependent cif processing */ ffi_status ffi_prep_cif_machdep(ffi_cif *cif) { if (cif->rtype->type == FFI_TYPE_STRUCT) cif->flags = -1; else cif->flags = cif->rtype->size; cif->bytes = ALIGN (cif->bytes, 8); return FFI_OK; } extern void ffi_call_EABI(void *(*)(char *, extended_cif *), extended_cif *, unsigned, unsigned, unsigned *, void (*fn)()); void ffi_call(ffi_cif *cif, void (*fn)(), void *rvalue, void **avalue) { extended_cif ecif; ecif.cif = cif; ecif.avalue = avalue; /* If the return value is a struct and we don't have a return */ /* value address then we need to make one */ if ((rvalue == NULL) && (cif->rtype->type == FFI_TYPE_STRUCT)) { ecif.rvalue = alloca(cif->rtype->size); } else ecif.rvalue = rvalue; switch (cif->abi) { case FFI_EABI: ffi_call_EABI(ffi_prep_args, &ecif, cif->bytes, cif->flags, ecif.rvalue, fn); break; default: FFI_ASSERT(0); break; } } void ffi_closure_eabi (unsigned arg1, unsigned arg2, unsigned arg3, unsigned arg4, unsigned arg5, unsigned arg6) { /* This function is called by a trampoline. The trampoline stows a pointer to the ffi_closure object in gr7. We must save this pointer in a place that will persist while we do our work. */ register ffi_closure *creg __asm__ ("gr7"); ffi_closure *closure = creg; /* Arguments that don't fit in registers are found on the stack at a fixed offset above the current frame pointer. */ register char *frame_pointer __asm__ ("fp"); char *stack_args = frame_pointer + 16; /* Lay the register arguments down in a continuous chunk of memory. */ unsigned register_args[6] = { arg1, arg2, arg3, arg4, arg5, arg6 }; ffi_cif *cif = closure->cif; ffi_type **arg_types = cif->arg_types; void **avalue = alloca (cif->nargs * sizeof(void *)); char *ptr = (char *) register_args; int i; /* Find the address of each argument. */ for (i = 0; i < cif->nargs; i++) { switch (arg_types[i]->type) { case FFI_TYPE_SINT8: case FFI_TYPE_UINT8: avalue[i] = ptr + 3; break; case FFI_TYPE_SINT16: case FFI_TYPE_UINT16: avalue[i] = ptr + 2; break; case FFI_TYPE_SINT32: case FFI_TYPE_UINT32: case FFI_TYPE_FLOAT: avalue[i] = ptr; break; case FFI_TYPE_STRUCT: avalue[i] = *(void**)ptr; break; default: /* This is an 8-byte value. */ avalue[i] = ptr; ptr += 4; break; } ptr += 4; /* If we've handled more arguments than fit in registers, start looking at the those passed on the stack. */ if (ptr == ((char *)register_args + (6*4))) ptr = stack_args; } /* Invoke the closure. */ if (cif->rtype->type == FFI_TYPE_STRUCT) { /* The caller allocates space for the return structure, and passes a pointer to this space in gr3. Use this value directly as the return value. */ register void *return_struct_ptr __asm__("gr3"); (closure->fun) (cif, return_struct_ptr, avalue, closure->user_data); } else { /* Allocate space for the return value and call the function. */ long long rvalue; (closure->fun) (cif, &rvalue, avalue, closure->user_data); /* Functions return 4-byte or smaller results in gr8. 8-byte values also use gr9. We fill the both, even for small return values, just to avoid a branch. */ asm ("ldi @(%0, #0), gr8" : : "r" (&rvalue)); asm ("ldi @(%0, #0), gr9" : : "r" (&((int *) &rvalue)[1])); } } ffi_status ffi_prep_closure (ffi_closure* closure, ffi_cif* cif, void (*fun)(ffi_cif*, void*, void**, void*), void *user_data) { unsigned int *tramp = (unsigned int *) &closure->tramp[0]; unsigned long fn = (long) ffi_closure_eabi; unsigned long cls = (long) closure; #ifdef __FRV_FDPIC__ register void *got __asm__("gr15"); #endif int i; fn = (unsigned long) ffi_closure_eabi; #ifdef __FRV_FDPIC__ tramp[0] = &tramp[2]; tramp[1] = got; tramp[2] = 0x8cfc0000 + (fn & 0xffff); /* setlos lo(fn), gr6 */ tramp[3] = 0x8efc0000 + (cls & 0xffff); /* setlos lo(cls), gr7 */ tramp[4] = 0x8cf80000 + (fn >> 16); /* sethi hi(fn), gr6 */ tramp[5] = 0x8ef80000 + (cls >> 16); /* sethi hi(cls), gr7 */ tramp[6] = 0x9cc86000; /* ldi @(gr6, #0), gr14 */ tramp[7] = 0x8030e000; /* jmpl @(gr14, gr0) */ #else tramp[0] = 0x8cfc0000 + (fn & 0xffff); /* setlos lo(fn), gr6 */ tramp[1] = 0x8efc0000 + (cls & 0xffff); /* setlos lo(cls), gr7 */ tramp[2] = 0x8cf80000 + (fn >> 16); /* sethi hi(fn), gr6 */ tramp[3] = 0x8ef80000 + (cls >> 16); /* sethi hi(cls), gr7 */ tramp[4] = 0x80300006; /* jmpl @(gr0, gr6) */ #endif closure->cif = cif; closure->fun = fun; closure->user_data = user_data; /* Cache flushing. */ for (i = 0; i < FFI_TRAMPOLINE_SIZE; i++) __asm__ volatile ("dcf @(%0,%1)\n\tici @(%0,%1)" :: "r" (tramp), "r" (i)); return FFI_OK; } --- NEW FILE: ffitarget.h --- /* -----------------------------------------------------------------*-C-*- ffitarget.h - Copyright (c) 1996-2004 Red Hat, Inc. Target configuration macros for FR-V Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the ``Software''), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL CYGNUS SOLUTIONS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ----------------------------------------------------------------------- */ #ifndef LIBFFI_TARGET_H #define LIBFFI_TARGET_H /* ---- System specific configurations ----------------------------------- */ #ifndef LIBFFI_ASM typedef unsigned long ffi_arg; typedef signed long ffi_sarg; typedef enum ffi_abi { FFI_FIRST_ABI = 0, #ifdef FRV FFI_EABI, FFI_DEFAULT_ABI = FFI_EABI, #endif FFI_LAST_ABI = FFI_DEFAULT_ABI + 1 } ffi_abi; #endif /* ---- Definitions for closures ----------------------------------------- */ #define FFI_CLOSURES 1 #define FFI_NATIVE_RAW_API 0 #ifdef __FRV_FDPIC__ /* Trampolines are 8 4-byte instructions long. */ #define FFI_TRAMPOLINE_SIZE (8*4) #else /* Trampolines are 5 4-byte instructions long. */ #define FFI_TRAMPOLINE_SIZE (5*4) #endif #endif |
From: Andreas D. <ad...@us...> - 2005-05-16 23:30:40
|
Update of /cvsroot/ctypes/ctypes/source/gcc/libffi/src/mips In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20568/source/gcc/libffi/src/mips Modified Files: Tag: branch_1_0 o32.S ffitarget.h ffi.c Log Message: merged with HEAD Index: o32.S =================================================================== RCS file: /cvsroot/ctypes/ctypes/source/gcc/libffi/src/mips/o32.S,v retrieving revision 1.1 retrieving revision 1.1.4.1 diff -C2 -d -r1.1 -r1.1.4.1 *** o32.S 18 Jun 2004 20:07:11 -0000 1.1 --- o32.S 16 May 2005 23:28:55 -0000 1.1.4.1 *************** *** 43,53 **** .ent ffi_call_O32 ffi_call_O32: ! # Prologue SUBU $sp, SIZEOF_FRAME # Frame size REG_S $fp, SIZEOF_FRAME - 2*FFI_SIZEOF_ARG($sp) # Save frame pointer REG_S ra, SIZEOF_FRAME - 1*FFI_SIZEOF_ARG($sp) # Save return address move $fp, $sp move t9, callback # callback function pointer REG_S flags, SIZEOF_FRAME + 3*FFI_SIZEOF_ARG($fp) # flags --- 43,57 ---- .ent ffi_call_O32 ffi_call_O32: ! $LFB0: # Prologue SUBU $sp, SIZEOF_FRAME # Frame size + $LCFI0: REG_S $fp, SIZEOF_FRAME - 2*FFI_SIZEOF_ARG($sp) # Save frame pointer + $LCFI1: REG_S ra, SIZEOF_FRAME - 1*FFI_SIZEOF_ARG($sp) # Save return address + $LCFI2: move $fp, $sp + $LCFI3: move t9, callback # callback function pointer REG_S flags, SIZEOF_FRAME + 3*FFI_SIZEOF_ARG($fp) # flags *************** *** 70,74 **** ADDU a3, $fp, SIZEOF_FRAME + 3*FFI_SIZEOF_ARG ! jal t9 REG_L t0, SIZEOF_FRAME + 3*FFI_SIZEOF_ARG($fp) # load the flags word --- 74,78 ---- ADDU a3, $fp, SIZEOF_FRAME + 3*FFI_SIZEOF_ARG ! jalr t9 REG_L t0, SIZEOF_FRAME + 3*FFI_SIZEOF_ARG($fp) # load the flags word *************** *** 137,149 **** beqz t1, noretval ! bne t2, FFI_TYPE_INT, retfloat ! jal t9 REG_L t0, SIZEOF_FRAME + 4*FFI_SIZEOF_ARG($fp) REG_S v0, 0(t0) b epilogue retfloat: bne t2, FFI_TYPE_FLOAT, retdouble ! jal t9 REG_L t0, SIZEOF_FRAME + 4*FFI_SIZEOF_ARG($fp) s.s $f0, 0(t0) --- 141,162 ---- beqz t1, noretval ! bne t2, FFI_TYPE_INT, retlonglong ! jalr t9 REG_L t0, SIZEOF_FRAME + 4*FFI_SIZEOF_ARG($fp) REG_S v0, 0(t0) b epilogue + retlonglong: + # Really any 64-bit int, signed or not. + bne t2, FFI_TYPE_UINT64, retfloat + jalr t9 + REG_L t0, SIZEOF_FRAME + 4*FFI_SIZEOF_ARG($fp) + REG_S v1, 4(t0) + REG_S v0, 0(t0) + b epilogue + retfloat: bne t2, FFI_TYPE_FLOAT, retdouble ! jalr t9 REG_L t0, SIZEOF_FRAME + 4*FFI_SIZEOF_ARG($fp) s.s $f0, 0(t0) *************** *** 152,156 **** retdouble: bne t2, FFI_TYPE_DOUBLE, noretval ! jal t9 REG_L t0, SIZEOF_FRAME + 4*FFI_SIZEOF_ARG($fp) s.d $f0, 0(t0) --- 165,169 ---- retdouble: bne t2, FFI_TYPE_DOUBLE, noretval ! jalr t9 REG_L t0, SIZEOF_FRAME + 4*FFI_SIZEOF_ARG($fp) s.d $f0, 0(t0) *************** *** 158,162 **** noretval: ! jal t9 # Epilogue --- 171,175 ---- noretval: ! jalr t9 # Epilogue *************** *** 168,172 **** --- 181,371 ---- j ra + $LFE0: .end ffi_call_O32 + + + /* ffi_closure_O32. Expects address of the passed-in ffi_closure + in t0. Stores any arguments passed in registers onto the + stack, then calls ffi_closure_mips_inner_O32, which + then decodes them. + Stack layout: + + 14 - Start of parameters, original sp + 13 - ra save + 12 - fp save + 11 - $16 (s0) save + 10 - cprestore + 9 - return value high (v1) + 8 - return value low (v0) + 7 - f14 (le high, be low) + 6 - f14 (le low, be high) + 5 - f12 (le high, be low) + 4 - f12 (le low, be high) + 3 - Called function a3 save + 2 - Called function a2 save + 1 - Called function a1 save + 0 - Called function a0 save our sp, fp point here + */ + + #define SIZEOF_FRAME2 ( 14 * FFI_SIZEOF_ARG ) + + .text + .align 2 + .globl ffi_closure_O32 + .ent ffi_closure_O32 + ffi_closure_O32: + $LFB1: + # Prologue + .frame $fp, SIZEOF_FRAME2, $31 + .set noreorder + .cpload $25 + .set reorder + SUBU $sp, SIZEOF_FRAME2 + .cprestore SIZEOF_FRAME2 - 4*FFI_SIZEOF_ARG + $LCFI4: + REG_S $16, SIZEOF_FRAME2 - 3*FFI_SIZEOF_ARG($sp) # Save s0 + REG_S $fp, SIZEOF_FRAME2 - 2*FFI_SIZEOF_ARG($sp) # Save frame pointer + REG_S ra, SIZEOF_FRAME2 - 1*FFI_SIZEOF_ARG($sp) # Save return address + $LCFI6: + move $fp, $sp + + $LCFI7: + # Store all possible argument registers. If there are more than + # four arguments, then they should be stored above where we put $7. + REG_S $4, SIZEOF_FRAME2 + 0*FFI_SIZEOF_ARG($fp) + REG_S $5, SIZEOF_FRAME2 + 1*FFI_SIZEOF_ARG($fp) + REG_S $6, SIZEOF_FRAME2 + 2*FFI_SIZEOF_ARG($fp) + REG_S $7, SIZEOF_FRAME2 + 3*FFI_SIZEOF_ARG($fp) + + # Load ABI enum to $16 + REG_L $16, 20($8) # cif pointer follows tramp. + REG_L $16, 0($16) # abi is first member. + + li $13, 1 # FFI_O32 + bne $16, $13, 1f # Skip fp save if FFI_O32_SOFT_FLOAT + + # Store all possible float/double registers. + s.d $f12, SIZEOF_FRAME2 - 10*FFI_SIZEOF_ARG($fp) + s.d $f14, SIZEOF_FRAME2 - 8*FFI_SIZEOF_ARG($fp) + 1: + # Call ffi_closure_mips_inner_O32 to do the work. + la $25, ffi_closure_mips_inner_O32 + move $4, $8 # Pointer to the ffi_closure + addu $5, $fp, SIZEOF_FRAME2 - 6*FFI_SIZEOF_ARG + addu $6, $fp, SIZEOF_FRAME2 + 0*FFI_SIZEOF_ARG + addu $7, $fp, SIZEOF_FRAME2 - 10*FFI_SIZEOF_ARG + jalr $31, $25 + + # Load the return value into the appropriate register. + move $8, $2 + li $9, FFI_TYPE_VOID + beq $8, $9, closure_done + + li $13, 1 # FFI_O32 + bne $16, $13, 1f # Skip fp restore if FFI_O32_SOFT_FLOAT + + li $9, FFI_TYPE_FLOAT + l.s $f0, SIZEOF_FRAME2 - 6*FFI_SIZEOF_ARG($fp) + beq $8, $9, closure_done + + li $9, FFI_TYPE_DOUBLE + l.d $f0, SIZEOF_FRAME2 - 6*FFI_SIZEOF_ARG($fp) + beq $8, $9, closure_done + 1: + li $9, FFI_TYPE_SINT64 + REG_L $3, SIZEOF_FRAME2 - 5*FFI_SIZEOF_ARG($fp) + beq $8, $9, integer + li $9, FFI_TYPE_UINT64 + beq $8, $9, integer + + integer: + REG_L $2, SIZEOF_FRAME2 - 6*FFI_SIZEOF_ARG($fp) + + closure_done: + # Epilogue + move $sp, $fp + REG_L $16, SIZEOF_FRAME2 - 3*FFI_SIZEOF_ARG($sp) # Restore s0 + REG_L $fp, SIZEOF_FRAME2 - 2*FFI_SIZEOF_ARG($sp) # Restore frame pointer + REG_L ra, SIZEOF_FRAME2 - 1*FFI_SIZEOF_ARG($sp) # Restore return address + ADDU $sp, SIZEOF_FRAME2 + j ra + $LFE1: + .end ffi_closure_O32 + + /* DWARF-2 unwind info. */ + + .section .eh_frame,"a",@progbits + $Lframe0: + .4byte $LECIE0-$LSCIE0 # Length of Common Information Entry + $LSCIE0: + .4byte 0x0 # CIE Identifier Tag + .byte 0x1 # CIE Version + .ascii "zR\0" # CIE Augmentation + .uleb128 0x1 # CIE Code Alignment Factor + .sleb128 4 # CIE Data Alignment Factor + .byte 0x1f # CIE RA Column + .uleb128 0x1 # Augmentation size + .byte 0x00 # FDE Encoding (absptr) + .byte 0xc # DW_CFA_def_cfa + .uleb128 0x1d + .uleb128 0x0 + .align 2 + $LECIE0: + $LSFDE0: + .4byte $LEFDE0-$LASFDE0 # FDE Length + $LASFDE0: + .4byte $LASFDE0-$Lframe0 # FDE CIE offset + .4byte $LFB0 # FDE initial location + .4byte $LFE0-$LFB0 # FDE address range + .uleb128 0x0 # Augmentation size + .byte 0x4 # DW_CFA_advance_loc4 + .4byte $LCFI0-$LFB0 + .byte 0xe # DW_CFA_def_cfa_offset + .uleb128 0x18 + .byte 0x4 # DW_CFA_advance_loc4 + .4byte $LCFI2-$LCFI0 + .byte 0x11 # DW_CFA_offset_extended_sf + .uleb128 0x1e # $fp + .sleb128 -2 # SIZEOF_FRAME2 - 2*FFI_SIZEOF_ARG($sp) + .byte 0x11 # DW_CFA_offset_extended_sf + .uleb128 0x1f # $ra + .sleb128 -1 # SIZEOF_FRAME2 - 1*FFI_SIZEOF_ARG($sp) + .byte 0x4 # DW_CFA_advance_loc4 + .4byte $LCFI3-$LCFI2 + .byte 0xc # DW_CFA_def_cfa + .uleb128 0x1e + .uleb128 0x18 + .align 2 + $LEFDE0: + $LSFDE1: + .4byte $LEFDE1-$LASFDE1 # FDE Length + $LASFDE1: + .4byte $LASFDE1-$Lframe0 # FDE CIE offset + .4byte $LFB1 # FDE initial location + .4byte $LFE1-$LFB1 # FDE address range + .uleb128 0x0 # Augmentation size + .byte 0x4 # DW_CFA_advance_loc4 + .4byte $LCFI4-$LFB1 + .byte 0xe # DW_CFA_def_cfa_offset + .uleb128 0x38 + .byte 0x4 # DW_CFA_advance_loc4 + .4byte $LCFI6-$LCFI4 + .byte 0x11 # DW_CFA_offset_extended_sf + .uleb128 0x10 # $16 + .sleb128 -3 # SIZEOF_FRAME2 - 3*FFI_SIZEOF_ARG($sp) + .byte 0x11 # DW_CFA_offset_extended_sf + .uleb128 0x1e # $fp + .sleb128 -2 # SIZEOF_FRAME2 - 2*FFI_SIZEOF_ARG($sp) + .byte 0x11 # DW_CFA_offset_extended_sf + .uleb128 0x1f # $ra + .sleb128 -1 # SIZEOF_FRAME2 - 1*FFI_SIZEOF_ARG($sp) + .byte 0x4 # DW_CFA_advance_loc4 + .4byte $LCFI7-$LCFI6 + .byte 0xc # DW_CFA_def_cfa + .uleb128 0x1e + .uleb128 0x38 + .align 2 + $LEFDE1: + #endif Index: ffi.c =================================================================== RCS file: /cvsroot/ctypes/ctypes/source/gcc/libffi/src/mips/ffi.c,v retrieving revision 1.1 retrieving revision 1.1.4.1 diff -C2 -d -r1.1 -r1.1.4.1 *** ffi.c 18 Jun 2004 20:07:11 -0000 1.1 --- ffi.c 16 May 2005 23:28:55 -0000 1.1.4.1 *************** *** 28,31 **** --- 28,32 ---- #include <stdlib.h> + #include <sys/cachectl.h> #if _MIPS_SIM == _ABIN32 *************** *** 85,92 **** { size_t z; /* Align if necessary */ ! if (((*p_arg)->alignment - 1) & (unsigned) argp) { ! argp = (char *) ALIGN(argp, (*p_arg)->alignment); FIX_ARGP; } --- 86,98 ---- { size_t z; + unsigned short a; /* Align if necessary */ ! a = (*p_arg)->alignment; ! if (a < FFI_SIZEOF_ARG) ! a = FFI_SIZEOF_ARG; ! ! if ((a - 1) & (unsigned) argp) { ! argp = (char *) ALIGN(argp, a); FIX_ARGP; } *************** *** 268,274 **** #if _MIPS_SIM == _ABIO32 ! /* Set the flags necessary for O32 processing */ ! if (cif->rtype->type != FFI_TYPE_STRUCT) { if (cif->nargs > 0) --- 274,282 ---- #if _MIPS_SIM == _ABIO32 ! /* Set the flags necessary for O32 processing. FFI_O32_SOFT_FLOAT ! * does not have special handling for floating point args. ! */ ! if (cif->rtype->type != FFI_TYPE_STRUCT && cif->abi == FFI_O32) { if (cif->nargs > 0) *************** *** 307,322 **** /* Set the return type flag */ ! switch (cif->rtype->type) { ! case FFI_TYPE_VOID: ! case FFI_TYPE_STRUCT: ! case FFI_TYPE_FLOAT: ! case FFI_TYPE_DOUBLE: ! cif->flags += cif->rtype->type << (FFI_FLAG_BITS * 2); ! break; ! default: ! cif->flags += FFI_TYPE_INT << (FFI_FLAG_BITS * 2); ! break; } #endif --- 315,361 ---- /* Set the return type flag */ ! ! if (cif->abi == FFI_O32_SOFT_FLOAT) { ! switch (cif->rtype->type) ! { ! case FFI_TYPE_VOID: ! case FFI_TYPE_STRUCT: ! cif->flags += cif->rtype->type << (FFI_FLAG_BITS * 2); ! break; ! ! case FFI_TYPE_SINT64: ! case FFI_TYPE_UINT64: ! case FFI_TYPE_DOUBLE: ! cif->flags += FFI_TYPE_UINT64 << (FFI_FLAG_BITS * 2); ! break; ! case FFI_TYPE_FLOAT: ! default: ! cif->flags += FFI_TYPE_INT << (FFI_FLAG_BITS * 2); ! break; ! } ! } ! else ! { ! /* FFI_O32 */ ! switch (cif->rtype->type) ! { ! case FFI_TYPE_VOID: ! case FFI_TYPE_STRUCT: ! case FFI_TYPE_FLOAT: ! case FFI_TYPE_DOUBLE: ! cif->flags += cif->rtype->type << (FFI_FLAG_BITS * 2); ! break; ! ! case FFI_TYPE_SINT64: ! case FFI_TYPE_UINT64: ! cif->flags += FFI_TYPE_UINT64 << (FFI_FLAG_BITS * 2); ! break; ! ! default: ! cif->flags += FFI_TYPE_INT << (FFI_FLAG_BITS * 2); ! break; ! } } #endif *************** *** 443,446 **** --- 482,486 ---- #if _MIPS_SIM == _ABIO32 case FFI_O32: + case FFI_O32_SOFT_FLOAT: ffi_call_O32(ffi_prep_args, &ecif, cif->bytes, cif->flags, ecif.rvalue, fn); *************** *** 460,461 **** --- 500,625 ---- } } + + #if FFI_CLOSURES /* N32 not implemented yet, FFI_CLOSURES not defined */ + #if defined(FFI_MIPS_O32) + extern void ffi_closure_O32(void); + #endif /* FFI_MIPS_O32 */ + + ffi_status + ffi_prep_closure (ffi_closure *closure, + ffi_cif *cif, + void (*fun)(ffi_cif*,void*,void**,void*), + void *user_data) + { + unsigned int *tramp = (unsigned int *) &closure->tramp[0]; + unsigned int fn; + unsigned int ctx = (unsigned int) closure; + + #if defined(FFI_MIPS_O32) + FFI_ASSERT(cif->abi == FFI_O32 || cif->abi == FFI_O32_SOFT_FLOAT); + fn = (unsigned int) ffi_closure_O32; + #else /* FFI_MIPS_N32 */ + FFI_ASSERT(cif->abi == FFI_N32); + FFI_ASSERT(!"not implemented"); + #endif /* FFI_MIPS_O32 */ + + tramp[0] = 0x3c190000 | (fn >> 16); /* lui $25,high(fn) */ + tramp[1] = 0x3c080000 | (ctx >> 16); /* lui $8,high(ctx) */ + tramp[2] = 0x37390000 | (fn & 0xffff); /* ori $25,low(fn) */ + tramp[3] = 0x03200008; /* jr $25 */ + tramp[4] = 0x35080000 | (ctx & 0xffff); /* ori $8,low(ctx) */ + + closure->cif = cif; + closure->fun = fun; + closure->user_data = user_data; + + /* XXX this is available on Linux, but anything else? */ + cacheflush (tramp, FFI_TRAMPOLINE_SIZE, ICACHE); + + return FFI_OK; + } + + /* + * Decodes the arguments to a function, which will be stored on the + * stack. AR is the pointer to the beginning of the integer arguments + * (and, depending upon the arguments, some floating-point arguments + * as well). FPR is a pointer to the area where floating point + * registers have been saved, if any. + * + * RVALUE is the location where the function return value will be + * stored. CLOSURE is the prepared closure to invoke. + * + * This function should only be called from assembly, which is in + * turn called from a trampoline. + * + * Returns the function return type. + * + * Based on the similar routine for sparc. + */ + int + ffi_closure_mips_inner_O32 (ffi_closure *closure, + void *rvalue, unsigned long *ar, + double *fpr) + { + ffi_cif *cif; + void **avalue; + ffi_type **arg_types; + int i, avn, argn, seen_int; + + cif = closure->cif; + avalue = alloca (cif->nargs * sizeof (void *)); + + seen_int = (cif->abi == FFI_O32_SOFT_FLOAT); + argn = 0; + + if ((cif->flags >> (FFI_FLAG_BITS * 2)) == FFI_TYPE_STRUCT) + { + rvalue = (void *) ar[0]; + argn = 1; + } + + i = 0; + avn = cif->nargs; + arg_types = cif->arg_types; + + while (i < avn) + { + if (i < 2 && !seen_int && + (arg_types[i]->type == FFI_TYPE_FLOAT || + arg_types[i]->type == FFI_TYPE_DOUBLE)) + { + avalue[i] = ((char *) &fpr[i]); + } + else + { + if (arg_types[i]->alignment == 8 && (argn & 0x1)) + argn++; + avalue[i] = ((char *) &ar[argn]); + seen_int = 1; + } + argn += ALIGN(arg_types[i]->size, FFI_SIZEOF_ARG) / FFI_SIZEOF_ARG; + i++; + } + + /* Invoke the closure. */ + (closure->fun) (cif, rvalue, avalue, closure->user_data); + + if (cif->abi == FFI_O32_SOFT_FLOAT) + { + switch (cif->rtype->type) + { + case FFI_TYPE_FLOAT: + return FFI_TYPE_INT; + case FFI_TYPE_DOUBLE: + return FFI_TYPE_UINT64; + default: + return cif->rtype->type; + } + } + else + { + return cif->rtype->type; + } + } + + #endif /* FFI_CLOSURES */ Index: ffitarget.h =================================================================== RCS file: /cvsroot/ctypes/ctypes/source/gcc/libffi/src/mips/ffitarget.h,v retrieving revision 1.1 retrieving revision 1.1.4.1 diff -C2 -d -r1.1 -r1.1.4.1 *** ffitarget.h 18 Jun 2004 20:07:11 -0000 1.1 --- ffitarget.h 16 May 2005 23:28:55 -0000 1.1.4.1 *************** *** 139,145 **** --- 139,150 ---- FFI_N32, FFI_N64, + FFI_O32_SOFT_FLOAT, #ifdef FFI_MIPS_O32 + #ifdef __mips_soft_float + FFI_DEFAULT_ABI = FFI_O32_SOFT_FLOAT, + #else FFI_DEFAULT_ABI = FFI_O32, + #endif #else FFI_DEFAULT_ABI = FFI_N32, *************** *** 154,158 **** --- 159,169 ---- /* ---- Definitions for closures ----------------------------------------- */ + #if defined(FFI_MIPS_O32) + #define FFI_CLOSURES 1 + #define FFI_TRAMPOLINE_SIZE 20 + #else + /* N32/N64 not implemented yet. */ #define FFI_CLOSURES 0 + #endif /* FFI_MIPS_O32 */ #define FFI_NATIVE_RAW_API 0 |
From: Andreas D. <ad...@us...> - 2005-05-16 23:30:38
|
Update of /cvsroot/ctypes/ctypes/source/gcc/libffi/src/alpha In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20568/source/gcc/libffi/src/alpha Modified Files: Tag: branch_1_0 osf.S Log Message: merged with HEAD Index: osf.S =================================================================== RCS file: /cvsroot/ctypes/ctypes/source/gcc/libffi/src/alpha/osf.S,v retrieving revision 1.1 retrieving revision 1.1.4.1 diff -C2 -d -r1.1 -r1.1.4.1 *** osf.S 18 Jun 2004 20:07:09 -0000 1.1 --- osf.S 16 May 2005 23:29:14 -0000 1.1.4.1 *************** *** 50,59 **** mov $16, $30 stq $26, 0($1) - $LCFI0: stq $15, 8($1) - $LCFI1: stq $18, 16($1) mov $1, $15 ! $LCFI2: .prologue 0 --- 50,57 ---- mov $16, $30 stq $26, 0($1) stq $15, 8($1) stq $18, 16($1) mov $1, $15 ! $LCFI1: .prologue 0 *************** *** 85,88 **** --- 83,87 ---- ldq $18, 16($15) ldq $26, 0($15) + $LCFI2: beq $19, $noretval *************** *** 95,102 **** --- 94,103 ---- bne $3, $retdouble + .align 3 $noretval: ldq $15, 8($15) ret + .align 4 $retint: stq $0, 0($19) *************** *** 105,108 **** --- 106,110 ---- ret + .align 4 $retfloat: sts $f0, 0($19) *************** *** 111,114 **** --- 113,117 ---- ret + .align 4 $retdouble: stt $f0, 0($19) *************** *** 296,354 **** .section .eh_frame,EH_FRAME_FLAGS,@progbits __FRAME_BEGIN__: ! .4byte $LECIE1-$LSCIE1 # Length of Common Information Entry $LSCIE1: ! .4byte 0x0 # CIE Identifier Tag ! .byte 0x1 # CIE Version ! .ascii "zR\0" # CIE Augmentation ! .byte 0x1 # uleb128 0x1; CIE Code Alignment Factor ! .byte 0x78 # sleb128 -8; CIE Data Alignment Factor ! .byte 0x1a # CIE RA Column ! .byte 0x1 # uleb128 0x1; Augmentation size ! .byte 0x1b # FDE Encoding (pcrel sdata4) ! .byte 0xc # DW_CFA_def_cfa ! .byte 0x1e # uleb128 0x1e ! .byte 0x0 # uleb128 0x0 .align 3 $LECIE1: $LSFDE1: ! .4byte $LEFDE1-$LASFDE1 # FDE Length $LASFDE1: ! .4byte $LASFDE1-__FRAME_BEGIN__ # FDE CIE offset ! .4byte $LFB1-. # FDE initial location ! .4byte $LFE1-$LFB1 # FDE address range ! .byte 0x0 # uleb128 0x0; Augmentation size ! .byte 0x4 # DW_CFA_advance_loc4 ! .4byte $LCFI0-$LFB1 ! .byte 0xe # DW_CFA_def_cfa_offset ! .byte 0x30 # uleb128 0x30 ! .byte 0x4 # DW_CFA_advance_loc4 ! .4byte $LCFI1-$LCFI0 ! .byte 0x9a # DW_CFA_offset, column 0x1a ! .byte 0x6 # uleb128 0x6 ! .byte 0x8f # DW_CFA_offset, column 0xf ! .byte 0x5 # uleb128 0x5 ! .byte 0x4 # DW_CFA_advance_loc4 .4byte $LCFI2-$LCFI1 ! .byte 0xc # DW_CFA_def_cfa ! .byte 0xf # uleb128 0xf ! .byte 0x30 # uleb128 0x30 .align 3 $LEFDE1: $LSFDE3: ! .4byte $LEFDE3-$LASFDE3 # FDE Length $LASFDE3: ! .4byte $LASFDE3-__FRAME_BEGIN__ # FDE CIE offset ! .4byte $LFB2-. # FDE initial location ! .4byte $LFE2-$LFB2 # FDE address range ! .byte 0x0 # uleb128 0x0; Augmentation size ! .byte 0x4 # DW_CFA_advance_loc4 .4byte $LCFI5-$LFB2 ! .byte 0xe # DW_CFA_def_cfa_offset ! .byte 0x90,0x1 # uleb128 0x90 ! .byte 0x4 # DW_CFA_advance_loc4 .4byte $LCFI6-$LCFI5 ! .byte 0x9a # DW_CFA_offset, column 0x1a ! .byte 0x12 # uleb128 0x12 .align 3 $LEFDE3: --- 299,358 ---- .section .eh_frame,EH_FRAME_FLAGS,@progbits __FRAME_BEGIN__: ! .4byte $LECIE1-$LSCIE1 # Length of Common Information Entry $LSCIE1: ! .4byte 0x0 # CIE Identifier Tag ! .byte 0x1 # CIE Version ! .ascii "zR\0" # CIE Augmentation ! .byte 0x1 # uleb128 0x1; CIE Code Alignment Factor ! .byte 0x78 # sleb128 -8; CIE Data Alignment Factor ! .byte 26 # CIE RA Column ! .byte 0x1 # uleb128 0x1; Augmentation size ! .byte 0x1b # FDE Encoding (pcrel sdata4) ! .byte 0xc # DW_CFA_def_cfa ! .byte 30 # uleb128 column 30 ! .byte 0 # uleb128 offset 0 .align 3 $LECIE1: $LSFDE1: ! .4byte $LEFDE1-$LASFDE1 # FDE Length $LASFDE1: ! .4byte $LASFDE1-__FRAME_BEGIN__ # FDE CIE offset ! .4byte $LFB1-. # FDE initial location ! .4byte $LFE1-$LFB1 # FDE address range ! .byte 0x0 # uleb128 0x0; Augmentation size ! ! .byte 0x4 # DW_CFA_advance_loc4 ! .4byte $LCFI1-$LFB1 ! .byte 0x9a # DW_CFA_offset, column 26 ! .byte 4 # uleb128 4*-8 ! .byte 0x8f # DW_CFA_offset, column 15 ! .byte 0x3 # uleb128 3*-8 ! .byte 0xc # DW_CFA_def_cfa ! .byte 15 # uleb128 column 15 ! .byte 32 # uleb128 offset 32 ! ! .byte 0x4 # DW_CFA_advance_loc4 .4byte $LCFI2-$LCFI1 ! .byte 0xda # DW_CFA_restore, column 26 .align 3 $LEFDE1: $LSFDE3: ! .4byte $LEFDE3-$LASFDE3 # FDE Length $LASFDE3: ! .4byte $LASFDE3-__FRAME_BEGIN__ # FDE CIE offset ! .4byte $LFB2-. # FDE initial location ! .4byte $LFE2-$LFB2 # FDE address range ! .byte 0x0 # uleb128 0x0; Augmentation size ! ! .byte 0x4 # DW_CFA_advance_loc4 .4byte $LCFI5-$LFB2 ! .byte 0xe # DW_CFA_def_cfa_offset ! .byte 0x80,0x1 # uleb128 128 ! ! .byte 0x4 # DW_CFA_advance_loc4 .4byte $LCFI6-$LCFI5 ! .byte 0x9a # DW_CFA_offset, column 26 ! .byte 16 # uleb128 offset 16*-8 .align 3 $LEFDE3: |
From: Andreas D. <ad...@us...> - 2005-05-16 23:30:37
|
Update of /cvsroot/ctypes/ctypes/source/gcc/libffi/src/sh In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20568/source/gcc/libffi/src/sh Modified Files: Tag: branch_1_0 sysv.S ffi.c Log Message: merged with HEAD Index: sysv.S =================================================================== RCS file: /cvsroot/ctypes/ctypes/source/gcc/libffi/src/sh/sysv.S,v retrieving revision 1.1 retrieving revision 1.1.4.1 diff -C2 -d -r1.1 -r1.1.4.1 *** sysv.S 18 Jun 2004 20:07:13 -0000 1.1 --- sysv.S 16 May 2005 23:28:53 -0000 1.1.4.1 *************** *** 1,4 **** /* ----------------------------------------------------------------------- ! sysv.S - Copyright (c) 2002, 2003 Kaz Kojima SuperH Foreign Function Interface --- 1,4 ---- /* ----------------------------------------------------------------------- ! sysv.S - Copyright (c) 2002, 2003, 2004 Kaz Kojima SuperH Foreign Function Interface *************** *** 118,127 **** add #1,r3 1: - mov r15,r0 - and #7,r0 - tst r0,r0 - bt 2f - add #4,r15 - 2: mov #12,r0 cmp/hs r0,r3 --- 118,121 ---- *************** *** 554,560 **** --- 548,557 ---- #endif + bt/s 10f + mov r2, r5 mov r14,r1 add #8,r1 mov r1,r5 + 10: mov r14,r1 *************** *** 566,570 **** --- 563,575 ---- mov.l r1,@r14 + #ifdef PIC + mov.l L_got,r1 + mova L_got,r0 + add r0,r1 + mov.l L_helper,r0 + add r1,r0 + #else mov.l L_helper,r0 + #endif jsr @r0 mov r3,r4 *************** *** 580,585 **** --- 585,597 ---- 0: .align 2 + #ifdef PIC + L_got: + .long _GLOBAL_OFFSET_TABLE_ + L_helper: + .long ffi_closure_helper_SYSV@GOTOFF + #else L_helper: .long ffi_closure_helper_SYSV + #endif L_table: .short L_case_v - 0b /* FFI_TYPE_VOID */ *************** *** 684,691 **** --- 696,711 ---- .4byte 0x0 /* CIE Identifier Tag */ .byte 0x1 /* CIE Version */ + #ifdef PIC + .ascii "zR\0" /* CIE Augmentation */ + #else .byte 0x0 /* CIE Augmentation */ + #endif .byte 0x1 /* uleb128 0x1; CIE Code Alignment Factor */ .byte 0x7c /* sleb128 -4; CIE Data Alignment Factor */ .byte 0x11 /* CIE RA Column */ + #ifdef PIC + .uleb128 0x1 /* Augmentation size */ + .byte 0x10 /* FDE Encoding (pcrel) */ + #endif .byte 0xc /* DW_CFA_def_cfa */ .byte 0xf /* uleb128 0xf */ *************** *** 697,702 **** --- 717,729 ---- .LASFDE1: .4byte .LASFDE1-__FRAME_BEGIN__ /* FDE CIE offset */ + #ifdef PIC + .4byte .LFB1-. /* FDE initial location */ + #else .4byte .LFB1 /* FDE initial location */ + #endif .4byte .LFE1-.LFB1 /* FDE address range */ + #ifdef PIC + .uleb128 0x0 /* Augmentation size */ + #endif .byte 0x4 /* DW_CFA_advance_loc4 */ .4byte .LCFI0-.LFB1 *************** *** 746,751 **** --- 773,785 ---- .LASFDE3: .4byte .LASFDE3-__FRAME_BEGIN__ /* FDE CIE offset */ + #ifdef PIC + .4byte .LFB2-. /* FDE initial location */ + #else .4byte .LFB2 /* FDE initial location */ + #endif .4byte .LFE2-.LFB2 /* FDE address range */ + #ifdef PIC + .uleb128 0x0 /* Augmentation size */ + #endif .byte 0x4 /* DW_CFA_advance_loc4 */ .4byte .LCFI7-.LFB2 Index: ffi.c =================================================================== RCS file: /cvsroot/ctypes/ctypes/source/gcc/libffi/src/sh/ffi.c,v retrieving revision 1.1 retrieving revision 1.1.4.1 diff -C2 -d -r1.1 -r1.1.4.1 *** ffi.c 18 Jun 2004 20:07:13 -0000 1.1 --- ffi.c 16 May 2005 23:28:53 -0000 1.1.4.1 *************** *** 1,4 **** /* ----------------------------------------------------------------------- ! ffi.c - Copyright (c) 2002, 2003 Kaz Kojima SuperH Foreign Function Interface --- 1,4 ---- /* ----------------------------------------------------------------------- ! ffi.c - Copyright (c) 2002, 2003, 2004 Kaz Kojima SuperH Foreign Function Interface *************** *** 472,485 **** { unsigned int *tramp; FFI_ASSERT (cif->abi == FFI_GCC_SYSV); tramp = (unsigned int *) &closure->tramp[0]; #ifdef __LITTLE_ENDIAN__ ! tramp[0] = 0xd301d202; ! tramp[1] = 0x0009422b; #else ! tramp[0] = 0xd202d301; ! tramp[1] = 0x422b0009; #endif *(void **) &tramp[2] = (void *)closure; /* ctx */ --- 472,491 ---- { unsigned int *tramp; + unsigned short insn; FFI_ASSERT (cif->abi == FFI_GCC_SYSV); tramp = (unsigned int *) &closure->tramp[0]; + /* Set T bit if the function returns a struct pointed with R2. */ + insn = (return_type (cif->rtype) == FFI_TYPE_STRUCT + ? 0x0018 /* sett */ + : 0x0008 /* clrt */); + #ifdef __LITTLE_ENDIAN__ ! tramp[0] = 0xd301d102; ! tramp[1] = 0x0000412b | (insn << 16); #else ! tramp[0] = 0xd102d301; ! tramp[1] = 0x412b0000 | insn; #endif *(void **) &tramp[2] = (void *)closure; /* ctx */ |
From: Andreas D. <ad...@us...> - 2005-05-16 23:30:36
|
Update of /cvsroot/ctypes/ctypes/source/gcc/libffi/src/arm In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20568/source/gcc/libffi/src/arm Modified Files: Tag: branch_1_0 sysv.S ffi.c Log Message: merged with HEAD Index: sysv.S =================================================================== RCS file: /cvsroot/ctypes/ctypes/source/gcc/libffi/src/arm/sysv.S,v retrieving revision 1.1 retrieving revision 1.1.4.1 diff -C2 -d -r1.1 -r1.1.4.1 *** sysv.S 18 Jun 2004 20:07:10 -0000 1.1 --- sysv.S 16 May 2005 23:29:13 -0000 1.1.4.1 *************** *** 41,125 **** #define ENTRY(x) .globl CNAME(x); .type CNAME(x),%function; CNAME(x): #endif - - .text ! # a1: ffi_prep_args ! # a2: &ecif ! # a3: cif->bytes ! # a4: fig->flags ! # sp+0: ecif.rvalue ! # sp+4: fn ! # This assumes we are using gas. ! ENTRY(ffi_call_SYSV) ! # Save registers ! stmfd sp!, {a1-a4, fp, lr} ! mov fp, sp ! # Make room for all of the new args. ! sub sp, fp, a3 ! # Place all of the ffi_prep_args in position ! mov ip, a1 ! mov a1, sp ! # a2 already set ! # And call ! mov lr, pc ! mov pc, ip ! # move first 4 parameters in registers ! ldr a1, [sp, #0] ! ldr a2, [sp, #4] ! ldr a3, [sp, #8] ! ldr a4, [sp, #12] ! # and adjust stack ! ldr ip, [fp, #8] ! cmp ip, #16 ! movge ip, #16 ! add sp, sp, ip - # call function - mov lr, pc - ldr pc, [fp, #28] ! # Remove the space we pushed for the args ! mov sp, fp ! # Load a3 with the pointer to storage for the return value ! ldr a3, [sp, #24] ! # Load a4 with the return type code ! ldr a4, [sp, #12] ! # If the return value pointer is NULL, assume no return value. ! cmp a3, #0 ! beq epilogue ! # return INT ! cmp a4, #FFI_TYPE_INT ! streq a1, [a3] ! beq epilogue ! # return FLOAT ! cmp a4, #FFI_TYPE_FLOAT #ifdef __SOFTFP__ ! streq a1, [a3] ! #else ! stfeqs f0, [a3] #endif ! beq epilogue ! # return DOUBLE or LONGDOUBLE ! cmp a4, #FFI_TYPE_DOUBLE #ifdef __SOFTFP__ ! stmeqia a3, {a1, a2} ! #else ! stfeqd f0, [a3] #endif ! epilogue: ! ldmfd sp!, {a1-a4, fp, pc} .ffi_call_SYSV_end: --- 41,207 ---- #define ENTRY(x) .globl CNAME(x); .type CNAME(x),%function; CNAME(x): #endif ! #ifdef __ELF__ ! #define LSYM(x) .x ! #else ! #define LSYM(x) x ! #endif ! /* We need a better way of testing for this, but for now, this is all ! we can do. */ ! @ This selects the minimum architecture level required. ! #define __ARM_ARCH__ 3 ! #if defined(__ARM_ARCH_4__) || defined(__ARM_ARCH_4T__) ! # undef __ARM_ARCH__ ! # define __ARM_ARCH__ 4 ! #endif ! ! #if defined(__ARM_ARCH_5__) || defined(__ARM_ARCH_5T__) \ ! || defined(__ARM_ARCH_5E__) || defined(__ARM_ARCH_5TE__) \ ! || defined(__ARM_ARCH_5TEJ__) ! # undef __ARM_ARCH__ ! # define __ARM_ARCH__ 5 ! #endif ! #if defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) \ ! || defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6Z__) \ ! || defined(__ARM_ARCH_6ZK__) ! # undef __ARM_ARCH__ ! # define __ARM_ARCH__ 6 ! #endif ! #if __ARM_ARCH__ >= 5 ! # define call_reg(x) blx x ! #elif defined (__ARM_ARCH_4T__) ! # define call_reg(x) mov lr, pc ; bx x ! # if defined(__thumb__) || defined(__THUMB_INTERWORK__) ! # define __INTERWORKING__ ! # endif ! #else ! # define call_reg(x) mov lr, pc ; mov pc, x ! #endif ! #if defined(__thumb__) && !defined(__THUMB_INTERWORK__) ! .macro ARM_FUNC_START name ! .text ! .align 0 ! .thumb ! .thumb_func ! ENTRY(\name) ! bx pc ! nop ! .arm ! /* A hook to tell gdb that we've switched to ARM mode. Also used to call ! directly from other local arm routines. */ ! _L__\name: ! .endm ! #else ! .macro ARM_FUNC_START name ! .text ! .align 0 ! .arm ! ENTRY(\name) ! .endm ! #endif ! .macro RETLDM regs=, cond=, dirn=ia ! #if defined (__INTERWORKING__) ! .ifc "\regs","" ! ldr\cond lr, [sp], #4 ! .else ! ldm\cond\dirn sp!, {\regs, lr} ! .endif ! bx\cond lr ! #else ! .ifc "\regs","" ! ldr\cond pc, [sp], #4 ! .else ! ldm\cond\dirn sp!, {\regs, pc} ! .endif ! #endif ! .endm ! @ r0: ffi_prep_args ! @ r1: &ecif ! @ r2: cif->bytes ! @ r3: fig->flags ! @ sp+0: ecif.rvalue ! @ sp+4: fn ! @ This assumes we are using gas. ! ARM_FUNC_START ffi_call_SYSV ! @ Save registers ! stmfd sp!, {r0-r3, fp, lr} ! mov fp, sp ! @ Make room for all of the new args. ! sub sp, fp, r2 ! @ Place all of the ffi_prep_args in position ! mov ip, r0 ! mov r0, sp ! @ r1 already set ! @ Call ffi_prep_args(stack, &ecif) ! call_reg(ip) ! @ move first 4 parameters in registers ! ldmia sp, {r0-r3} ! ! @ and adjust stack ! ldr ip, [fp, #8] ! cmp ip, #16 ! movhs ip, #16 ! add sp, sp, ip ! ! @ call (fn) (...) ! ldr ip, [fp, #28] ! call_reg(ip) ! ! @ Remove the space we pushed for the args ! mov sp, fp ! ! @ Load r2 with the pointer to storage for the return value ! ldr r2, [sp, #24] ! ! @ Load r3 with the return type code ! ldr r3, [sp, #12] ! ! @ If the return value pointer is NULL, assume no return value. ! cmp r2, #0 ! beq LSYM(Lepilogue) ! ! @ return INT ! cmp r3, #FFI_TYPE_INT #ifdef __SOFTFP__ ! cmpne r3, #FFI_TYPE_FLOAT #endif ! streq r0, [r2] ! beq LSYM(Lepilogue) ! @ return INT64 ! cmp r3, #FFI_TYPE_SINT64 #ifdef __SOFTFP__ ! cmpne r3, #FFI_TYPE_DOUBLE #endif + stmeqia r2, {r0, r1} ! #ifndef __SOFTFP__ ! beq LSYM(Lepilogue) ! ! @ return FLOAT ! cmp r3, #FFI_TYPE_FLOAT ! stfeqs f0, [r2] ! beq LSYM(Lepilogue) ! ! @ return DOUBLE or LONGDOUBLE ! cmp r3, #FFI_TYPE_DOUBLE ! stfeqd f0, [r2] ! #endif ! ! LSYM(Lepilogue): ! RETLDM "r0-r3,fp" .ffi_call_SYSV_end: Index: ffi.c =================================================================== RCS file: /cvsroot/ctypes/ctypes/source/gcc/libffi/src/arm/ffi.c,v retrieving revision 1.1 retrieving revision 1.1.4.1 diff -C2 -d -r1.1 -r1.1.4.1 *** ffi.c 18 Jun 2004 20:07:10 -0000 1.1 --- ffi.c 16 May 2005 23:29:13 -0000 1.1.4.1 *************** *** 109,112 **** --- 109,117 ---- ffi_status ffi_prep_cif_machdep(ffi_cif *cif) { + /* Round the stack up to a multiple of 8 bytes. This isn't needed + everywhere, but it is on some platforms, and it doesn't harm anything + when it isn't needed. */ + cif->bytes = (cif->bytes + 7) & ~7; + /* Set the return type flag */ switch (cif->rtype->type) *************** *** 119,122 **** --- 124,132 ---- break; + case FFI_TYPE_SINT64: + case FFI_TYPE_UINT64: + cif->flags = (unsigned) FFI_TYPE_SINT64; + break; + default: cif->flags = FFI_TYPE_INT; |
From: Andreas D. <ad...@us...> - 2005-05-16 23:30:36
|
Update of /cvsroot/ctypes/ctypes/source/gcc/gcc/testsuite/lib/CVS.gcc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20568/source/gcc/gcc/testsuite/lib/CVS.gcc Added Files: Tag: branch_1_0 Root Repository Entries Log Message: merged with HEAD --- NEW FILE: Root --- :ext:an...@sa...:/cvsroot/gcc --- NEW FILE: Repository --- gcc/gcc/testsuite/lib --- NEW FILE: Entries --- /c-torture.exp/1.19/Tue Mar 8 22:10:33 2005// /compat.exp/1.12/Tue Nov 30 21:37:14 2004// /copy-file.exp/1.1/Sat Jun 7 14:55:56 2003// /dg-pch.exp/1.4/Wed Aug 20 04:04:47 2003// /file-format.exp/1.9/Thu Mar 31 18:38:27 2005// /fortran-torture.exp/1.8/Thu Apr 28 23:58:30 2005// /g++-dg.exp/1.11/Thu Jun 5 22:18:54 2003// /g++.exp/1.46/Sat Mar 26 01:50:32 2005// /gcc-defs.exp/1.5/Sat Mar 26 01:50:32 2005// /gcc-dg.exp/1.53/Thu Mar 31 18:11:14 2005// /gcc.exp/1.18/Tue Apr 5 22:50:40 2005// /gcov.exp/1.6/Tue Mar 8 22:10:34 2005// /gfortran-dg.exp/1.5/Mon Feb 21 16:31:42 2005// /gfortran.exp/1.11/Sat Mar 26 01:50:32 2005// /mike-g++.exp/1.5/Tue Mar 8 22:10:34 2005// /mike-gcc.exp/1.5/Tue Mar 8 22:10:34 2005// /objc-dg.exp/1.3/Fri May 16 20:53:04 2003// /objc-torture.exp/1.8/Tue Mar 8 22:10:34 2005// /objc.exp/1.32/Sat Mar 26 01:50:32 2005// /profopt.exp/1.7/Thu Mar 31 18:36:30 2005// /prune.exp/1.12/Fri Apr 9 22:24:29 2004// /scantree.exp/1.3/Thu Mar 31 00:28:49 2005// /target-libpath.exp/1.4/Tue Mar 8 22:10:34 2005// /treelang-dg.exp/1.1/Tue Jan 20 01:57:57 2004// /treelang.exp/1.11/Sat Mar 26 01:50:32 2005// /wrapper.exp/1.3/Tue Apr 12 06:26:39 2005// /scanasm.exp/1.16/Fri May 13 21:49:23 2005// /target-supports-dg.exp/1.3/Fri May 13 21:49:23 2005// /target-supports.exp/1.56/Fri May 13 21:49:23 2005// D |
From: Andreas D. <ad...@us...> - 2005-05-16 23:30:36
|
Update of /cvsroot/ctypes/ctypes/source/gcc/libffi/src/x86 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20568/source/gcc/libffi/src/x86 Modified Files: Tag: branch_1_0 unix64.S ffi64.c Log Message: merged with HEAD Index: unix64.S =================================================================== RCS file: /cvsroot/ctypes/ctypes/source/gcc/libffi/src/x86/unix64.S,v retrieving revision 1.1.4.1 retrieving revision 1.1.4.2 diff -C2 -d -r1.1.4.1 -r1.1.4.2 *** unix64.S 22 Apr 2005 15:16:40 -0000 1.1.4.1 --- unix64.S 16 May 2005 23:28:52 -0000 1.1.4.2 *************** *** 29,310 **** #include <ffi.h> - .section .rodata - .LC0: - .string "asm in progress %lld\n" - .LC1: - .string "asm in progress\n" .text - .align 2 - .globl ffi_call_UNIX64 - .type ffi_call_UNIX64,@function ! ffi_call_UNIX64: ! .LFB1: ! pushq %rbp ! .LCFI0: ! movq %rsp, %rbp ! .LCFI1: ! /* Save all arguments */ ! subq $48, %rsp ! .LCFI2: ! movq %rdi, -8(%rbp) /* ffi_prep_args */ ! movq %rsi, -16(%rbp) /* ffi_fill_return_value */ ! movq %rdx, -24(%rbp) /* ecif */ ! movq %rcx, -32(%rbp) /* cif->bytes */ ! movq %r8, -40(%rbp) /* ecif.rvalue */ ! movq %r9, -48(%rbp) /* fn */ ! /* Make room for all of the new args and the register args */ ! addl $176, %ecx ! .LCFI3: ! subq %rcx, %rsp ! .LCFI4: ! /* Setup the call to ffi_prep_args. */ ! movq %rdi, %rax /* &ffi_prep_args */ ! movq %rsp, %rdi /* stackLayout */ ! movq %rdx, %rsi /* ecif */ ! call *%rax /* ffi_prep_args(stackLayout, ecif);*/ ! /* ffi_prep_args have put all the register contents into the */ ! /* stackLayout struct. Now put the register values in place. */ ! movq (%rsp), %rdi ! movq 8(%rsp), %rsi ! movq 16(%rsp), %rdx ! movq 24(%rsp), %rcx ! movq 32(%rsp), %r8 ! movq 40(%rsp), %r9 ! movaps 48(%rsp), %xmm0 ! movaps 64(%rsp), %xmm1 ! movaps 80(%rsp), %xmm2 ! movaps 96(%rsp), %xmm3 ! movaps 112(%rsp), %xmm4 ! movaps 128(%rsp), %xmm5 ! movaps 144(%rsp), %xmm6 ! movaps 160(%rsp), %xmm7 ! /* Remove space for stackLayout so stack arguments are placed ! correctly for the call. */ ! .LCFI5: ! addq $176, %rsp ! .LCFI6: ! /* Set %rax to max. number of used SSE registers for vararg calls. ! See also: ! http://article.gmane.org/gmane.comp.python.ctypes/1702 ! http://article.gmane.org/gmane.comp.python.ctypes/1703 ! */ ! movq $8, %rax /* Call the user function. */ ! call *-48(%rbp) ! /* Make stack space for the return_value struct. */ ! subq $64, %rsp ! /* Fill in all potential return values to this struct. */ ! movq %rax, (%rsp) ! movq %rdx, 8(%rsp) ! movaps %xmm0, 16(%rsp) ! movaps %xmm1, 32(%rsp) ! fstpt 48(%rsp) ! /* Now call ffi_fill_return_value. */ ! movq %rsp, %rdi /* struct return_value */ ! movq -24(%rbp), %rsi /* ecif */ ! movq -16(%rbp), %rax /* &ffi_fill_return_value */ ! call *%rax /* call it */ ! /* And the work is done. */ ! leave ! ret ! .LFE1: ! .ffi_call_UNIX64_end: ! .size ffi_call_UNIX64,.ffi_call_UNIX64_end-ffi_call_UNIX64 ! .text ! .align 2 ! .globl float2sse ! .type float2sse,@function ! float2sse: ! /* Save the contents of this sse-float in a pointer. */ ! movaps %xmm0, (%rdi) ret ! .align 2 ! .globl floatfloat2sse ! .type floatfloat2sse,@function ! floatfloat2sse: ! /* Save the contents of these two sse-floats in a pointer. */ ! movq (%rdi), %xmm0 ! movaps %xmm0, (%rsi) ret ! ! .align 2 ! .globl double2sse ! .type double2sse,@function ! double2sse: ! /* Save the contents of this sse-double in a pointer. */ ! movaps %xmm0, (%rdi) ret ! ! .align 2 ! .globl sse2float ! .type sse2float,@function ! sse2float: ! /* Save the contents of this sse-float in a pointer. */ ! movaps (%rdi), %xmm0 ret ! .align 2 ! .globl sse2double ! .type sse2double,@function ! sse2double: ! /* Save the contents of this pointer in a sse-double. */ ! movaps (%rdi), %xmm0 ret ! .align 2 ! .globl sse2floatfloat ! .type sse2floatfloat,@function ! sse2floatfloat: ! /* Save the contents of this pointer in two sse-floats. */ ! movaps (%rdi), %xmm0 ! movq %xmm0, (%rsi) ret .align 2 ! .globl ffi_closure_UNIX64 ! .type ffi_closure_UNIX64,@function - ffi_closure_UNIX64: - .LFB2: - pushq %rbp - .LCFI10: - movq %rsp, %rbp - .LCFI11: - subq $240, %rsp - .LCFI12: - movq %rdi, -176(%rbp) - movq %rsi, -168(%rbp) - movq %rdx, -160(%rbp) - movq %rcx, -152(%rbp) - movq %r8, -144(%rbp) - movq %r9, -136(%rbp) - /* FIXME: We can avoid all this stashing of XMM registers by - (in ffi_prep_closure) computing the number of - floating-point args and moving it into %rax before calling - this function. Once this is done, uncomment the next few - lines and only the essential XMM registers will be written - to memory. This is a significant saving. */ - /* movzbl %al, %eax */ - /* movq %rax, %rdx */ - /* leaq 0(,%rdx,4), %rax */ - /* leaq 2f(%rip), %rdx */ - /* subq %rax, %rdx */ - leaq -1(%rbp), %rax - /* jmp *%rdx */ - movaps %xmm7, -15(%rax) - movaps %xmm6, -31(%rax) - movaps %xmm5, -47(%rax) - movaps %xmm4, -63(%rax) - movaps %xmm3, -79(%rax) - movaps %xmm2, -95(%rax) - movaps %xmm1, -111(%rax) - movaps %xmm0, -127(%rax) - 2: - movl %edi, -180(%rbp) - movl $0, -224(%rbp) - movl $48, -220(%rbp) - leaq 16(%rbp), %rax - movq %rax, -216(%rbp) - leaq -176(%rbp), %rdx - movq %rdx, -208(%rbp) - leaq -224(%rbp), %rsi movq %r10, %rdi movq %rsp, %rdx ! call ffi_closure_UNIX64_inner@PLT ! cmpl $FFI_TYPE_FLOAT, %eax ! je 1f ! cmpl $FFI_TYPE_DOUBLE, %eax ! je 2f ! cmpl $FFI_TYPE_LONGDOUBLE, %eax ! je 3f ! cmpl $FFI_TYPE_STRUCT, %eax ! je 4f ! popq %rax ! leave ! ret ! 1: ! 2: ! 3: ! movaps -240(%rbp), %xmm0 ! leave ! ret ! 4: ! leave ret ! .LFE2: ! ! .section .eh_frame,EH_FRAME_FLAGS,@progbits ! .Lframe0: ! .long .LECIE1-.LSCIE1 .LSCIE1: ! .long 0x0 ! .byte 0x1 ! .string "zR" ! .uleb128 0x1 ! .sleb128 -8 ! .byte 0x10 ! .uleb128 0x1 ! .byte 0x1b ! .byte 0xc ! .uleb128 0x7 ! .uleb128 0x8 ! .byte 0x90 ! .uleb128 0x1 ! .align 8 .LECIE1: .LSFDE1: ! .long .LEFDE1-.LASFDE1 .LASFDE1: ! .long .LASFDE1-.Lframe0 - .long .LFB1-. - .long .LFE1-.LFB1 - .uleb128 0x0 - .byte 0x4 # DW_CFA_advance_loc4 - .long .LCFI0-.LFB1 - .byte 0xe # DW_CFA_def_cfa_offset - .uleb128 0x10 - .byte 0x86 # DW_CFA_offset: r6 at cfa-16 - .uleb128 0x2 - .byte 0x4 # DW_CFA_advance_loc4 - .long .LCFI1-.LCFI0 - .byte 0x86 # DW_CFA_offset: r6 at cfa-16 - .uleb128 0x2 - .byte 0xd # DW_CFA_def_cfa_reg: r6 - .uleb128 0x6 .align 8 .LEFDE1: .LSFDE3: ! .long .LEFDE3-.LASFDE3 # FDE Length .LASFDE3: ! .long .LASFDE3-.Lframe0 # FDE CIE offset ! .long .LFB2-. # FDE initial location ! .long .LFE2-.LFB2 # FDE address range ! .uleb128 0x0 # Augmentation size ! .byte 0x4 # DW_CFA_advance_loc4 ! .long .LCFI10-.LFB2 ! .byte 0xe # DW_CFA_def_cfa_offset ! .uleb128 0x10 ! .byte 0x86 # DW_CFA_offset, column 0x6 ! .uleb128 0x2 ! .byte 0x4 # DW_CFA_advance_loc4 ! .long .LCFI11-.LCFI10 ! .byte 0xd # DW_CFA_def_cfa_register ! .uleb128 0x6 ! .align 8 .LEFDE3: ! #endif /* __x86_64__ */ --- 29,412 ---- #include <ffi.h> .text ! /* ffi_call_unix64 (void *args, unsigned long bytes, unsigned flags, ! void *raddr, void (*fnaddr)()); ! Bit o trickiness here -- ARGS+BYTES is the base of the stack frame ! for this function. This has been allocated by ffi_call. We also ! deallocate some of the stack that has been alloca'd. */ ! .align 2 ! .globl ffi_call_unix64 ! .type ffi_call_unix64,@function ! ffi_call_unix64: ! .LUW0: ! movq (%rsp), %r10 /* Load return address. */ ! leaq (%rdi, %rsi), %rax /* Find local stack base. */ ! movq %rdx, (%rax) /* Save flags. */ ! movq %rcx, 8(%rax) /* Save raddr. */ ! movq %rbp, 16(%rax) /* Save old frame pointer. */ ! movq %r10, 24(%rax) /* Relocate return address. */ ! movq %rax, %rbp /* Finalize local stack frame. */ ! .LUW1: ! movq %rdi, %r10 /* Save a copy of the register area. */ ! movq %r8, %r11 /* Save a copy of the target fn. */ ! movl %r9d, %eax /* Set number of SSE registers. */ ! ! /* Load up all argument registers. */ ! movq (%r10), %rdi ! movq 8(%r10), %rsi ! movq 16(%r10), %rdx ! movq 24(%r10), %rcx ! movq 32(%r10), %r8 ! movq 40(%r10), %r9 ! testl %eax, %eax ! jnz .Lload_sse ! .Lret_from_load_sse: ! ! /* Deallocate the reg arg area. */ ! leaq 176(%r10), %rsp /* Call the user function. */ ! call *%r11 ! /* Deallocate stack arg area; local stack frame in redzone. */ ! leaq 24(%rbp), %rsp ! movq 0(%rbp), %rcx /* Reload flags. */ ! movq 8(%rbp), %rdi /* Reload raddr. */ ! movq 16(%rbp), %rbp /* Reload old frame pointer. */ ! .LUW2: ! /* The first byte of the flags contains the FFI_TYPE. */ ! movzbl %cl, %r10d ! leaq .Lstore_table(%rip), %r11 ! movslq (%r11, %r10, 4), %r10 ! addq %r11, %r10 ! jmp *%r10 ! .section .rodata ! .Lstore_table: ! .long .Lst_void-.Lstore_table /* FFI_TYPE_VOID */ ! .long .Lst_sint32-.Lstore_table /* FFI_TYPE_INT */ ! .long .Lst_float-.Lstore_table /* FFI_TYPE_FLOAT */ ! .long .Lst_double-.Lstore_table /* FFI_TYPE_DOUBLE */ ! .long .Lst_ldouble-.Lstore_table /* FFI_TYPE_LONGDOUBLE */ ! .long .Lst_uint8-.Lstore_table /* FFI_TYPE_UINT8 */ ! .long .Lst_sint8-.Lstore_table /* FFI_TYPE_SINT8 */ ! .long .Lst_uint16-.Lstore_table /* FFI_TYPE_UINT16 */ ! .long .Lst_sint16-.Lstore_table /* FFI_TYPE_SINT16 */ ! .long .Lst_uint32-.Lstore_table /* FFI_TYPE_UINT32 */ ! .long .Lst_sint32-.Lstore_table /* FFI_TYPE_SINT32 */ ! .long .Lst_int64-.Lstore_table /* FFI_TYPE_UINT64 */ ! .long .Lst_int64-.Lstore_table /* FFI_TYPE_SINT64 */ ! .long .Lst_struct-.Lstore_table /* FFI_TYPE_STRUCT */ ! .long .Lst_int64-.Lstore_table /* FFI_TYPE_POINTER */ ! .text ! .align 2 ! .Lst_void: ret + .align 2 ! .Lst_uint8: ! movzbq %al, %rax ! movq %rax, (%rdi) ret ! .align 2 ! .Lst_sint8: ! movsbq %al, %rax ! movq %rax, (%rdi) ret ! .align 2 ! .Lst_uint16: ! movzwq %ax, %rax ! movq %rax, (%rdi) ! .align 2 ! .Lst_sint16: ! movswq %ax, %rax ! movq %rax, (%rdi) ! ret ! .align 2 ! .Lst_uint32: ! movl %eax, %eax ! movq %rax, (%rdi) ! .align 2 ! .Lst_sint32: ! cltq ! movq %rax, (%rdi) ! ret ! .align 2 ! .Lst_int64: ! movq %rax, (%rdi) ret ! .align 2 ! .Lst_float: ! movss %xmm0, (%rdi) ! ret ! .align 2 ! .Lst_double: ! movsd %xmm0, (%rdi) ! ret ! .Lst_ldouble: ! fstpt (%rdi) ret ! .align 2 ! .Lst_struct: ! leaq -20(%rsp), %rsi /* Scratch area in redzone. */ ! ! /* We have to locate the values now, and since we don't want to ! write too much data into the user's return value, we spill the ! value to a 16 byte scratch area first. Bits 8, 9, and 10 ! control where the values are located. Only one of the three ! bits will be set; see ffi_prep_cif_machdep for the pattern. */ ! movd %xmm0, %r10 ! movd %xmm1, %r11 ! testl $0x100, %ecx ! cmovnz %rax, %rdx ! cmovnz %r10, %rax ! testl $0x200, %ecx ! cmovnz %r10, %rdx ! testl $0x400, %ecx ! cmovnz %r10, %rax ! cmovnz %r11, %rdx ! movq %rax, (%rsi) ! movq %rdx, 8(%rsi) ! ! /* Bits 12-31 contain the true size of the structure. Copy from ! the scratch area to the true destination. */ ! shrl $12, %ecx ! rep movsb ret + /* Many times we can avoid loading any SSE registers at all. + It's not worth an indirect jump to load the exact set of + SSE registers needed; zero or all is a good compromise. */ + .align 2 + .LUW3: + .Lload_sse: + movdqa 48(%r10), %xmm0 + movdqa 64(%r10), %xmm1 + movdqa 80(%r10), %xmm2 + movdqa 96(%r10), %xmm3 + movdqa 112(%r10), %xmm4 + movdqa 128(%r10), %xmm5 + movdqa 144(%r10), %xmm6 + movdqa 160(%r10), %xmm7 + jmp .Lret_from_load_sse + + .LUW4: + .size ffi_call_unix64,.-ffi_call_unix64 + .align 2 ! .globl ffi_closure_unix64 ! .type ffi_closure_unix64,@function ! ! ffi_closure_unix64: ! .LUW5: ! /* The carry flag is set by the trampoline iff SSE registers ! are used. Don't clobber it before the branch instruction. */ ! leaq -200(%rsp), %rsp ! .LUW6: ! movq %rdi, (%rsp) ! movq %rsi, 8(%rsp) ! movq %rdx, 16(%rsp) ! movq %rcx, 24(%rsp) ! movq %r8, 32(%rsp) ! movq %r9, 40(%rsp) ! jc .Lsave_sse ! .Lret_from_save_sse: movq %r10, %rdi + leaq 176(%rsp), %rsi movq %rsp, %rdx ! leaq 208(%rsp), %rcx ! call ffi_closure_unix64_inner@PLT ! /* Deallocate stack frame early; return value is now in redzone. */ ! addq $200, %rsp ! .LUW7: ! ! /* The first byte of the return value contains the FFI_TYPE. */ ! movzbl %al, %r10d ! leaq .Lload_table(%rip), %r11 ! movslq (%r11, %r10, 4), %r10 ! addq %r11, %r10 ! jmp *%r10 ! ! .section .rodata ! .Lload_table: ! .long .Lld_void-.Lload_table /* FFI_TYPE_VOID */ ! .long .Lld_int32-.Lload_table /* FFI_TYPE_INT */ ! .long .Lld_float-.Lload_table /* FFI_TYPE_FLOAT */ ! .long .Lld_double-.Lload_table /* FFI_TYPE_DOUBLE */ ! .long .Lld_ldouble-.Lload_table /* FFI_TYPE_LONGDOUBLE */ ! .long .Lld_int8-.Lload_table /* FFI_TYPE_UINT8 */ ! .long .Lld_int8-.Lload_table /* FFI_TYPE_SINT8 */ ! .long .Lld_int16-.Lload_table /* FFI_TYPE_UINT16 */ ! .long .Lld_int16-.Lload_table /* FFI_TYPE_SINT16 */ ! .long .Lld_int32-.Lload_table /* FFI_TYPE_UINT32 */ ! .long .Lld_int32-.Lload_table /* FFI_TYPE_SINT32 */ ! .long .Lld_int64-.Lload_table /* FFI_TYPE_UINT64 */ ! .long .Lld_int64-.Lload_table /* FFI_TYPE_SINT64 */ ! .long .Lld_struct-.Lload_table /* FFI_TYPE_STRUCT */ ! .long .Lld_int64-.Lload_table /* FFI_TYPE_POINTER */ ! ! .text ! .align 2 ! .Lld_void: ret ! ! .align 2 ! .Lld_int8: ! movzbl -24(%rsp), %eax ! ret ! .align 2 ! .Lld_int16: ! movzwl -24(%rsp), %eax ! ret ! .align 2 ! .Lld_int32: ! movl -24(%rsp), %eax ! ret ! .align 2 ! .Lld_int64: ! movq -24(%rsp), %rax ! ret ! ! .align 2 ! .Lld_float: ! movss -24(%rsp), %xmm0 ! ret ! .align 2 ! .Lld_double: ! movsd -24(%rsp), %xmm0 ! ret ! .align 2 ! .Lld_ldouble: ! fldt -24(%rsp) ! ret ! ! .align 2 ! .Lld_struct: ! /* There are four possibilities here, %rax/%rdx, %xmm0/%rax, ! %rax/%xmm0, %xmm0/%xmm1. We collapse two by always loading ! both rdx and xmm1 with the second word. For the remaining, ! bit 8 set means xmm0 gets the second word, and bit 9 means ! that rax gets the second word. */ ! movq -24(%rsp), %rcx ! movq -16(%rsp), %rdx ! movq -16(%rsp), %xmm1 ! testl $0x100, %eax ! cmovnz %rdx, %rcx ! movd %rcx, %xmm0 ! testl $0x200, %eax ! movq -24(%rsp), %rax ! cmovnz %rdx, %rax ! ret ! ! /* See the comment above .Lload_sse; the same logic applies here. */ ! .align 2 ! .LUW8: ! .Lsave_sse: ! movdqa %xmm0, 48(%rsp) ! movdqa %xmm1, 64(%rsp) ! movdqa %xmm2, 80(%rsp) ! movdqa %xmm3, 96(%rsp) ! movdqa %xmm4, 112(%rsp) ! movdqa %xmm5, 128(%rsp) ! movdqa %xmm6, 144(%rsp) ! movdqa %xmm7, 160(%rsp) ! jmp .Lret_from_save_sse ! ! .LUW9: ! .size ffi_closure_unix64,.-ffi_closure_unix64 ! ! .section .eh_frame,"a",@progbits ! .Lframe1: ! .long .LECIE1-.LSCIE1 /* CIE Length */ .LSCIE1: ! .long 0 /* CIE Identifier Tag */ ! .byte 1 /* CIE Version */ ! .ascii "zR\0" /* CIE Augmentation */ ! .uleb128 1 /* CIE Code Alignment Factor */ ! .sleb128 -8 /* CIE Data Alignment Factor */ ! .byte 0x10 /* CIE RA Column */ ! .uleb128 1 /* Augmentation size */ ! .byte 0x1b /* FDE Encoding (pcrel sdata4) */ ! .byte 0xc /* DW_CFA_def_cfa, %rsp offset 8 */ ! .uleb128 7 ! .uleb128 8 ! .byte 0x80+16 /* DW_CFA_offset, %rip offset 1*-8 */ ! .uleb128 1 ! .align 8 .LECIE1: .LSFDE1: ! .long .LEFDE1-.LASFDE1 /* FDE Length */ .LASFDE1: ! .long .LASFDE1-.Lframe1 /* FDE CIE offset */ ! .long .LUW0-. /* FDE initial location */ ! .long .LUW4-.LUW0 /* FDE address range */ ! .uleb128 0x0 /* Augmentation size */ ! ! .byte 0x4 /* DW_CFA_advance_loc4 */ ! .long .LUW1-.LUW0 ! ! /* New stack frame based off rbp. This is a itty bit of unwind ! trickery in that the CFA *has* changed. There is no easy way ! to describe it correctly on entry to the function. Fortunately, ! it doesn't matter too much since at all points we can correctly ! unwind back to ffi_call. Note that the location to which we ! moved the return address is (the new) CFA-8, so from the ! perspective of the unwind info, it hasn't moved. */ ! .byte 0xc /* DW_CFA_def_cfa, %rbp offset 32 */ ! .uleb128 6 ! .uleb128 32 ! .byte 0x80+6 /* DW_CFA_offset, %rbp offset 2*-8 */ ! .uleb128 2 ! .byte 0xa /* DW_CFA_remember_state */ ! ! .byte 0x4 /* DW_CFA_advance_loc4 */ ! .long .LUW2-.LUW1 ! .byte 0xc /* DW_CFA_def_cfa, %rsp offset 8 */ ! .uleb128 7 ! .uleb128 8 ! .byte 0xc0+6 /* DW_CFA_restore, %rbp */ ! ! .byte 0x4 /* DW_CFA_advance_loc4 */ ! .long .LUW3-.LUW2 ! .byte 0xb /* DW_CFA_restore_state */ .align 8 .LEFDE1: .LSFDE3: ! .long .LEFDE3-.LASFDE3 /* FDE Length */ .LASFDE3: ! .long .LASFDE3-.Lframe1 /* FDE CIE offset */ ! .long .LUW5-. /* FDE initial location */ ! .long .LUW9-.LUW5 /* FDE address range */ ! .uleb128 0x0 /* Augmentation size */ ! .byte 0x4 /* DW_CFA_advance_loc4 */ ! .long .LUW6-.LUW5 ! .byte 0xe /* DW_CFA_def_cfa_offset */ ! .uleb128 208 ! .byte 0xa /* DW_CFA_remember_state */ ! ! .byte 0x4 /* DW_CFA_advance_loc4 */ ! .long .LUW7-.LUW6 ! .byte 0xe /* DW_CFA_def_cfa_offset */ ! .uleb128 8 ! ! .byte 0x4 /* DW_CFA_advance_loc4 */ ! .long .LUW8-.LUW7 ! .byte 0xb /* DW_CFA_restore_state */ ! ! .align 8 .LEFDE3: ! #endif /* __x86_64__ */ Index: ffi64.c =================================================================== RCS file: /cvsroot/ctypes/ctypes/source/gcc/libffi/src/x86/ffi64.c,v retrieving revision 1.1 retrieving revision 1.1.4.1 diff -C2 -d -r1.1 -r1.1.4.1 *** ffi64.c 18 Jun 2004 20:07:15 -0000 1.1 --- ffi64.c 16 May 2005 23:28:52 -0000 1.1.4.1 *************** *** 30,49 **** #include <stdarg.h> - /* ffi_prep_args is called by the assembly routine once stack space - has been allocated for the function's arguments */ - #ifdef __x86_64__ #define MAX_GPR_REGS 6 #define MAX_SSE_REGS 8 ! typedef struct [...968 lines suppressed...] ! avalue[i] = a; ! for (j = 0; j < n; j++, a += 8) ! { ! if (SSE_CLASS_P (classes[j])) ! memcpy (a, ®_args->sse[ssecount++], 8); ! else ! memcpy (a, ®_args->gpr[gprcount++], 8); ! } ! } } /* Invoke the closure. */ ! closure->fun (cif, rvalue, avalue, closure->user_data); ! /* Tell assembly how to perform return type promotions. */ ! return ret; } ! ! #endif /* __x86_64__ */ |
From: Andreas D. <ad...@us...> - 2005-05-16 23:30:36
|
Update of /cvsroot/ctypes/ctypes/source/gcc/libffi/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20568/source/gcc/libffi/include Modified Files: Tag: branch_1_0 ffi_common.h ffi.h.in Makefile.in Makefile.am Log Message: merged with HEAD Index: Makefile.in =================================================================== RCS file: /cvsroot/ctypes/ctypes/source/gcc/libffi/include/Makefile.in,v retrieving revision 1.1 retrieving revision 1.1.4.1 diff -C2 -d -r1.1 -r1.1.4.1 *** Makefile.in 18 Jun 2004 20:07:08 -0000 1.1 --- Makefile.in 16 May 2005 23:29:15 -0000 1.1.4.1 *************** *** 1,3 **** ! # Makefile.in generated by automake 1.8.5 from Makefile.am. # @configure_input@ --- 1,3 ---- ! # Makefile.in generated by automake 1.9.3 from Makefile.am. # @configure_input@ *************** *** 43,48 **** $(srcdir)/ffi.h.in $(toollibffi_HEADERS) ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 ! am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ ! $(top_srcdir)/../libtool.m4 $(top_srcdir)/../config/accross.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ --- 43,48 ---- $(srcdir)/ffi.h.in $(toollibffi_HEADERS) ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 ! am__aclocal_m4_deps = $(top_srcdir)/../config/accross.m4 \ ! $(top_srcdir)/../libtool.m4 $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ *************** *** 53,56 **** --- 53,62 ---- SOURCES = DIST_SOURCES = + am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; + am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; + am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(hackdir)" "$(DESTDIR)$(toollibffidir)" hackDATA_INSTALL = $(INSTALL_DATA) *************** *** 90,93 **** --- 96,101 ---- EGREP = @EGREP@ EXEEXT = @EXEEXT@ + FRV_FALSE = @FRV_FALSE@ + FRV_TRUE = @FRV_TRUE@ HAVE_LONG_DOUBLE = @HAVE_LONG_DOUBLE@ IA64_FALSE = @IA64_FALSE@ *************** *** 97,100 **** --- 105,110 ---- INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ + LIBFFI_CRIS_FALSE = @LIBFFI_CRIS_FALSE@ + LIBFFI_CRIS_TRUE = @LIBFFI_CRIS_TRUE@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ *************** *** 102,105 **** --- 112,117 ---- LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ + M32R_FALSE = @M32R_FALSE@ + M32R_TRUE = @M32R_TRUE@ M68K_FALSE = @M68K_FALSE@ M68K_TRUE = @M68K_TRUE@ *************** *** 159,162 **** --- 171,176 ---- am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ + am__tar = @am__tar@ + am__untar = @am__untar@ bindir = @bindir@ build = @build@ *************** *** 167,171 **** datadir = @datadir@ exec_prefix = @exec_prefix@ - gcc_version = @gcc_version@ host = @host@ host_alias = @host_alias@ --- 181,184 ---- *************** *** 193,197 **** target_os = @target_os@ target_vendor = @target_vendor@ - tool_include_dir = @tool_include_dir@ toolexecdir = @toolexecdir@ toolexeclibdir = @toolexeclibdir@ --- 206,209 ---- *************** *** 201,205 **** hackdir = $(includedir) hack_DATA = ffi.h ! toollibffidir = @tool_include_dir@/libffi toollibffi_HEADERS = ffitarget.h all: all-am --- 213,219 ---- hackdir = $(includedir) hack_DATA = ffi.h ! ! # Where generated headers like ffitarget.h get installed. ! toollibffidir := $(libdir)/gcc/include/libffi toollibffi_HEADERS = ffitarget.h all: all-am *************** *** 252,256 **** @list='$(hack_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ ! f="`echo $$p | sed -e 's|^.*/||'`"; \ echo " $(hackDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(hackdir)/$$f'"; \ $(hackDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(hackdir)/$$f"; \ --- 266,270 ---- @list='$(hack_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ ! f=$(am__strip_dir) \ echo " $(hackDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(hackdir)/$$f'"; \ $(hackDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(hackdir)/$$f"; \ *************** *** 260,264 **** @$(NORMAL_UNINSTALL) @list='$(hack_DATA)'; for p in $$list; do \ ! f="`echo $$p | sed -e 's|^.*/||'`"; \ echo " rm -f '$(DESTDIR)$(hackdir)/$$f'"; \ rm -f "$(DESTDIR)$(hackdir)/$$f"; \ --- 274,278 ---- @$(NORMAL_UNINSTALL) @list='$(hack_DATA)'; for p in $$list; do \ ! f=$(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(hackdir)/$$f'"; \ rm -f "$(DESTDIR)$(hackdir)/$$f"; \ *************** *** 269,273 **** @list='$(toollibffi_HEADERS)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ ! f="`echo $$p | sed -e 's|^.*/||'`"; \ echo " $(toollibffiHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(toollibffidir)/$$f'"; \ $(toollibffiHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(toollibffidir)/$$f"; \ --- 283,287 ---- @list='$(toollibffi_HEADERS)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ ! f=$(am__strip_dir) \ echo " $(toollibffiHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(toollibffidir)/$$f'"; \ $(toollibffiHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(toollibffidir)/$$f"; \ *************** *** 277,281 **** @$(NORMAL_UNINSTALL) @list='$(toollibffi_HEADERS)'; for p in $$list; do \ ! f="`echo $$p | sed -e 's|^.*/||'`"; \ echo " rm -f '$(DESTDIR)$(toollibffidir)/$$f'"; \ rm -f "$(DESTDIR)$(toollibffidir)/$$f"; \ --- 291,295 ---- @$(NORMAL_UNINSTALL) @list='$(toollibffi_HEADERS)'; for p in $$list; do \ ! f=$(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(toollibffidir)/$$f'"; \ rm -f "$(DESTDIR)$(toollibffidir)/$$f"; \ *************** *** 383,387 **** distclean-generic: ! -rm -f $(CONFIG_CLEAN_FILES) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) --- 397,401 ---- distclean-generic: ! -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) Index: ffi_common.h =================================================================== RCS file: /cvsroot/ctypes/ctypes/source/gcc/libffi/include/ffi_common.h,v retrieving revision 1.1 retrieving revision 1.1.4.1 diff -C2 -d -r1.1 -r1.1.4.1 *** ffi_common.h 18 Jun 2004 20:07:08 -0000 1.1 --- ffi_common.h 16 May 2005 23:29:15 -0000 1.1.4.1 *************** *** 61,64 **** --- 61,65 ---- #define ALIGN(v, a) (((((size_t) (v))-1) | ((a)-1))+1) + #define ALIGN_DOWN(v, a) (((size_t) (v)) & -a) /* Perform machine dependent cif processing */ Index: ffi.h.in =================================================================== RCS file: /cvsroot/ctypes/ctypes/source/gcc/libffi/include/ffi.h.in,v retrieving revision 1.1 retrieving revision 1.1.4.1 diff -C2 -d -r1.1 -r1.1.4.1 *** ffi.h.in 18 Jun 2004 20:07:08 -0000 1.1 --- ffi.h.in 16 May 2005 23:29:15 -0000 1.1.4.1 *************** *** 219,223 **** void (*fun)(ffi_cif*,void*,void**,void*); void *user_data; ! } ffi_closure; ffi_status --- 219,223 ---- void (*fun)(ffi_cif*,void*,void**,void*); void *user_data; ! } ffi_closure __attribute__((aligned (8))); ffi_status Index: Makefile.am =================================================================== RCS file: /cvsroot/ctypes/ctypes/source/gcc/libffi/include/Makefile.am,v retrieving revision 1.1 retrieving revision 1.1.4.1 diff -C2 -d -r1.1 -r1.1.4.1 *** Makefile.am 18 Jun 2004 20:07:08 -0000 1.1 --- Makefile.am 16 May 2005 23:29:15 -0000 1.1.4.1 *************** *** 10,13 **** hack_DATA= ffi.h ! toollibffidir = @tool_include_dir@/libffi toollibffi_HEADERS = ffitarget.h --- 10,15 ---- hack_DATA= ffi.h ! # Where generated headers like ffitarget.h get installed. ! toollibffidir := $(libdir)/gcc/include/libffi ! toollibffi_HEADERS = ffitarget.h |
From: Andreas D. <ad...@us...> - 2005-05-16 23:30:36
|
Update of /cvsroot/ctypes/ctypes/source/gcc/libffi/src/s390 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20568/source/gcc/libffi/src/s390 Modified Files: Tag: branch_1_0 ffi.c Log Message: merged with HEAD Index: ffi.c =================================================================== RCS file: /cvsroot/ctypes/ctypes/source/gcc/libffi/src/s390/ffi.c,v retrieving revision 1.1 retrieving revision 1.1.4.1 diff -C2 -d -r1.1 -r1.1.4.1 *** ffi.c 18 Jun 2004 20:07:12 -0000 1.1 --- ffi.c 16 May 2005 23:28:53 -0000 1.1.4.1 *************** *** 70,74 **** static void ffi_prep_args (unsigned char *, extended_cif *); - static int ffi_check_float_struct (ffi_type *); void #if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ > 2) --- 70,73 ---- *************** *** 223,235 **** } ! /* Pointers are passed like UINTs of the same size. */ ! if (type == FFI_TYPE_POINTER) ! #ifdef __s390x__ ! type = FFI_TYPE_UINT64; ! #else ! type = FFI_TYPE_UINT32; ! #endif ! ! /* Now handle all primitive int/float data types. */ switch (type) { --- 222,226 ---- } ! /* Now handle all primitive int/pointer/float data types. */ switch (type) { *************** *** 252,255 **** --- 243,253 ---- p_ov[n_ov++] = *(unsigned int *) arg; break; + + case FFI_TYPE_POINTER: + if (n_gpr < MAX_GPRARGS) + p_gpr[n_gpr++] = (unsigned long)*(unsigned char **) arg; + else + p_ov[n_ov++] = (unsigned long)*(unsigned char **) arg; + break; case FFI_TYPE_UINT64: |
From: Andreas D. <ad...@us...> - 2005-05-16 23:30:36
|
Update of /cvsroot/ctypes/ctypes/source/gcc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20568/source/gcc Removed Files: Tag: branch_1_0 move-if-change missing ltmain.sh ltconfig ltcf-c.sh install-sh configure config.sub config.if config.guess config-ml.in Log Message: merged with HEAD --- move-if-change DELETED --- --- ltconfig DELETED --- --- ltcf-c.sh DELETED --- --- configure DELETED --- --- missing DELETED --- --- config.guess DELETED --- --- config-ml.in DELETED --- --- config.sub DELETED --- --- ltmain.sh DELETED --- --- config.if DELETED --- --- install-sh DELETED --- |
From: Andreas D. <ad...@us...> - 2005-05-16 23:30:34
|
Update of /cvsroot/ctypes/ctypes/source/gcc/libffi/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20568/source/gcc/libffi/src Modified Files: Tag: branch_1_0 types.c prep_cif.c Log Message: merged with HEAD Index: prep_cif.c =================================================================== RCS file: /cvsroot/ctypes/ctypes/source/gcc/libffi/src/prep_cif.c,v retrieving revision 1.1 retrieving revision 1.1.4.1 diff -C2 -d -r1.1 -r1.1.4.1 *** prep_cif.c 18 Jun 2004 20:07:08 -0000 1.1 --- prep_cif.c 16 May 2005 23:29:14 -0000 1.1.4.1 *************** *** 82,85 **** --- 82,90 ---- } + #ifndef __CRIS__ + /* The CRIS ABI specifies structure elements to have byte + alignment only, so it completely overrides this functions, + which assumes "natural" alignment and padding. */ + /* Perform machine independent ffi_cif preparation, then call machine dependent routine. */ *************** *** 159,160 **** --- 164,166 ---- return ffi_prep_cif_machdep(cif); } + #endif /* not __CRIS__ */ Index: types.c =================================================================== RCS file: /cvsroot/ctypes/ctypes/source/gcc/libffi/src/types.c,v retrieving revision 1.1 retrieving revision 1.1.4.1 diff -C2 -d -r1.1 -r1.1.4.1 *** types.c 18 Jun 2004 20:07:08 -0000 1.1 --- types.c 16 May 2005 23:29:14 -0000 1.1.4.1 *************** *** 29,108 **** /* Type definitions */ ! #define FFI_INTEGRAL_TYPEDEF(n, s, a, t) ffi_type ffi_type_##n = { s, a, t, NULL } ! #define FFI_AGGREGATE_TYPEDEF(n, e) ffi_type ffi_type_##n = { 0, 0, FFI_TYPE_STRUCT, e } /* Size and alignment are fake here. They must not be 0. */ ! FFI_INTEGRAL_TYPEDEF(void, 1, 1, FFI_TYPE_VOID); ! ! FFI_INTEGRAL_TYPEDEF(uint8, 1, 1, FFI_TYPE_UINT8); ! FFI_INTEGRAL_TYPEDEF(sint8, 1, 1, FFI_TYPE_SINT8); ! FFI_INTEGRAL_TYPEDEF(uint16, 2, 2, FFI_TYPE_UINT16); ! FFI_INTEGRAL_TYPEDEF(sint16, 2, 2, FFI_TYPE_SINT16); ! FFI_INTEGRAL_TYPEDEF(uint32, 4, 4, FFI_TYPE_UINT32); ! FFI_INTEGRAL_TYPEDEF(sint32, 4, 4, FFI_TYPE_SINT32); ! FFI_INTEGRAL_TYPEDEF(float, 4, 4, FFI_TYPE_FLOAT); ! ! #if defined ALPHA || defined SPARC64 || defined X86_64 || defined S390X \ ! || defined IA64 || defined POWERPC64 ! ! FFI_INTEGRAL_TYPEDEF(pointer, 8, 8, FFI_TYPE_POINTER); ! ! #else ! ! FFI_INTEGRAL_TYPEDEF(pointer, 4, 4, FFI_TYPE_POINTER); ! ! #endif ! ! #if defined X86 || defined ARM || defined M68K ! ! FFI_INTEGRAL_TYPEDEF(uint64, 8, 4, FFI_TYPE_UINT64); ! FFI_INTEGRAL_TYPEDEF(sint64, 8, 4, FFI_TYPE_SINT64); ! ! #elif defined SH ! ! FFI_INTEGRAL_TYPEDEF(uint64, 8, 4, FFI_TYPE_UINT64); ! FFI_INTEGRAL_TYPEDEF(sint64, 8, 4, FFI_TYPE_SINT64); ! ! #else ! ! FFI_INTEGRAL_TYPEDEF(uint64, 8, 8, FFI_TYPE_UINT64); ! FFI_INTEGRAL_TYPEDEF(sint64, 8, 8, FFI_TYPE_SINT64); ! ! #endif ! ! ! #if defined X86 || defined X86_WIN32 || defined M68K ! ! #ifdef X86_WIN32 ! FFI_INTEGRAL_TYPEDEF(double, 8, 8, FFI_TYPE_DOUBLE); ! #else ! FFI_INTEGRAL_TYPEDEF(double, 8, 4, FFI_TYPE_DOUBLE); ! #endif ! FFI_INTEGRAL_TYPEDEF(longdouble, 12, 4, FFI_TYPE_LONGDOUBLE); ! ! #elif defined ARM || defined SH || defined POWERPC_AIX || defined POWERPC_DARWIN ! ! FFI_INTEGRAL_TYPEDEF(double, 8, 4, FFI_TYPE_DOUBLE); ! FFI_INTEGRAL_TYPEDEF(longdouble, 8, 4, FFI_TYPE_LONGDOUBLE); ! ! #elif defined SPARC ! ! FFI_INTEGRAL_TYPEDEF(double, 8, 8, FFI_TYPE_DOUBLE); ! #ifdef SPARC64 ! FFI_INTEGRAL_TYPEDEF(longdouble, 16, 16, FFI_TYPE_LONGDOUBLE); ! #else ! FFI_INTEGRAL_TYPEDEF(longdouble, 16, 8, FFI_TYPE_LONGDOUBLE); ! #endif ! ! #elif defined X86_64 || defined POWERPC64 ! ! FFI_INTEGRAL_TYPEDEF(double, 8, 8, FFI_TYPE_DOUBLE); ! FFI_INTEGRAL_TYPEDEF(longdouble, 16, 16, FFI_TYPE_LONGDOUBLE); ! ! #else ! FFI_INTEGRAL_TYPEDEF(double, 8, 8, FFI_TYPE_DOUBLE); ! FFI_INTEGRAL_TYPEDEF(longdouble, 8, 8, FFI_TYPE_LONGDOUBLE); ! #endif --- 29,60 ---- /* Type definitions */ ! #define FFI_TYPEDEF(name, type, id) \ ! struct struct_align_##name { \ ! char c; \ ! type x; \ ! }; \ ! ffi_type ffi_type_##name = { \ ! sizeof(type), \ ! offsetof(struct struct_align_##name, x), \ ! id, NULL \ ! } /* Size and alignment are fake here. They must not be 0. */ ! ffi_type ffi_type_void = { ! 1, 1, FFI_TYPE_VOID, NULL ! }; ! FFI_TYPEDEF(uint8, UINT8, FFI_TYPE_UINT8); ! FFI_TYPEDEF(sint8, SINT8, FFI_TYPE_SINT8); ! FFI_TYPEDEF(uint16, UINT16, FFI_TYPE_UINT16); ! FFI_TYPEDEF(sint16, SINT16, FFI_TYPE_SINT16); ! FFI_TYPEDEF(uint32, UINT32, FFI_TYPE_UINT32); ! FFI_TYPEDEF(sint32, SINT32, FFI_TYPE_SINT32); ! FFI_TYPEDEF(uint64, UINT64, FFI_TYPE_UINT64); ! FFI_TYPEDEF(sint64, SINT64, FFI_TYPE_SINT64); ! FFI_TYPEDEF(pointer, void*, FFI_TYPE_POINTER); + FFI_TYPEDEF(float, float, FFI_TYPE_FLOAT); + FFI_TYPEDEF(double, double, FFI_TYPE_DOUBLE); + FFI_TYPEDEF(longdouble, long double, FFI_TYPE_LONGDOUBLE); |
Update of /cvsroot/ctypes/ctypes/source/gcc/libffi In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20568/source/gcc/libffi Modified Files: Tag: branch_1_0 libtool-version configure.ac configure aclocal.m4 acinclude.m4 Makefile.in Makefile.am ChangeLog Added Files: Tag: branch_1_0 version.c missing ltmain.sh ltconfig ltcf-c.sh install-sh depcomp configure.host config.sub config.guess config-ml.in Log Message: merged with HEAD --- NEW FILE: ltconfig --- #! /bin/sh # ltconfig - Create a system-specific libtool. # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 # Free Software Foundation, Inc. # Originally by Gordon Matzigkeit <go...@gn...>, 1996 # # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software [...2830 lines suppressed...] ;; esac >> confcache if cmp -s $cache_file confcache; then : else if test -w $cache_file; then echo "updating cache $cache_file" cat confcache > $cache_file else echo "not updating unwritable cache $cache_file" fi fi rm -f confcache exit 0 # Local Variables: # mode:shell-script # sh-indentation:2 # End: --- NEW FILE: config-ml.in --- # Configure fragment invoked in the post-target section for subdirs # wanting multilib support. # # Copyright (C) 1995, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 # Free Software Foundation, Inc. # # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, # Boston, MA 02111-1307, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # # Please report bugs to <gcc...@gn...> # and send patches to <gcc...@gn...>. # It is advisable to support a few --enable/--disable options to let the # user select which libraries s/he really wants. # # Subdirectories wishing to use multilib should put the following lines # in the "post-target" section of configure.in. # # if [ "${srcdir}" = "." ] ; then # if [ "${with_target_subdir}" != "." ] ; then # . ${with_multisrctop}../../config-ml.in # else # . ${with_multisrctop}../config-ml.in # fi # else # . ${srcdir}/../config-ml.in # fi # # # Things are complicated because 6 separate cases must be handled: # 2 (native, cross) x 3 (absolute-path, relative-not-dot, dot) = 6. # # srcdir=. is special. It must handle make programs that don't handle VPATH. # To implement this, a symlink tree is built for each library and for each # multilib subdir. # # The build tree is layed out as # # ./ # newlib # m68020/ # newlib # m68881/ # newlib # # The nice feature about this arrangement is that inter-library references # in the build tree work without having to care where you are. Note that # inter-library references also work in the source tree because symlink trees # are built when srcdir=. # # Unfortunately, trying to access the libraries in the build tree requires # the user to manually choose which library to use as GCC won't be able to # find the right one. This is viewed as the lesser of two evils. # # Configure variables: # ${with_target_subdir} = "." for native, or ${target_alias} for cross. # Set by top level Makefile. # ${with_multisrctop} = how many levels of multilibs there are in the source # tree. It exists to handle the case of configuring in the source tree: # ${srcdir} is not constant. # ${with_multisubdir} = name of multilib subdirectory (eg: m68020/m68881). # # Makefile variables: # MULTISRCTOP = number of multilib levels in source tree (+1 if cross) # (FIXME: note that this is different than ${with_multisrctop}. Check out.). # MULTIBUILDTOP = number of multilib levels in build tree # MULTIDIRS = list of multilib subdirs (eg: m68000 m68020 ...) # (only defined in each library's main Makefile). # MULTISUBDIR = installed subdirectory name with leading '/' (eg: /m68000) # (only defined in each multilib subdir). # FIXME: Multilib is currently disabled by default for everything other than # newlib. It is up to each target to turn on multilib support for the other # libraries as desired. # Autoconf incoming variables: # srcdir, host, ac_configure_args # # We *could* figure srcdir and host out, but we'd have to do work that # our caller has already done to figure them out and requiring these two # seems reasonable. # Note that `host' in this case is GCC's `target'. Target libraries are # configured for a particular host. Makefile=${ac_file-Makefile} ml_config_shell=${CONFIG_SHELL-/bin/sh} ml_realsrcdir=${srcdir} # Scan all the arguments and set all the ones we need. ml_verbose=--verbose for option in ${ac_configure_args} do # strip single quotes surrounding individual options case $option in \'*\') eval option=$option ;; esac case $option in --*) ;; -*) option=-$option ;; esac case $option in --*=*) optarg=`echo $option | sed -e 's/^[^=]*=//'` ;; esac case $option in --disable-*) enableopt=`echo ${option} | sed 's:^--disable-:enable_:;s:-:_:g'` eval $enableopt=no ;; --enable-*) case "$option" in *=*) ;; *) optarg=yes ;; esac enableopt=`echo ${option} | sed 's:^--::;s:=.*$::;s:-:_:g'` eval $enableopt="$optarg" ;; --norecursion | --no-recursion) ml_norecursion=yes ;; --silent | --sil* | --quiet | --q*) ml_verbose=--silent ;; --verbose | --v | --verb*) ml_verbose=--verbose ;; --with-*) case "$option" in *=*) ;; *) optarg=yes ;; esac withopt=`echo ${option} | sed 's:^--::;s:=.*$::;s:-:_:g'` eval $withopt="$optarg" ;; --without-*) withopt=`echo ${option} | sed 's:^--::;s:out::;s:-:_:g'` eval $withopt=no ;; esac done # Only do this if --enable-multilib. if [ "${enable_multilib}" = yes ]; then # Compute whether this is the library's top level directory # (ie: not a multilib subdirectory, and not a subdirectory like newlib/src). # ${with_multisubdir} tells us we're in the right branch, but we could be # in a subdir of that. # ??? The previous version could void this test by separating the process into # two files: one that only the library's toplevel configure.in ran (to # configure the multilib subdirs), and another that all configure.in's ran to # update the Makefile. It seemed reasonable to collapse all multilib support # into one file, but it does leave us with having to perform this test. ml_toplevel_p=no if [ -z "${with_multisubdir}" ]; then if [ "${srcdir}" = "." ]; then # Use ${ml_realsrcdir} instead of ${srcdir} here to account for ${subdir}. # ${with_target_subdir} = "." for native, otherwise target alias. if [ "${with_target_subdir}" = "." ]; then if [ -f ${ml_realsrcdir}/../config-ml.in ]; then ml_toplevel_p=yes fi else if [ -f ${ml_realsrcdir}/../../config-ml.in ]; then ml_toplevel_p=yes fi fi else # Use ${ml_realsrcdir} instead of ${srcdir} here to account for ${subdir}. if [ -f ${ml_realsrcdir}/../config-ml.in ]; then ml_toplevel_p=yes fi fi fi # If this is the library's top level directory, set multidirs to the # multilib subdirs to support. This lives at the top because we need # `multidirs' set right away. if [ "${ml_toplevel_p}" = yes ]; then multidirs= for i in `${CC-gcc} --print-multi-lib 2>/dev/null`; do dir=`echo $i | sed -e 's/;.*$//'` if [ "${dir}" = "." ]; then true else if [ -z "${multidirs}" ]; then multidirs="${dir}" else multidirs="${multidirs} ${dir}" fi fi done # Target libraries are configured for the host they run on, so we check # $host here, not $target. case "${host}" in arc-*-elf*) if [ x$enable_biendian != xyes ] then old_multidirs=${multidirs} multidirs="" for x in ${old_multidirs}; do case "${x}" in *be*) : ;; *) multidirs="${multidirs} ${x}" ;; esac done fi ;; arm-*-*) if [ x"$enable_fpu" = xno ] then old_multidirs=${multidirs} multidirs="" for x in ${old_multidirs}; do case "${x}" in *fpu*) : ;; *) multidirs="${multidirs} ${x}" ;; esac done fi if [ x"$enable_26bit" = xno ] then old_multidirs=${multidirs} multidirs="" for x in ${old_multidirs}; do case "${x}" in *26bit*) : ;; *) multidirs="${multidirs} ${x}" ;; esac done fi if [ x"$enable_underscore" = xno ] then old_multidirs=${multidirs} multidirs="" for x in ${old_multidirs}; do case "${x}" in *under*) : ;; *) multidirs="${multidirs} ${x}" ;; esac done fi if [ x"$enable_interwork" = xno ] then old_multidirs=${multidirs} multidirs="" for x in ${old_multidirs}; do case "${x}" in *interwork*) : ;; *) multidirs="${multidirs} ${x}" ;; esac done fi if [ x$enable_biendian = xno ] then old_multidirs="${multidirs}" multidirs="" for x in ${old_multidirs}; do case "$x" in *le* ) : ;; *be* ) : ;; *) multidirs="${multidirs} ${x}" ;; esac done fi if [ x"$enable_nofmult" = xno ] then old_multidirs="${multidirs}" multidirs="" for x in ${old_multidirs}; do case "$x" in *nofmult* ) : ;; *) multidirs="${multidirs} ${x}" ;; esac done fi ;; m68*-*-*) if [ x$enable_softfloat = xno ] then old_multidirs="${multidirs}" multidirs="" for x in ${old_multidirs}; do case "$x" in *soft-float* ) : ;; *) multidirs="${multidirs} ${x}" ;; esac done fi if [ x$enable_m68881 = xno ] then old_multidirs="${multidirs}" multidirs="" for x in ${old_multidirs}; do case "$x" in *m68881* ) : ;; *) multidirs="${multidirs} ${x}" ;; esac done fi if [ x$enable_m68000 = xno ] then old_multidirs="${multidirs}" multidirs="" for x in ${old_multidirs}; do case "$x" in *m68000* ) : ;; *) multidirs="${multidirs} ${x}" ;; esac done fi if [ x$enable_m68020 = xno ] then old_multidirs="${multidirs}" multidirs="" for x in ${old_multidirs}; do case "$x" in *m68020* ) : ;; *) multidirs="${multidirs} ${x}" ;; esac done fi ;; mips*-*-*) if [ x$enable_single_float = xno ] then old_multidirs="${multidirs}" multidirs="" for x in ${old_multidirs}; do case "$x" in *single* ) : ;; *) multidirs="${multidirs} ${x}" ;; esac done fi if [ x$enable_biendian = xno ] then old_multidirs="${multidirs}" multidirs="" for x in ${old_multidirs}; do case "$x" in *el* ) : ;; *eb* ) : ;; *) multidirs="${multidirs} ${x}" ;; esac done fi if [ x$enable_softfloat = xno ] then old_multidirs="${multidirs}" multidirs="" for x in ${old_multidirs}; do case "$x" in *soft-float* ) : ;; *) multidirs="${multidirs} ${x}" ;; esac done fi case " $multidirs " in *" mabi=64 "*) # We will not be able to create libraries with -mabi=64 if # we cannot even link a trivial program. It usually # indicates the 64bit libraries are missing. if echo 'main() {}' > conftest.c && ${CC-gcc} -mabi=64 conftest.c -o conftest; then : else echo Could not link program with -mabi=64, disabling it. old_multidirs="${multidirs}" multidirs="" for x in ${old_multidirs}; do case "$x" in *mabi=64* ) : ;; *) multidirs="${multidirs} ${x}" ;; esac done fi rm -f conftest.c conftest ;; esac ;; powerpc*-*-* | rs6000*-*-*) if [ x$enable_aix64 = xno ] then old_multidirs="${multidirs}" multidirs="" for x in ${old_multidirs}; do case "$x" in *ppc64* ) : ;; *) multidirs="${multidirs} ${x}" ;; esac done fi if [ x$enable_pthread = xno ] then old_multidirs="${multidirs}" multidirs="" for x in ${old_multidirs}; do case "$x" in *pthread* ) : ;; *) multidirs="${multidirs} ${x}" ;; esac done fi if [ x$enable_softfloat = xno ] then old_multidirs="${multidirs}" multidirs="" for x in ${old_multidirs}; do case "$x" in *soft-float* ) : ;; *) multidirs="${multidirs} ${x}" ;; esac done fi if [ x$enable_powercpu = xno ] then old_multidirs="${multidirs}" multidirs="" for x in ${old_multidirs}; do case "$x" in power | */power | */power/* ) : ;; *) multidirs="${multidirs} ${x}" ;; esac done fi if [ x$enable_powerpccpu = xno ] then old_multidirs="${multidirs}" multidirs="" for x in ${old_multidirs}; do case "$x" in *powerpc* ) : ;; *) multidirs="${multidirs} ${x}" ;; esac done fi if [ x$enable_powerpcos = xno ] then old_multidirs="${multidirs}" multidirs="" for x in ${old_multidirs}; do case "$x" in *mcall-linux* | *mcall-solaris* ) : ;; *) multidirs="${multidirs} ${x}" ;; esac done fi if [ x$enable_biendian = xno ] then old_multidirs="${multidirs}" multidirs="" for x in ${old_multidirs}; do case "$x" in *mlittle* | *mbig* ) : ;; *) multidirs="${multidirs} ${x}" ;; esac done fi if [ x$enable_sysv = xno ] then old_multidirs="${multidirs}" multidirs="" for x in ${old_multidirs}; do case "$x" in *mcall-sysv* ) : ;; *) multidirs="${multidirs} ${x}" ;; esac done fi ;; sparc*-*-*) case " $multidirs " in *" m64 "*) # We will not be able to create libraries with -m64 if # we cannot even link a trivial program. It usually # indicates the 64bit libraries are missing. if echo 'main() {}' > conftest.c && ${CC-gcc} -m64 conftest.c -o conftest; then : else echo Could not link program with -m64, disabling it. old_multidirs="${multidirs}" multidirs="" for x in ${old_multidirs}; do case "$x" in *m64* ) : ;; *) multidirs="${multidirs} ${x}" ;; esac done fi rm -f conftest.c conftest ;; esac ;; esac # Remove extraneous blanks from multidirs. # Tests like `if [ -n "$multidirs" ]' require it. multidirs=`echo "$multidirs" | sed -e 's/^[ ][ ]*//' -e 's/[ ][ ]*$//' -e 's/[ ][ ]*/ /g'` # Add code to library's top level makefile to handle building the multilib # subdirs. cat > Multi.tem <<\EOF PWD_COMMAND=$${PWDCMD-pwd} # FIXME: There should be an @-sign in front of the `if'. # Leave out until this is tested a bit more. multi-do: if [ -z "$(MULTIDIRS)" ]; then \ true; \ else \ rootpre=`${PWD_COMMAND}`/; export rootpre; \ srcrootpre=`cd $(srcdir); ${PWD_COMMAND}`/; export srcrootpre; \ lib=`echo $${rootpre} | sed -e 's,^.*/\([^/][^/]*\)/$$,\1,'`; \ compiler="$(CC)"; \ for i in `$${compiler} --print-multi-lib 2>/dev/null`; do \ dir=`echo $$i | sed -e 's/;.*$$//'`; \ if [ "$${dir}" = "." ]; then \ true; \ else \ if [ -d ../$${dir}/$${lib} ]; then \ flags=`echo $$i | sed -e 's/^[^;]*;//' -e 's/@/ -/g'`; \ if (cd ../$${dir}/$${lib}; $(MAKE) $(FLAGS_TO_PASS) \ CFLAGS="$(CFLAGS) $${flags}" \ FCFLAGS="$(FCFLAGS) $${flags}" \ FFLAGS="$(FFLAGS) $${flags}" \ ADAFLAGS="$(ADAFLAGS) $${flags}" \ prefix="$(prefix)" \ exec_prefix="$(exec_prefix)" \ GCJFLAGS="$(GCJFLAGS) $${flags}" \ CXXFLAGS="$(CXXFLAGS) $${flags}" \ LIBCFLAGS="$(LIBCFLAGS) $${flags}" \ LIBCXXFLAGS="$(LIBCXXFLAGS) $${flags}" \ LDFLAGS="$(LDFLAGS) $${flags}" \ MULTIFLAGS="$${flags}" \ DESTDIR="$(DESTDIR)" \ INSTALL="$(INSTALL)" \ INSTALL_DATA="$(INSTALL_DATA)" \ INSTALL_PROGRAM="$(INSTALL_PROGRAM)" \ INSTALL_SCRIPT="$(INSTALL_SCRIPT)" \ $(DO)); then \ true; \ else \ exit 1; \ fi; \ else true; \ fi; \ fi; \ done; \ fi # FIXME: There should be an @-sign in front of the `if'. # Leave out until this is tested a bit more. multi-clean: if [ -z "$(MULTIDIRS)" ]; then \ true; \ else \ lib=`${PWD_COMMAND} | sed -e 's,^.*/\([^/][^/]*\)$$,\1,'`; \ for dir in Makefile $(MULTIDIRS); do \ if [ -f ../$${dir}/$${lib}/Makefile ]; then \ if (cd ../$${dir}/$${lib}; $(MAKE) $(FLAGS_TO_PASS) $(DO)); \ then true; \ else exit 1; \ fi; \ else true; \ fi; \ done; \ fi EOF cat ${Makefile} Multi.tem > Makefile.tem rm -f ${Makefile} Multi.tem mv Makefile.tem ${Makefile} fi # ${ml_toplevel_p} = yes if [ "${ml_verbose}" = --verbose ]; then echo "Adding multilib support to Makefile in ${ml_realsrcdir}" if [ "${ml_toplevel_p}" = yes ]; then echo "multidirs=${multidirs}" fi echo "with_multisubdir=${with_multisubdir}" fi if [ "${srcdir}" = "." ]; then if [ "${with_target_subdir}" != "." ]; then ml_srcdotdot="../" else ml_srcdotdot="" fi else ml_srcdotdot="" fi if [ -z "${with_multisubdir}" ]; then ml_subdir= ml_builddotdot= : # ml_srcdotdot= # already set else ml_subdir="/${with_multisubdir}" # The '[^/][^/]*' appears that way to work around a SunOS sed bug. ml_builddotdot=`echo ${with_multisubdir} | sed -e 's:[^/][^/]*:..:g'`/ if [ "$srcdir" = "." ]; then ml_srcdotdot=${ml_srcdotdot}${ml_builddotdot} else : # ml_srcdotdot= # already set fi fi if [ "${ml_toplevel_p}" = yes ]; then ml_do='$(MAKE)' ml_clean='$(MAKE)' else ml_do=true ml_clean=true fi # TOP is used by newlib and should not be used elsewhere for this purpose. # MULTI{SRC,BUILD}TOP are the proper ones to use. MULTISRCTOP is empty # when srcdir != builddir. MULTIBUILDTOP is always some number of ../'s. # FIXME: newlib needs to be updated to use MULTI{SRC,BUILD}TOP so we can # delete TOP. Newlib may wish to continue to use TOP for its own purposes # of course. # MULTIDIRS is non-empty for the cpu top level Makefile (eg: newlib/Makefile) # and lists the subdirectories to recurse into. # MULTISUBDIR is non-empty in each cpu subdirectory's Makefile # (eg: newlib/h8300h/Makefile) and is the installed subdirectory name with # a leading '/'. # MULTIDO is used for targets like all, install, and check where # $(FLAGS_TO_PASS) augmented with the subdir's compiler option is needed. # MULTICLEAN is used for the *clean targets. # # ??? It is possible to merge MULTIDO and MULTICLEAN into one. They are # currently kept separate because we don't want the *clean targets to require # the existence of the compiler (which MULTIDO currently requires) and # therefore we'd have to record the directory options as well as names # (currently we just record the names and use --print-multi-lib to get the # options). sed -e "s:^TOP[ ]*=[ ]*\([./]*\)[ ]*$:TOP = ${ml_builddotdot}\1:" \ -e "s:^MULTISRCTOP[ ]*=.*$:MULTISRCTOP = ${ml_srcdotdot}:" \ -e "s:^MULTIBUILDTOP[ ]*=.*$:MULTIBUILDTOP = ${ml_builddotdot}:" \ -e "s:^MULTIDIRS[ ]*=.*$:MULTIDIRS = ${multidirs}:" \ -e "s:^MULTISUBDIR[ ]*=.*$:MULTISUBDIR = ${ml_subdir}:" \ -e "s:^MULTIDO[ ]*=.*$:MULTIDO = $ml_do:" \ -e "s:^MULTICLEAN[ ]*=.*$:MULTICLEAN = $ml_clean:" \ ${Makefile} > Makefile.tem rm -f ${Makefile} mv Makefile.tem ${Makefile} # If this is the library's top level, configure each multilib subdir. # This is done at the end because this is the loop that runs configure # in each multilib subdir and it seemed reasonable to finish updating the # Makefile before going on to configure the subdirs. if [ "${ml_toplevel_p}" = yes ]; then # We must freshly configure each subdirectory. This bit of code is # actually partially stolen from the main configure script. FIXME. if [ -n "${multidirs}" ] && [ -z "${ml_norecursion}" ]; then if [ "${ml_verbose}" = --verbose ]; then echo "Running configure in multilib subdirs ${multidirs}" echo "pwd: `${PWDCMD-pwd}`" fi ml_origdir=`${PWDCMD-pwd}` ml_libdir=`echo $ml_origdir | sed -e 's,^.*/,,'` # cd to top-level-build-dir/${with_target_subdir} cd .. for ml_dir in ${multidirs}; do if [ "${ml_verbose}" = --verbose ]; then echo "Running configure in multilib subdir ${ml_dir}" echo "pwd: `${PWDCMD-pwd}`" fi if [ -d ${ml_dir} ]; then true; else # ``mkdir -p ${ml_dir}'' See also mkinstalldirs. pathcomp="" for d in `echo ":${ml_dir}" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`; do pathcomp="$pathcomp$d" case "$pathcomp" in -* ) pathcomp=./$pathcomp ;; esac if test ! -d "$pathcomp"; then echo "mkdir $pathcomp" 1>&2 mkdir "$pathcomp" > /dev/null 2>&1 || lasterr=$? fi if test ! -d "$pathcomp"; then exit $lasterr fi pathcomp="$pathcomp/" done fi if [ -d ${ml_dir}/${ml_libdir} ]; then true; else mkdir ${ml_dir}/${ml_libdir}; fi # Eg: if ${ml_dir} = m68000/m68881, dotdot = ../../ dotdot=../`echo ${ml_dir} | sed -e 's|[^/]||g' -e 's|/|../|g'` case ${srcdir} in ".") echo Building symlink tree in `${PWDCMD-pwd}`/${ml_dir}/${ml_libdir} if [ "${with_target_subdir}" != "." ]; then ml_unsubdir="../" else ml_unsubdir="" fi (cd ${ml_dir}/${ml_libdir}; ../${dotdot}${ml_unsubdir}symlink-tree ../${dotdot}${ml_unsubdir}${ml_libdir} "") if [ -f ${ml_dir}/${ml_libdir}/Makefile ]; then if [ x"${MAKE}" = x ]; then (cd ${ml_dir}/${ml_libdir}; make distclean) else (cd ${ml_dir}/${ml_libdir}; ${MAKE} distclean) fi fi ml_newsrcdir="." ml_srcdiroption= multisrctop=${dotdot} ;; *) case "${srcdir}" in /* | [A-Za-z]:[\\/]* ) # absolute path ml_newsrcdir=${srcdir} ;; *) # otherwise relative ml_newsrcdir=${dotdot}${srcdir} ;; esac ml_srcdiroption="-srcdir=${ml_newsrcdir}" multisrctop= ;; esac case "${progname}" in /* | [A-Za-z]:[\\/]* ) ml_recprog=${progname} ;; *) ml_recprog=${dotdot}${progname} ;; esac # FIXME: POPDIR=${PWD=`pwd`} doesn't work here. ML_POPDIR=`${PWDCMD-pwd}` cd ${ml_dir}/${ml_libdir} if [ -f ${ml_newsrcdir}/configure ]; then ml_recprog="${ml_newsrcdir}/configure" fi # find compiler flag corresponding to ${ml_dir} for i in `${CC-gcc} --print-multi-lib 2>/dev/null`; do dir=`echo $i | sed -e 's/;.*$//'` if [ "${dir}" = "${ml_dir}" ]; then flags=`echo $i | sed -e 's/^[^;]*;//' -e 's/@/ -/g'` break fi done ml_config_env='CC="${CC_}$flags" CXX="${CXX_}$flags" F77="${F77_}$flags" GCJ="${GCJ_}$flags" GFORTRAN="${GFORTRAN_}$flags"' if [ "${with_target_subdir}" = "." ]; then CC_=$CC' ' CXX_=$CXX' ' F77_=$F77' ' GCJ_=$GCJ' ' GFORTRAN_=$GFORTRAN' ' else # Create a regular expression that matches any string as long # as ML_POPDIR. popdir_rx=`echo ${ML_POPDIR} | sed 's,.,.,g'` CC_= for arg in ${CC}; do case $arg in -[BIL]"${ML_POPDIR}"/*) CC_="${CC_}"`echo "X${arg}" | sed -n "s/X\\(-[BIL]${popdir_rx}\\).*/\\1/p"`/${ml_dir}`echo "X${arg}" | sed -n "s/X-[BIL]${popdir_rx}\\(.*\\)/\1/p"`' ' ;; "${ML_POPDIR}"/*) CC_="${CC_}"`echo "X${arg}" | sed -n "s/X\\(${popdir_rx}\\).*/\\1/p"`/${ml_dir}`echo "X${arg}" | sed -n "s/X${popdir_rx}\\(.*\\)/\\1/p"`' ' ;; *) CC_="${CC_}${arg} " ;; esac done CXX_= for arg in ${CXX}; do case $arg in -[BIL]"${ML_POPDIR}"/*) CXX_="${CXX_}"`echo "X${arg}" | sed -n "s/X\\(-[BIL]${popdir_rx}\\).*/\\1/p"`/${ml_dir}`echo "X${arg}" | sed -n "s/X-[BIL]${popdir_rx}\\(.*\\)/\\1/p"`' ' ;; "${ML_POPDIR}"/*) CXX_="${CXX_}"`echo "X${arg}" | sed -n "s/X\\(${popdir_rx}\\).*/\\1/p"`/${ml_dir}`echo "X${arg}" | sed -n "s/X${popdir_rx}\\(.*\\)/\\1/p"`' ' ;; *) CXX_="${CXX_}${arg} " ;; esac done F77_= for arg in ${F77}; do case $arg in -[BIL]"${ML_POPDIR}"/*) F77_="${F77_}"`echo "X${arg}" | sed -n "s/X\\(-[BIL]${popdir_rx}\\).*/\\1/p"`/${ml_dir}`echo "X${arg}" | sed -n "s/X-[BIL]${popdir_rx}\\(.*\\)/\\1/p"`' ' ;; "${ML_POPDIR}"/*) F77_="${F77_}"`echo "X${arg}" | sed -n "s/X\\(${popdir_rx}\\).*/\\1/p"`/${ml_dir}`echo "X${arg}" | sed -n "s/X${popdir_rx}\\(.*\\)/\\1/p"`' ' ;; *) F77_="${F77_}${arg} " ;; esac done GCJ_= for arg in ${GCJ}; do case $arg in -[BIL]"${ML_POPDIR}"/*) GCJ_="${GCJ_}"`echo "X${arg}" | sed -n "s/X\\(-[BIL]${popdir_rx}\\).*/\\1/p"`/${ml_dir}`echo "X${arg}" | sed -n "s/X-[BIL]${popdir_rx}\\(.*\\)/\\1/p"`' ' ;; "${ML_POPDIR}"/*) GCJ_="${GCJ_}"`echo "X${arg}" | sed -n "s/X\\(${popdir_rx}\\).*/\\1/p"`/${ml_dir}`echo "X${arg}" | sed -n "s/X${popdir_rx}\\(.*\\)/\\1/p"`' ' ;; *) GCJ_="${GCJ_}${arg} " ;; esac done GFORTRAN_= for arg in ${GFORTRAN}; do case $arg in -[BIL]"${ML_POPDIR}"/*) GFORTRAN_="${GFORTRAN_}"`echo "X${arg}" | sed -n "s/X\\(-[BIL]${popdir_rx}\\).*/\\1/p"`/${ml_dir}`echo "X${arg}" | sed -n "s/X-[BIL]${popdir_rx}\\(.*\\)/\\1/p"`' ' ;; "${ML_POPDIR}"/*) GFORTRAN_="${GFORTRAN_}"`echo "X${arg}" | sed -n "s/X\\(${popdir_rx}\\).*/\\1/p"`/${ml_dir}`echo "X${arg}" | sed -n "s/X${popdir_rx}\\(.*\\)/\\1/p"`' ' ;; *) GFORTRAN_="${GFORTRAN_}${arg} " ;; esac done if test "x${LD_LIBRARY_PATH+set}" = xset; then LD_LIBRARY_PATH_= for arg in `echo "$LD_LIBRARY_PATH" | tr ':' ' '`; do case "$arg" in "${ML_POPDIR}"/*) arg=`echo "X${arg}" | sed -n "s/X\\(${popdir_rx}\\).*/\\1/p"`/${ml_dir}`echo "X${arg}" | sed -n "s/X${popdir_rx}\\(.*\\)/\\1/p"` ;; esac if test "x$LD_LIBRARY_PATH_" != x; then LD_LIBRARY_PATH_=$LD_LIBRARY_PATH_:$arg else LD_LIBRARY_PATH_=$arg fi done ml_config_env="$ml_config_env LD_LIBRARY_PATH=$LD_LIBRARY_PATH_" fi if test "x${SHLIB_PATH+set}" = xset; then SHLIB_PATH_= for arg in `echo "$SHLIB_PATH" | tr ':' ' '`; do case "$arg" in "${ML_POPDIR}"/*) arg=`echo "X${arg}" | sed -n "s/X\\(${popdir_rx}\\).*/\\1/p"`/${ml_dir}`echo "X${arg}" | sed -n "s/X${popdir_rx}\\(.*\\)/\\1/p"` ;; esac if test "x$SHLIB_PATH_" != x; then SHLIB_PATH_=$SHLIB_PATH_:$arg else SHLIB_PATH_=$arg fi done ml_config_env="$ml_config_env SHLIB_PATH=$SHLIB_PATH_" fi fi if eval ${ml_config_env} ${ml_config_shell} ${ml_recprog} \ --with-multisubdir=${ml_dir} --with-multisrctop=${multisrctop} \ ${ac_configure_args} ${ml_srcdiroption} ; then true else exit 1 fi cd ${ML_POPDIR} done cd ${ml_origdir} fi fi # ${ml_toplevel_p} = yes fi # ${enable_multilib} = yes Index: configure =================================================================== RCS file: /cvsroot/ctypes/ctypes/source/gcc/libffi/configure,v retrieving revision 1.2 retrieving revision 1.2.4.1 diff -C2 -d -r1.2 -r1.2.4.1 *** configure 20 Oct 2004 15:53:30 -0000 1.2 --- configure 16 May 2005 23:29:16 -0000 1.2.4.1 *************** *** 311,315 **** #endif" ! ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS multi_basedir build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot CC ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CFLAGS CCAS CCASFLAGS LN_S RANLIB ac_ct_RANLIB LIBTOOL MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT CPP CPPFLAGS EGREP TESTSUBDIR_TRUE TESTSUBDIR_FALSE AM_RUNTESTFLAGS MIPS_IRIX_TRUE MIPS_IRIX_FALSE MIPS_LINUX_TRUE MIPS_LINUX_FALSE SPARC_TRUE SPARC_FALSE X86_TRUE X86_FALSE X86_WIN32_TRUE X86_WIN32_FALSE ALPHA_TRUE ALPHA_FALSE IA64_TRUE IA64_FALSE M68K_TRUE M68K_FALSE POWERPC_TRUE POWERPC_FALSE POWERPC_AIX_TRUE POWERPC_AIX_FALSE POWERPC_DARWIN_TRUE POWERPC_DARWIN_FALSE ARM_TRUE ARM_FALSE S390_TRUE S390_FALSE X86_64_TRUE X86_64_FALSE SH_TRUE SH_FALSE SH64_TRUE SH64_FALSE PA_TRUE PA_FALSE ALLOCA HAVE_LONG_DOUBLE TARGET TARGETDIR toolexecdir toolexeclibdir tool_include_dir gcc_version LIBOBJS LTLIBOBJS' ac_subst_files='' --- 311,315 ---- #endif" ! ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS multi_basedir build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar CC ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CFLAGS CCAS CCASFLAGS LN_S RANLIB ac_ct_RANLIB LIBTOOL MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT CPP CPPFLAGS EGREP TESTSUBDIR_TRUE TESTSUBDIR_FALSE AM_RUNTESTFLAGS MIPS_IRIX_TRUE MIPS_IRIX_FALSE MIPS_LINUX_TRUE MIPS_LINUX_FALSE SPARC_TRUE SPARC_FALSE X86_TRUE X86_FALSE X86_WIN32_TRUE X86_WIN32_FALSE ALPHA_TRUE ALPHA_FALSE IA64_TRUE IA64_FALSE M32R_TRUE M32R_FALSE M68K_TRUE M68K_FALSE POWERPC_TRUE POWERPC_FALSE POWERPC_AIX_TRUE POWERPC_AIX_FALSE POWERPC_DARWIN_TRUE POWERPC_DARWIN_FALSE ARM_TRUE ARM_FALSE LIBFFI_CRIS_TRUE LIBFFI_CRIS_FALSE FRV_TRUE FRV_FALSE S390_TRUE S390_FALSE X86_64_TRUE X86_64_FALSE SH_TRUE SH_FALSE SH64_TRUE SH64_FALSE PA_TRUE PA_FALSE ALLOCA HAVE_LONG_DOUBLE TARGET TARGETDIR toolexecdir toolexeclibdir LIBOBJS LTLIBOBJS' ac_subst_files='' [...1062 lines suppressed...] --- 8584,8602 ---- continue fi ! # Extract the definition of DEPDIR, am__include, and am__quote ! # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` ! # Find all dependency output files, they are included files with ! # $(DEPDIR) in their names. We invoke sed twice because it is the ! # simplest approach to changing $(DEPDIR) to its actual value in the ! # expansion. ! for file in `sed -n " ! s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. --- NEW FILE: configure.host --- # configure.host # # This shell script handles all host based configuration for libffi. # # THIS TABLE IS SORTED. KEEP IT THAT WAY. case "${host}" in frv*-elf) LDFLAGS=`echo $LDFLAGS | sed "s/\-B[^ ]*libgloss\/frv\///"`\ -B`pwd`/../libgloss/frv/ ;; esac Index: ChangeLog =================================================================== RCS file: /cvsroot/ctypes/ctypes/source/gcc/libffi/ChangeLog,v retrieving revision 1.1 retrieving revision 1.1.4.1 diff -C2 -d -r1.1 -r1.1.4.1 *** ChangeLog 18 Jun 2004 20:07:08 -0000 1.1 --- ChangeLog 16 May 2005 23:29:16 -0000 1.1.4.1 *************** *** 1,2 **** --- 1,429 ---- + 2005-05-09 Mike Stump <mr...@ap...> + + * configure: Regenerate. + + 2005-05-08 Richard Henderson <rt...@re...> + + PR libffi/21285 + * src/alpha/osf.S: Update unwind into to match code. + + 2005-05-04 Andreas Degert <ad...@pa...> + Richard Henderson <rt...@re...> + + * src/x86/ffi64.c (ffi_prep_cif_machdep): Save sse-used flag in + bit 11 of flags. + (ffi_call): Mask return type field. Pass ssecount to ffi_call_unix64. + (ffi_prep_closure): Set carry bit if sse-used flag set. + * src/x86/unix64.S (ffi_call_unix64): Add ssecount argument. + Only load sse registers if ssecount non-zero. + (ffi_closure_unix64): Only save sse registers if carry set on entry. + + 2005-04-29 Ralf Corsepius <ral...@rt...> + + * configure.ac: Add i*86-*-rtems*, sparc*-*-rtems*, + powerpc-*rtems*, arm*-*-rtems*, sh-*-rtems*. + * configure: Regenerate. + + 2005-04-20 Hans-Peter Nilsson <hp...@ax...> + + * testsuite/lib/libffi-dg.exp (libffi-dg-test-1): In regsub use, + have Tcl8.3-compatible intermediate variable. + + 2005-04-18 Simon Posnjak <sim...@si...> + Hans-Peter Nilsson <hp...@ax...> + + * Makefile.am: Add CRIS support. + * configure.ac: Likewise. + * Makefile.in, configure, testsuite/Makefile.in, + include/Makefile.in: Regenerate. + * src/cris: New directory. + * src/cris/ffi.c, src/cris/sysv.S, src/cris/ffitarget.h: New files. + * src/prep_cif.c (ffi_prep_cif): Wrap in #ifndef __CRIS__. + + * testsuite/lib/libffi-dg.exp (libffi-dg-test-1): Replace \n with + \r?\n in output tests. + + 2005-04-12 Mike Stump <mr...@ap...> + + * configure: Regenerate. + + 2005-03-30 Hans Boehm <Han...@hp...> + + * src/ia64/ffitarget.h (ffi_arg): Use long long instead of DI. + + 2005-03-30 Steve Ellcey <sj...@cu...> + + * src/ia64/ffitarget.h (ffi_arg) ADD DI attribute. + (ffi_sarg) Ditto. + * src/ia64/unix.S (ffi_closure_unix): Extend gp + to 64 bits in ILP32 mode. + Load 64 bits even for short data. + + 2005-03-23 Mike Stump <mr...@ap...> + + * src/powerpc/darwin.S: Update for -m64 multilib. + * src/powerpc/darwin_closure.S: Likewise. + + 2005-03-21 Zack Weinberg <za...@co...> + + * configure.ac: Do not invoke TL_AC_GCC_VERSION. + Do not set tool_include_dir. + * aclocal.m4, configure, Makefile.in, testsuite/Makefile.in: + Regenerate. + * include/Makefile.am: Set gcc_version and toollibffidir. + * include/Makefile.in: Regenerate. + + 2005-02-22 Andrew Haley <ap...@re...> + + * src/powerpc/ffi.c (ffi_prep_cif_machdep): Bump alignment to + odd-numbered register pairs for 64-bit integer types. + + 2005-02-23 Andreas Tobler <a.t...@sc...> + + PR libffi/20104 + * testsuite/libffi.call/return_ll1.c: New test case. + + 2005-02-11 Janis Johnson <jan...@us...> + + * testsuite/libffi.call/cls_align_longdouble.c: Remove dg-options. + * testsuite/libffi.call/float.c: Ditto. + * testsuite/libffi.call/float2.c: Ditto. + * testsuite/libffi.call/float3.c: Ditto. + + 2005-02-08 Andreas Tobler <a.t...@sc...> + + * src/frv/ffitarget.h: Remove PPC stuff which does not belong to frv. + + 2005-01-12 Eric Botcazou <ebo...@li...> + + * testsuite/libffi.special/special.exp (cxx_options): Add + -shared-libgcc. + + 2004-12-31 Richard Henderson <rt...@re...> + + * src/types.c (FFI_AGGREGATE_TYPEDEF): Remove. + (FFI_TYPEDEF): Rename from FFI_INTEGRAL_TYPEDEF. Replace size and + offset parameters with a type parameter; deduce size and structure + alignment. Update all users. + + 2004-12-31 Richard Henderson <rt...@re...> + + * src/types.c (FFI_TYPE_POINTER): Define with sizeof. + (FFI_TYPE_LONGDOUBLE): Fix for ia64. + * src/ia64/ffitarget.h (struct ffi_ia64_trampoline_struct): Move + into ffi_prep_closure. + * src/ia64/ia64_flags.h, src/ia64/ffi.c, src/ia64/unix.S: Rewrite + from scratch. + + 2004-12-27 Richard Henderson <rt...@re...> + + * src/x86/unix64.S: Fix typo in unwind info. + + 2004-12-25 Richard Henderson <rt...@re...> + + * src/x86/ffi64.c (struct register_args): Rename from stackLayout. + (enum x86_64_reg_class): Add X86_64_COMPLEX_X87_CLASS. + (merge_classes): Check for it. + (SSE_CLASS_P): New. + (classify_argument): Pass byte_offset by value; perform all updates + inside struct case. + (examine_argument): Add classes argument; handle + X86_64_COMPLEX_X87_CLASS. + (ffi_prep_args): Merge into ... + (ffi_call): ... here. Share stack frame with ffi_call_unix64. + (ffi_prep_cif_machdep): Setup cif->flags for proper structure return. + (ffi_fill_return_value): Remove. + (ffi_prep_closure): Remove dead assert. + (ffi_closure_unix64_inner): Rename from ffi_closure_UNIX64_inner. + Rewrite to use struct register_args instead of va_list. Create + flags for handling structure returns. + * src/x86/unix64.S: Remove dead strings. + (ffi_call_unix64): Rename from ffi_call_UNIX64. Rewrite to share + stack frame with ffi_call. Handle structure returns properly. + (float2sse, floatfloat2sse, double2sse): Remove. + (sse2float, sse2double, sse2floatfloat): Remove. + (ffi_closure_unix64): Rename from ffi_closure_UNIX64. Rewrite + to handle structure returns properly. + + 2004-12-08 David Edelsohn <ede...@gn...> + + * Makefile.am (AM_MAKEFLAGS): Remove duplicate LIBCFLAGS and + PICFLAG. + * Makefile.in: Regenerated. + + 2004-12-02 Richard Sandiford <rsa...@re...> + + * configure.ac: Use TL_AC_GCC_VERSION to set gcc_version. + * configure, aclocal.m4, Makefile.in: Regenerate. + * include/Makefile.in, testsuite/Makefile.in: Regenerate. + + 2004-11-29 Kelley Cook <kc...@gc...> + + * configure: Regenerate for libtool change. + + 2004-11-25 Kelley Cook <kc...@gc...> + + * configure: Regenerate for libtool reversion. + + 2004-11-24 Kelley Cook <kc...@gc...> + + * configure: Regenerate for libtool change. + + 2004-11-23 John David Anglin <dav...@nr...> + + * testsuite/lib/libffi-dg.exp: Use new procs in target-libpath.exp. + + 2004-11-23 Richard Sandiford <rsa...@re...> + + * src/mips/o32.S (ffi_call_O32, ffi_closure_O32): Use jalr instead + of jal. Use an absolute encoding for the frame information. + + 2004-11-23 Kelley Cook <kc...@gc...> + + * Makefile.am: Remove no-dependencies. Add ACLOCAL_AMFLAGS. + * acinclude.m4: Delete logic for sincludes. + * aclocal.m4, Makefile.in, configure: Regenerate. + * include/Makefile: Likewise. + * testsuite/Makefile: Likewise. + + 2004-11-22 Eric Botcazou <ebo...@li...> + + * src/sparc/ffi.c (ffi_prep_closure): Align doubles and 64-bit integers + on a 8-byte boundary. + * src/sparc/v8.S (ffi_closure_v8): Reserve frame space for arguments. + + 2004-10-27 Richard Earnshaw <rea...@ar...> + + * src/arm/ffi.c (ffi_prep_cif_machdep): Handle functions that return + long long values. Round stack allocation to a multiple of 8 bytes + for ATPCS compatibility. + * src/arm/sysv.S (ffi_call_SYSV): Rework to avoid use of APCS register + names. Handle returning long long types. Add Thumb and interworking + support. Improve soft-float code. + + 2004-10-27 Richard Earnshaw <rea...@ar...> + + * testsuite/lib/libffi-db.exp (load_gcc_lib): New function. + (libffi_exit): New function. + (libffi_init): Build the testglue wrapper if needed. + + 2004-10-25 Eric Botcazou <ebo...@li...> + + PR other/18138 + * testsuite/lib/libffi-dg.exp: Accept more than one multilib libgcc. + + 2004-10-25 Kazuhiro Inaoka <ina...@re...> + + * src/m32r/libffitarget.h (FFI_CLOSURES): Set to 0. + + 2004-10-20 Kaz Kojima <kk...@gc...> + + * src/sh/sysv.S (ffi_call_SYSV): Don't align for double data. + * testsuite/libffi.call/float3.c: New test case. + + 2004-10-18 Kaz Kojima <kk...@gc...> + + * src/sh/ffi.c (ffi_prep_closure): Set T bit in trampoline for + the function returning a structure pointed with R2. + * src/sh/sysv.S (ffi_closure_SYSV): Use R2 as the pointer to + the structure return value if T bit set. Emit position + independent code and EH data if PIC. + + 2004-10-13 Kazuhiro Inaoka <ina...@re...> + + * Makefile.am: Add m32r support. + * configure.ac: Likewise. + * Makefile.in: Regenerate. + * confiugre: Regenerate. + * src/types.c: Add m32r port to FFI_INTERNAL_TYPEDEF + (uint64, sint64, double, longdouble) + * src/m32r: New directory. + * src/m32r/ffi.c: New file. + * src/m32r/sysv.S: Likewise. + * src/m32r/ffitarget.h: Likewise. + + 2004-10-02 Kaz Kojima <kk...@gc...> + + * testsuite/libffi.call/negint.c: New test case. + + 2004-09-14 H.J. Lu <hon...@in...> + + PR libgcj/17465 + * testsuite/lib/libffi-dg.exp: Don't use global ld_library_path. + Set up LD_LIBRARY_PATH, SHLIB_PATH, LD_LIBRARYN32_PATH, + LD_LIBRARY64_PATH, LD_LIBRARY_PATH_32, LD_LIBRARY_PATH_64 and + DYLD_LIBRARY_PATH. + + 2004-09-05 Andreas Tobler <a.t...@sc...> + + * testsuite/libffi.call/many_win32.c: Remove whitespaces. + * testsuite/libffi.call/promotion.c: Likewise. + * testsuite/libffi.call/return_ll.c: Remove unused var. Cleanup + whitespaces. + * testsuite/libffi.call/return_sc.c: Likewise. + * testsuite/libffi.call/return_uc.c: Likewise. + + 2004-09-05 Andreas Tobler <a.t...@sc...> + + * src/powerpc/darwin.S: Fix comments and identation. + * src/powerpc/darwin_closure.S: Likewise. + + 2004-09-02 Andreas Tobler <a.t...@sc...> + + * src/powerpc/ffi_darwin.c: Add flag for longdouble return values. + (ffi_prep_args): Handle longdouble arguments. + (ffi_prep_cif_machdep): Set flags for longdouble. Calculate space for + longdouble. + (ffi_closure_helper_DARWIN): Add closure handling for longdouble. + * src/powerpc/darwin.S (_ffi_call_DARWIN): Add handling of longdouble + values. + * src/powerpc/darwin_closure.S (_ffi_closure_ASM): Likewise. + * src/types.c: Defined longdouble size and alignment for darwin. + + 2004-09-02 Andreas Tobler <a.t...@sc...> + + * src/powerpc/aix.S: Remove whitespaces. + * src/powerpc/aix_closure.S: Likewise. + * src/powerpc/asm.h: Likewise. + * src/powerpc/ffi.c: Likewise. + * src/powerpc/ffitarget.h: Likewise. + * src/powerpc/linux64.S: Likewise. + * src/powerpc/linux64_closure.S: Likewise. + * src/powerpc/ppc_closure.S: Likewise. + * src/powerpc/sysv.S: Likewise. + + 2004-08-30 Anthony Green <gr...@re...> + + * Makefile.am: Add frv support. + * Makefile.in, testsuite/Makefile.in: Rebuilt. + * configure.ac: Read configure.host. + * configure.in: Read configure.host. + * configure.host: New file. frv-elf needs libgloss. + * include/ffi.h.in: Force ffi_closure to have a nice big (8) + alignment. This is needed to frv and shouldn't harm the others. + * include/ffi_common.h (ALIGN_DOWN): New macro. + * src/frv/ffi.c, src/frv/ffitarget.h, src/frv/eabi.S: New files. + + 2004-08-24 David Daney <da...@av...> + + * testsuite/libffi.call/closure_fn0.c: Xfail mips64* instead of mips*. + * testsuite/libffi.call/closure_fn1.c: Likewise. + * testsuite/libffi.call/closure_fn2.c Likewise. + * testsuite/libffi.call/closure_fn3.c: Likewise. + * testsuite/libffi.call/closure_fn4.c: Likewise. + * testsuite/libffi.call/closure_fn5.c: Likewise. + * testsuite/libffi.call/cls_18byte.c: Likewise. + * testsuite/libffi.call/cls_19byte.c: Likewise. + * testsuite/libffi.call/cls_1_1byte.c: Likewise. + * testsuite/libffi.call/cls_20byte.c: Likewise. + * testsuite/libffi.call/cls_20byte1.c: Likewise. + * testsuite/libffi.call/cls_24byte.c: Likewise. + * testsuite/libffi.call/cls_2byte.c: Likewise. + * testsuite/libffi.call/cls_3_1byte.c: Likewise. + * testsuite/libffi.call/cls_3byte1.c: Likewise. + * testsuite/libffi.call/cls_3byte2.c: Likewise. + * testsuite/libffi.call/cls_4_1byte.c: Likewise. + * testsuite/libffi.call/cls_4byte.c: Likewise. + * testsuite/libffi.call/cls_64byte.c: Likewise. + * testsuite/libffi.call/cls_6byte.c: Likewise. + * testsuite/libffi.call/cls_7byte.c: Likewise. + * testsuite/libffi.call/cls_8byte.c: Likewise. + * testsuite/libffi.call/cls_9byte1.c: Likewise. + * testsuite/libffi.call/cls_9byte2.c: Likewise. + * testsuite/libffi.call/cls_align_double.c: Likewise. + * testsuite/libffi.call/cls_align_float.c: Likewise. + * testsuite/libffi.call/cls_align_longdouble.c: Likewise. + * testsuite/libffi.call/cls_align_pointer.c: Likewise. + * testsuite/libffi.call/cls_align_sint16.c: Likewise. + * testsuite/libffi.call/cls_align_sint32.c: Likewise. + * testsuite/libffi.call/cls_align_sint64.c: Likewise. + * testsuite/libffi.call/cls_align_uint16.c: Likewise. + * testsuite/libffi.call/cls_align_uint32.c: Likewise. + * testsuite/libffi.call/cls_align_uint64.c: Likewise. + * testsuite/libffi.call/cls_double.c: Likewise. + * testsuite/libffi.call/cls_float.c: Likewise. + * testsuite/libffi.call/cls_multi_schar.c: Likewise. + * testsuite/libffi.call/cls_multi_sshort.c: Likewise. + * testsuite/libffi.call/cls_multi_sshortchar.c: Likewise. + * testsuite/libffi.call/cls_multi_uchar.c: Likewise. + * testsuite/libffi.call/cls_multi_ushort.c: Likewise. + * testsuite/libffi.call/cls_multi_ushortchar.c: Likewise. + * testsuite/libffi.call/cls_schar.c: Likewise. + * testsuite/libffi.call/cls_sint.c: Likewise. + * testsuite/libffi.call/cls_sshort.c: Likewise. + * testsuite/libffi.call/cls_uchar.c: Likewise. + * testsuite/libffi.call/cls_uint.c: Likewise. + * testsuite/libffi.call/cls_ulonglong.c: Likewise. + * testsuite/libffi.call/cls_ushort.c: Likewise. + * testsuite/libffi.call/nested_struct.c: Likewise. + * testsuite/libffi.call/nested_struct1.c: Likewise. + * testsuite/libffi.call/nested_struct2.c: Likewise. + * testsuite/libffi.call/nested_struct3.c: Likewise. + * testsuite/libffi.call/problem1.c: Likewise. + * testsuite/libffi.special/unwindtest.cc: Likewise. + * testsuite/libffi.call/cls_12byte.c: Likewise and set return value + to zero. + * testsuite/libffi.call/cls_16byte.c: Likewise. + * testsuite/libffi.call/cls_5byte.c: Likewise. + + 2004-08-23 David Daney <da...@av...> + + PR libgcj/13141 + * src/mips/ffitarget.h (FFI_O32_SOFT_FLOAT): New ABI. + * src/mips/ffi.c (ffi_prep_args): Fix alignment calculation. + (ffi_prep_cif_machdep): Handle FFI_O32_SOFT_FLOAT floating point + parameters and return types. + (ffi_call): Handle FFI_O32_SOFT_FLOAT ABI. + (ffi_prep_closure): Ditto. + (ffi_closure_mips_inner_O32): Handle FFI_O32_SOFT_FLOAT ABI, fix + alignment calculations. + * src/mips/o32.S (ffi_closure_O32): Don't use floating point + instructions if FFI_O32_SOFT_FLOAT, make stack frame ABI compliant. + + 2004-08-14 Casey Marshall <cs...@gn...> + + * src/mips/ffi.c (ffi_pref_cif_machdep): set `cif->flags' to + contain `FFI_TYPE_UINT64' as return type for any 64-bit + integer (O32 ABI only). + (ffi_prep_closure): new function. + (ffi_closure_mips_inner_O32): new function. + * src/mips/ffitarget.h: Define `FFI_CLOSURES' and + `FFI_TRAMPOLINE_SIZE' appropriately if the ABI is o32. + * src/mips/o32.S (ffi_call_O32): add labels for .eh_frame. Return + 64 bit integers correctly. + (ffi_closure_O32): new function. + Added DWARF-2 unwind info for both functions. + + 2004-08-10 Andrew Haley <ap...@re...> + + * src/x86/ffi64.c (ffi_prep_args ): 8-align all stack arguments. + + 2004-08-01 Robert Millan <rob...@gn...> + + * configure.ac: Detect knetbsd-gnu and kfreebsd-gnu. + * configure: Regenerate. + + 2004-07-30 Maciej W. Rozycki <ma...@li...> + + * acinclude.m4 (AC_FUNC_MMAP_BLACKLIST): Check for <sys/mman.h> + and mmap() explicitly instead of relying on preset autoconf cache + variables. + * aclocal.m4: Regenerate. + * configure: Regenerate. + + 2004-07-11 Ulrich Weigand <uwe...@de...> + + * src/s390/ffi.c (ffi_prep_args): Fix C aliasing violation. + (ffi_check_float_struct): Remove unused prototype. + + 2004-06-30 Geoffrey Keating <ge...@ap...> + + * src/powerpc/ffi_darwin.c (flush_icache): ';' is a comment + character on Darwin, use '\n\t' instead. + + 2004-06-26 Matthias Klose <do...@de...> + + * libtool-version: Fix typo in revision/age. + 2004-06-17 Matthias Klose <do...@de...> *************** *** 41,45 **** FDE location. * src/powerpc/darwin_closure.S: Likewise. ! 2004-04-24 Andreas Tobler <a.t...@sc...> --- 468,472 ---- FDE location. * src/powerpc/darwin_closure.S: Likewise. ! 2004-04-24 Andreas Tobler <a.t...@sc...> *************** *** 851,855 **** 2003-03-03 Andreas Tobler <a.t...@sc...> ! * src/powerpc/darwin_closure.S: Recode to fit dynamic libraries. 2003-02-06 Andreas Tobler <a.t...@sc...> --- 1278,1282 ---- 2003-03-03 Andreas Tobler <a.t...@sc...> ! * src/powerpc/darwin_closure.S: Recode to fit dynamic libraries. 2003-02-06 Andreas Tobler <a.t...@sc...> *************** *** 870,879 **** Andreas Schwab <sc...@su...> ! * configure.in: Adjust command to source config-ml.in to account for changes to the libffi_basedir definition. (libffi_basedir): Remove ${srcdir} from value and include trailing slash if nonempty. ! * configure: Regenerate. 2003-01-29 Franz Sirl <Fra...@la...> --- 1297,1306 ---- Andreas Schwab <sc...@su...> ! * configure.in: Adjust command to source config-ml.in to account for changes to the libffi_basedir definition. (libffi_basedir): Remove ${srcdir} from value and include trailing slash if nonempty. ! * configure: Regenerate. 2003-01-29 Franz Sirl <Fra...@la...> *************** *** 924,933 **** * libffi/src/ffitest.c ! add closure testcases 2003-01-13 Kevin B. Hendricks <khe...@iv...> * libffi/src/powerpc/ffi.c ! fix alignment bug for float (4 byte aligned iso 8 byte) 2003-01-09 Geoffrey Keating <ge...@ap...> --- 1351,1360 ---- * libffi/src/ffitest.c ! add closure testcases 2003-01-13 Kevin B. Hendricks <khe...@iv...> * libffi/src/powerpc/ffi.c ! fix alignment bug for float (4 byte aligned iso 8 byte) 2003-01-09 Geoffrey Keating <ge...@ap...> Index: Makefile.in =================================================================== RCS file: /cvsroot/ctypes/ctypes/source/gcc/libffi/Makefile.in,v retrieving revision 1.1 retrieving revision 1.1.4.1 diff -C2 -d -r1.1 -r1.1.4.1 *** Makefile.in 18 Jun 2004 20:07:08 -0000 1.1 --- Makefile.in 16 May 2005 23:29:16 -0000 1.1.4.1 *************** *** 1,3 **** ! # Makefile.in generated by automake 1.8.5 from Makefile.am. # @configure_input@ --- 1,3 ---- ! # Makefile.in generated by automake 1.9.3 from Makefile.am. # @configure_input@ *************** *** 47,70 **** @ALPHA_TRUE@am__append_6 = src/alpha/ffi.c src/alpha/osf.S [...1284 lines suppressed...] + -rm -f src/sparc/$(am__dirstamp) + -rm -f src/x86/$(DEPDIR)/$(am__dirstamp) -rm -f src/x86/$(am__dirstamp) *************** *** 1397,1400 **** --- 1228,1232 ---- distclean: distclean-multi distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -rf src/$(DEPDIR) src/alpha/$(DEPDIR) src/arm/$(DEPDIR) src/cris/$(DEPDIR) src/frv/$(DEPDIR) src/ia64/$(DEPDIR) src/m32r/$(DEPDIR) src/m68k/$(DEPDIR) src/mips/$(DEPDIR) src/pa/$(DEPDIR) src/powerpc/$(DEPDIR) src/s390/$(DEPDIR) src/sh/$(DEPDIR) src/sh64/$(DEPDIR) src/sparc/$(DEPDIR) src/x86/$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ *************** *** 1424,1427 **** --- 1256,1260 ---- -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache + -rm -rf src/$(DEPDIR) src/alpha/$(DEPDIR) src/arm/$(DEPDIR) src/cris/$(DEPDIR) src/frv/$(DEPDIR) src/ia64/$(DEPDIR) src/m32r/$(DEPDIR) src/m68k/$(DEPDIR) src/mips/$(DEPDIR) src/pa/$(DEPDIR) src/powerpc/$(DEPDIR) src/s390/$(DEPDIR) src/sh/$(DEPDIR) src/sh64/$(DEPDIR) src/sparc/$(DEPDIR) src/x86/$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic --- NEW FILE: version.c --- #include "version.h" /* This is the trailing component of the string reported as the version number by all components of the compiler. For an official FSF release, it is empty. If you distribute a modified version of GCC, please change this string to indicate that. The suggested format is a leading space, followed by your organization's name in parentheses. You may also wish to include a number indicating the revision of your modified compiler. */ #define VERSUFFIX "" /* This is the location of the online document giving instructions for reporting bugs. If you distribute a modified version of GCC, please change this to refer to a document giving instructions for reporting bugs to you, not us. (You are of course welcome to forward us bugs reported to you, if you determine that they are not bugs in your modifications.) */ const char bug_report_url[] = "<URL:http://gcc.gnu.org/bugs.html>"; /* The complete version string, assembled from several pieces. BASEVER, DATESTAMP, and DEVPHASE are defined by the Makefile. */ const char version_string[] = BASEVER DATESTAMP DEVPHASE VERSUFFIX; --- NEW FILE: config.guess --- #! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. timestamp='2004-11-12' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software [...1414 lines suppressed...] /bin/universe = `(/bin/universe) 2>/dev/null` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` /bin/arch = `(/bin/arch) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = ${UNAME_MACHINE} UNAME_RELEASE = ${UNAME_RELEASE} UNAME_SYSTEM = ${UNAME_SYSTEM} UNAME_VERSION = ${UNAME_VERSION} EOF exit 1 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: --- NEW FILE: config.sub --- #! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. timestamp='2005-04-22' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software # can handle that machine. It does not imply ALL GNU software can. # # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the [...1530 lines suppressed...] -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; -vos*) vendor=stratus ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os exit 0 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: Index: libtool-version =================================================================== RCS file: /cvsroot/ctypes/ctypes/source/gcc/libffi/libtool-version,v retrieving revision 1.1 retrieving revision 1.1.4.1 diff -C2 -d -r1.1 -r1.1.4.1 *** libtool-version 18 Jun 2004 20:07:08 -0000 1.1 --- libtool-version 16 May 2005 23:29:16 -0000 1.1.4.1 *************** *** 4,6 **** # automake. # CURRENT:REVISION:AGE ! 4:0:1 --- 4,6 ---- # automake. # CURRENT:REVISION:AGE ! 4:1:0 Index: acinclude.m4 =================================================================== RCS file: /cvsroot/ctypes/ctypes/source/gcc/libffi/acinclude.m4,v retrieving revision 1.1 retrieving revision 1.1.4.1 diff -C2 -d -r1.1 -r1.1.4.1 *** acinclude.m4 18 Jun 2004 20:07:08 -0000 1.1 --- acinclude.m4 16 May 2005 23:29:16 -0000 1.1.4.1 *************** *** 1,17 **** - sinclude(../libtool.m4) - dnl The lines below arrange for aclocal not to bring libtool.m4 - dnl AC_PROG_LIBTOOL into aclocal.m4, while still arranging for automake - dnl to add a definition of LIBTOOL to Makefile.in. - ifelse(yes,no,[ - AC_DEFUN([AC_PROG_LIBTOOL],) - AC_DEFUN([AM_PROG_LIBTOOL],) - AC_SUBST(LIBTOOL) - ]) - # mmap(2) blacklisting. Some platforms provide the mmap library routine # but don't support all of the features we need from it. AC_DEFUN([AC_FUNC_MMAP_BLACKLIST], ! [if test $ac_cv_header_sys_mman_h != yes \ ! || test $ac_cv_func_mmap != yes; then ac_cv_func_mmap_file=no ac_cv_func_mmap_dev_zero=no --- 1,11 ---- # mmap(2) blacklisting. Some platforms provide the mmap library routine # but don't support all of the features we need from it. AC_DEFUN([AC_FUNC_MMAP_BLACKLIST], ! [ ! AC_CHECK_HEADER([sys/mman.h], ! [libffi_header_sys_mman_h=yes], [libffi_header_sys_mman_h=no]) ! AC_CHECK_FUNC([mmap], [libffi_func_mmap=yes], [libffi_func_mmap=no]) ! if test "$libffi_header_sys_mman_h" != yes \ ! || test "$libffi_func_mmap" != yes; then ac_cv_func_mmap_file=no ac_cv_func_mmap_dev_zero=no *************** *** 97,100 **** fi ]) - - sinclude(../config/accross.m4) --- 91,92 ---- Index: configure.ac =================================================================== RCS file: /cvsroot/ctypes/ctypes/source/gcc/libffi/configure.ac,v retrieving revision 1.1 retrieving revision 1.1.4.1 diff -C2 -d -r1.1 -r1.1.4.1 *** configure.ac 18 Jun 2004 20:07:08 -0000 1.1 --- configure.ac 16 May 2005 23:29:16 -0000 1.1.4.1 *************** *** 11,14 **** --- 11,16 ---- target_alias=${target_alias-$host_alias} + . ${srcdir}/configure.host + AM_INIT_AUTOMAKE *************** *** 43,57 **** i*86-*-solaris*) TARGET=X86; TARGETDIR=x86;; i*86-*-beos*) TARGET=X86; TARGETDIR=x86;; ! i*86-*-freebsd*) TARGET=X86; TARGETDIR=x86;; ! i*86-*-netbsdelf*) TARGET=X86; TARGETDIR=x86;; i*86-*-win32*) TARGET=X86_WIN32; TARGETDIR=x86;; i*86-*-cygwin*) TARGET=X86_WIN32; TARGETDIR=x86;; i*86-*-mingw*) TARGET=X86_WIN32; TARGETDIR=x86;; sparc-sun-4*) TARGET=SPARC; TARGETDIR=sparc;; sparc*-sun-*) TARGET=SPARC; TARGETDIR=sparc;; ! sparc-*-linux* | sparc-*-netbsdelf*) TARGET=SPARC; TARGETDIR=sparc;; ! sparc64-*-linux* | sparc64-*-netbsd*) TARGET=SPARC; TARGETDIR=sparc;; ! alpha*-*-linux* | alpha*-*-osf* | alpha*-*-freebsd* | alpha*-*-netbsd*) TARGET=ALPHA; TARGETDIR=alpha;; ia64*-*-*) TARGET=IA64; TARGETDIR=ia64;; m68k-*-linux*) TARGET=M68K; TARGETDIR=m68k;; mips64*-*);; --- 45,63 ---- i*86-*-solaris*) TARGET=X86; TARGETDIR=x86;; i*86-*-beos*) TARGET=X86; TARGETDIR=x86;; ! i*86-... [truncated message content] |
From: Andreas D. <ad...@us...> - 2005-05-16 23:30:33
|
Update of /cvsroot/ctypes/ctypes/source/gcc/libffi/src/ia64 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20568/source/gcc/libffi/src/ia64 Modified Files: Tag: branch_1_0 unix.S ia64_flags.h ffitarget.h ffi.c Log Message: merged with HEAD Index: unix.S =================================================================== RCS file: /cvsroot/ctypes/ctypes/source/gcc/libffi/src/ia64/unix.S,v retrieving revision 1.1 retrieving revision 1.1.4.1 diff -C2 -d -r1.1 -r1.1.4.1 *** unix.S 18 Jun 2004 20:07:10 -0000 1.1 --- unix.S 16 May 2005 23:28:56 -0000 1.1.4.1 *************** *** 34,327 **** #include "ia64_flags.h" - /* parameters: */ - #define callback in0 - #define ecifp in1 - #define bytes in2 - #define flags in3 - #define raddr in4 - #define fn in5 - - #define FLOAT_SZ 8 /* in-memory size of fp operands */ - - /* Allocate an ia64_args structure on the stack; call ffi_prep_args */ - /* to fill it in with argument values; copy those to the real */ - /* registers, leaving overflow arguments on the stack. Then call fn */ - /* and move the result from registers into *raddr. */ .pred.safe_across_calls p1-p5,p16-p63 .text .align 16 ! .global ffi_call_unix ! .proc ffi_call_unix ffi_call_unix: .prologue ! .save ar.pfs,r38 /* loc0 */ ! alloc loc0=ar.pfs,6,6,8,0 ! .save rp,loc1 ! mov loc1=b0; ! .vframe loc5 ! mov loc5=sp; .body ! sub sp=sp,bytes ! mov loc4=r1 /* Save gp */ ! ld8 r8=[callback],8 /* code address of callback */ ;; ! mov out0=sp ! mov out1=ecifp ! mov out2=bytes ! ld8 r1=[callback] /* Set up gp for callback. Unnecessary? */ ! mov b6=r8 ;; ! br.call.sptk.many b0 = b6 /* call ffi_prep_args */ ! cmp.eq p6,p0=0,r8 /* r8 nonzero ==> need fp regs */ ! ;; ! (p6) add loc2=32+8*FLOAT_SZ,sp ! (p6) br.cond.dptk.many fp_done ! ;; /* Quiets warning; needed? */ ! add loc2=32,sp ! add loc3=32+FLOAT_SZ,sp ;; ! ldfd f8=[loc2],2*FLOAT_SZ ! ldfd f9=[loc3],2*FLOAT_SZ ;; ! ldfd f10=[loc2],2*FLOAT_SZ ! ldfd f11=[loc3],2*FLOAT_SZ ;; ! ldfd f12=[loc2],2*FLOAT_SZ ! ldfd f13=[loc3],2*FLOAT_SZ ;; ! ldfd f14=[loc2],2*FLOAT_SZ ! ldfd f15=[loc3] ;; ! fp_done: ! add r9=16,sp /* Pointer to r8_contents */ ! /* loc2 points at first integer register value. */ ! add loc3=8,loc2 ;; ! ld8 r8=[r9] /* Just in case we return large struct */ ! ld8 out0=[loc2],16 ! ld8 out1=[loc3],16 ;; ! ld8 out2=[loc2],16 ! ld8 out3=[loc3],16 ;; ! ld8 out4=[loc2],16 ! ld8 out5=[loc3],16 ;; ! ld8 out6=[loc2] ! ld8 out7=[loc3] ! /* Set sp to 16 bytes below the first stack parameter. This */ ! /* is the value currently in loc2. */ ! mov sp=loc2 ! ! ld8 r8=[fn],8 ;; ! ld8 r1=[fn] /* Set up gp */ ! mov b6=r8;; ! br.call.sptk.many b0 = b6 /* call fn */ ! ! /* Handle return value. */ ! cmp.eq p6,p0=0,raddr ! cmp.eq p7,p0=FFI_TYPE_INT,flags ! cmp.eq p10,p0=FFI_IS_SMALL_STRUCT2,flags ! cmp.eq p11,p0=FFI_IS_SMALL_STRUCT3,flags ! cmp.eq p12,p0=FFI_IS_SMALL_STRUCT4,flags ;; ! (p6) br.cond.dpnt.few done /* Dont copy ret values if raddr = 0 */ ! (p7) br.cond.dptk.few copy1 ! (p10) br.cond.dpnt.few copy2 ! (p11) br.cond.dpnt.few copy3 ! (p12) br.cond.dpnt.few copy4 ! cmp.eq p8,p0=FFI_TYPE_FLOAT,flags ! cmp.eq p9,p0=FFI_TYPE_DOUBLE,flags ! tbit.nz p6,p0=flags,FLOAT_FP_AGGREGATE_BIT ! tbit.nz p7,p0=flags,DOUBLE_FP_AGGREGATE_BIT ;; ! (p8) stfs [raddr]=f8 ! (p9) stfd [raddr]=f8 ;; - .label_state 1 - (p6) br.cond.dpnt.few handle_float_hfa - (p7) br.cond.dpnt.few handle_double_hfa - br done ! copy4: ! add loc3=24,raddr ;; ! st8 [loc3]=r11 ! copy3: ! add loc3=16,raddr ;; ! st8 [loc3]=r10 ! copy2: ! add loc3=8,raddr ;; - st8 [loc3]=r9 - copy1: - st8 [raddr]=r8 - /* In the big struct case, raddr was passed as an argument. */ - /* In the void case there was nothing to do. */ ! done: ! mov r1=loc4 /* Restore gp */ mov ar.pfs = loc0 mov b0 = loc1 ! .restore sp ! mov sp = loc5 br.ret.sptk.many b0 ! handle_double_hfa: ! .body ! .copy_state 1 ! /* Homogeneous floating point array of doubles is returned in */ ! /* registers f8-f15. Save one at a time to return area. */ ! and flags=0xf,flags /* Retrieve size */ ;; ! cmp.eq p6,p0=2,flags ! cmp.eq p7,p0=3,flags ! cmp.eq p8,p0=4,flags ! cmp.eq p9,p0=5,flags ! cmp.eq p10,p0=6,flags ! cmp.eq p11,p0=7,flags ! cmp.eq p12,p0=8,flags ;; ! (p6) br.cond.dptk.few dhfa2 ! (p7) br.cond.dptk.few dhfa3 ! (p8) br.cond.dptk.few dhfa4 ! (p9) br.cond.dptk.few dhfa5 ! (p10) br.cond.dptk.few dhfa6 ! (p11) br.cond.dptk.few dhfa7 ! dhfa8: add loc3=7*8,raddr ;; ! stfd [loc3]=f15 ! dhfa7: add loc3=6*8,raddr ;; ! stfd [loc3]=f14 ! dhfa6: add loc3=5*8,raddr ;; ! stfd [loc3]=f13 ! dhfa5: add loc3=4*8,raddr ;; ! stfd [loc3]=f12 ! dhfa4: add loc3=3*8,raddr ;; ! stfd [loc3]=f11 ! dhfa3: add loc3=2*8,raddr ;; ! stfd [loc3]=f10 ! dhfa2: add loc3=1*8,raddr ;; - stfd [loc3]=f9 - stfd [raddr]=f8 - br done ! handle_float_hfa: ! /* Homogeneous floating point array of floats is returned in */ ! /* registers f8-f15. Save one at a time to return area. */ ! and flags=0xf,flags /* Retrieve size */ ;; ! cmp.eq p6,p0=2,flags ! cmp.eq p7,p0=3,flags ! cmp.eq p8,p0=4,flags ! cmp.eq p9,p0=5,flags ! cmp.eq p10,p0=6,flags ! cmp.eq p11,p0=7,flags ! cmp.eq p12,p0=8,flags ;; ! (p6) br.cond.dptk.few shfa2 ! (p7) br.cond.dptk.few shfa3 ! (p8) br.cond.dptk.few shfa4 ! (p9) br.cond.dptk.few shfa5 ! (p10) br.cond.dptk.few shfa6 ! (p11) br.cond.dptk.few shfa7 ! shfa8: add loc3=7*4,raddr ;; ! stfd [loc3]=f15 ! shfa7: add loc3=6*4,raddr ;; ! stfd [loc3]=f14 ! shfa6: add loc3=5*4,raddr ;; ! stfd [loc3]=f13 ! shfa5: add loc3=4*4,raddr ;; ! stfd [loc3]=f12 ! shfa4: add loc3=3*4,raddr ;; ! stfd [loc3]=f11 ! shfa3: add loc3=2*4,raddr ;; ! stfd [loc3]=f10 ! shfa2: add loc3=1*4,raddr ;; ! stfd [loc3]=f9 ! stfd [raddr]=f8 ! br done ! .endp ffi_call_unix ! .pred.safe_across_calls p1-p5,p16-p63 ! .text ! .align 16 ! .global ffi_closure_UNIX ! .proc ffi_closure_UNIX ! ffi_closure_UNIX: ! .prologue ! .save ar.pfs,r40 /* loc0 */ ! alloc loc0=ar.pfs,8,3,2,0 ! .save rp,loc1 ! mov loc1=b0 ! .vframe loc2 ! mov loc2=sp ! /* Retrieve closure pointer and real gp. */ ! mov out0=gp ! add gp=16,gp ;; ! ld8 gp=[gp] ! /* Reserve a structia64_args on the stack such that arguments */ ! /* past the first 8 are automatically placed in the right */ ! /* slot. Note that when we start the sp points at 2 8-byte */ ! /* scratch words, followed by the extra arguments. */ ! # define BASIC_ARGS_SZ (8*FLOAT_SZ+8*8+2*8) ! # define FIRST_FP_OFFSET (4*8) ! add r14=-(BASIC_ARGS_SZ-FIRST_FP_OFFSET),sp ! add r15=-(BASIC_ARGS_SZ-FIRST_FP_OFFSET-FLOAT_SZ),sp ! add sp=-BASIC_ARGS_SZ,sp ! /* r14 points to fp_regs[0], r15 points to fp_regs[1] */ ;; ! stfd [r14]=f8,2*FLOAT_SZ ! stfd [r15]=f9,2*FLOAT_SZ ;; ! stfd [r14]=f10,2*FLOAT_SZ ! stfd [r15]=f11,2*FLOAT_SZ ;; ! stfd [r14]=f12,2*FLOAT_SZ ! stfd [r15]=f13,2*FLOAT_SZ ;; ! stfd [r14]=f14,2*FLOAT_SZ ! stfd [r15]=f15,FLOAT_SZ+8 ;; ! /* r14 points to first parameter register area, r15 to second. */ ! st8 [r14]=in0,2*8 ! st8 [r15]=in1,2*8 ;; ! st8 [r14]=in2,2*8 ! st8 [r15]=in3,2*8 ;; ! st8 [r14]=in4,2*8 ! st8 [r15]=in5,2*8 ;; ! st8 [r14]=in6,2*8 ! st8 [r15]=in7,2*8 ! /* Call ffi_closure_UNIX_inner */ ! mov out1=sp ! br.call.sptk.many b0=ffi_closure_UNIX_inner ;; ! mov b0=loc1 ! mov ar.pfs=loc0 .restore sp ! mov sp=loc2 br.ret.sptk.many b0 ! .endp ffi_closure_UNIX ! --- 34,555 ---- #include "ia64_flags.h" .pred.safe_across_calls p1-p5,p16-p63 .text + + /* int ffi_call_unix (struct ia64_args *stack, PTR64 rvalue, + void (*fn)(), int flags); + */ + .align 16 ! .global ffi_call_unix ! .proc ffi_call_unix ffi_call_unix: .prologue ! /* Bit o trickiness. We actually share a stack frame with ffi_call. ! Rely on the fact that ffi_call uses a vframe and don't bother ! tracking one here at all. */ ! .fframe 0 ! .save ar.pfs, r36 // loc0 ! alloc loc0 = ar.pfs, 4, 3, 8, 0 ! .save rp, loc1 ! mov loc1 = b0 .body ! add r16 = 16, in0 ! mov loc2 = gp ! mov r8 = in1 ;; ! ! /* Load up all of the argument registers. */ ! ldf.fill f8 = [in0], 32 ! ldf.fill f9 = [r16], 32 ;; ! ldf.fill f10 = [in0], 32 ! ldf.fill f11 = [r16], 32 ;; ! ldf.fill f12 = [in0], 32 ! ldf.fill f13 = [r16], 32 ;; ! ldf.fill f14 = [in0], 32 ! ldf.fill f15 = [r16], 24 ;; ! ld8 out0 = [in0], 16 ! ld8 out1 = [r16], 16 ;; ! ld8 out2 = [in0], 16 ! ld8 out3 = [r16], 16 ;; ! ld8 out4 = [in0], 16 ! ld8 out5 = [r16], 16 ;; ! ld8 out6 = [in0] ! ld8 out7 = [r16] ;; ! ! /* Deallocate the register save area from the stack frame. */ ! mov sp = in0 ! ! /* Call the target function. */ ! ld8 r16 = [in2], 8 ;; ! ld8 gp = [in2] ! mov b6 = r16 ! br.call.sptk.many b0 = b6 ;; ! ! /* Dispatch to handle return value. */ ! mov gp = loc2 ! zxt1 r16 = in3 ;; ! mov ar.pfs = loc0 ! addl r18 = @ltoffx(.Lst_table), gp ;; ! ld8.mov r18 = [r18], .Lst_table ! mov b0 = loc1 ;; ! shladd r18 = r16, 3, r18 ! ;; ! ld8 r17 = [r18] ! shr in3 = in3, 8 ! ;; ! add r17 = r17, r18 ! ;; ! mov b6 = r17 ! br b6 ;; ! .Lst_void: ! br.ret.sptk.many b0 ;; ! .Lst_uint8: ! zxt1 r8 = r8 ;; ! st8 [in1] = r8 ! br.ret.sptk.many b0 ! ;; ! .Lst_sint8: ! sxt1 r8 = r8 ! ;; ! st8 [in1] = r8 ! br.ret.sptk.many b0 ! ;; ! .Lst_uint16: ! zxt2 r8 = r8 ! ;; ! st8 [in1] = r8 ! br.ret.sptk.many b0 ! ;; ! .Lst_sint16: ! sxt2 r8 = r8 ! ;; ! st8 [in1] = r8 ! br.ret.sptk.many b0 ! ;; ! .Lst_uint32: ! zxt4 r8 = r8 ! ;; ! st8 [in1] = r8 ! br.ret.sptk.many b0 ! ;; ! .Lst_sint32: ! sxt4 r8 = r8 ! ;; ! st8 [in1] = r8 ! br.ret.sptk.many b0 ! ;; ! .Lst_int64: ! st8 [in1] = r8 ! br.ret.sptk.many b0 ! ;; ! .Lst_float: ! stfs [in1] = f8 ! br.ret.sptk.many b0 ! ;; ! .Lst_double: ! stfd [in1] = f8 ! br.ret.sptk.many b0 ! ;; ! .Lst_ldouble: ! stfe [in1] = f8 ! br.ret.sptk.many b0 ;; ! .Lst_small_struct: ! add sp = -16, sp ! cmp.lt p6, p0 = 8, in3 ! cmp.lt p7, p0 = 16, in3 ! cmp.lt p8, p0 = 24, in3 ! ;; ! add r16 = 8, sp ! add r17 = 16, sp ! add r18 = 24, sp ! ;; ! st8 [sp] = r8 ! (p6) st8 [r16] = r9 ! mov out0 = in1 ! (p7) st8 [r17] = r10 ! (p8) st8 [r18] = r11 ! mov out1 = sp ! mov out2 = in3 ! br.call.sptk.many b0 = memcpy# ! ;; mov ar.pfs = loc0 mov b0 = loc1 ! mov gp = loc2 br.ret.sptk.many b0 ! .Lst_hfa_float: ! add r16 = 4, in1 ! cmp.lt p6, p0 = 4, in3 ;; ! stfs [in1] = f8, 8 ! (p6) stfs [r16] = f9, 8 ! cmp.lt p7, p0 = 8, in3 ! cmp.lt p8, p0 = 12, in3 ;; ! (p7) stfs [in1] = f10, 8 ! (p8) stfs [r16] = f11, 8 ! cmp.lt p9, p0 = 16, in3 ! cmp.lt p10, p0 = 20, in3 ;; ! (p9) stfs [in1] = f12, 8 ! (p10) stfs [r16] = f13, 8 ! cmp.lt p6, p0 = 24, in3 ! cmp.lt p7, p0 = 28, in3 ;; ! (p6) stfs [in1] = f14 ! (p7) stfs [r16] = f15 ! br.ret.sptk.many b0 ;; ! ! .Lst_hfa_double: ! add r16 = 8, in1 ! cmp.lt p6, p0 = 8, in3 ;; ! stfd [in1] = f8, 16 ! (p6) stfd [r16] = f9, 16 ! cmp.lt p7, p0 = 16, in3 ! cmp.lt p8, p0 = 24, in3 ;; ! (p7) stfd [in1] = f10, 16 ! (p8) stfd [r16] = f11, 16 ! cmp.lt p9, p0 = 32, in3 ! cmp.lt p10, p0 = 40, in3 ;; ! (p9) stfd [in1] = f12, 16 ! (p10) stfd [r16] = f13, 16 ! cmp.lt p6, p0 = 48, in3 ! cmp.lt p7, p0 = 56, in3 ! ;; ! (p6) stfd [in1] = f14 ! (p7) stfd [r16] = f15 ! br.ret.sptk.many b0 ;; ! .Lst_hfa_ldouble: ! add r16 = 16, in1 ! cmp.lt p6, p0 = 16, in3 ;; ! stfe [in1] = f8, 32 ! (p6) stfe [r16] = f9, 32 ! cmp.lt p7, p0 = 32, in3 ! cmp.lt p8, p0 = 48, in3 ;; ! (p7) stfe [in1] = f10, 32 ! (p8) stfe [r16] = f11, 32 ! cmp.lt p9, p0 = 64, in3 ! cmp.lt p10, p0 = 80, in3 ;; ! (p9) stfe [in1] = f12, 32 ! (p10) stfe [r16] = f13, 32 ! cmp.lt p6, p0 = 96, in3 ! cmp.lt p7, p0 = 112, in3 ;; ! (p6) stfe [in1] = f14 ! (p7) stfe [r16] = f15 ! br.ret.sptk.many b0 ;; ! ! .endp ffi_call_unix ! ! .align 16 ! .global ffi_closure_unix ! .proc ffi_closure_unix ! ! #define FRAME_SIZE (8*16 + 8*8 + 8*16) ! ! ffi_closure_unix: ! .prologue ! .save ar.pfs, r40 // loc0 ! alloc loc0 = ar.pfs, 8, 4, 4, 0 ! .fframe FRAME_SIZE ! add r12 = -FRAME_SIZE, r12 ! .save rp, loc1 ! mov loc1 = b0 ! .save ar.unat, loc2 ! mov loc2 = ar.unat ! .body ! ! /* Retrieve closure pointer and real gp. */ ! #ifdef _ILP32 ! addp4 out0 = 0, gp ! addp4 gp = 16, gp ! #else ! mov out0 = gp ! add gp = 16, gp ! #endif ;; ! ld8 gp = [gp] ! ! /* Spill all of the possible argument registers. */ ! add r16 = 16 + 8*16, sp ! add r17 = 16 + 8*16 + 16, sp ;; ! stf.spill [r16] = f8, 32 ! stf.spill [r17] = f9, 32 ! mov loc3 = gp ;; ! stf.spill [r16] = f10, 32 ! stf.spill [r17] = f11, 32 ;; ! stf.spill [r16] = f12, 32 ! stf.spill [r17] = f13, 32 ! ;; ! stf.spill [r16] = f14, 32 ! stf.spill [r17] = f15, 24 ! ;; ! .mem.offset 0, 0 ! st8.spill [r16] = in0, 16 ! .mem.offset 8, 0 ! st8.spill [r17] = in1, 16 ! add out1 = 16 + 8*16, sp ! ;; ! .mem.offset 0, 0 ! st8.spill [r16] = in2, 16 ! .mem.offset 8, 0 ! st8.spill [r17] = in3, 16 ! add out2 = 16, sp ! ;; ! .mem.offset 0, 0 ! st8.spill [r16] = in4, 16 ! .mem.offset 8, 0 ! st8.spill [r17] = in5, 16 ! mov out3 = r8 ! ;; ! .mem.offset 0, 0 ! st8.spill [r16] = in6 ! .mem.offset 8, 0 ! st8.spill [r17] = in7 ! /* Invoke ffi_closure_unix_inner for the hard work. */ ! br.call.sptk.many b0 = ffi_closure_unix_inner ! ;; + /* Dispatch to handle return value. */ + mov gp = loc3 + zxt1 r16 = r8 + ;; + addl r18 = @ltoffx(.Lld_table), gp + mov ar.pfs = loc0 + ;; + ld8.mov r18 = [r18], .Lld_table + mov b0 = loc1 + ;; + shladd r18 = r16, 3, r18 + mov ar.unat = loc2 + ;; + ld8 r17 = [r18] + shr r8 = r8, 8 + ;; + add r17 = r17, r18 + add r16 = 16, sp + ;; + mov b6 = r17 + br b6 + ;; + .label_state 1 ! .Lld_void: ! .restore sp ! add sp = FRAME_SIZE, sp ! br.ret.sptk.many b0 ;; ! .Lld_int: ! .body ! .copy_state 1 ! ld8 r8 = [r16] ! .restore sp ! add sp = FRAME_SIZE, sp ! br.ret.sptk.many b0 ;; ! .Lld_float: ! .body ! .copy_state 1 ! ldfs f8 = [r16] ! .restore sp ! add sp = FRAME_SIZE, sp ! br.ret.sptk.many b0 ;; ! .Lld_double: ! .body ! .copy_state 1 ! ldfd f8 = [r16] ! .restore sp ! add sp = FRAME_SIZE, sp ! br.ret.sptk.many b0 ;; ! .Lld_ldouble: ! .body ! .copy_state 1 ! ldfe f8 = [r16] ! .restore sp ! add sp = FRAME_SIZE, sp ! br.ret.sptk.many b0 ;; ! ! .Lld_small_struct: ! .body ! .copy_state 1 ! add r17 = 8, r16 ! cmp.lt p6, p0 = 8, r8 ! cmp.lt p7, p0 = 16, r8 ! cmp.lt p8, p0 = 24, r8 ;; ! ld8 r8 = [r16], 16 ! (p6) ld8 r9 = [r17], 16 ;; ! (p7) ld8 r10 = [r16] ! (p8) ld8 r11 = [r17] ! .restore sp ! add sp = FRAME_SIZE, sp ! br.ret.sptk.many b0 ;; ! ! .Lld_hfa_float: ! .body ! .copy_state 1 ! add r17 = 4, r16 ! cmp.lt p6, p0 = 4, r8 ;; ! ldfs f8 = [r16], 8 ! (p6) ldfs f9 = [r17], 8 ! cmp.lt p7, p0 = 8, r8 ! cmp.lt p8, p0 = 12, r8 ;; ! (p7) ldfs f10 = [r16], 8 ! (p8) ldfs f11 = [r17], 8 ! cmp.lt p9, p0 = 16, r8 ! cmp.lt p10, p0 = 20, r8 ! ;; ! (p9) ldfs f12 = [r16], 8 ! (p10) ldfs f13 = [r17], 8 ! cmp.lt p6, p0 = 24, r8 ! cmp.lt p7, p0 = 28, r8 ! ;; ! (p6) ldfs f14 = [r16] ! (p7) ldfs f15 = [r17] .restore sp ! add sp = FRAME_SIZE, sp br.ret.sptk.many b0 ! ;; ! ! .Lld_hfa_double: ! .body ! .copy_state 1 ! add r17 = 8, r16 ! cmp.lt p6, p0 = 8, r8 ! ;; ! ldfd f8 = [r16], 16 ! (p6) ldfd f9 = [r17], 16 ! cmp.lt p7, p0 = 16, r8 ! cmp.lt p8, p0 = 24, r8 ! ;; ! (p7) ldfd f10 = [r16], 16 ! (p8) ldfd f11 = [r17], 16 ! cmp.lt p9, p0 = 32, r8 ! cmp.lt p10, p0 = 40, r8 ! ;; ! (p9) ldfd f12 = [r16], 16 ! (p10) ldfd f13 = [r17], 16 ! cmp.lt p6, p0 = 48, r8 ! cmp.lt p7, p0 = 56, r8 ! ;; ! (p6) ldfd f14 = [r16] ! (p7) ldfd f15 = [r17] ! .restore sp ! add sp = FRAME_SIZE, sp ! br.ret.sptk.many b0 ! ;; + .Lld_hfa_ldouble: + .body + .copy_state 1 + add r17 = 16, r16 + cmp.lt p6, p0 = 16, r8 + ;; + ldfe f8 = [r16], 32 + (p6) ldfe f9 = [r17], 32 + cmp.lt p7, p0 = 32, r8 + cmp.lt p8, p0 = 48, r8 + ;; + (p7) ldfe f10 = [r16], 32 + (p8) ldfe f11 = [r17], 32 + cmp.lt p9, p0 = 64, r8 + cmp.lt p10, p0 = 80, r8 + ;; + (p9) ldfe f12 = [r16], 32 + (p10) ldfe f13 = [r17], 32 + cmp.lt p6, p0 = 96, r8 + cmp.lt p7, p0 = 112, r8 + ;; + (p6) ldfe f14 = [r16] + (p7) ldfe f15 = [r17] + .restore sp + add sp = FRAME_SIZE, sp + br.ret.sptk.many b0 + ;; + + .endp ffi_closure_unix + + .section .rodata + .align 8 + .Lst_table: + data8 @pcrel(.Lst_void) // FFI_TYPE_VOID + data8 @pcrel(.Lst_sint32) // FFI_TYPE_INT + data8 @pcrel(.Lst_float) // FFI_TYPE_FLOAT + data8 @pcrel(.Lst_double) // FFI_TYPE_DOUBLE + data8 @pcrel(.Lst_ldouble) // FFI_TYPE_LONGDOUBLE + data8 @pcrel(.Lst_uint8) // FFI_TYPE_UINT8 + data8 @pcrel(.Lst_sint8) // FFI_TYPE_SINT8 + data8 @pcrel(.Lst_uint16) // FFI_TYPE_UINT16 + data8 @pcrel(.Lst_sint16) // FFI_TYPE_SINT16 + data8 @pcrel(.Lst_uint32) // FFI_TYPE_UINT32 + data8 @pcrel(.Lst_sint32) // FFI_TYPE_SINT32 + data8 @pcrel(.Lst_int64) // FFI_TYPE_UINT64 + data8 @pcrel(.Lst_int64) // FFI_TYPE_SINT64 + data8 @pcrel(.Lst_void) // FFI_TYPE_STRUCT + data8 @pcrel(.Lst_int64) // FFI_TYPE_POINTER + data8 @pcrel(.Lst_small_struct) // FFI_IA64_TYPE_SMALL_STRUCT + data8 @pcrel(.Lst_hfa_float) // FFI_IA64_TYPE_HFA_FLOAT + data8 @pcrel(.Lst_hfa_double) // FFI_IA64_TYPE_HFA_DOUBLE + data8 @pcrel(.Lst_hfa_ldouble) // FFI_IA64_TYPE_HFA_LDOUBLE + + .Lld_table: + data8 @pcrel(.Lld_void) // FFI_TYPE_VOID + data8 @pcrel(.Lld_int) // FFI_TYPE_INT + data8 @pcrel(.Lld_float) // FFI_TYPE_FLOAT + data8 @pcrel(.Lld_double) // FFI_TYPE_DOUBLE + data8 @pcrel(.Lld_ldouble) // FFI_TYPE_LONGDOUBLE + data8 @pcrel(.Lld_int) // FFI_TYPE_UINT8 + data8 @pcrel(.Lld_int) // FFI_TYPE_SINT8 + data8 @pcrel(.Lld_int) // FFI_TYPE_UINT16 + data8 @pcrel(.Lld_int) // FFI_TYPE_SINT16 + data8 @pcrel(.Lld_int) // FFI_TYPE_UINT32 + data8 @pcrel(.Lld_int) // FFI_TYPE_SINT32 + data8 @pcrel(.Lld_int) // FFI_TYPE_UINT64 + data8 @pcrel(.Lld_int) // FFI_TYPE_SINT64 + data8 @pcrel(.Lld_void) // FFI_TYPE_STRUCT + data8 @pcrel(.Lld_int) // FFI_TYPE_POINTER + data8 @pcrel(.Lld_small_struct) // FFI_IA64_TYPE_SMALL_STRUCT + data8 @pcrel(.Lld_hfa_float) // FFI_IA64_TYPE_HFA_FLOAT + data8 @pcrel(.Lld_hfa_double) // FFI_IA64_TYPE_HFA_DOUBLE + data8 @pcrel(.Lld_hfa_ldouble) // FFI_IA64_TYPE_HFA_LDOUBLE Index: ffi.c =================================================================== RCS file: /cvsroot/ctypes/ctypes/source/gcc/libffi/src/ia64/ffi.c,v retrieving revision 1.1 retrieving revision 1.1.4.1 diff -C2 -d -r1.1 -r1.1.4.1 *** ffi.c 18 Jun 2004 20:07:10 -0000 1.1 --- ffi.c 16 May 2005 23:29:12 -0000 1.1.4.1 *************** *** 30,671 **** #include <stdlib.h> #include <stdbool.h> #include "ia64_flags.h" ! /* Memory image of fp register contents. Should eventually be an fp */ ! /* type long enough to hold an entire register. For now we use double. */ ! typedef double float80; ! /* The stack layout at call to ffi_prep_args. Other_args will remain */ [...1146 lines suppressed...] ! if (offset < size) ! memcpy (addr + offset, (char *)stack->gp_regs + gp_offset, ! size - offset); } + else + avalue[i] = &stack->gp_regs[gpcount]; + + gpcount += (size + 7) / 8; } break; default: ! abort (); } } ! closure->fun (cif, rvalue, avalue, closure->user_data); ! return cif->flags; } Index: ia64_flags.h =================================================================== RCS file: /cvsroot/ctypes/ctypes/source/gcc/libffi/src/ia64/ia64_flags.h,v retrieving revision 1.1 retrieving revision 1.1.4.1 diff -C2 -d -r1.1 -r1.1.4.1 *** ia64_flags.h 18 Jun 2004 20:07:10 -0000 1.1 --- ia64_flags.h 16 May 2005 23:29:12 -0000 1.1.4.1 *************** *** 26,62 **** ----------------------------------------------------------------------- */ ! /* Homogeneous Floating Point Aggregates (HFAs) which are returned */ ! /* in FP registers. The least significant bits specify the size in */ ! /* words. */ ! #define FFI_IS_FLOAT_FP_AGGREGATE 0x1000 ! #define FFI_IS_DOUBLE_FP_AGGREGATE 0x0800 ! #define FLOAT_FP_AGGREGATE_BIT 12 ! #define DOUBLE_FP_AGGREGATE_BIT 11 ! ! /* Small structures containing N words. If N=1, they are returned */ ! /* as though they were integers. */ ! #define FFI_IS_SMALL_STRUCT2 0x40 /* Struct > 8, <=16 bytes */ ! #define FFI_IS_SMALL_STRUCT3 0x41 /* Struct > 16 <= 24 bytes */ ! #define FFI_IS_SMALL_STRUCT4 0x42 /* Struct > 24, <=32 bytes */ ! ! /* Flag values identifying particularly simple cases, which are */ ! /* handled specially. We treat functions as simple if they take all */ ! /* arguments can be passed as 32 or 64 bit integer quantities, there is */ ! /* either no return value or it can be treated as a 64bit integer, and */ ! /* if there are at most 2 arguments. */ ! /* This is OR'ed with the normal flag values. */ ! #define FFI_SIMPLE_V 0x10000 /* () -> X */ ! #define FFI_SIMPLE_I 0x20000 /* (int) -> X */ ! #define FFI_SIMPLE_L 0x30000 /* (long) -> X */ ! #define FFI_SIMPLE_II 0x40000 /* (int,int) -> X */ ! #define FFI_SIMPLE_IL 0x50000 /* (int,long) -> X */ ! #define FFI_SIMPLE_LI 0x60000 /* (long,int) -> X */ ! #define FFI_SIMPLE_LL 0x70000 /* (long,long) -> X */ ! ! /* Mask for all of the FFI_SIMPLE bits: */ ! #define FFI_SIMPLE 0xf0000 ! /* An easy way to build FFI_SIMPLE flags from FFI_SIMPLE_V: */ ! #define FFI_ADD_LONG_ARG(flag) (((flag) << 1) | 0x10000) ! #define FFI_ADD_INT_ARG(flag) ((flag) << 1) --- 26,39 ---- ----------------------------------------------------------------------- */ + /* "Type" codes used between assembly and C. When used as a part of + a cfi->flags value, the low byte will be these extra type codes, + and bits 8-31 will be the actual size of the type. */ ! /* Small structures containing N words in integer registers. */ ! #define FFI_IA64_TYPE_SMALL_STRUCT (FFI_TYPE_LAST + 1) ! /* Homogeneous Floating Point Aggregates (HFAs) which are returned ! in FP registers. */ ! #define FFI_IA64_TYPE_HFA_FLOAT (FFI_TYPE_LAST + 2) ! #define FFI_IA64_TYPE_HFA_DOUBLE (FFI_TYPE_LAST + 3) ! #define FFI_IA64_TYPE_HFA_LDOUBLE (FFI_TYPE_LAST + 4) Index: ffitarget.h =================================================================== RCS file: /cvsroot/ctypes/ctypes/source/gcc/libffi/src/ia64/ffitarget.h,v retrieving revision 1.1 retrieving revision 1.1.4.1 diff -C2 -d -r1.1 -r1.1.4.1 *** ffitarget.h 18 Jun 2004 20:07:10 -0000 1.1 --- ffitarget.h 16 May 2005 23:29:12 -0000 1.1.4.1 *************** *** 28,33 **** #ifndef LIBFFI_ASM ! typedef unsigned long ffi_arg; ! typedef signed long ffi_sarg; typedef enum ffi_abi { --- 28,33 ---- #ifndef LIBFFI_ASM ! typedef unsigned long long ffi_arg; ! typedef signed long long ffi_sarg; typedef enum ffi_abi { *************** *** 46,58 **** /* descriptor: */ - #ifndef LIBFFI_ASM - struct ffi_ia64_trampoline_struct { - void * code_pointer; /* Pointer to ffi_closure_UNIX */ - void * fake_gp; /* Pointer to closure, installed as gp */ - void * real_gp; /* Real gp value, reinstalled by */ - /* ffi_closure_UNIX. */ - }; - #endif - #endif --- 46,49 ---- |
From: Andreas D. <ad...@us...> - 2005-05-16 23:30:33
|
Update of /cvsroot/ctypes/ctypes/source/gcc/libffi/src/powerpc/CVS.gcc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20568/source/gcc/libffi/src/powerpc/CVS.gcc Added Files: Tag: branch_1_0 Root Repository Entries Log Message: merged with HEAD --- NEW FILE: Root --- :ext:an...@sa...:/cvsroot/gcc --- NEW FILE: Repository --- gcc/libffi/src/powerpc --- NEW FILE: Entries --- /aix.S/1.5/Thu Sep 2 21:07:21 2004// /aix_closure.S/1.5/Thu Sep 2 21:07:21 2004// /asm.h/1.2/Thu Sep 2 21:07:21 2004/-ko/ /darwin.S/1.12/Thu Mar 24 00:45:38 2005// /darwin_closure.S/1.11/Thu Mar 24 00:45:38 2005// /ffi.c/1.12/Wed Feb 23 14:05:12 2005/-ko/ /ffi_darwin.c/1.13/Thu Sep 2 21:14:45 2004// /ffitarget.h/1.2/Thu Sep 2 21:07:21 2004// /linux64.S/1.7/Thu Sep 2 21:07:21 2004// /linux64_closure.S/1.7/Thu Sep 2 21:07:21 2004// /ppc_closure.S/1.9/Thu Sep 2 21:07:21 2004// /sysv.S/1.6/Thu Sep 2 21:07:21 2004/-ko/ D |
From: Andreas D. <ad...@us...> - 2005-05-16 23:30:32
|
Update of /cvsroot/ctypes/ctypes/source/gcc/libffi/src/frv/CVS.gcc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20568/source/gcc/libffi/src/frv/CVS.gcc Added Files: Tag: branch_1_0 Root Repository Entries Log Message: merged with HEAD --- NEW FILE: Root --- :ext:an...@sa...:/cvsroot/gcc --- NEW FILE: Repository --- gcc/libffi/src/frv --- NEW FILE: Entries --- /eabi.S/1.1/Mon Aug 30 15:43:03 2004/-ko/ /ffi.c/1.1/Mon Aug 30 15:43:03 2004// /ffitarget.h/1.2/Tue Feb 8 21:10:50 2005// D |
From: Andreas D. <ad...@us...> - 2005-05-16 23:30:32
|
Update of /cvsroot/ctypes/ctypes/source/gcc/libffi/src/cris/CVS.gcc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20568/source/gcc/libffi/src/cris/CVS.gcc Added Files: Tag: branch_1_0 Root Repository Entries Log Message: merged with HEAD --- NEW FILE: Root --- :ext:an...@sa...:/cvsroot/gcc --- NEW FILE: Repository --- gcc/libffi/src/cris --- NEW FILE: Entries --- /ffi.c/1.1/Mon Apr 18 17:08:57 2005// /ffitarget.h/1.1/Mon Apr 18 17:08:57 2005// /sysv.S/1.1/Mon Apr 18 17:08:57 2005// D |
From: Andreas D. <ad...@us...> - 2005-05-16 23:30:32
|
Update of /cvsroot/ctypes/ctypes/source/gcc/libffi/src/m68k/CVS.gcc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20568/source/gcc/libffi/src/m68k/CVS.gcc Added Files: Tag: branch_1_0 Root Repository Entries Log Message: merged with HEAD --- NEW FILE: Root --- :ext:an...@sa...:/cvsroot/gcc --- NEW FILE: Repository --- gcc/libffi/src/m68k --- NEW FILE: Entries --- /ffi.c/1.2/Thu Jul 18 23:08:30 2002/-ko/ /ffitarget.h/1.1/Tue Oct 21 19:07:50 2003// /sysv.S/1.2/Tue Oct 21 19:01:56 2003/-ko/ D |
From: Andreas D. <ad...@us...> - 2005-05-16 23:30:32
|
Update of /cvsroot/ctypes/ctypes/source/gcc/libffi/src/ia64/CVS.gcc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20568/source/gcc/libffi/src/ia64/CVS.gcc Added Files: Tag: branch_1_0 Root Repository Entries Log Message: merged with HEAD --- NEW FILE: Root --- :ext:an...@sa...:/cvsroot/gcc --- NEW FILE: Repository --- gcc/libffi/src/ia64 --- NEW FILE: Entries --- /ffi.c/1.7/Fri Dec 31 20:11:17 2004// /ffitarget.h/1.4/Thu Mar 31 01:22:46 2005// /ia64_flags.h/1.2/Fri Dec 31 20:11:17 2004// /unix.S/1.8/Wed Mar 30 21:49:19 2005// D |
From: Andreas D. <ad...@us...> - 2005-05-16 23:30:32
|
Update of /cvsroot/ctypes/ctypes/source/gcc/libffi/src/CVS.gcc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20568/source/gcc/libffi/src/CVS.gcc Added Files: Tag: branch_1_0 Root Repository Entries Log Message: merged with HEAD --- NEW FILE: Root --- :ext:an...@sa...:/cvsroot/gcc --- NEW FILE: Repository --- gcc/libffi/src --- NEW FILE: Entries --- /debug.c/1.3/Tue Oct 21 19:01:54 2003/-ko/ /ffitest.c/1.13/Fri Apr 18 12:32:36 2003/-ko/ /java_raw_api.c/1.6/Thu Oct 23 20:24:20 2003// /prep_cif.c/1.10/Mon Apr 18 17:08:57 2005/-ko/ /raw_api.c/1.3/Tue Oct 21 19:01:54 2003/-ko/ /types.c/1.19/Fri Dec 31 22:04:30 2004/-ko/ D/alpha//// D/arm//// D/cris//// D/frv//// D/ia64//// D/m32r//// D/m68k//// D/mips//// D/pa//// D/powerpc//// D/s390//// D/sh//// D/sh64//// D/sparc//// D/x86//// |
From: Andreas D. <ad...@us...> - 2005-05-16 23:30:28
|
Update of /cvsroot/ctypes/ctypes/source/gcc/libffi/src/pa/CVS.gcc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20568/source/gcc/libffi/src/pa/CVS.gcc Added Files: Tag: branch_1_0 Root Repository Entries Log Message: merged with HEAD --- NEW FILE: Root --- :ext:an...@sa...:/cvsroot/gcc --- NEW FILE: Repository --- gcc/libffi/src/pa --- NEW FILE: Entries --- /ffi.c/1.1/Fri Mar 19 22:34:17 2004// /ffitarget.h/1.1/Fri Mar 19 22:34:17 2004// /linux.S/1.2/Sat Mar 20 11:58:01 2004// D |
From: Andreas D. <ad...@us...> - 2005-05-16 23:30:28
|
Update of /cvsroot/ctypes/ctypes/source/gcc/libffi/src/sparc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20568/source/gcc/libffi/src/sparc Modified Files: Tag: branch_1_0 v8.S ffi.c Log Message: merged with HEAD Index: ffi.c =================================================================== RCS file: /cvsroot/ctypes/ctypes/source/gcc/libffi/src/sparc/ffi.c,v retrieving revision 1.1 retrieving revision 1.1.4.1 diff -C2 -d -r1.1 -r1.1.4.1 *** ffi.c 18 Jun 2004 20:07:14 -0000 1.1 --- ffi.c 16 May 2005 23:28:52 -0000 1.1.4.1 *************** *** 471,475 **** int ffi_closure_sparc_inner_v8(ffi_closure *closure, ! void *rvalue, unsigned long *gpr) { ffi_cif *cif; --- 471,475 ---- int ffi_closure_sparc_inner_v8(ffi_closure *closure, ! void *rvalue, unsigned long *gpr, unsigned long *scratch) { ffi_cif *cif; *************** *** 506,509 **** --- 506,522 ---- avalue[i] = (void *)gpr[argn++]; } + else if ((arg_types[i]->type == FFI_TYPE_DOUBLE + || arg_types[i]->type == FFI_TYPE_SINT64 + || arg_types[i]->type == FFI_TYPE_UINT64) + /* gpr is 8-byte aligned. */ + && (argn % 2) != 0) + { + /* Align on a 8-byte boundary. */ + scratch[0] = gpr[argn]; + scratch[1] = gpr[argn+1]; + avalue[i] = scratch; + scratch -= 2; + argn += 2; + } else { Index: v8.S =================================================================== RCS file: /cvsroot/ctypes/ctypes/source/gcc/libffi/src/sparc/v8.S,v retrieving revision 1.1 retrieving revision 1.1.4.1 diff -C2 -d -r1.1 -r1.1.4.1 *** v8.S 18 Jun 2004 20:07:15 -0000 1.1 --- v8.S 16 May 2005 23:28:52 -0000 1.1.4.1 *************** *** 116,120 **** #endif .LLFB2: ! save %sp, -STACKFRAME, %sp .LLCFI1: --- 116,128 ---- #endif .LLFB2: ! ! Reserve frame space for all arguments in case ! ! we need to align them on a 8-byte boundary. ! ld [%g2+FFI_TRAMPOLINE_SIZE], %g1 ! ld [%g1+4], %g1 ! sll %g1, 3, %g1 ! add %g1, STACKFRAME, %g1 ! ! %g1 == STACKFRAME + 8*nargs ! neg %g1 ! save %sp, %g1, %sp .LLCFI1: *************** *** 130,135 **** mov %g2, %o0 add %fp, -8, %o1 call ffi_closure_sparc_inner_v8 ! add %fp, 64, %o2 ! Load up the return value in the proper type. --- 138,144 ---- mov %g2, %o0 add %fp, -8, %o1 + add %fp, 64, %o2 call ffi_closure_sparc_inner_v8 ! add %fp, -16, %o3 ! Load up the return value in the proper type. *************** *** 158,161 **** --- 167,171 ---- ! FFI_TYPE_SINT64 + ! FFI_TYPE_UINT64 ld [%fp-4], %i1 |