[arm] Add ExtractValue for Maybe of Thumb LowGPR operand.

This commit is contained in:
Kevin Quick 2018-03-11 10:54:33 -07:00
parent 7d12033f0c
commit 0069d3c907
No known key found for this signature in database
GPG Key ID: E6D7733599CC0A21

View File

@ -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