From 2e59e8b4886b38087bdbc244b59a0831d236a9d3 Mon Sep 17 00:00:00 2001 From: slava Date: Sat, 9 Sep 2006 05:11:01 +0000 Subject: [PATCH] Move x86 alien-indirect --- library/compiler/x86/alien.factor | 10 ---------- library/compiler/x86/architecture.factor | 10 ++++++++++ 2 files changed, 10 insertions(+), 10 deletions(-) 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.