diff options
author | Anthony Green <green@gmachine.(none)> | 2009-12-26 07:02:27 -0500 |
---|---|---|
committer | Anthony Green <green@gmachine.(none)> | 2009-12-26 07:02:27 -0500 |
commit | 9458d88f676e9a21ab8993a54e16754b11687419 (patch) | |
tree | 5e8f943332cf97f138ee40696355b64398413ff4 /src/mips | |
parent | 6a3412417593f068a04dc6163f4269cb295ad5ca (diff) | |
download | libffi-9458d88f676e9a21ab8993a54e16754b11687419.tar.gz |
Rebase from GCC
Diffstat (limited to 'src/mips')
-rw-r--r-- | src/mips/.svn/entries | 44 | ||||
-rw-r--r-- | src/mips/.svn/text-base/ffi.c.svn-base | 17 | ||||
-rw-r--r-- | src/mips/.svn/text-base/ffitarget.h.svn-base | 22 | ||||
-rw-r--r-- | src/mips/.svn/text-base/n32.S.svn-base | 4 |
4 files changed, 56 insertions, 31 deletions
diff --git a/src/mips/.svn/entries b/src/mips/.svn/entries index c929ed7..10692d9 100644 --- a/src/mips/.svn/entries +++ b/src/mips/.svn/entries @@ -1,15 +1,15 @@ 10 dir -155452 +155472 svn+ssh://green@gcc.gnu.org/svn/gcc/trunk/libffi/src/mips svn+ssh://green@gcc.gnu.org/svn/gcc -2009-09-15T17:15:33.045042Z -151726 -daney +2009-12-26T04:59:25.888276Z +155470 +green @@ -32,11 +32,11 @@ file -2009-12-20T06:01:55.707555Z -fdf13476bd3e53815092fde3494d8fc9 -2009-09-15T17:15:33.045042Z -151726 -daney +2009-12-26T04:53:55.604975Z +a48654d49076d07b6bc757bfa1c81c94 +2009-12-26T04:59:25.888276Z +155470 +green @@ -58,7 +58,7 @@ daney -5878 +6205 n32.S file @@ -66,11 +66,11 @@ file -2009-12-20T06:01:55.708555Z -142328c284156e2c2ea05bbcbf19a163 -2009-09-15T17:15:33.045042Z -151726 -daney +2009-12-26T04:53:55.605975Z +673e7f68577075b8b9f6a9da7fc13913 +2009-12-26T04:59:25.888276Z +155470 +green @@ -92,7 +92,7 @@ daney -14437 +14490 o32.S file @@ -134,11 +134,11 @@ file -2009-12-20T06:01:55.709555Z -8ab6839e93489a8417539b6953934de1 -2009-09-15T17:15:33.045042Z -151726 -daney +2009-12-26T04:53:55.604975Z +d86a1ed07159fae7554dcb68210ad136 +2009-12-26T04:59:25.888276Z +155470 +green @@ -160,5 +160,5 @@ daney -25747 +26147 diff --git a/src/mips/.svn/text-base/ffi.c.svn-base b/src/mips/.svn/text-base/ffi.c.svn-base index 3143dcf..d714cc9 100644 --- a/src/mips/.svn/text-base/ffi.c.svn-base +++ b/src/mips/.svn/text-base/ffi.c.svn-base @@ -625,7 +625,7 @@ void ffi_call(ffi_cif *cif, void (*fn)(void), void *rvalue, void **avalue) { rvalue_copy = alloca (8); copy_rvalue = 1; -#ifdef __MIPSEB__ +#if defined(__MIPSEB__) || defined(_MIPSEB) copy_offset = 4; #endif } @@ -772,9 +772,10 @@ ffi_closure_mips_inner_O32 (ffi_closure *closure, { if (i < 2 && !seen_int && (arg_types[i]->type == FFI_TYPE_FLOAT || - arg_types[i]->type == FFI_TYPE_DOUBLE)) + arg_types[i]->type == FFI_TYPE_DOUBLE || + arg_types[i]->type == FFI_TYPE_LONGDOUBLE)) { -#ifdef __MIPSEB__ +#if defined(__MIPSEB__) || defined(_MIPSEB) if (arg_types[i]->type == FFI_TYPE_FLOAT) avaluep[i] = ((char *) &fpr[i]) + sizeof (float); else @@ -931,10 +932,16 @@ ffi_closure_mips_inner_N32 (ffi_closure *closure, while (i < avn) { if (arg_types[i]->type == FFI_TYPE_FLOAT - || arg_types[i]->type == FFI_TYPE_DOUBLE) + || arg_types[i]->type == FFI_TYPE_DOUBLE + || arg_types[i]->type == FFI_TYPE_LONGDOUBLE) { argp = (argn >= 8 || soft_float) ? ar + argn : fpr + argn; -#ifdef __MIPSEB__ + if ((arg_types[i]->type == FFI_TYPE_LONGDOUBLE) && ((unsigned)argp & (arg_types[i]->alignment-1))) + { + argp=(ffi_arg*)ALIGN(argp,arg_types[i]->alignment); + argn++; + } +#if defined(__MIPSEB__) || defined(_MIPSEB) if (arg_types[i]->type == FFI_TYPE_FLOAT && argn < 8) avaluep[i] = ((char *) argp) + sizeof (float); else diff --git a/src/mips/.svn/text-base/ffitarget.h.svn-base b/src/mips/.svn/text-base/ffitarget.h.svn-base index dd3fe73..c5f4e05 100644 --- a/src/mips/.svn/text-base/ffitarget.h.svn-base +++ b/src/mips/.svn/text-base/ffitarget.h.svn-base @@ -28,7 +28,10 @@ #define LIBFFI_TARGET_H #ifdef linux -#include <asm/sgidefs.h> +# include <asm/sgidefs.h> +#else +# include <sgidefs.h> +#endif # ifndef _ABIN32 # define _ABIN32 _MIPS_SIM_NABI32 # endif @@ -38,7 +41,6 @@ # ifndef _ABIO32 # define _ABIO32 _MIPS_SIM_ABI32 # endif -#endif #if !defined(_MIPS_SIM) -- something is very wrong -- @@ -154,7 +156,8 @@ # endif /* _MIPS_SIM==_ABI64 */ #endif /* !FFI_MIPS_O32 */ #else /* !LIBFFI_ASM */ -#ifdef FFI_MIPS_O32 +# ifdef __GNUC__ +# ifdef FFI_MIPS_O32 /* O32 stack frames have 32bit integer args */ typedef unsigned int ffi_arg __attribute__((__mode__(__SI__))); typedef signed int ffi_sarg __attribute__((__mode__(__SI__))); @@ -162,7 +165,18 @@ typedef signed int ffi_sarg __attribute__((__mode__(__SI__))); /* N32 and N64 frames have 64bit integer args */ typedef unsigned int ffi_arg __attribute__((__mode__(__DI__))); typedef signed int ffi_sarg __attribute__((__mode__(__DI__))); -#endif +# endif +# else +# ifdef FFI_MIPS_O32 +/* O32 stack frames have 32bit integer args */ +typedef __uint32_t ffi_arg; +typedef __int32_t ffi_sarg; +# else +/* N32 and N64 frames have 64bit integer args */ +typedef __uint64_t ffi_arg; +typedef __int64_t ffi_sarg; +# endif +# endif /* __GNUC__ */ typedef enum ffi_abi { FFI_FIRST_ABI = 0, diff --git a/src/mips/.svn/text-base/n32.S.svn-base b/src/mips/.svn/text-base/n32.S.svn-base index 6f0f4c6..81e81bc 100644 --- a/src/mips/.svn/text-base/n32.S.svn-base +++ b/src/mips/.svn/text-base/n32.S.svn-base @@ -40,7 +40,9 @@ #define SIZEOF_FRAME ( 8 * FFI_SIZEOF_ARG ) +#ifdef linux .abicalls +#endif .text .align 2 .globl ffi_call_N32 @@ -527,6 +529,7 @@ cls_epilogue: .LFE2: .end ffi_closure_N32 +#ifdef linux .section .eh_frame,"aw",@progbits .Lframe1: .4byte .LECIE1-.LSCIE1 # length @@ -583,5 +586,6 @@ cls_epilogue: .uleb128 (SIZEOF_FRAME2 - RA_OFF2)/4 .align EH_FRAME_ALIGN .LEFDE3: +#endif /* linux */ #endif |