working on AMD64 overflow checks
parent
8de238eece
commit
0528c5a89c
|
@ -1,5 +1,6 @@
|
|||
IN: compiler-backend
|
||||
USING: assembler compiler-backend kernel sequences ;
|
||||
USING: alien assembler compiler compiler-backend kernel
|
||||
sequences ;
|
||||
|
||||
! AMD64 register assignments
|
||||
! RAX RCX RDX RSI RDI R8 R9 R10 R11 vregs
|
||||
|
@ -19,7 +20,8 @@ USING: assembler compiler-backend kernel sequences ;
|
|||
|
||||
: param-regs { R9 R8 RCX RDX RSI RDI } ;
|
||||
|
||||
DEFER: compile-c-call
|
||||
: compile-c-call ( symbol dll -- )
|
||||
2dup dlsym 0 scratch swap MOV 0 0 rel-dlsym 0 scratch CALL ;
|
||||
|
||||
: compile-c-call* ( symbol dll -- operands )
|
||||
param-regs swap [ MOV ] 2each compile-c-call ;
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
IN: compiler-backend
|
||||
USING: assembler compiler-backend kernel sequences ;
|
||||
USING: alien assembler compiler compiler-backend kernel
|
||||
sequences ;
|
||||
|
||||
! x86 register assignments
|
||||
! EAX, ECX, EDX vregs
|
||||
|
@ -17,7 +18,8 @@ USING: assembler compiler-backend kernel sequences ;
|
|||
|
||||
: vregs { EAX ECX EDX } ; inline
|
||||
|
||||
DEFER: compile-c-call
|
||||
: compile-c-call ( symbol dll -- )
|
||||
2dup dlsym CALL 1 0 rel-dlsym ;
|
||||
|
||||
: compile-c-call* ( symbol dll args -- operands )
|
||||
[ [ PUSH ] each compile-c-call ] keep
|
||||
|
|
|
@ -7,9 +7,6 @@ kernel-internals lists math memory namespaces sequences words ;
|
|||
! Not used on x86
|
||||
M: %prologue generate-node drop ;
|
||||
|
||||
: compile-c-call ( symbol dll -- )
|
||||
2dup dlsym CALL 1 0 rel-dlsym ;
|
||||
|
||||
: (call-label)
|
||||
label dup postpone-word
|
||||
dup primitive? [ address-operand ] when ;
|
||||
|
|
Loading…
Reference in New Issue