Ryujinx/src/ARMeilleure/CodeGen/RegisterAllocators/StackAllocator.cs
2023-04-27 23:51:14 +02:00

25 lines
No EOL
491 B
C#

using ARMeilleure.IntermediateRepresentation;
namespace ARMeilleure.CodeGen.RegisterAllocators
{
class StackAllocator
{
private int _offset;
public int TotalSize => _offset;
public int Allocate(OperandType type)
{
return Allocate(type.GetSizeInBytes());
}
public int Allocate(int sizeInBytes)
{
int offset = _offset;
_offset += sizeInBytes;
return offset;
}
}
}