sparc v9 fixes for sun tools

This commit is contained in:
Anthony Green
2013-02-08 12:25:18 -05:00
parent 35ee8d44f3
commit cb03ea8f4e
7 changed files with 29 additions and 16 deletions

View File

@@ -1,3 +1,13 @@
2013-02-08 Anthony Green <green@moxielogic.com>
* configure.ac: Move sparc asm config checks to within functions
for compatibility with sun tools.
* configure: Rebuilt.
* src/sparc/ffi.c (ffi_prep_closure_loc): Flush cache on v9
systems.
* src/sparc/v8.S (ffi_flush_icache): Implement a sparc v9 cache
flusher.
2013-02-08 Nathan Rossi <nathan.rossi@xilinx.com>
* src/microblaze/ffi.c (ffi_closure_call_SYSV): Fix handling of

12
configure vendored
View File

@@ -14450,11 +14450,11 @@ else
# Check if we have .register
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
asm (".register %g2, #scratch");
int
main ()
{
asm (".register %g2, #scratch");
;
return 0;
}
@@ -14508,11 +14508,11 @@ else
# Check if we have .ascii
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
asm (".ascii \\"string\\"");
int
main ()
{
asm (".ascii \\"string\\"");
;
return 0;
}
@@ -14543,11 +14543,11 @@ else
# Check if we have .string
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
asm (".string \\"string\\"");
int
main ()
{
asm (".string \\"string\\"");
;
return 0;
}

View File

@@ -338,7 +338,7 @@ if test x$TARGET = xSPARC; then
libffi_cv_as_register_pseudo_op, [
libffi_cv_as_register_pseudo_op=unknown
# Check if we have .register
AC_TRY_COMPILE([asm (".register %g2, #scratch");],,
AC_TRY_COMPILE(,[asm (".register %g2, #scratch");],
[libffi_cv_as_register_pseudo_op=yes],
[libffi_cv_as_register_pseudo_op=no])
])
@@ -366,7 +366,7 @@ if test x$TARGET = xX86 || test x$TARGET = xX86_WIN32 || test x$TARGET = xX86_64
libffi_cv_as_ascii_pseudo_op, [
libffi_cv_as_ascii_pseudo_op=unknown
# Check if we have .ascii
AC_TRY_COMPILE([asm (".ascii \\"string\\"");],,
AC_TRY_COMPILE(,[asm (".ascii \\"string\\"");],
[libffi_cv_as_ascii_pseudo_op=yes],
[libffi_cv_as_ascii_pseudo_op=no])
])
@@ -379,7 +379,7 @@ if test x$TARGET = xX86 || test x$TARGET = xX86_WIN32 || test x$TARGET = xX86_64
libffi_cv_as_string_pseudo_op, [
libffi_cv_as_string_pseudo_op=unknown
# Check if we have .string
AC_TRY_COMPILE([asm (".string \\"string\\"");],,
AC_TRY_COMPILE(,[asm (".string \\"string\\"");],
[libffi_cv_as_string_pseudo_op=yes],
[libffi_cv_as_string_pseudo_op=no])
])

View File

@@ -1,4 +1,4 @@
@set UPDATED 6 February 2013
@set UPDATED-MONTH February 2013
@set EDITION 3.0.12-rc2
@set VERSION 3.0.12-rc2
@set EDITION 3.0.12-rc3
@set VERSION 3.0.12-rc3

View File

@@ -1,4 +1,4 @@
@set UPDATED 6 February 2013
@set UPDATED-MONTH February 2013
@set EDITION 3.0.12-rc2
@set VERSION 3.0.12-rc2
@set EDITION 3.0.12-rc3
@set VERSION 3.0.12-rc3

View File

@@ -521,16 +521,15 @@ ffi_prep_closure_loc (ffi_closure* closure,
closure->user_data = user_data;
/* Flush the Icache. closure is 8 bytes aligned. */
#ifdef __GNUC__
#ifdef SPARC64
asm volatile ("flush %0; flush %0+8" : : "r" (closure) : "memory");
#else
#ifdef __GNUC__
asm volatile ("iflush %0; iflush %0+8" : : "r" (closure) : "memory");
/* SPARC v8 requires 5 instructions for flush to be visible */
asm volatile ("nop; nop; nop; nop; nop");
#else
ffi_flush_icache (closure, 16);
#endif
ffi_flush_icache (closure, 16);
#endif
return FFI_OK;

View File

@@ -41,7 +41,11 @@
ffi_flush_icache:
_ffi_flush_icache:
add %o0, %o1, %o2
#ifdef SPARC64
1: flush %o0
#else
1: iflush %o0
#endif
add %o0, 8, %o0
cmp %o0, %o2
blt 1b