File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -497,6 +497,16 @@ step(Code cs cfg vs (e:es)) = (`runReaderT` cfg) $ do
497497 Right () -> k vs' es
498498 Left exn -> k vs' (Trapping (memoryErrorString exn) @@ at : es)
499499
500+ (MemoryCopy , I32 0 : I32 src : I32 dst : vs') -> {-# SCC step_MemoryCopy #-} do
501+ inst <- getFrameInst
502+ mem <- lift $ memory inst (0 @@ at)
503+ let addrs = fromIntegral . i64_extend_u_i32 . fromIntegral <$> [dst, src]
504+ eres <- lift $ lift $ runExceptT $
505+ mapM_ (\ addr -> Memory. loadPacked Pack8 ZX mem addr 0 I32Type ) addrs
506+ case eres of
507+ Right _ -> k vs' es
508+ Left exn -> k vs' (Trapping (memoryErrorString exn) @@ at : es)
509+
500510 (MemoryCopy , I32 cnt : I32 src : I32 dst : vs') -> {-# SCC step_MemoryCopy #-} do
501511 inst <- getFrameInst
502512 mem <- lift $ memory inst (0 @@ at)
You can’t perform that action at this time.
0 commit comments