Skip to content

Commit 025cd9f

Browse files
author
bryant
committed
add selectcc, brcc, and br
1 parent 96063bb commit 025cd9f

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

scripts/SDNode.hs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,22 @@ data SDNode (l :: LeafKind) (a :: SDKind) where
2626
SDBuildPair :: SDGT b a => SDNode k a -> SDNode l a -> SDNode N b
2727
SDLoadOp :: SDIsInt a => SDNode l SDPtr -> SDNode N a
2828
SDStoreOp :: SDIsInt a => SDNode k SDPtr -> SDNode l a -> SDNode N SDUnit
29+
SDSelectCC :: SDNode h a -> SDNode j a -> SDNode k b -> SDNode l b
30+
-> CondCode -> SDNode N b
31+
SDBrCC :: CondCode -> SDNode j a -> SDNode k a -> SDNode l BasicBlock
32+
-> SDNode N SDUnit
33+
SDBr :: SDNode l BasicBlock -> SDNode N SDUnit
2934
SDPatLeaf :: TypeShow a => String -> Int -> SDNode L a
3035

3136
-- Operand kind
3237
data SDKind = SDI Nat | Imm Nat | SDPtr | SDUnit | BasicBlock
3338

39+
data CondCode
40+
= SETOEQ | SETOGT | SETOGE | SETOLT | SETOLE | SETONE | SETO
41+
| SETUO | SETUEQ | SETUGT | SETUGE | SETULT | SETULE | SETUNE
42+
| SETEQ | SETGT | SETGE | SETLT | SETLE | SETNE
43+
deriving (Show, Eq)
44+
3445
type I32 = SDI 32
3546
type I16 = SDI 16
3647
type I8 = SDI 8

0 commit comments

Comments
 (0)