diff --git a/library/compiler/x86/alien.factor b/library/compiler/x86/alien.factor index e6fa480e37..b6b3462fdb 100644 --- a/library/compiler/x86/alien.factor +++ b/library/compiler/x86/alien.factor @@ -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 load-literal EAX PUSH diff --git a/library/compiler/x86/architecture.factor b/library/compiler/x86/architecture.factor index 627e389ece..73c6ab53a7 100644 --- a/library/compiler/x86/architecture.factor +++ b/library/compiler/x86/architecture.factor @@ -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.