about summary refs log tree commit diff
diff options
context:
space:
mode:
authorGraydon Hoare <graydon@mozilla.com>2010-08-10 16:49:36 -0700
committerGraydon Hoare <graydon@mozilla.com>2010-08-10 16:49:36 -0700
commit60e5ad384e6b748a780148e9232b9bb44cd08cec (patch)
treeaf77eea66fd109028bb8682c656e161fbc2f58f8
parent5d2e94838ecd0043cc8dfbe2f19d16d9703c2890 (diff)
Put out burning tinderbox on OSX.
-rw-r--r--src/Makefile1
-rw-r--r--src/boot/be/x86.ml27
2 files changed, 20 insertions, 8 deletions
diff --git a/src/Makefile b/src/Makefile
index 781c66b3884..63cc67d0a27 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -398,6 +398,7 @@ TEST_XFAILS_X86 :=  $(TASK_XFAILS) \
                     test/run-pass/generic-recursive-tag.rs \
                     test/run-pass/int-lib.rs \
                     test/run-pass/iter-ret.rs \
+                    test/run-pass/lib-deque.rs \
                     test/run-pass/lib-map.rs \
                     test/run-pass/mlist-cycle.rs \
                     test/run-pass/obj-as.rs \
diff --git a/src/boot/be/x86.ml b/src/boot/be/x86.ml
index 71f9cdcf084..f879027bac6 100644
--- a/src/boot/be/x86.ml
+++ b/src/boot/be/x86.ml
@@ -311,14 +311,25 @@ let emit_target_specific
                     Il.Mem (Il.next_spill_slot e
                               (Il.ScalarTy (Il.operand_scalar_ty op)))
                   in
-                  let lhs_spill = next_spill_like lhs in
-                  let rhs_spill = next_spill_like rhs in
-
-                    mov lhs_spill lhs;
-                    mov rhs_spill rhs;
-
-                    mov lhs_eax (Il.Cell lhs_spill);
-                    mov rhs_ecx (Il.Cell rhs_spill);
+                  let is_eax cell =
+                    match cell with
+                        Il.Cell (Il.Reg (Il.Hreg hr, _)) -> hr = eax
+                      | _ -> false
+                  in                    
+                    if is_eax lhs
+                    then
+                      mov rhs_ecx rhs
+                    else
+                      begin
+                        let lhs_spill = next_spill_like lhs in
+                        let rhs_spill = next_spill_like rhs in
+
+                          mov lhs_spill lhs;
+                          mov rhs_spill rhs;
+
+                          mov lhs_eax (Il.Cell lhs_spill);
+                          mov rhs_ecx (Il.Cell rhs_spill);
+                      end;
 
                     put (Il.Binary
                            { b with