First complete (but broken) build of ikarus in 64-bit.

This commit is contained in:
Abdulaziz Ghuloum 2008-04-14 22:02:03 -04:00
parent d02e9fe035
commit 139ff2f33c
4 changed files with 26 additions and 19 deletions

View File

@ -1 +1 @@
1447 1448

View File

@ -2179,11 +2179,11 @@
(define-primop $code-set! unsafe (define-primop $code-set! unsafe
[(E x i v) [(E x i v)
(prm 'bset/h (T x) (prm 'bset (T x)
(prm 'int+ (prm 'int+
(prm 'sra (T i) (K fx-shift)) (prm 'sra (T i) (K fx-shift))
(K (- disp-code-data vector-tag))) (K (- disp-code-data vector-tag)))
(prm 'sll (T v) (K (- 8 fx-shift))))]) (prm 'sra (T v) (K fx-shift)))])
(define-primop $set-code-annotation! unsafe (define-primop $set-code-annotation! unsafe
[(E x v) (mem-assign v (T x) (- disp-code-annotation vector-tag))]) [(E x v) (mem-assign v (T x) (- disp-code-annotation vector-tag))])

View File

@ -374,6 +374,7 @@ extern void verify_integrity(ikpcb* pcb, char*);
ikpcb* ikpcb*
ik_collect(int mem_req, ikpcb* pcb){ ik_collect(int mem_req, ikpcb* pcb){
// fprintf(stderr, "ik_collect\n");
#ifndef NDEBUG #ifndef NDEBUG
verify_integrity(pcb, "entry"); verify_integrity(pcb, "entry");
#endif #endif
@ -565,6 +566,7 @@ ik_collect(int mem_req, ikpcb* pcb){
} }
// fprintf(stderr, "ik_collect\n");
return pcb; return pcb;
} }

View File

@ -99,26 +99,31 @@ L_multivalue_underflow:
.align 8 .align 8
ik_asm_reenter: ik_asm_reenter:
_ik_asm_reenter: _ik_asm_reenter:
# argc is at 12(%esp) # c parameters come in registers:
# scheme stack is third arg 8(%esp) # %rdi, %rsi, %rdx, %rcx, %r8 and %r9
# pcb is the first arg 4(%esp) # return value registers are %rax and %rdi
# callee-save registers:
# %rbp, %rbx, %r12, r13, r14, %r15 are callee-save
# argc is the third arg 12(%esp) %rdx
# scheme stack is second arg 8(%esp) %rsi
# pcb is the first arg 4(%esp) %rdi
# return point is at 0(%esp) # return point is at 0(%esp)
movl 12(%esp), %eax movq %rdx, %rax # third arg -> argc
movl 8(%esp), %ebx movq %rsi, %rbx # second arg -> rbx (scheme stack)
movl %esi, -4(%esp) movq %rdi, %rsi # first arg -> pcb
movl %ebp, -8(%esp) movq 0(%rsi), %rbp # allocation pointer is at 0(pcb)
movl 4(%esp), %esi movq %rsp, 48(%rsi) # save esp in pcb->system_stack
movl 0(%esi), %ebp # allocation pointer is at 0(pcb) movq %rbx, %rsp # load scheme stack from rbx
subl $16, %esp # 24 for alignment cmpq $-8, %rax
movl %esp, 24(%esi) # save esp in pcb->system_stack
movl %ebx, %esp # load scheme stack from second arg
cmpl $-4, %eax
jne L_multi_reentry jne L_multi_reentry
movl -4(%esp), %eax movq -8(%rsp), %rax
ret ret
L_multi_reentry: L_multi_reentry:
movl 0(%esp), %ebx movq $0, %rax
jmp *-9(%ebx) movq %rax, 0(%rax)
movq 0(%rsp), %rbx
jmp *-9(%rbx)
.align 8 .align 8