diff options
author | Simon Marlow <marlowsd@gmail.com> | 2008-07-30 10:52:31 +0000 |
---|---|---|
committer | Simon Marlow <marlowsd@gmail.com> | 2008-07-30 10:52:31 +0000 |
commit | 5ef63d1912a0363de083beff248574c026998ae7 (patch) | |
tree | cfa263a2f9d7c68a36cb787b8bce2d4e9f15453f | |
parent | 0f881aa7613f235192a89f90112ac3b47e44bb39 (diff) | |
download | haskell-5ef63d1912a0363de083beff248574c026998ae7.tar.gz |
FIX #2388: check that the operand fits before using the 'test' opcode
-rw-r--r-- | compiler/nativeGen/MachCodeGen.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/nativeGen/MachCodeGen.hs b/compiler/nativeGen/MachCodeGen.hs index b2f3dffeb3..9901e6220d 100644 --- a/compiler/nativeGen/MachCodeGen.hs +++ b/compiler/nativeGen/MachCodeGen.hs @@ -2229,7 +2229,7 @@ condIntCode cond (CmmLoad x pk) (CmmLit lit) | is32BitLit lit = do -- anything vs zero, using a mask -- TODO: Add some sanity checking!!!! condIntCode cond (CmmMachOp (MO_And rep) [x,o2]) (CmmLit (CmmInt 0 pk)) - | (CmmLit (CmmInt mask pk2)) <- o2 + | (CmmLit lit@(CmmInt mask pk2)) <- o2, is32BitLit lit = do (x_reg, x_code) <- getSomeReg x let |