[MLton-commit] r6689

Wesley Terpstra wesley at mlton.org
Tue Aug 5 17:21:54 PDT 2008


These is no stdcall/cdecl calling convention on amd64 linux or win64.
This patch ignores the convention as it can output invalid assembly.


----------------------------------------------------------------------

U   mlton/trunk/mlton/codegen/amd64-codegen/amd64-generate-transfers.fun

----------------------------------------------------------------------

Modified: mlton/trunk/mlton/codegen/amd64-codegen/amd64-generate-transfers.fun
===================================================================
--- mlton/trunk/mlton/codegen/amd64-codegen/amd64-generate-transfers.fun	2008-08-06 00:16:10 UTC (rev 6688)
+++ mlton/trunk/mlton/codegen/amd64-codegen/amd64-generate-transfers.fun	2008-08-06 00:21:53 UTC (rev 6689)
@@ -1183,7 +1183,7 @@
                 => let
                      datatype z = datatype CFunction.Convention.t
                      datatype z = datatype CFunction.Target.t
-                     val CFunction.T {convention,
+                     val CFunction.T {convention=_,
                                       maySwitchThreads,
                                       modifiesFrontier,
                                       readsStackTop, 
@@ -1521,10 +1521,6 @@
                         case target of
                            Direct name =>
                               let
-                                 val name = 
-                                    case convention of
-                                       Cdecl => name
-                                     | Stdcall => concat [name, "@", Int.toString size_stack_args]
                                  val target = mkCCallLabel name
                               in
                                  AppendList.fromList
@@ -1581,7 +1577,6 @@
                          {returns = Operand.cReturnTemps returnTy})
                      val fixCStack =
                         if size_stack_args > 0
-                           andalso convention = CFunction.Convention.Cdecl
                            then (AppendList.single
                                  (Assembly.instruction_binal
                                   {oper = Instruction.ADD,




More information about the MLton-commit mailing list