From 5ef63d1912a0363de083beff248574c026998ae7 Mon Sep 17 00:00:00 2001 From: Simon Marlow Date: Wed, 30 Jul 2008 10:52:31 +0000 Subject: [PATCH] FIX #2388: check that the operand fits before using the 'test' opcode --- compiler/nativeGen/MachCodeGen.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/nativeGen/MachCodeGen.hs b/compiler/nativeGen/MachCodeGen.hs index b2f3dff..9901e62 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 -- 1.7.10.4