This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH/RFA] libffi SH patch


Hi,

The appended patch fixes an embarrassing bug in SH port of
libffi, which causes failures of closure tests in ffitest
for the little endian target. OK for the mainline?

Regards,
	kaz
--
2003-08-13  Kaz Kojima  <kkojima@gcc.gnu.org>

	* src/sh/ffi.c (OFS_INT16): Set 0 for little endian case.  Update
	copyright years.

diff -u3prN ORIG/gcc/libffi/src/sh/ffi.c LOCAL/gcc/libffi/src/sh/ffi.c
--- ORIG/gcc/libffi/src/sh/ffi.c	Fri Jul 19 10:08:43 2002
+++ LOCAL/gcc/libffi/src/sh/ffi.c	Tue Aug 12 13:46:39 2003
@@ -1,5 +1,5 @@
 /* -----------------------------------------------------------------------
-   ffi.c - Copyright (c) 2002 Kaz Kojima
+   ffi.c - Copyright (c) 2002, 2003 Kaz Kojima
    
    SuperH Foreign Function Interface 
 
@@ -507,7 +507,7 @@ ffi_prep_closure (ffi_closure* closure,
 
 #ifdef __LITTLE_ENDIAN__
 #define OFS_INT8	0
-#define OFS_INT16	2
+#define OFS_INT16	0
 #else
 #define OFS_INT8	3
 #define OFS_INT16	2


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]