aboutsummaryrefslogtreecommitdiff
path: root/ARMeilleure/CodeGen/X86
diff options
context:
space:
mode:
Diffstat (limited to 'ARMeilleure/CodeGen/X86')
-rw-r--r--ARMeilleure/CodeGen/X86/Assembler.cs3
-rw-r--r--ARMeilleure/CodeGen/X86/CodeGenContext.cs3
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;