From 2471be317ed6e8c9b19b0016d343572791a5b913 Mon Sep 17 00:00:00 2001 From: MerryMage Date: Tue, 23 Aug 2016 02:22:04 +0100 Subject: [PATCH] arm_types: Implement LocationDescription::FPSCR_RMode --- src/frontend/arm_types.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/frontend/arm_types.h b/src/frontend/arm_types.h index c963a85b..df85b699 100644 --- a/src/frontend/arm_types.h +++ b/src/frontend/arm_types.h @@ -64,6 +64,13 @@ enum class SignExtendRotation { ROR_24 ///< ROR #24 }; +enum class FPRoundingMode { + RoundToNearest, + RoundTowardsPositiveInfinity, + RoundTowardsNegativeInfinity, + RoundTowardsZero, +}; + /** * LocationDescriptor describes the location of a basic block. * The location is not solely based on the PC because other flags influence the way @@ -84,6 +91,7 @@ struct LocationDescriptor { bool FPSCR_DN() const { return Common::Bit<25>(fpscr); } u32 FPSCR_Len() const { return Common::Bits<16, 18>(fpscr) + 1; } u32 FPSCR_Stride() const { return Common::Bits<20, 21>(fpscr) + 1; } + FPRoundingMode FPSCR_RMode() const { return static_cast(Common::Bits<22, 23>(fpscr)); } bool operator == (const LocationDescriptor& o) const { return std::tie(arm_pc, tflag, eflag, fpscr) == std::tie(o.arm_pc, o.tflag, o.eflag, o.fpscr);