summaryrefslogtreecommitdiff
path: root/compiler/GHC/CmmToAsm/Format.hs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/GHC/CmmToAsm/Format.hs')
-rw-r--r--compiler/GHC/CmmToAsm/Format.hs4
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler/GHC/CmmToAsm/Format.hs b/compiler/GHC/CmmToAsm/Format.hs
index 207de095ae..390ef29bd2 100644
--- a/compiler/GHC/CmmToAsm/Format.hs
+++ b/compiler/GHC/CmmToAsm/Format.hs
@@ -12,6 +12,7 @@ module GHC.CmmToAsm.Format (
Format(..),
intFormat,
floatFormat,
+ isIntFormat,
isFloatFormat,
cmmTypeFormat,
formatToWidth,
@@ -73,6 +74,9 @@ floatFormat width
other -> pprPanic "Format.floatFormat" (ppr other)
+-- | Check if a format represent an integer value.
+isIntFormat :: Format -> Bool
+isIntFormat = not . isFloatFormat
-- | Check if a format represents a floating point value.
isFloatFormat :: Format -> Bool