[MLton-commit] r4631

Matthew Fluet MLton@mlton.org
Thu, 8 Jun 2006 16:20:54 -0700


Fixed bug in the native codegen's implementation of the C-calling
convention.  16bit arguments were not being widened to 32bits before
being pushed onto the stack.


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

U   mlton/trunk/doc/changelog
U   mlton/trunk/mlton/codegen/x86-codegen/x86-generate-transfers.fun

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

Modified: mlton/trunk/doc/changelog
===================================================================
--- mlton/trunk/doc/changelog	2006-06-08 22:35:54 UTC (rev 4630)
+++ mlton/trunk/doc/changelog	2006-06-08 23:20:48 UTC (rev 4631)
@@ -1,5 +1,9 @@
 Here are the changes since version 20051202.
 
+* 2006-06-08
+  - Fixed a bug in the native codegen's implementation of the C-calling
+    convention.
+	
 * 2006-05-11
   - Ported to PowerPC-AIX.
   - Fixed a bug in the runtime for the cases where nonblocking IO with

Modified: mlton/trunk/mlton/codegen/x86-codegen/x86-generate-transfers.fun
===================================================================
--- mlton/trunk/mlton/codegen/x86-codegen/x86-generate-transfers.fun	2006-06-08 22:35:54 UTC (rev 4630)
+++ mlton/trunk/mlton/codegen/x86-codegen/x86-generate-transfers.fun	2006-06-08 23:20:48 UTC (rev 4631)
@@ -1128,7 +1128,8 @@
                                     {src = arg,
                                      dst = c_stackPDerefFloat,
                                      size = size}]
-                            else if Size.eq (size, Size.BYTE)
+                            else if Size.eq (size, Size.BYTE) 
+                                    orelse Size.eq (size, Size.WORD)
                               then AppendList.fromList
                                    [Assembly.instruction_movx
                                     {oper = Instruction.MOVZX,