This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH/RFA] libffi SH patch
- From: kaz Kojima <kkojima at rr dot iij4u dot or dot jp>
- To: gcc-patches at gcc dot gnu dot org
- Cc: green at redhat dot com
- Date: Wed, 13 Aug 2003 15:32:08 +0900
- Subject: [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