compiler: add ##safepoint IR insn
parent
ae1a903c4e
commit
0c022f2454
|
@ -84,6 +84,8 @@ INSN: ##epilogue ;
|
|||
|
||||
INSN: ##return ;
|
||||
|
||||
INSN: ##safepoint ;
|
||||
|
||||
! Dummy instruction that simply inhibits TCO
|
||||
INSN: ##no-tco ;
|
||||
|
||||
|
|
|
@ -57,6 +57,7 @@ UNION: final-insn
|
|||
##branch
|
||||
##dispatch
|
||||
conditional-branch-insn
|
||||
##safepoint
|
||||
##epilogue ##return
|
||||
##callback-outputs ;
|
||||
|
||||
|
|
|
@ -160,6 +160,7 @@ CODEGEN: ##inc-r %inc-r
|
|||
CODEGEN: ##call %call
|
||||
CODEGEN: ##jump %jump
|
||||
CODEGEN: ##return %return
|
||||
CODEGEN: ##safepoint %safepoint
|
||||
CODEGEN: ##slot %slot
|
||||
CODEGEN: ##slot-imm %slot-imm
|
||||
CODEGEN: ##set-slot %set-slot
|
||||
|
|
|
@ -495,6 +495,8 @@ HOOK: %call-gc cpu ( gc-map -- )
|
|||
HOOK: %prologue cpu ( n -- )
|
||||
HOOK: %epilogue cpu ( n -- )
|
||||
|
||||
HOOK: %safepoint cpu ( -- )
|
||||
|
||||
HOOK: test-instruction? cpu ( -- ? )
|
||||
|
||||
M: object test-instruction? f ;
|
||||
|
|
|
@ -218,6 +218,9 @@ M:: x86.32 stack-cleanup ( stack-size return abi -- n )
|
|||
M: x86.32 %cleanup ( n -- )
|
||||
[ ESP swap SUB ] unless-zero ;
|
||||
|
||||
M: x86.32 %safepoint
|
||||
0 EAX MOVABS rc-absolute rel-safepoint ;
|
||||
|
||||
M: x86.32 dummy-stack-params? f ;
|
||||
|
||||
M: x86.32 dummy-int-params? f ;
|
||||
|
|
|
@ -130,6 +130,9 @@ M: x86.64 stack-cleanup 3drop 0 ;
|
|||
|
||||
M: x86.64 %cleanup 0 assert= ;
|
||||
|
||||
M: x86.64 %safepoint
|
||||
0 [RIP+] EAX MOV rc-relative rel-safepoint ;
|
||||
|
||||
M: x86.64 long-long-on-stack? f ;
|
||||
|
||||
M: x86.64 float-on-stack? f ;
|
||||
|
|
Loading…
Reference in New Issue