[project @ 2000-04-11 11:54:22 by simonmar]
[ghc-hetmet.git] / ghc / rts / universal_call_c.S
index 49128c2..5860ef5 100644 (file)
@@ -5,8 +5,8 @@
  * Copyright (c) 1994-1999.
  *
  * $RCSfile: universal_call_c.S,v $
- * $Revision: 1.6 $
- * $Date: 1999/10/27 11:55:51 $
+ * $Revision: 1.9 $
+ * $Date: 1999/11/17 13:19:36 $
  * ------------------------------------------------------------------------*/
        
 #include "config.h"
          }
       }
 #endif
-       
+
+#if LEADING_UNDERSCORE
+#define ADD_UNDERSCORE(sss) _##sss
+#else
+#define ADD_UNDERSCORE(sss) sss
+#endif
+
 #if i386_TARGET_ARCH
 
-# Tricky!  Calls the specified function using ccall convention,
-# *and* assumes that I myself was called using ccall.
+/*
+ * 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:
+.globl ADD_UNDERSCORE(universal_call_c_x86_ccall)
+ADD_UNDERSCORE(universal_call_c_x86_ccall:)
        pushl %ebp
        movl %esp,%ebp
        pushl %edi
@@ -146,8 +154,8 @@ universal_call_c_x86_ccall:
 # stdcall convention, *but* assumes that I myself was called 
 # using ccall.
        
-.globl universal_call_c_x86_stdcall
-universal_call_c_x86_stdcall:
+.globl ADD_UNDERSCORE(universal_call_c_x86_stdcall)
+ADD_UNDERSCORE(universal_call_c_x86_stdcall:)
        pushl %ebp
        movl %esp,%ebp
        pushl %edi
@@ -206,15 +214,15 @@ universal_call_c_x86_stdcall:
        fstpl 0(%esi)
        jmp .Lsbye      
 .Lsbye:
-       ## don_t clear the args -- the callee does it
-       ## leal -12(%ebp),%esp
+       /* don_t clear the args -- the callee does it */
+       /* leal -12(%ebp),%esp */
        popl %ebx
        popl %esi
        popl %edi
        leave
-       ## ret $16       # but we have to clear our own! (no! we were ccall_d)
+       /* ret $16     # but we have to clear our own! (no! we were ccall_d) */
        ret
 
 #endif /* i386_TARGET_ARCH */
        
-#endif /* INTERPRETER */
\ No newline at end of file
+#endif /* INTERPRETER */