--- /dev/null
+# Trap Word Immediate
+
+twi TO,RA,SI
+
+ a <- EXTS((RA)[32:63])
+ if (a < EXTS(SI)) & TO[0] then TRAP
+ if (a > EXTS(SI)) & TO[1] then TRAP
+ if (a = EXTS(SI)) & TO[2] then TRAP
+ if (a <u EXTS(SI)) & TO 3 then TRAP
+ if (a >u EXTS(SI)) & TO 4 then TRAP
+
+# Trap Word
+
+tw TO,RA,RB
+
+ a <- EXTS((RA)[32:63])
+ b <- EXTS((RB)[32:63])
+ if (a < b) & TO[0] then TRAP
+ if (a > b) & TO[1] then TRAP
+ if (a = b) & TO[2] then TRAP
+ if (a <u b) & TO[3] then TRAP
+ if (a >u b) & TO[4] then TRAP
+
+# Trap Doubleword Immediate
+
+tdi TO,RA,SI
+
+ a <- (RA)
+ b <- EXTS(SI)
+ if (a < b) & TO[0] then TRAP
+ if (a > b) & TO[1] then TRAP
+ if (a = b) & TO[2] then TRAP
+ if (a <u b) & TO[3] then TRAP
+ if (a >u b) & TO[4] then TRAP
+
+# Trap Doubleword
+
+td TO,RA,RB
+
+ a <- (RA)
+ b <- (RB)
+ if (a < b) & TO[0] then TRAP
+ if (a > b) & TO[1] then TRAP
+ if (a = b) & TO[2] then TRAP
+ if (a <u b) & TO[3] then TRAP
+ if (a >u b) & TO[4] then TRAP
+
+# Integer Select
+
+isel RT,RA,RB,BC
+
+ if RA=0 then a <-0 else a <- (RA)
+ if CR[BC+32]=1 then RT <- a
+ else RT <- (RB)
+