From: sewardj Date: Thu, 20 Jan 2000 13:58:13 +0000 (+0000) Subject: [project @ 2000-01-20 13:58:13 by sewardj] X-Git-Tag: Approximately_9120_patches~5246 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=fa68e248945b9a3b81098f99ae30a12188c0a4b8;p=ghc-hetmet.git [project @ 2000-01-20 13:58:13 by sewardj] trivialCode (x86), when fst arg is immediate, assumed you could reverse the order of operands, but not true for eg subtract. Fixed. --- diff --git a/ghc/compiler/nativeGen/MachCode.lhs b/ghc/compiler/nativeGen/MachCode.lhs index 0af2745..86d3c31 100644 --- a/ghc/compiler/nativeGen/MachCode.lhs +++ b/ghc/compiler/nativeGen/MachCode.lhs @@ -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