[Git][ghc/ghc][wip/T14586] Add ARM Cond codes.

dmjio gitlab at gitlab.haskell.org
Thu Jun 25 06:53:21 UTC 2020



dmjio pushed to branch wip/T14586 at Glasgow Haskell Compiler / GHC


Commits:
62d1b017 by David Johnson at 2020-06-25T02:53:07-04:00
Add ARM Cond codes.

- - - - -


1 changed file:

- compiler/GHC/CmmToAsm/ARM/Cond.hs


Changes:

=====================================
compiler/GHC/CmmToAsm/ARM/Cond.hs
=====================================
@@ -1,42 +1,34 @@
 module GHC.CmmToAsm.ARM.Cond
   ( Cond (..)
-  , condNegate
   , condUnsigned
   ) where
 
 import GHC.Prelude
-import GHC.Utils.Panic
 
+-- | ARM Cond codes
 data Cond
-  = ALWAYS
-  | EQQ
+  = AL
+  | CC
+  -- ^ Also LO, unsigned lower
+  | CS
+  -- ^ Also HS, unsigned higher
+  | EQ
   | GE
-  | GEU
-  | GTT
-  | GU
+  | GT
+  | HI
   | LE
-  | LEU
-  | LTT
-  | LU
+  | LS
+  | LT
+  | MI
   | NE
+  | PL
+  | VC
+  | VS
   deriving Eq
 
-condNegate :: Cond -> Cond
-condNegate ALWAYS  = panic "condNegate: ALWAYS"
-condNegate EQQ     = NE
-condNegate GE      = LTT
-condNegate GEU     = LU
-condNegate GTT     = LE
-condNegate GU      = LEU
-condNegate LE      = GTT
-condNegate LEU     = GU
-condNegate LTT     = GE
-condNegate LU      = GEU
-condNegate NE      = EQQ
-
 condUnsigned :: Cond -> Bool
-condUnsigned GU  = True
-condUnsigned LU  = True
-condUnsigned GEU = True
-condUnsigned LEU = True
+condUnsigned CC  = True
+condUnsigned CS  = True
+condUnsigned HI  = True
+condUnsigned LS  = True
 condUnsigned _   = False



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/62d1b0170101c134381705a693380123070f8ad2

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/62d1b0170101c134381705a693380123070f8ad2
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20200625/ba1335a0/attachment-0001.html>


More information about the ghc-commits mailing list