projects
/
sbcl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Better initialization of ir2-component-constants on x86-64.
[sbcl.git]
/
src
/
runtime
/
funcall.c
diff --git
a/src/runtime/funcall.c
b/src/runtime/funcall.c
index
186435c
..
4eb1d72
100644
(file)
--- a/
src/runtime/funcall.c
+++ b/
src/runtime/funcall.c
@@
-22,16
+22,22
@@
#include "interrupt.h"
/* This is implemented in assembly language and called from C: */
#include "interrupt.h"
/* This is implemented in assembly language and called from C: */
-extern lispobj call_into_lisp(lispobj fun, lispobj *args, int nargs);
+extern lispobj call_into_lisp(lispobj fun, lispobj *args, int nargs)
+#ifdef LISP_FEATURE_X86_64
+ __attribute__((sysv_abi))
+#endif
+ ;
static inline lispobj
safe_call_into_lisp(lispobj fun, lispobj *args, int nargs)
{
static inline lispobj
safe_call_into_lisp(lispobj fun, lispobj *args, int nargs)
{
+#ifndef LISP_FEATURE_SB_SAFEPOINT
/* SIG_STOP_FOR_GC needs to be enabled before we can call lisp:
* otherwise two threads racing here may deadlock: the other will
* wait on the GC lock, and the other cannot stop the first
* one... */
/* SIG_STOP_FOR_GC needs to be enabled before we can call lisp:
* otherwise two threads racing here may deadlock: the other will
* wait on the GC lock, and the other cannot stop the first
* one... */
- check_gc_signals_unblocked_or_lose();
+ check_gc_signals_unblocked_or_lose(0);
+#endif
return call_into_lisp(fun, args, nargs);
}
return call_into_lisp(fun, args, nargs);
}
@@
-85,7
+91,9
@@
funcall3(lispobj function, lispobj arg0, lispobj arg1, lispobj arg2)
lispobj
funcall0(lispobj function)
{
lispobj
funcall0(lispobj function)
{
- lispobj *args = current_control_stack_pointer;
+ lispobj **stack_pointer
+ = &access_control_stack_pointer(arch_os_get_current_thread());
+ lispobj *args = *stack_pointer;
return safe_call_into_lisp(function, args, 0);
}
return safe_call_into_lisp(function, args, 0);
}
@@
-93,9
+101,11
@@
funcall0(lispobj function)
lispobj
funcall1(lispobj function, lispobj arg0)
{
lispobj
funcall1(lispobj function, lispobj arg0)
{
- lispobj *args = current_control_stack_pointer;
+ lispobj **stack_pointer
+ = &access_control_stack_pointer(arch_os_get_current_thread());
+ lispobj *args = *stack_pointer;
- current_control_stack_pointer += 1;
+ *stack_pointer += 1;
args[0] = arg0;
return safe_call_into_lisp(function, args, 1);
args[0] = arg0;
return safe_call_into_lisp(function, args, 1);
@@
-104,9
+114,11
@@
funcall1(lispobj function, lispobj arg0)
lispobj
funcall2(lispobj function, lispobj arg0, lispobj arg1)
{
lispobj
funcall2(lispobj function, lispobj arg0, lispobj arg1)
{
- lispobj *args = current_control_stack_pointer;
+ lispobj **stack_pointer
+ = &access_control_stack_pointer(arch_os_get_current_thread());
+ lispobj *args = *stack_pointer;
- current_control_stack_pointer += 2;
+ *stack_pointer += 2;
args[0] = arg0;
args[1] = arg1;
args[0] = arg0;
args[1] = arg1;
@@
-116,9
+128,11
@@
funcall2(lispobj function, lispobj arg0, lispobj arg1)
lispobj
funcall3(lispobj function, lispobj arg0, lispobj arg1, lispobj arg2)
{
lispobj
funcall3(lispobj function, lispobj arg0, lispobj arg1, lispobj arg2)
{
- lispobj *args = current_control_stack_pointer;
+ lispobj **stack_pointer
+ = &access_control_stack_pointer(arch_os_get_current_thread());
+ lispobj *args = *stack_pointer;
- current_control_stack_pointer += 3;
+ *stack_pointer += 3;
args[0] = arg0;
args[1] = arg1;
args[2] = arg2;
args[0] = arg0;
args[1] = arg1;
args[2] = arg2;