on master help sign in
Implement bitcasts in LLVM codegen
7de42c8Benjamin Saunders
src/IRTS/CodegenLLVM.hs+5
@@ -921,6 +921,11 @@ cgOp (LUpdateVec ety c) [v,i,e] = do
921 nv' <- inst $ InsertElement nv ne ni []
921 nv' <- inst $ InsertElement nv ne ni []
922 box fty nv'
922 box fty nv'
923
923
924+cgOp (LBitCast from to) [x] = do
925+ nx <- unbox (FArith from) x
926+ nx' <- inst $ BitCast nx (ftyToTy (FArith to)) []
927+ box (FArith to) nx'
928+
924cgOp LStrEq [x,y] = do
929cgOp LStrEq [x,y] = do
925 x' <- unbox FString x
930 x' <- unbox FString x
926 y' <- unbox FString y
931 y' <- unbox FString y