on master help sign in
Implement bitcasts in LLVM codegen
commit7de42c888f546cab8d4ca2748c98b938ef4b86cb authorBenjamin Saunders <besaunde@sfu.ca> dateSun 14 Jul 2013, 15:43 (13 years ago) parentaa42f71
1 file changed+5
src/IRTS/CodegenLLVM.hs+5
src/IRTS/CodegenLLVM.hs+5
@@ -921,6 +921,11 @@ cgOp (LUpdateVec ety c) [v,i,e] = do
921921 nv' <- inst $ InsertElement nv ne ni []
922922 box fty nv'
923923
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+
924929cgOp LStrEq [x,y] = do
925930 x' <- unbox FString x
926931 y' <- unbox FString y