From a9d49a96ed6a0436b9273d64df912b73a698a0f6 Mon Sep 17 00:00:00 2001 From: Daniel Wagner Date: Fri, 8 Jun 2018 11:45:59 -0400 Subject: [PATCH] don't turn sext into uext --- base/src/Data/Macaw/CFG/Rewriter.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base/src/Data/Macaw/CFG/Rewriter.hs b/base/src/Data/Macaw/CFG/Rewriter.hs index 3492644c..8b676a10 100644 --- a/base/src/Data/Macaw/CFG/Rewriter.hs +++ b/base/src/Data/Macaw/CFG/Rewriter.hs @@ -173,7 +173,7 @@ rewriteApp app = do Trunc (valueAsApp -> Just (SExt v _)) w -> case compareNat w (typeWidth v) of NatLT _ -> rewriteApp $ Trunc v w NatEQ -> pure v - NatGT _ -> rewriteApp $ UExt v w + NatGT _ -> rewriteApp $ SExt v w SExt (BVValue u x) w -> do pure $ BVValue w $ toUnsigned w $ toSigned u x