- defined RTLD_LOCAL for cygwin (possibly incorrect)

- added a missing save to a callee-save register (%edi) 
  when entering/reentering to Scheme which caused Ikarus
  not to run properly depending on whether or not gcc places
  the pcb in %edi or not during Scheme execution.
- updated lab/test-ffi.ss to use the new names for foreign
  types, etc.
This commit is contained in:
Abdulaziz Ghuloum
2008-10-07 02:46:56 -04:00
parent 1e5e516b08
commit 69c62649cc
4 changed files with 29 additions and 19 deletions
+6 -3
View File
@@ -217,10 +217,11 @@ _ik_asm_enter:
movl 16(%esp), %edi # closure pointer
movl %esi, -4(%esp) # preserve
movl %ebp, -8(%esp) # preserve
movl %edi, -12(%esp) # preserve
movl 4(%esp), %esi
movl 0(%esi), %ebp # allocation pointer is at 0(pcb)
movl %esp, %ecx
subl $16, %esp # 24 for alignment
subl $16, %esp # 16 for alignment
movl %esp, 24(%esi) # save esp in pcb->system_stack
movl 8(%esi), %esp # load scheme stack from pcb->frame_pinter
jmp L_call
@@ -242,6 +243,7 @@ L_do_underflow:
addl $16, %esp # 24 for alignment (>= 16)
movl -4(%esp), %esi # restore callee-save registers
movl -8(%esp), %ebp #
movl -12(%esp), %edi #
ret # back to C, which handled the underflow
L_multivalue_underflow:
addl $4, %esp
@@ -257,8 +259,9 @@ _ik_asm_reenter:
# return point is at 0(%esp)
movl 12(%esp), %eax
movl 8(%esp), %ebx
movl %esi, -4(%esp)
movl %ebp, -8(%esp)
movl %esi, -4(%esp) # preserve
movl %ebp, -8(%esp) # preserve
movl %edi, -12(%esp) # preserve
movl 4(%esp), %esi
movl 0(%esi), %ebp # allocation pointer is at 0(pcb)
subl $16, %esp # 24 for alignment
+4
View File
@@ -92,6 +92,10 @@ ikrt_dlerror(ikpcb* pcb) {
return bv+bytevector_tag;
}
#ifndef RTLD_LOCAL
#define RTLD_LOCAL 0 /* for cygwin, possibly incorrect */
#endif
ikptr
ikrt_dlopen(ikptr x, ikptr load_lazy, ikptr load_global, ikpcb* pcb) {
int flags =