Move x86 alien-indirect

slava 2006-09-09 05:11:01 +00:00
parent 4ead056557
commit 2e59e8b488
2 changed files with 10 additions and 10 deletions

View File

@ -39,16 +39,6 @@ kernel-internals math memory namespaces words ;
f %alien-invoke
drop-return-reg ;
: alien-temp ( quot -- )
0 [] swap call "alien_temp" f rel-absolute rel-dlsym ;
: %prepare-alien-indirect ( -- )
"unbox_alien" f %alien-invoke
[ EAX MOV ] alien-temp ;
: %alien-indirect ( -- )
[ CALL ] alien-temp ;
: %alien-callback ( quot -- )
0 <int-vreg> load-literal
EAX PUSH

View File

@ -28,6 +28,16 @@ M: cs-loc v>operand cs-loc-n cs-reg reg-stack ;
: %alien-invoke ( symbol dll -- ) (CALL) rel-dlsym ;
: alien-temp ( quot -- )
0 [] swap call "alien_temp" f rel-absolute rel-dlsym ;
: %prepare-alien-indirect ( -- )
"unbox_alien" f %alien-invoke
[ EAX MOV ] alien-temp ;
: %alien-indirect ( -- )
[ CALL ] alien-temp ;
: with-aligned-stack ( n quot -- )
#! On Linux, there is no requirement to align stack frames,
#! so this is mostly a no-op.