summaryrefslogtreecommitdiff
path: root/ext/ffi_c/libffi/src/sparc/v8.S
diff options
context:
space:
mode:
Diffstat (limited to 'ext/ffi_c/libffi/src/sparc/v8.S')
-rw-r--r--ext/ffi_c/libffi/src/sparc/v8.S39
1 files changed, 36 insertions, 3 deletions
diff --git a/ext/ffi_c/libffi/src/sparc/v8.S b/ext/ffi_c/libffi/src/sparc/v8.S
index 2c4eb60..6bf7ac0 100644
--- a/ext/ffi_c/libffi/src/sparc/v8.S
+++ b/ext/ffi_c/libffi/src/sparc/v8.S
@@ -1,5 +1,6 @@
/* -----------------------------------------------------------------------
- v8.S - Copyright (c) 1996, 1997, 2003, 2004, 2008 Red Hat, Inc.
+ v8.S - Copyright (c) 2013 The Written Word, Inc.
+ Copyright (c) 1996, 1997, 2003, 2004, 2008 Red Hat, Inc.
SPARC Foreign Function Interface
@@ -31,11 +32,39 @@
#define STACKFRAME 96 /* Minimum stack framesize for SPARC */
#define ARGS (64+4) /* Offset of register area in frame */
-.text
+#ifndef __GNUC__
+ .text
+ .align 8
+.globl ffi_flush_icache
+.globl _ffi_flush_icache
+
+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
+ nop
+ nop
+ nop
+ nop
+ nop
+ retl
+ nop
+.ffi_flush_icache_end:
+ .size ffi_flush_icache,.ffi_flush_icache_end-ffi_flush_icache
+#endif
+
+ .text
.align 8
.globl ffi_call_v8
.globl _ffi_call_v8
-
+
ffi_call_v8:
_ffi_call_v8:
.LLFB1:
@@ -213,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