sparc v9 fixes for sun tools
This commit is contained in:
10
ChangeLog
10
ChangeLog
@@ -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>
|
2013-02-08 Nathan Rossi <nathan.rossi@xilinx.com>
|
||||||
|
|
||||||
* src/microblaze/ffi.c (ffi_closure_call_SYSV): Fix handling of
|
* src/microblaze/ffi.c (ffi_closure_call_SYSV): Fix handling of
|
||||||
|
|||||||
12
configure
vendored
12
configure
vendored
@@ -14450,11 +14450,11 @@ else
|
|||||||
# Check if we have .register
|
# Check if we have .register
|
||||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||||
/* end confdefs.h. */
|
/* end confdefs.h. */
|
||||||
asm (".register %g2, #scratch");
|
|
||||||
int
|
int
|
||||||
main ()
|
main ()
|
||||||
{
|
{
|
||||||
|
asm (".register %g2, #scratch");
|
||||||
;
|
;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -14508,11 +14508,11 @@ else
|
|||||||
# Check if we have .ascii
|
# Check if we have .ascii
|
||||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||||
/* end confdefs.h. */
|
/* end confdefs.h. */
|
||||||
asm (".ascii \\"string\\"");
|
|
||||||
int
|
int
|
||||||
main ()
|
main ()
|
||||||
{
|
{
|
||||||
|
asm (".ascii \\"string\\"");
|
||||||
;
|
;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -14543,11 +14543,11 @@ else
|
|||||||
# Check if we have .string
|
# Check if we have .string
|
||||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||||
/* end confdefs.h. */
|
/* end confdefs.h. */
|
||||||
asm (".string \\"string\\"");
|
|
||||||
int
|
int
|
||||||
main ()
|
main ()
|
||||||
{
|
{
|
||||||
|
asm (".string \\"string\\"");
|
||||||
;
|
;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -338,7 +338,7 @@ if test x$TARGET = xSPARC; then
|
|||||||
libffi_cv_as_register_pseudo_op, [
|
libffi_cv_as_register_pseudo_op, [
|
||||||
libffi_cv_as_register_pseudo_op=unknown
|
libffi_cv_as_register_pseudo_op=unknown
|
||||||
# Check if we have .register
|
# 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=yes],
|
||||||
[libffi_cv_as_register_pseudo_op=no])
|
[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, [
|
||||||
libffi_cv_as_ascii_pseudo_op=unknown
|
libffi_cv_as_ascii_pseudo_op=unknown
|
||||||
# Check if we have .ascii
|
# 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=yes],
|
||||||
[libffi_cv_as_ascii_pseudo_op=no])
|
[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, [
|
||||||
libffi_cv_as_string_pseudo_op=unknown
|
libffi_cv_as_string_pseudo_op=unknown
|
||||||
# Check if we have .string
|
# 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=yes],
|
||||||
[libffi_cv_as_string_pseudo_op=no])
|
[libffi_cv_as_string_pseudo_op=no])
|
||||||
])
|
])
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
@set UPDATED 6 February 2013
|
@set UPDATED 6 February 2013
|
||||||
@set UPDATED-MONTH February 2013
|
@set UPDATED-MONTH February 2013
|
||||||
@set EDITION 3.0.12-rc2
|
@set EDITION 3.0.12-rc3
|
||||||
@set VERSION 3.0.12-rc2
|
@set VERSION 3.0.12-rc3
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
@set UPDATED 6 February 2013
|
@set UPDATED 6 February 2013
|
||||||
@set UPDATED-MONTH February 2013
|
@set UPDATED-MONTH February 2013
|
||||||
@set EDITION 3.0.12-rc2
|
@set EDITION 3.0.12-rc3
|
||||||
@set VERSION 3.0.12-rc2
|
@set VERSION 3.0.12-rc3
|
||||||
|
|||||||
@@ -521,16 +521,15 @@ ffi_prep_closure_loc (ffi_closure* closure,
|
|||||||
closure->user_data = user_data;
|
closure->user_data = user_data;
|
||||||
|
|
||||||
/* Flush the Icache. closure is 8 bytes aligned. */
|
/* Flush the Icache. closure is 8 bytes aligned. */
|
||||||
|
#ifdef __GNUC__
|
||||||
#ifdef SPARC64
|
#ifdef SPARC64
|
||||||
asm volatile ("flush %0; flush %0+8" : : "r" (closure) : "memory");
|
asm volatile ("flush %0; flush %0+8" : : "r" (closure) : "memory");
|
||||||
#else
|
#else
|
||||||
#ifdef __GNUC__
|
|
||||||
asm volatile ("iflush %0; iflush %0+8" : : "r" (closure) : "memory");
|
asm volatile ("iflush %0; iflush %0+8" : : "r" (closure) : "memory");
|
||||||
/* SPARC v8 requires 5 instructions for flush to be visible */
|
/* SPARC v8 requires 5 instructions for flush to be visible */
|
||||||
asm volatile ("nop; nop; nop; nop; nop");
|
asm volatile ("nop; nop; nop; nop; nop");
|
||||||
#else
|
|
||||||
ffi_flush_icache (closure, 16);
|
|
||||||
#endif
|
#endif
|
||||||
|
ffi_flush_icache (closure, 16);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return FFI_OK;
|
return FFI_OK;
|
||||||
|
|||||||
@@ -41,7 +41,11 @@
|
|||||||
ffi_flush_icache:
|
ffi_flush_icache:
|
||||||
_ffi_flush_icache:
|
_ffi_flush_icache:
|
||||||
add %o0, %o1, %o2
|
add %o0, %o1, %o2
|
||||||
|
#ifdef SPARC64
|
||||||
|
1: flush %o0
|
||||||
|
#else
|
||||||
1: iflush %o0
|
1: iflush %o0
|
||||||
|
#endif
|
||||||
add %o0, 8, %o0
|
add %o0, 8, %o0
|
||||||
cmp %o0, %o2
|
cmp %o0, %o2
|
||||||
blt 1b
|
blt 1b
|
||||||
|
|||||||
Reference in New Issue
Block a user