From 83ca1933c73024b21b8e29bd6ade2ccf68af6847 Mon Sep 17 00:00:00 2001 From: sewardj Date: Wed, 27 Oct 1999 11:11:11 +0000 Subject: [PATCH] [project @ 1999-10-27 11:11:11 by sewardj] universal_call_c_x86_stdcall: assume *I* have been ccall'd, not stdcall'd, so don't clear my own args on return. --- ghc/rts/universal_call_c.S | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/ghc/rts/universal_call_c.S b/ghc/rts/universal_call_c.S index e34af9f..736502e 100644 --- a/ghc/rts/universal_call_c.S +++ b/ghc/rts/universal_call_c.S @@ -5,8 +5,8 @@ * Copyright (c) 1994-1999. * * $RCSfile: universal_call_c.S,v $ - * $Revision: 1.4 $ - * $Date: 1999/10/26 17:27:31 $ + * $Revision: 1.5 $ + * $Date: 1999/10/27 11:11:11 $ * ------------------------------------------------------------------------*/ #include "config.h" @@ -67,6 +67,9 @@ #if i386_TARGET_ARCH +# Tricky! Calls the specified function using ccall convention, +# *and* assumes that I myself was called using ccall. + .globl universal_call_c_x86_ccall universal_call_c_x86_ccall: pushl %ebp @@ -138,6 +141,10 @@ cbye: # Almost identical to the above piece of code # see comments near end for differences + +# Even more tricky! Calls the specified function using +# stdcall convention, *but* assumes that I myself was called +# using ccall. .globl universal_call_c_x86_stdcall universal_call_c_x86_stdcall: @@ -205,7 +212,8 @@ sbye: popl %esi popl %edi leave - ret $16 # but we have to clear our own! + ## ret $16 # but we have to clear our own! (no! we were ccall_d) + ret #endif /* i386_TARGET_ARCH */ -- 1.7.10.4