aboutsummaryrefslogtreecommitdiff
path: root/ARMeilleure/Memory/IMemoryManager.cs
blob: bcee5db230df423f989c45f5126b64a2d993475b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
using ARMeilleure.State;
using System;

namespace ARMeilleure.Memory
{
    public interface IMemoryManager : IMemory, IDisposable
    {
        void Map(long va, long pa, long size);

        void Unmap(long position, long size);

        bool IsMapped(long position);

        long GetPhysicalAddress(long virtualAddress);

        bool IsRegionModified(long position, long size);

        bool TryGetHostAddress(long position, long size, out IntPtr ptr);

        bool IsValidPosition(long position);

        bool AtomicCompareExchangeInt32(long position, int expected, int desired);

        int AtomicIncrementInt32(long position);

        int AtomicDecrementInt32(long position);

        byte[] ReadBytes(long position, long size);

        void ReadBytes(long position, byte[] data, int startIndex, int size);

        void WriteVector128(long position, V128 value);

        void WriteBytes(long position, byte[] data);

        void WriteBytes(long position, byte[] data, int startIndex, int size);

        void CopyBytes(long src, long dst, long size);
    }
}