[project @ 2000-01-20 13:58:13 by sewardj]
authorsewardj <unknown>
Thu, 20 Jan 2000 13:58:13 +0000 (13:58 +0000)
committersewardj <unknown>
Thu, 20 Jan 2000 13:58:13 +0000 (13:58 +0000)
trivialCode (x86), when fst arg is immediate, assumed you could reverse
the order of operands, but not true for eg subtract.  Fixed.

ghc/compiler/nativeGen/MachCode.lhs

index 0af2745..86d3c31 100644 (file)
@@ -2792,8 +2792,8 @@ trivialCode instr x y
                          src1  = registerName register1 dst
                      in code1 .
                         if isFixed register1 && src1 /= dst
-                        then mkSeqInstrs [MOV L (OpReg src1) (OpReg dst),
-                                          instr (OpImm imm__2) (OpReg dst)]
+                        then mkSeqInstrs [MOV L (OpImm imm__2) (OpReg dst),
+                                          instr (OpReg src1) (OpReg dst)]
                         else
                                mkSeqInstr (instr (OpImm imm__2) (OpReg src1))
     in