[commit: ghc] master: Fix generic 2-word-multiply (16d8cdd)

Ian Lynagh igloo at earth.li
Fri Feb 24 03:46:34 CET 2012


Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/16d8cddd359ea39355418528604ceac5493aaa52

>---------------------------------------------------------------

commit 16d8cddd359ea39355418528604ceac5493aaa52
Author: Ian Lynagh <igloo at earth.li>
Date:   Fri Feb 24 01:49:41 2012 +0000

    Fix generic 2-word-multiply

>---------------------------------------------------------------

 compiler/codeGen/CgPrimOp.hs |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/compiler/codeGen/CgPrimOp.hs b/compiler/codeGen/CgPrimOp.hs
index c23608d..2fad514 100644
--- a/compiler/codeGen/CgPrimOp.hs
+++ b/compiler/codeGen/CgPrimOp.hs
@@ -530,9 +530,9 @@ emitPrimOp [res_h, res_l] WordMul2Op [arg_x, arg_y] _
                       (toTopHalf (CmmReg r))),
               CmmAssign (CmmLocal res_h)
                   (sum [mul (topHalf arg_x) (topHalf arg_y),
-                        bottomHalf (CmmReg xhyl),
-                        bottomHalf (CmmReg xlyh),
-                        topHalf    (CmmReg r)])]
+                        topHalf (CmmReg xhyl),
+                        topHalf (CmmReg xlyh),
+                        topHalf (CmmReg r)])]
                where topHalf x = CmmMachOp (MO_U_Shr wordWidth) [x, hww]
                      toTopHalf x = CmmMachOp (MO_Shl wordWidth) [x, hww]
                      bottomHalf x = CmmMachOp (MO_And wordWidth) [x, hwm]





More information about the Cvs-ghc mailing list