[MLton-commit] r6825

Matthew Fluet fluet at mlton.org
Mon Sep 1 06:19:36 PDT 2008


The logic for line information in assembler files was not inverted.

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

U   mlton/trunk/mlton/codegen/amd64-codegen/amd64-mlton-basic.fun
U   mlton/trunk/mlton/codegen/x86-codegen/x86-mlton-basic.fun

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

Modified: mlton/trunk/mlton/codegen/amd64-codegen/amd64-mlton-basic.fun
===================================================================
--- mlton/trunk/mlton/codegen/amd64-codegen/amd64-mlton-basic.fun	2008-09-01 13:19:31 UTC (rev 6824)
+++ mlton/trunk/mlton/codegen/amd64-codegen/amd64-mlton-basic.fun	2008-09-01 13:19:35 UTC (rev 6825)
@@ -1,4 +1,4 @@
-(* Copyright (C) 1999-2007 Henry Cejtin, Matthew Fluet, Suresh
+(* Copyright (C) 1999-2008 Henry Cejtin, Matthew Fluet, Suresh
  *    Jagannathan, and Stephen Weeks.
  * Copyright (C) 1997-2000 NEC Research Institute.
  *
@@ -278,12 +278,15 @@
                                                  then "_LINE__"
                                               else "__LINE__"))
 
+  (* When debugging, the assembly file is not passed through cpp,
+   * so use an dummy value (zero).
+   *)
   val fileLine
     = fn () => if !Control.debug
-                 then (Operand.immediate
+                 then Operand.immediate (Immediate.zero)
+                 else (Operand.immediate
                        (Immediate.labelPlusInt
                         (fileLineLabel (), 9)))
-                 else Operand.immediate (Immediate.zero)
 
   val gcState_label = Label.fromString "gcState"
 

Modified: mlton/trunk/mlton/codegen/x86-codegen/x86-mlton-basic.fun
===================================================================
--- mlton/trunk/mlton/codegen/x86-codegen/x86-mlton-basic.fun	2008-09-01 13:19:31 UTC (rev 6824)
+++ mlton/trunk/mlton/codegen/x86-codegen/x86-mlton-basic.fun	2008-09-01 13:19:35 UTC (rev 6825)
@@ -1,4 +1,4 @@
-(* Copyright (C) 1999-2007 Henry Cejtin, Matthew Fluet, Suresh
+(* Copyright (C) 1999-2008 Henry Cejtin, Matthew Fluet, Suresh
  *    Jagannathan, and Stephen Weeks.
  * Copyright (C) 1997-2000 NEC Research Institute.
  *
@@ -341,10 +341,13 @@
                                                  then "_LINE__+9"
                                               else "__LINE__+9"))
 
+  (* When debugging, the assembly file is not passed through cpp,
+   * so use an dummy value (zero).
+   *)
   val fileLine
     = fn () => if !Control.debug
-                 then Operand.label (fileLineLabel ())
-                 else Operand.immediate (Immediate.zero)
+                 then Operand.immediate (Immediate.zero)
+                 else Operand.label (fileLineLabel ())
 
   val gcState_label = Label.fromString "gcState"
 




More information about the MLton-commit mailing list