From 0069d3c907c4dce6cef048b0f327a00b0d9a7298 Mon Sep 17 00:00:00 2001 From: Kevin Quick Date: Sun, 11 Mar 2018 10:54:33 -0700 Subject: [PATCH] [arm] Add ExtractValue for Maybe of Thumb LowGPR operand. --- macaw-arm/src/Data/Macaw/ARM/Operand.hs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/macaw-arm/src/Data/Macaw/ARM/Operand.hs b/macaw-arm/src/Data/Macaw/ARM/Operand.hs index 9a852325..1417f9c1 100644 --- a/macaw-arm/src/Data/Macaw/ARM/Operand.hs +++ b/macaw-arm/src/Data/Macaw/ARM/Operand.hs @@ -108,3 +108,9 @@ instance ExtractValue ARM.ARM T32Operand.LowGPR (BVType 32) where instance ToRegister T32Operand.LowGPR Reg.ARMReg (BVType 32) where toRegister = Reg.ARM_GP . T32Operand.unLowGPR + +instance ExtractValue ARM.ARM (Maybe T32Operand.LowGPR) (BVType 32) where + extractValue mgpr = + case mgpr of + Just r -> extractValue r + Nothing -> return $ MC.BVValue NR.knownNat 0