From eee639d6ba544fa5dd9352426d55e91bc54e157d Mon Sep 17 00:00:00 2001 From: LDj3SNuD <35856442+LDj3SNuD@users.noreply.github.com> Date: Thu, 31 Oct 2019 19:09:03 +0100 Subject: .NET Core 3.0 is here! (#784) * .NET Core 3.0 is here! * Remove IMemoryManager.cs and its references. * Add T Math/F.FusedMultiplyAdd(T, T, T). Nits. * Nit. * Update appveyor.yml * Revert "Resolve Visual Studio build issues" This reverts commit 1772128ce0fc058e6280001aace3a77a7a96897b. * Update SvcTable.cs --- ARMeilleure/Memory/IMemoryManager.cs | 40 ------------------------------------ ARMeilleure/Memory/MemoryHelper.cs | 8 ++++---- ARMeilleure/Memory/MemoryManager.cs | 2 +- 3 files changed, 5 insertions(+), 45 deletions(-) delete mode 100644 ARMeilleure/Memory/IMemoryManager.cs (limited to 'ARMeilleure/Memory') diff --git a/ARMeilleure/Memory/IMemoryManager.cs b/ARMeilleure/Memory/IMemoryManager.cs deleted file mode 100644 index bcee5db2..00000000 --- a/ARMeilleure/Memory/IMemoryManager.cs +++ /dev/null @@ -1,40 +0,0 @@ -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); - } -} \ No newline at end of file diff --git a/ARMeilleure/Memory/MemoryHelper.cs b/ARMeilleure/Memory/MemoryHelper.cs index 71ddac23..8e310d4d 100644 --- a/ARMeilleure/Memory/MemoryHelper.cs +++ b/ARMeilleure/Memory/MemoryHelper.cs @@ -7,7 +7,7 @@ namespace ARMeilleure.Memory { public static class MemoryHelper { - public static void FillWithZeros(IMemoryManager memory, long position, int size) + public static void FillWithZeros(MemoryManager memory, long position, int size) { int size8 = size & ~(8 - 1); @@ -22,7 +22,7 @@ namespace ARMeilleure.Memory } } - public unsafe static T Read(IMemoryManager memory, long position) where T : struct + public unsafe static T Read(MemoryManager memory, long position) where T : struct { long size = Marshal.SizeOf(); @@ -34,7 +34,7 @@ namespace ARMeilleure.Memory } } - public unsafe static void Write(IMemoryManager memory, long position, T value) where T : struct + public unsafe static void Write(MemoryManager memory, long position, T value) where T : struct { long size = Marshal.SizeOf(); @@ -48,7 +48,7 @@ namespace ARMeilleure.Memory memory.WriteBytes(position, data); } - public static string ReadAsciiString(IMemoryManager memory, long position, long maxSize = -1) + public static string ReadAsciiString(MemoryManager memory, long position, long maxSize = -1) { using (MemoryStream ms = new MemoryStream()) { diff --git a/ARMeilleure/Memory/MemoryManager.cs b/ARMeilleure/Memory/MemoryManager.cs index 12c11843..c6224988 100644 --- a/ARMeilleure/Memory/MemoryManager.cs +++ b/ARMeilleure/Memory/MemoryManager.cs @@ -7,7 +7,7 @@ using static ARMeilleure.Memory.MemoryManagement; namespace ARMeilleure.Memory { - public unsafe class MemoryManager : IMemoryManager + public unsafe class MemoryManager { public const int PageBits = 12; public const int PageSize = 1 << PageBits; -- cgit v1.2.3