sparc v8 and 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
diff --git a/src/sparc/v8.S b/src/sparc/v8.S
index ba3cdac..6bf7ac0 100644
--- a/src/sparc/v8.S
+++ b/src/sparc/v8.S
@@ -242,6 +242,10 @@ ffi_closure_v8:
be,a done1
ldd [%fp-8], %i0
+ cmp %o0, FFI_TYPE_UINT64
+ be,a done1
+ ldd [%fp-8], %i0
+
ld [%fp-8], %i0
done1:
jmp %i7+8
diff --git a/testsuite/libffi.call/ffitest.h b/testsuite/libffi.call/ffitest.h
index 830fcc7..136a7a6 100644
--- a/testsuite/libffi.call/ffitest.h
+++ b/testsuite/libffi.call/ffitest.h
@@ -127,3 +127,6 @@
#define PRId64 "I64d"
#endif
+#ifndef PRIuPTR
+#define PRIuPTR "u"
+#endif
diff --git a/testsuite/libffi.call/many2.c b/testsuite/libffi.call/many2.c
index 1077159..98eac60 100644
--- a/testsuite/libffi.call/many2.c
+++ b/testsuite/libffi.call/many2.c
@@ -12,7 +12,10 @@
typedef unsigned char u8;
-__attribute__((noinline)) uint8_t
+#ifdef __GNUC__
+__attribute__((noinline))
+#endif
+uint8_t
foo (uint8_t a, uint8_t b, uint8_t c, uint8_t d,
uint8_t e, uint8_t f, uint8_t g)
{
diff --git a/testsuite/libffi.call/negint.c b/testsuite/libffi.call/negint.c
index 3168113..6e2f26f 100644
--- a/testsuite/libffi.call/negint.c
+++ b/testsuite/libffi.call/negint.c
@@ -5,7 +5,6 @@
Originator: From the original ffitest.c */
/* { dg-do run } */
-/* { dg-options -O2 } */
#include "ffitest.h"