Testsuite fixes.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259
diff --git a/libffi/ChangeLog b/libffi/ChangeLog
index 8f42ec0..f5b08fe 100644
--- a/libffi/ChangeLog
+++ b/libffi/ChangeLog
@@ -1,3 +1,17 @@
+Sun Oct 21 12:15:17 2001 Anthony Green <green@redhat.com>
+
+ * testsuite/lib/libffi.exp, testsuite/libffi.call/float.c,
+ testsuite/libffi.call/many.c, testsuite/libffi.call/strlen.c,
+ testsuite/libffi.call/ffitest.h, testsuite/libffi.call/call.exp,
+ testsuite/config/default.exp, testsuite/Makefile.am,
+ testsuite/Makefile.in: New files.
+
+ * include/ffi.h: Remove /*@ comments.
+ (FFI_ALIGN_RVALUE): Define.
+
+ * Makefile.am (libffi_la_LDFLAGS): Remove -I$(srcdir)/src.
+ * Makefile.in: Rebuilt.
+
Sun Apr 22 15:50:08 2001 Anthony Green <green@redhat.com>
* include/ffi_common.h: Delete, after moving contents to...
diff --git a/libffi/Makefile.am b/libffi/Makefile.am
index f46f4c5..aeab336 100644
--- a/libffi/Makefile.am
+++ b/libffi/Makefile.am
@@ -43,4 +43,4 @@ AM_CFLAGS = -fexceptions
libffi_la_LDFLAGS = -release $(VERSION)
-INCLUDES = -I$(top_srcdir)/include -Iinclude -I$(top_srcdir)/src
+INCLUDES = -I$(top_srcdir)/include -Iinclude
diff --git a/libffi/configure.in b/libffi/configure.in
index 1a1254b..a20c05b 100644
--- a/libffi/configure.in
+++ b/libffi/configure.in
@@ -27,7 +27,7 @@ AC_SUBST(libffi_basedir)
AC_CANONICAL_HOST
-AM_INIT_AUTOMAKE(libffi,2.00-beta,no-define)
+AM_INIT_AUTOMAKE(libffi,2.00,no-define)
AC_EXEEXT
AM_MAINTAINER_MODE
diff --git a/libffi/include/ffi.h b/libffi/include/ffi.h
index 1ad4acf..b672db8 100644
--- a/libffi/include/ffi.h
+++ b/libffi/include/ffi.h
@@ -20,7 +20,6 @@
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.
-
----------------------------------------------------------------------- */
/* -------------------------------------------------------------------
@@ -234,10 +233,10 @@ typedef union {
void* ptr;
} ffi_raw;
-void ffi_raw_call (/*@dependent@*/ ffi_cif *cif,
+void ffi_raw_call (ffi_cif *cif,
void (*fn)(),
- /*@out@*/ void *rvalue,
- /*@dependent@*/ ffi_raw *avalue);
+ void *rvalue,
+ ffi_raw *avalue);
void ffi_ptrarray_to_raw (ffi_cif *cif, void **args, ffi_raw *raw);
void ffi_raw_to_ptrarray (ffi_cif *cif, ffi_raw *raw, void **args);
@@ -249,10 +248,10 @@ size_t ffi_raw_size (ffi_cif *cif);
/* packing, even on 64-bit machines. I.e. on 64-bit machines */
/* longs and doubles are followed by an empty 64-bit word. */
-void ffi_java_raw_call (/*@dependent@*/ ffi_cif *cif,
+void ffi_java_raw_call (ffi_cif *cif,
void (*fn)(),
- /*@out@*/ void *rvalue,
- /*@dependent@*/ ffi_raw *avalue);
+ void *rvalue,
+ ffi_raw *avalue);
void ffi_java_ptrarray_to_raw (ffi_cif *cif, void **args, ffi_raw *raw);
void ffi_java_raw_to_ptrarray (ffi_cif *cif, ffi_raw *raw, void **args);
@@ -262,6 +261,11 @@ size_t ffi_java_raw_size (ffi_cif *cif);
#endif /* !FFI_NO_RAW_API */
+/* ---- Return type alignment -------------------------------------------- */
+
+/* This is more than enough for all supported architectures. */
+#define FFI_ALIGN_RVALUE __attribute__((aligned(8)))
+
/* ---- Definitions for closures ----------------------------------------- */
#ifdef __i386__
diff --git a/libffi/testsuite/libffi.call/float.c b/libffi/testsuite/libffi.call/float.c
index 95e7a31..8b68a58 100644
--- a/libffi/testsuite/libffi.call/float.c
+++ b/libffi/testsuite/libffi.call/float.c
@@ -19,7 +19,7 @@ main ()
float f;
double d;
long double ld;
- int rint __attribute__((aligned(8)));
+ int rint FFI_ALIGN_RVALUE;
args[0] = &ffi_type_sint;
values[0] = &si1;
diff --git a/libffi/testsuite/libffi.call/many.c b/libffi/testsuite/libffi.call/many.c
index 1b3d72c..bd2d307 100644
--- a/libffi/testsuite/libffi.call/many.c
+++ b/libffi/testsuite/libffi.call/many.c
@@ -16,7 +16,7 @@ static float many(float f1,
float f12,
float f13)
{
-#if 1
+#if 0
printf("%f %f %f %f %f %f %f %f %f %f %f %f %f\n",
(double) f1, (double) f2, (double) f3, (double) f4, (double) f5,
(double) f6, (double) f7, (double) f8, (double) f9, (double) f10,
diff --git a/libffi/testsuite/libffi.call/strlen.c b/libffi/testsuite/libffi.call/strlen.c
index 3517278..3b921ec 100644
--- a/libffi/testsuite/libffi.call/strlen.c
+++ b/libffi/testsuite/libffi.call/strlen.c
@@ -11,7 +11,7 @@ main ()
ffi_cif cif;
ffi_type *args[1];
void *values[1];
- int rint __attribute__((aligned(8)));
+ int rint FFI_ALIGN_RVALUE;
char *s;
args[0] = &ffi_type_pointer;
diff --git a/libffi/x86/ffi.c b/libffi/x86/ffi.c
index 830d6a1..b0d54a4 100644
--- a/libffi/x86/ffi.c
+++ b/libffi/x86/ffi.c
@@ -25,16 +25,13 @@
#include <ffi.h>
#include <ffi_private.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 */
-/*@-exportheader@*/
void ffi_prep_args(char *stack, extended_cif *ecif)
-/*@=exportheader@*/
{
register unsigned int i;
register int tmp;
@@ -145,20 +142,16 @@ ffi_status ffi_prep_cif_machdep(ffi_cif *cif)
return FFI_OK;
}
-/*@-declundef@*/
-/*@-exportheader@*/
extern void ffi_call_SYSV(void (*)(char *, extended_cif *),
- /*@out@*/ extended_cif *,
+ extended_cif *,
unsigned, unsigned,
- /*@out@*/ unsigned *,
+ unsigned *,
void (*fn)());
-/*@=declundef@*/
-/*@=exportheader@*/
-void ffi_call(/*@dependent@*/ ffi_cif *cif,
+void ffi_call(ffi_cif *cif,
void (*fn)(),
- /*@out@*/ void *rvalue,
- /*@dependent@*/ void **avalue)
+ void *rvalue,
+ void **avalue)
{
extended_cif ecif;
@@ -171,9 +164,7 @@ void ffi_call(/*@dependent@*/ ffi_cif *cif,
if ((rvalue == NULL) &&
(cif->rtype->type == FFI_TYPE_STRUCT))
{
- /*@-sysunrecog@*/
ecif.rvalue = alloca(cif->rtype->size);
- /*@=sysunrecog@*/
}
else
ecif.rvalue = rvalue;
@@ -182,10 +173,8 @@ void ffi_call(/*@dependent@*/ ffi_cif *cif,
switch (cif->abi)
{
case FFI_SYSV:
- /*@-usedef@*/
ffi_call_SYSV(ffi_prep_args, &ecif, cif->bytes,
cif->flags, ecif.rvalue, fn);
- /*@=usedef@*/
break;
default:
FFI_ASSERT(0);
@@ -266,11 +255,9 @@ ffi_closure_SYSV ()
}
}
-/*@-exportheader@*/
static void
ffi_prep_incoming_args_SYSV(char *stack, void **rvalue,
void **avalue, ffi_cif *cif)
-/*@=exportheader@*/
{
register unsigned int i;
register int tmp;
@@ -461,16 +448,16 @@ ffi_prep_args_raw(char *stack, extended_cif *ecif)
extern void
ffi_call_SYSV(void (*)(char *, extended_cif *),
- /*@out@*/ extended_cif *,
+ extended_cif *,
unsigned, unsigned,
- /*@out@*/ unsigned *,
+ unsigned *,
void (*fn)());
void
-ffi_raw_call(/*@dependent@*/ ffi_cif *cif,
+ffi_raw_call(ffi_cif *cif,
void (*fn)(),
- /*@out@*/ void *rvalue,
- /*@dependent@*/ ffi_raw *fake_avalue)
+ void *rvalue,
+ ffi_raw *fake_avalue)
{
extended_cif ecif;
void **avalue = (void **)fake_avalue;
@@ -484,9 +471,7 @@ ffi_raw_call(/*@dependent@*/ ffi_cif *cif,
if ((rvalue == NULL) &&
(cif->rtype->type == FFI_TYPE_STRUCT))
{
- /*@-sysunrecog@*/
ecif.rvalue = alloca(cif->rtype->size);
- /*@=sysunrecog@*/
}
else
ecif.rvalue = rvalue;
@@ -495,10 +480,8 @@ ffi_raw_call(/*@dependent@*/ ffi_cif *cif,
switch (cif->abi)
{
case FFI_SYSV:
- /*@-usedef@*/
ffi_call_SYSV(ffi_prep_args_raw, &ecif, cif->bytes,
cif->flags, ecif.rvalue, fn);
- /*@=usedef@*/
break;
default:
FFI_ASSERT(0);