diff options
Diffstat (limited to 'ARMeilleure/CodeGen/X86')
-rw-r--r-- | ARMeilleure/CodeGen/X86/Assembler.cs | 3 | ||||
-rw-r--r-- | ARMeilleure/CodeGen/X86/CodeGenContext.cs | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/ARMeilleure/CodeGen/X86/Assembler.cs b/ARMeilleure/CodeGen/X86/Assembler.cs index c15deadc..2ea4208b 100644 --- a/ARMeilleure/CodeGen/X86/Assembler.cs +++ b/ARMeilleure/CodeGen/X86/Assembler.cs @@ -1,5 +1,6 @@ using ARMeilleure.CodeGen.Linking; using ARMeilleure.IntermediateRepresentation; +using Ryujinx.Common.Memory; using System; using System.Collections.Generic; using System.Diagnostics; @@ -1285,7 +1286,7 @@ namespace ARMeilleure.CodeGen.X86 // Write the code, ignoring the dummy bytes after jumps, into a new stream. _stream.Seek(0, SeekOrigin.Begin); - using var codeStream = new MemoryStream(); + using var codeStream = MemoryStreamManager.Shared.GetStream(); var assembler = new Assembler(codeStream, HasRelocs); bool hasRelocs = HasRelocs; diff --git a/ARMeilleure/CodeGen/X86/CodeGenContext.cs b/ARMeilleure/CodeGen/X86/CodeGenContext.cs index eee71bd7..89948724 100644 --- a/ARMeilleure/CodeGen/X86/CodeGenContext.cs +++ b/ARMeilleure/CodeGen/X86/CodeGenContext.cs @@ -1,5 +1,6 @@ using ARMeilleure.CodeGen.RegisterAllocators; using ARMeilleure.IntermediateRepresentation; +using Ryujinx.Common.Memory; using System.IO; using System.Numerics; @@ -22,7 +23,7 @@ namespace ARMeilleure.CodeGen.X86 public CodeGenContext(AllocationResult allocResult, int maxCallArgs, int blocksCount, bool relocatable) { - _stream = new MemoryStream(); + _stream = MemoryStreamManager.Shared.GetStream(); _blockLabels = new Operand[blocksCount]; AllocResult = allocResult; |