fixing a calling convention issue I don't fully understand
parent
b2307c91e6
commit
a38834bf62
|
|
@ -18,9 +18,10 @@
|
|||
- on win64: to_cell will break
|
||||
- .h .b .o for ratios and floats is broken
|
||||
- amd64 to do:
|
||||
- overflow checks
|
||||
- fixnum<< overflow check
|
||||
- alien calls
|
||||
- relocation info
|
||||
- relocation problem
|
||||
- compiling sheet runs out of memory
|
||||
|
||||
word help sections:
|
||||
- synopsis
|
||||
|
|
|
|||
|
|
@ -44,3 +44,7 @@ M: float-regs fastcall-regs drop 0 ;
|
|||
: fixnum>slot@ drop ; inline
|
||||
|
||||
: prepare-division CQO ; inline
|
||||
|
||||
: compile-prologue RSP 8 SUB ; inline
|
||||
|
||||
: compile-epilogue RSP 8 ADD ; inline
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ M: %call generate-node ( vop -- )
|
|||
dup primitive? [ word-addr 3 MTCTR BCTR ] [ B ] if ;
|
||||
|
||||
M: %jump generate-node ( vop -- )
|
||||
drop label compile-epilogue compile-jump ;
|
||||
drop compile-epilogue label compile-jump ;
|
||||
|
||||
M: %jump-label generate-node ( vop -- )
|
||||
drop label B ;
|
||||
|
|
|
|||
|
|
@ -41,3 +41,7 @@ M: float-regs fastcall-regs drop 0 ;
|
|||
: fixnum>slot@ 1 SHR ; inline
|
||||
|
||||
: prepare-division CDQ ; inline
|
||||
|
||||
: compile-prologue ; inline
|
||||
|
||||
: compile-epilogue ; inline
|
||||
|
|
|
|||
|
|
@ -5,7 +5,8 @@ USING: alien arrays assembler compiler inference kernel
|
|||
kernel-internals lists math memory namespaces sequences words ;
|
||||
|
||||
! Not used on x86
|
||||
M: %prologue generate-node drop ;
|
||||
M: %prologue generate-node ( vop -- )
|
||||
drop compile-prologue ;
|
||||
|
||||
: (call-label)
|
||||
label dup postpone-word
|
||||
|
|
@ -18,10 +19,10 @@ M: %call-label generate-node ( vop -- )
|
|||
drop label CALL ;
|
||||
|
||||
M: %jump generate-node ( vop -- )
|
||||
drop (call-label) JMP ;
|
||||
drop compile-epilogue (call-label) JMP ;
|
||||
|
||||
M: %jump-label generate-node ( vop -- )
|
||||
drop label JMP ;
|
||||
drop compile-epilogue label JMP ;
|
||||
|
||||
M: %jump-t generate-node ( vop -- )
|
||||
drop
|
||||
|
|
@ -31,10 +32,10 @@ M: %jump-t generate-node ( vop -- )
|
|||
label JNE ;
|
||||
|
||||
M: %return-to generate-node ( vop -- )
|
||||
drop label address-operand PUSH ;
|
||||
drop label address-operand PUSH compile-prologue ;
|
||||
|
||||
M: %return generate-node ( vop -- )
|
||||
drop RET ;
|
||||
drop compile-epilogue RET ;
|
||||
|
||||
M: %dispatch generate-node ( vop -- )
|
||||
#! Compile a piece of code that jumps to an offset in a
|
||||
|
|
|
|||
Loading…
Reference in New Issue