@@ -753,6 +753,14 @@ cgOp (LAnd ity) [x,y] = ibin ity x y And
753753cgOp (LOr ity) [x,y] = ibin ity x y Or
754754cgOp (LXOr ity) [x,y] = ibin ity x y Xor
755755
756+cgOp LStrEq [x,y] = do
757+ x' <- unbox FString x
758+ y' <- unbox FString y
759+ cmp <- inst $ simpleCall "strcmp" [x', y']
760+ flag <- inst $ ICmp IPred.EQ cmp (ConstantOperand (C.Int 32 0)) []
761+ val <- inst $ ZExt flag (IntegerType 32) []
762+ box (FInt IT32) val
763+
756764cgOp (LIntStr ITBig) [x] = do
757765 x' <- unbox (FInt ITBig) x
758766 ustr <- inst $ simpleCall "__gmpz_get_str"