From: sewardj Date: Wed, 27 Oct 1999 11:11:11 +0000 (+0000) Subject: [project @ 1999-10-27 11:11:11 by sewardj] X-Git-Tag: Approximately_9120_patches~5659 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=83ca1933c73024b21b8e29bd6ade2ccf68af6847;p=ghc-hetmet.git [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. --- 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 */